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AAW,SAAU/sB,UACZiH,KAAKlK,KAAKiD,EACnB,GAyBFxH,EAAQkH,UAAYA,EACpBlH,EAAQ0R,MAAQA,EAChB1R,EAAQ6wB,MAAQA,EAChB7wB,EAAQoxB,SAAWA,EACnBpxB,EAAQwG,OAASA,EACjBxG,EAAQsxB,SAAWA,EACnBtxB,EAAQwxB,aAAeA,EACvBxxB,EAAQuG,WAAaA,EACrBvG,EAAQ+P,QAAUA,EAClB/P,EAAQ4R,SAAWA,EACnB5R,EAAQ+xB,MAAQA,EAChB/xB,EAAQgyB,YAAcA,EACtBhyB,EAAQiyB,KAAOA,EACfjyB,EAAQqX,IAAMA,EACdrX,EAAQswB,OAASA,EACjBtwB,EAAQkwB,OAASA,EACjBlwB,EAAQoyB,KAAOA,EACfpyB,EAAQqyB,KAAOA,EACfryB,EAAQ0yB,MAAQA,EAChB1yB,EAAQkxB,QAAUA,EAClBlxB,EAAQ2yB,WAAaA,EACrB3yB,EAAQ4yB,SAAWA,EACnB5yB,EAAQ+wB,SAAWA,EACnB/wB,EAAQmxB,gBAAkBA,EAC1BnxB,EAAQ6yB,aAAeA,EACvB7yB,EAAQ4wB,MAAQA,EAChB5wB,EAAQgzB,MAAQA,EAChBhzB,EAAQizB,SAAWA,EACnBjzB,EAAQyG,UAAYA,EACpBzG,EAAQ0G,UAAYA,EACpB1G,EAAQoP,MAAQA,EAChBpP,EAAQuzB,kBAAoBA,EAC5BvzB,EAAQwzB,OAASA,EACjBxzB,EAAQ2G,KAAOA,EACf3G,EAAQ6zB,eAAiBA,EACzB7zB,EAAQywB,YAAcA,EACtBzwB,EAAQm0B,cAAgBA,EACxBn0B,EAAQo0B,YAAcA,EACtBp0B,EAAQs0B,KAAOA,C","sources":["webpack://i4proportal/./node_modules/zrender/lib/config.js","webpack://i4proportal/./node_modules/zrender/lib/contain/arc.js","webpack://i4proportal/./node_modules/zrender/lib/contain/cubic.js","webpack://i4proportal/./node_modules/zrender/lib/contain/line.js","webpack://i4proportal/./node_modules/zrender/lib/contain/path.js","webpack://i4proportal/./node_modules/zrender/lib/contain/polygon.js","webpack://i4proportal/./node_modules/zrender/lib/contain/quadratic.js","webpack://i4proportal/./node_modules/zrender/lib/contain/text.js","webpack://i4proportal/./node_modules/zrender/lib/contain/util.js","webpack://i4proportal/./node_modules/zrender/lib/contain/windingLine.js","webpack://i4proportal/./node_modules/zrender/lib/container/Group.js","webpack://i4proportal/./node_modules/zrender/lib/core/BoundingRect.js","webpack://i4proportal/./node_modules/zrender/lib/core/GestureMgr.js","webpack://i4proportal/./node_modules/zrender/lib/core/LRU.js","webpack://i4proportal/./node_modules/zrender/lib/core/PathProxy.js","webpack://i4proportal/./node_modules/zrender/lib/core/arrayDiff2.js","webpack://i4proportal/./node_modules/zrender/lib/core/bbox.js","webpack://i4proportal/./node_modules/zrender/lib/core/curve.js","webpack://i4proportal/./node_modules/zrender/lib/core/dom.js","webpack://i4proportal/./node_modules/zrender/lib/core/env.js","webpack://i4proportal/./node_modules/zrender/lib/core/event.js","webpack://i4proportal/./node_modules/zrender/lib/core/fourPointsTransform.js","webpack://i4proportal/./node_modules/zrender/lib/core/guid.js","webpack://i4proportal/./node_modules/zrender/lib/core/log.js","webpack://i4proportal/./node_modules/zrender/lib/core/matrix.js","webpack://i4proportal/./node_modules/zrender/lib/core/timsort.js","webpack://i4proportal/./node_modules/zrender/lib/core/util.js"],"sourcesContent":["var dpr = 1; // If in browser environment\n\nif (typeof window !== 'undefined') {\n dpr = Math.max(window.devicePixelRatio || 1, 1);\n}\n/**\n * config默认配置项\n * @exports zrender/config\n * @author Kener (@Kener-林峰, kener.linfeng@gmail.com)\n */\n\n/**\n * Debug log mode:\n * 0: Do nothing, for release.\n * 1: console.error, for debug.\n */\n\n\nvar debugMode = 0; // retina 屏幕优化\n\nvar devicePixelRatio = dpr;\nexports.debugMode = debugMode;\nexports.devicePixelRatio = devicePixelRatio;","var _util = require(\"./util\");\n\nvar normalizeRadian = _util.normalizeRadian;\nvar PI2 = Math.PI * 2;\n/**\n * 圆弧描边包含判断\n * @param {number} cx\n * @param {number} cy\n * @param {number} r\n * @param {number} startAngle\n * @param {number} endAngle\n * @param {boolean} anticlockwise\n * @param {number} lineWidth\n * @param {number} x\n * @param {number} y\n * @return {Boolean}\n */\n\nfunction containStroke(cx, cy, r, startAngle, endAngle, anticlockwise, lineWidth, x, y) {\n if (lineWidth === 0) {\n return false;\n }\n\n var _l = lineWidth;\n x -= cx;\n y -= cy;\n var d = Math.sqrt(x * x + y * y);\n\n if (d - _l > r || d + _l < r) {\n return false;\n }\n\n if (Math.abs(startAngle - endAngle) % PI2 < 1e-4) {\n // Is a circle\n return true;\n }\n\n if (anticlockwise) {\n var tmp = startAngle;\n startAngle = normalizeRadian(endAngle);\n endAngle = normalizeRadian(tmp);\n } else {\n startAngle = normalizeRadian(startAngle);\n endAngle = normalizeRadian(endAngle);\n }\n\n if (startAngle > endAngle) {\n endAngle += PI2;\n }\n\n var angle = Math.atan2(y, x);\n\n if (angle < 0) {\n angle += PI2;\n }\n\n return angle >= startAngle && angle <= endAngle || angle + PI2 >= startAngle && angle + PI2 <= endAngle;\n}\n\nexports.containStroke = containStroke;","var curve = require(\"../core/curve\");\n\n/**\n * 三次贝塞尔曲线描边包含判断\n * @param {number} x0\n * @param {number} y0\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @param {number} lineWidth\n * @param {number} x\n * @param {number} y\n * @return {boolean}\n */\nfunction containStroke(x0, y0, x1, y1, x2, y2, x3, y3, lineWidth, x, y) {\n if (lineWidth === 0) {\n return false;\n }\n\n var _l = lineWidth; // Quick reject\n\n if (y > y0 + _l && y > y1 + _l && y > y2 + _l && y > y3 + _l || y < y0 - _l && y < y1 - _l && y < y2 - _l && y < y3 - _l || x > x0 + _l && x > x1 + _l && x > x2 + _l && x > x3 + _l || x < x0 - _l && x < x1 - _l && x < x2 - _l && x < x3 - _l) {\n return false;\n }\n\n var d = curve.cubicProjectPoint(x0, y0, x1, y1, x2, y2, x3, y3, x, y, null);\n return d <= _l / 2;\n}\n\nexports.containStroke = containStroke;","/**\n * 线段包含判断\n * @param {number} x0\n * @param {number} y0\n * @param {number} x1\n * @param {number} y1\n * @param {number} lineWidth\n * @param {number} x\n * @param {number} y\n * @return {boolean}\n */\nfunction containStroke(x0, y0, x1, y1, lineWidth, x, y) {\n if (lineWidth === 0) {\n return false;\n }\n\n var _l = lineWidth;\n var _a = 0;\n var _b = x0; // Quick reject\n\n if (y > y0 + _l && y > y1 + _l || y < y0 - _l && y < y1 - _l || x > x0 + _l && x > x1 + _l || x < x0 - _l && x < x1 - _l) {\n return false;\n }\n\n if (x0 !== x1) {\n _a = (y0 - y1) / (x0 - x1);\n _b = (x0 * y1 - x1 * y0) / (x0 - x1);\n } else {\n return Math.abs(x - x0) <= _l / 2;\n }\n\n var tmp = _a * x - y + _b;\n\n var _s = tmp * tmp / (_a * _a + 1);\n\n return _s <= _l / 2 * _l / 2;\n}\n\nexports.containStroke = containStroke;","var PathProxy = require(\"../core/PathProxy\");\n\nvar line = require(\"./line\");\n\nvar cubic = require(\"./cubic\");\n\nvar quadratic = require(\"./quadratic\");\n\nvar arc = require(\"./arc\");\n\nvar _util = require(\"./util\");\n\nvar normalizeRadian = _util.normalizeRadian;\n\nvar curve = require(\"../core/curve\");\n\nvar windingLine = require(\"./windingLine\");\n\nvar CMD = PathProxy.CMD;\nvar PI2 = Math.PI * 2;\nvar EPSILON = 1e-4;\n\nfunction isAroundEqual(a, b) {\n return Math.abs(a - b) < EPSILON;\n} // 临时数组\n\n\nvar roots = [-1, -1, -1];\nvar extrema = [-1, -1];\n\nfunction swapExtrema() {\n var tmp = extrema[0];\n extrema[0] = extrema[1];\n extrema[1] = tmp;\n}\n\nfunction windingCubic(x0, y0, x1, y1, x2, y2, x3, y3, x, y) {\n // Quick reject\n if (y > y0 && y > y1 && y > y2 && y > y3 || y < y0 && y < y1 && y < y2 && y < y3) {\n return 0;\n }\n\n var nRoots = curve.cubicRootAt(y0, y1, y2, y3, y, roots);\n\n if (nRoots === 0) {\n return 0;\n } else {\n var w = 0;\n var nExtrema = -1;\n var y0_;\n var y1_;\n\n for (var i = 0; i < nRoots; i++) {\n var t = roots[i]; // Avoid winding error when intersection point is the connect point of two line of polygon\n\n var unit = t === 0 || t === 1 ? 0.5 : 1;\n var x_ = curve.cubicAt(x0, x1, x2, x3, t);\n\n if (x_ < x) {\n // Quick reject\n continue;\n }\n\n if (nExtrema < 0) {\n nExtrema = curve.cubicExtrema(y0, y1, y2, y3, extrema);\n\n if (extrema[1] < extrema[0] && nExtrema > 1) {\n swapExtrema();\n }\n\n y0_ = curve.cubicAt(y0, y1, y2, y3, extrema[0]);\n\n if (nExtrema > 1) {\n y1_ = curve.cubicAt(y0, y1, y2, y3, extrema[1]);\n }\n }\n\n if (nExtrema === 2) {\n // 分成三段单调函数\n if (t < extrema[0]) {\n w += y0_ < y0 ? unit : -unit;\n } else if (t < extrema[1]) {\n w += y1_ < y0_ ? unit : -unit;\n } else {\n w += y3 < y1_ ? unit : -unit;\n }\n } else {\n // 分成两段单调函数\n if (t < extrema[0]) {\n w += y0_ < y0 ? unit : -unit;\n } else {\n w += y3 < y0_ ? unit : -unit;\n }\n }\n }\n\n return w;\n }\n}\n\nfunction windingQuadratic(x0, y0, x1, y1, x2, y2, x, y) {\n // Quick reject\n if (y > y0 && y > y1 && y > y2 || y < y0 && y < y1 && y < y2) {\n return 0;\n }\n\n var nRoots = curve.quadraticRootAt(y0, y1, y2, y, roots);\n\n if (nRoots === 0) {\n return 0;\n } else {\n var t = curve.quadraticExtremum(y0, y1, y2);\n\n if (t >= 0 && t <= 1) {\n var w = 0;\n var y_ = curve.quadraticAt(y0, y1, y2, t);\n\n for (var i = 0; i < nRoots; i++) {\n // Remove one endpoint.\n var unit = roots[i] === 0 || roots[i] === 1 ? 0.5 : 1;\n var x_ = curve.quadraticAt(x0, x1, x2, roots[i]);\n\n if (x_ < x) {\n // Quick reject\n continue;\n }\n\n if (roots[i] < t) {\n w += y_ < y0 ? unit : -unit;\n } else {\n w += y2 < y_ ? unit : -unit;\n }\n }\n\n return w;\n } else {\n // Remove one endpoint.\n var unit = roots[0] === 0 || roots[0] === 1 ? 0.5 : 1;\n var x_ = curve.quadraticAt(x0, x1, x2, roots[0]);\n\n if (x_ < x) {\n // Quick reject\n return 0;\n }\n\n return y2 < y0 ? unit : -unit;\n }\n }\n} // TODO\n// Arc 旋转\n\n\nfunction windingArc(cx, cy, r, startAngle, endAngle, anticlockwise, x, y) {\n y -= cy;\n\n if (y > r || y < -r) {\n return 0;\n }\n\n var tmp = Math.sqrt(r * r - y * y);\n roots[0] = -tmp;\n roots[1] = tmp;\n var diff = Math.abs(startAngle - endAngle);\n\n if (diff < 1e-4) {\n return 0;\n }\n\n if (diff % PI2 < 1e-4) {\n // Is a circle\n startAngle = 0;\n endAngle = PI2;\n var dir = anticlockwise ? 1 : -1;\n\n if (x >= roots[0] + cx && x <= roots[1] + cx) {\n return dir;\n } else {\n return 0;\n }\n }\n\n if (anticlockwise) {\n var tmp = startAngle;\n startAngle = normalizeRadian(endAngle);\n endAngle = normalizeRadian(tmp);\n } else {\n startAngle = normalizeRadian(startAngle);\n endAngle = normalizeRadian(endAngle);\n }\n\n if (startAngle > endAngle) {\n endAngle += PI2;\n }\n\n var w = 0;\n\n for (var i = 0; i < 2; i++) {\n var x_ = roots[i];\n\n if (x_ + cx > x) {\n var angle = Math.atan2(y, x_);\n var dir = anticlockwise ? 1 : -1;\n\n if (angle < 0) {\n angle = PI2 + angle;\n }\n\n if (angle >= startAngle && angle <= endAngle || angle + PI2 >= startAngle && angle + PI2 <= endAngle) {\n if (angle > Math.PI / 2 && angle < Math.PI * 1.5) {\n dir = -dir;\n }\n\n w += dir;\n }\n }\n }\n\n return w;\n}\n\nfunction containPath(data, lineWidth, isStroke, x, y) {\n var w = 0;\n var xi = 0;\n var yi = 0;\n var x0 = 0;\n var y0 = 0;\n\n for (var i = 0; i < data.length;) {\n var cmd = data[i++]; // Begin a new subpath\n\n if (cmd === CMD.M && i > 1) {\n // Close previous subpath\n if (!isStroke) {\n w += windingLine(xi, yi, x0, y0, x, y);\n } // 如果被任何一个 subpath 包含\n // if (w !== 0) {\n // return true;\n // }\n\n }\n\n if (i === 1) {\n // 如果第一个命令是 L, C, Q\n // 则 previous point 同绘制命令的第一个 point\n //\n // 第一个命令为 Arc 的情况下会在后面特殊处理\n xi = data[i];\n yi = data[i + 1];\n x0 = xi;\n y0 = yi;\n }\n\n switch (cmd) {\n case CMD.M:\n // moveTo 命令重新创建一个新的 subpath, 并且更新新的起点\n // 在 closePath 的时候使用\n x0 = data[i++];\n y0 = data[i++];\n xi = x0;\n yi = y0;\n break;\n\n case CMD.L:\n if (isStroke) {\n if (line.containStroke(xi, yi, data[i], data[i + 1], lineWidth, x, y)) {\n return true;\n }\n } else {\n // NOTE 在第一个命令为 L, C, Q 的时候会计算出 NaN\n w += windingLine(xi, yi, data[i], data[i + 1], x, y) || 0;\n }\n\n xi = data[i++];\n yi = data[i++];\n break;\n\n case CMD.C:\n if (isStroke) {\n if (cubic.containStroke(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], lineWidth, x, y)) {\n return true;\n }\n } else {\n w += windingCubic(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], x, y) || 0;\n }\n\n xi = data[i++];\n yi = data[i++];\n break;\n\n case CMD.Q:\n if (isStroke) {\n if (quadratic.containStroke(xi, yi, data[i++], data[i++], data[i], data[i + 1], lineWidth, x, y)) {\n return true;\n }\n } else {\n w += windingQuadratic(xi, yi, data[i++], data[i++], data[i], data[i + 1], x, y) || 0;\n }\n\n xi = data[i++];\n yi = data[i++];\n break;\n\n case CMD.A:\n // TODO Arc 判断的开销比较大\n var cx = data[i++];\n var cy = data[i++];\n var rx = data[i++];\n var ry = data[i++];\n var theta = data[i++];\n var dTheta = data[i++]; // TODO Arc 旋转\n\n i += 1;\n var anticlockwise = 1 - data[i++];\n var x1 = Math.cos(theta) * rx + cx;\n var y1 = Math.sin(theta) * ry + cy; // 不是直接使用 arc 命令\n\n if (i > 1) {\n w += windingLine(xi, yi, x1, y1, x, y);\n } else {\n // 第一个命令起点还未定义\n x0 = x1;\n y0 = y1;\n } // zr 使用scale来模拟椭圆, 这里也对x做一定的缩放\n\n\n var _x = (x - cx) * ry / rx + cx;\n\n if (isStroke) {\n if (arc.containStroke(cx, cy, ry, theta, theta + dTheta, anticlockwise, lineWidth, _x, y)) {\n return true;\n }\n } else {\n w += windingArc(cx, cy, ry, theta, theta + dTheta, anticlockwise, _x, y);\n }\n\n xi = Math.cos(theta + dTheta) * rx + cx;\n yi = Math.sin(theta + dTheta) * ry + cy;\n break;\n\n case CMD.R:\n x0 = xi = data[i++];\n y0 = yi = data[i++];\n var width = data[i++];\n var height = data[i++];\n var x1 = x0 + width;\n var y1 = y0 + height;\n\n if (isStroke) {\n if (line.containStroke(x0, y0, x1, y0, lineWidth, x, y) || line.containStroke(x1, y0, x1, y1, lineWidth, x, y) || line.containStroke(x1, y1, x0, y1, lineWidth, x, y) || line.containStroke(x0, y1, x0, y0, lineWidth, x, y)) {\n return true;\n }\n } else {\n // FIXME Clockwise ?\n w += windingLine(x1, y0, x1, y1, x, y);\n w += windingLine(x0, y1, x0, y0, x, y);\n }\n\n break;\n\n case CMD.Z:\n if (isStroke) {\n if (line.containStroke(xi, yi, x0, y0, lineWidth, x, y)) {\n return true;\n }\n } else {\n // Close a subpath\n w += windingLine(xi, yi, x0, y0, x, y); // 如果被任何一个 subpath 包含\n // FIXME subpaths may overlap\n // if (w !== 0) {\n // return true;\n // }\n }\n\n xi = x0;\n yi = y0;\n break;\n }\n }\n\n if (!isStroke && !isAroundEqual(yi, y0)) {\n w += windingLine(xi, yi, x0, y0, x, y) || 0;\n }\n\n return w !== 0;\n}\n\nfunction contain(pathData, x, y) {\n return containPath(pathData, 0, false, x, y);\n}\n\nfunction containStroke(pathData, lineWidth, x, y) {\n return containPath(pathData, lineWidth, true, x, y);\n}\n\nexports.contain = contain;\nexports.containStroke = containStroke;","var windingLine = require(\"./windingLine\");\n\nvar EPSILON = 1e-8;\n\nfunction isAroundEqual(a, b) {\n return Math.abs(a - b) < EPSILON;\n}\n\nfunction contain(points, x, y) {\n var w = 0;\n var p = points[0];\n\n if (!p) {\n return false;\n }\n\n for (var i = 1; i < points.length; i++) {\n var p2 = points[i];\n w += windingLine(p[0], p[1], p2[0], p2[1], x, y);\n p = p2;\n } // Close polygon\n\n\n var p0 = points[0];\n\n if (!isAroundEqual(p[0], p0[0]) || !isAroundEqual(p[1], p0[1])) {\n w += windingLine(p[0], p[1], p0[0], p0[1], x, y);\n }\n\n return w !== 0;\n}\n\nexports.contain = contain;","var _curve = require(\"../core/curve\");\n\nvar quadraticProjectPoint = _curve.quadraticProjectPoint;\n\n/**\n * 二次贝塞尔曲线描边包含判断\n * @param {number} x0\n * @param {number} y0\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} lineWidth\n * @param {number} x\n * @param {number} y\n * @return {boolean}\n */\nfunction containStroke(x0, y0, x1, y1, x2, y2, lineWidth, x, y) {\n if (lineWidth === 0) {\n return false;\n }\n\n var _l = lineWidth; // Quick reject\n\n if (y > y0 + _l && y > y1 + _l && y > y2 + _l || y < y0 - _l && y < y1 - _l && y < y2 - _l || x > x0 + _l && x > x1 + _l && x > x2 + _l || x < x0 - _l && x < x1 - _l && x < x2 - _l) {\n return false;\n }\n\n var d = quadraticProjectPoint(x0, y0, x1, y1, x2, y2, x, y, null);\n return d <= _l / 2;\n}\n\nexports.containStroke = containStroke;","var BoundingRect = require(\"../core/BoundingRect\");\n\nvar imageHelper = require(\"../graphic/helper/image\");\n\nvar _util = require(\"../core/util\");\n\nvar getContext = _util.getContext;\nvar extend = _util.extend;\nvar retrieve2 = _util.retrieve2;\nvar retrieve3 = _util.retrieve3;\nvar trim = _util.trim;\nvar textWidthCache = {};\nvar textWidthCacheCounter = 0;\nvar TEXT_CACHE_MAX = 5000;\nvar STYLE_REG = /\\{([a-zA-Z0-9_]+)\\|([^}]*)\\}/g;\nvar DEFAULT_FONT = '12px sans-serif'; // Avoid assign to an exported variable, for transforming to cjs.\n\nvar methods = {};\n\nfunction $override(name, fn) {\n methods[name] = fn;\n}\n/**\n * @public\n * @param {string} text\n * @param {string} font\n * @return {number} width\n */\n\n\nfunction getWidth(text, font) {\n font = font || DEFAULT_FONT;\n var key = text + ':' + font;\n\n if (textWidthCache[key]) {\n return textWidthCache[key];\n }\n\n var textLines = (text + '').split('\\n');\n var width = 0;\n\n for (var i = 0, l = textLines.length; i < l; i++) {\n // textContain.measureText may be overrided in SVG or VML\n width = Math.max(measureText(textLines[i], font).width, width);\n }\n\n if (textWidthCacheCounter > TEXT_CACHE_MAX) {\n textWidthCacheCounter = 0;\n textWidthCache = {};\n }\n\n textWidthCacheCounter++;\n textWidthCache[key] = width;\n return width;\n}\n/**\n * @public\n * @param {string} text\n * @param {string} font\n * @param {string} [textAlign='left']\n * @param {string} [textVerticalAlign='top']\n * @param {Array.} [textPadding]\n * @param {Object} [rich]\n * @param {Object} [truncate]\n * @return {Object} {x, y, width, height, lineHeight}\n */\n\n\nfunction getBoundingRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, rich, truncate) {\n return rich ? getRichTextRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, rich, truncate) : getPlainTextRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, truncate);\n}\n\nfunction getPlainTextRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, truncate) {\n var contentBlock = parsePlainText(text, font, textPadding, textLineHeight, truncate);\n var outerWidth = getWidth(text, font);\n\n if (textPadding) {\n outerWidth += textPadding[1] + textPadding[3];\n }\n\n var outerHeight = contentBlock.outerHeight;\n var x = adjustTextX(0, outerWidth, textAlign);\n var y = adjustTextY(0, outerHeight, textVerticalAlign);\n var rect = new BoundingRect(x, y, outerWidth, outerHeight);\n rect.lineHeight = contentBlock.lineHeight;\n return rect;\n}\n\nfunction getRichTextRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, rich, truncate) {\n var contentBlock = parseRichText(text, {\n rich: rich,\n truncate: truncate,\n font: font,\n textAlign: textAlign,\n textPadding: textPadding,\n textLineHeight: textLineHeight\n });\n var outerWidth = contentBlock.outerWidth;\n var outerHeight = contentBlock.outerHeight;\n var x = adjustTextX(0, outerWidth, textAlign);\n var y = adjustTextY(0, outerHeight, textVerticalAlign);\n return new BoundingRect(x, y, outerWidth, outerHeight);\n}\n/**\n * @public\n * @param {number} x\n * @param {number} width\n * @param {string} [textAlign='left']\n * @return {number} Adjusted x.\n */\n\n\nfunction adjustTextX(x, width, textAlign) {\n // FIXME Right to left language\n if (textAlign === 'right') {\n x -= width;\n } else if (textAlign === 'center') {\n x -= width / 2;\n }\n\n return x;\n}\n/**\n * @public\n * @param {number} y\n * @param {number} height\n * @param {string} [textVerticalAlign='top']\n * @return {number} Adjusted y.\n */\n\n\nfunction adjustTextY(y, height, textVerticalAlign) {\n if (textVerticalAlign === 'middle') {\n y -= height / 2;\n } else if (textVerticalAlign === 'bottom') {\n y -= height;\n }\n\n return y;\n}\n/**\n * Follow same interface to `Displayable.prototype.calculateTextPosition`.\n * @public\n * @param {Obejct} [out] Prepared out object. If not input, auto created in the method.\n * @param {module:zrender/graphic/Style} style where `textPosition` and `textDistance` are visited.\n * @param {Object} rect {x, y, width, height} Rect of the host elment, according to which the text positioned.\n * @return {Object} The input `out`. Set: {x, y, textAlign, textVerticalAlign}\n */\n\n\nfunction calculateTextPosition(out, style, rect) {\n var textPosition = style.textPosition;\n var distance = style.textDistance;\n var x = rect.x;\n var y = rect.y;\n distance = distance || 0;\n var height = rect.height;\n var width = rect.width;\n var halfHeight = height / 2;\n var textAlign = 'left';\n var textVerticalAlign = 'top';\n\n switch (textPosition) {\n case 'left':\n x -= distance;\n y += halfHeight;\n textAlign = 'right';\n textVerticalAlign = 'middle';\n break;\n\n case 'right':\n x += distance + width;\n y += halfHeight;\n textVerticalAlign = 'middle';\n break;\n\n case 'top':\n x += width / 2;\n y -= distance;\n textAlign = 'center';\n textVerticalAlign = 'bottom';\n break;\n\n case 'bottom':\n x += width / 2;\n y += height + distance;\n textAlign = 'center';\n break;\n\n case 'inside':\n x += width / 2;\n y += halfHeight;\n textAlign = 'center';\n textVerticalAlign = 'middle';\n break;\n\n case 'insideLeft':\n x += distance;\n y += halfHeight;\n textVerticalAlign = 'middle';\n break;\n\n case 'insideRight':\n x += width - distance;\n y += halfHeight;\n textAlign = 'right';\n textVerticalAlign = 'middle';\n break;\n\n case 'insideTop':\n x += width / 2;\n y += distance;\n textAlign = 'center';\n break;\n\n case 'insideBottom':\n x += width / 2;\n y += height - distance;\n textAlign = 'center';\n textVerticalAlign = 'bottom';\n break;\n\n case 'insideTopLeft':\n x += distance;\n y += distance;\n break;\n\n case 'insideTopRight':\n x += width - distance;\n y += distance;\n textAlign = 'right';\n break;\n\n case 'insideBottomLeft':\n x += distance;\n y += height - distance;\n textVerticalAlign = 'bottom';\n break;\n\n case 'insideBottomRight':\n x += width - distance;\n y += height - distance;\n textAlign = 'right';\n textVerticalAlign = 'bottom';\n break;\n }\n\n out = out || {};\n out.x = x;\n out.y = y;\n out.textAlign = textAlign;\n out.textVerticalAlign = textVerticalAlign;\n return out;\n}\n/**\n * To be removed. But still do not remove in case that some one has imported it.\n * @deprecated\n * @public\n * @param {stirng} textPosition\n * @param {Object} rect {x, y, width, height}\n * @param {number} distance\n * @return {Object} {x, y, textAlign, textVerticalAlign}\n */\n\n\nfunction adjustTextPositionOnRect(textPosition, rect, distance) {\n var dummyStyle = {\n textPosition: textPosition,\n textDistance: distance\n };\n return calculateTextPosition({}, dummyStyle, rect);\n}\n/**\n * Show ellipsis if overflow.\n *\n * @public\n * @param {string} text\n * @param {string} containerWidth\n * @param {string} font\n * @param {number} [ellipsis='...']\n * @param {Object} [options]\n * @param {number} [options.maxIterations=3]\n * @param {number} [options.minChar=0] If truncate result are less\n * then minChar, ellipsis will not show, which is\n * better for user hint in some cases.\n * @param {number} [options.placeholder=''] When all truncated, use the placeholder.\n * @return {string}\n */\n\n\nfunction truncateText(text, containerWidth, font, ellipsis, options) {\n if (!containerWidth) {\n return '';\n }\n\n var textLines = (text + '').split('\\n');\n options = prepareTruncateOptions(containerWidth, font, ellipsis, options); // FIXME\n // It is not appropriate that every line has '...' when truncate multiple lines.\n\n for (var i = 0, len = textLines.length; i < len; i++) {\n textLines[i] = truncateSingleLine(textLines[i], options);\n }\n\n return textLines.join('\\n');\n}\n\nfunction prepareTruncateOptions(containerWidth, font, ellipsis, options) {\n options = extend({}, options);\n options.font = font;\n var ellipsis = retrieve2(ellipsis, '...');\n options.maxIterations = retrieve2(options.maxIterations, 2);\n var minChar = options.minChar = retrieve2(options.minChar, 0); // FIXME\n // Other languages?\n\n options.cnCharWidth = getWidth('国', font); // FIXME\n // Consider proportional font?\n\n var ascCharWidth = options.ascCharWidth = getWidth('a', font);\n options.placeholder = retrieve2(options.placeholder, ''); // Example 1: minChar: 3, text: 'asdfzxcv', truncate result: 'asdf', but not: 'a...'.\n // Example 2: minChar: 3, text: '维度', truncate result: '维', but not: '...'.\n\n var contentWidth = containerWidth = Math.max(0, containerWidth - 1); // Reserve some gap.\n\n for (var i = 0; i < minChar && contentWidth >= ascCharWidth; i++) {\n contentWidth -= ascCharWidth;\n }\n\n var ellipsisWidth = getWidth(ellipsis, font);\n\n if (ellipsisWidth > contentWidth) {\n ellipsis = '';\n ellipsisWidth = 0;\n }\n\n contentWidth = containerWidth - ellipsisWidth;\n options.ellipsis = ellipsis;\n options.ellipsisWidth = ellipsisWidth;\n options.contentWidth = contentWidth;\n options.containerWidth = containerWidth;\n return options;\n}\n\nfunction truncateSingleLine(textLine, options) {\n var containerWidth = options.containerWidth;\n var font = options.font;\n var contentWidth = options.contentWidth;\n\n if (!containerWidth) {\n return '';\n }\n\n var lineWidth = getWidth(textLine, font);\n\n if (lineWidth <= containerWidth) {\n return textLine;\n }\n\n for (var j = 0;; j++) {\n if (lineWidth <= contentWidth || j >= options.maxIterations) {\n textLine += options.ellipsis;\n break;\n }\n\n var subLength = j === 0 ? estimateLength(textLine, contentWidth, options.ascCharWidth, options.cnCharWidth) : lineWidth > 0 ? Math.floor(textLine.length * contentWidth / lineWidth) : 0;\n textLine = textLine.substr(0, subLength);\n lineWidth = getWidth(textLine, font);\n }\n\n if (textLine === '') {\n textLine = options.placeholder;\n }\n\n return textLine;\n}\n\nfunction estimateLength(text, contentWidth, ascCharWidth, cnCharWidth) {\n var width = 0;\n var i = 0;\n\n for (var len = text.length; i < len && width < contentWidth; i++) {\n var charCode = text.charCodeAt(i);\n width += 0 <= charCode && charCode <= 127 ? ascCharWidth : cnCharWidth;\n }\n\n return i;\n}\n/**\n * @public\n * @param {string} font\n * @return {number} line height\n */\n\n\nfunction getLineHeight(font) {\n // FIXME A rough approach.\n return getWidth('国', font);\n}\n/**\n * @public\n * @param {string} text\n * @param {string} font\n * @return {Object} width\n */\n\n\nfunction measureText(text, font) {\n return methods.measureText(text, font);\n} // Avoid assign to an exported variable, for transforming to cjs.\n\n\nmethods.measureText = function (text, font) {\n var ctx = getContext();\n ctx.font = font || DEFAULT_FONT;\n return ctx.measureText(text);\n};\n/**\n * @public\n * @param {string} text\n * @param {string} font\n * @param {Object} [truncate]\n * @return {Object} block: {lineHeight, lines, height, outerHeight, canCacheByTextString}\n * Notice: for performance, do not calculate outerWidth util needed.\n * `canCacheByTextString` means the result `lines` is only determined by the input `text`.\n * Thus we can simply comparing the `input` text to determin whether the result changed,\n * without travel the result `lines`.\n */\n\n\nfunction parsePlainText(text, font, padding, textLineHeight, truncate) {\n text != null && (text += '');\n var lineHeight = retrieve2(textLineHeight, getLineHeight(font));\n var lines = text ? text.split('\\n') : [];\n var height = lines.length * lineHeight;\n var outerHeight = height;\n var canCacheByTextString = true;\n\n if (padding) {\n outerHeight += padding[0] + padding[2];\n }\n\n if (text && truncate) {\n canCacheByTextString = false;\n var truncOuterHeight = truncate.outerHeight;\n var truncOuterWidth = truncate.outerWidth;\n\n if (truncOuterHeight != null && outerHeight > truncOuterHeight) {\n text = '';\n lines = [];\n } else if (truncOuterWidth != null) {\n var options = prepareTruncateOptions(truncOuterWidth - (padding ? padding[1] + padding[3] : 0), font, truncate.ellipsis, {\n minChar: truncate.minChar,\n placeholder: truncate.placeholder\n }); // FIXME\n // It is not appropriate that every line has '...' when truncate multiple lines.\n\n for (var i = 0, len = lines.length; i < len; i++) {\n lines[i] = truncateSingleLine(lines[i], options);\n }\n }\n }\n\n return {\n lines: lines,\n height: height,\n outerHeight: outerHeight,\n lineHeight: lineHeight,\n canCacheByTextString: canCacheByTextString\n };\n}\n/**\n * For example: 'some text {a|some text}other text{b|some text}xxx{c|}xxx'\n * Also consider 'bbbb{a|xxx\\nzzz}xxxx\\naaaa'.\n *\n * @public\n * @param {string} text\n * @param {Object} style\n * @return {Object} block\n * {\n * width,\n * height,\n * lines: [{\n * lineHeight,\n * width,\n * tokens: [[{\n * styleName,\n * text,\n * width, // include textPadding\n * height, // include textPadding\n * textWidth, // pure text width\n * textHeight, // pure text height\n * lineHeihgt,\n * font,\n * textAlign,\n * textVerticalAlign\n * }], [...], ...]\n * }, ...]\n * }\n * If styleName is undefined, it is plain text.\n */\n\n\nfunction parseRichText(text, style) {\n var contentBlock = {\n lines: [],\n width: 0,\n height: 0\n };\n text != null && (text += '');\n\n if (!text) {\n return contentBlock;\n }\n\n var lastIndex = STYLE_REG.lastIndex = 0;\n var result;\n\n while ((result = STYLE_REG.exec(text)) != null) {\n var matchedIndex = result.index;\n\n if (matchedIndex > lastIndex) {\n pushTokens(contentBlock, text.substring(lastIndex, matchedIndex));\n }\n\n pushTokens(contentBlock, result[2], result[1]);\n lastIndex = STYLE_REG.lastIndex;\n }\n\n if (lastIndex < text.length) {\n pushTokens(contentBlock, text.substring(lastIndex, text.length));\n }\n\n var lines = contentBlock.lines;\n var contentHeight = 0;\n var contentWidth = 0; // For `textWidth: 100%`\n\n var pendingList = [];\n var stlPadding = style.textPadding;\n var truncate = style.truncate;\n var truncateWidth = truncate && truncate.outerWidth;\n var truncateHeight = truncate && truncate.outerHeight;\n\n if (stlPadding) {\n truncateWidth != null && (truncateWidth -= stlPadding[1] + stlPadding[3]);\n truncateHeight != null && (truncateHeight -= stlPadding[0] + stlPadding[2]);\n } // Calculate layout info of tokens.\n\n\n for (var i = 0; i < lines.length; i++) {\n var line = lines[i];\n var lineHeight = 0;\n var lineWidth = 0;\n\n for (var j = 0; j < line.tokens.length; j++) {\n var token = line.tokens[j];\n var tokenStyle = token.styleName && style.rich[token.styleName] || {}; // textPadding should not inherit from style.\n\n var textPadding = token.textPadding = tokenStyle.textPadding; // textFont has been asigned to font by `normalizeStyle`.\n\n var font = token.font = tokenStyle.font || style.font; // textHeight can be used when textVerticalAlign is specified in token.\n\n var tokenHeight = token.textHeight = retrieve2( // textHeight should not be inherited, consider it can be specified\n // as box height of the block.\n tokenStyle.textHeight, getLineHeight(font));\n textPadding && (tokenHeight += textPadding[0] + textPadding[2]);\n token.height = tokenHeight;\n token.lineHeight = retrieve3(tokenStyle.textLineHeight, style.textLineHeight, tokenHeight);\n token.textAlign = tokenStyle && tokenStyle.textAlign || style.textAlign;\n token.textVerticalAlign = tokenStyle && tokenStyle.textVerticalAlign || 'middle';\n\n if (truncateHeight != null && contentHeight + token.lineHeight > truncateHeight) {\n return {\n lines: [],\n width: 0,\n height: 0\n };\n }\n\n token.textWidth = getWidth(token.text, font);\n var tokenWidth = tokenStyle.textWidth;\n var tokenWidthNotSpecified = tokenWidth == null || tokenWidth === 'auto'; // Percent width, can be `100%`, can be used in drawing separate\n // line when box width is needed to be auto.\n\n if (typeof tokenWidth === 'string' && tokenWidth.charAt(tokenWidth.length - 1) === '%') {\n token.percentWidth = tokenWidth;\n pendingList.push(token);\n tokenWidth = 0; // Do not truncate in this case, because there is no user case\n // and it is too complicated.\n } else {\n if (tokenWidthNotSpecified) {\n tokenWidth = token.textWidth; // FIXME: If image is not loaded and textWidth is not specified, calling\n // `getBoundingRect()` will not get correct result.\n\n var textBackgroundColor = tokenStyle.textBackgroundColor;\n var bgImg = textBackgroundColor && textBackgroundColor.image; // Use cases:\n // (1) If image is not loaded, it will be loaded at render phase and call\n // `dirty()` and `textBackgroundColor.image` will be replaced with the loaded\n // image, and then the right size will be calculated here at the next tick.\n // See `graphic/helper/text.js`.\n // (2) If image loaded, and `textBackgroundColor.image` is image src string,\n // use `imageHelper.findExistImage` to find cached image.\n // `imageHelper.findExistImage` will always be called here before\n // `imageHelper.createOrUpdateImage` in `graphic/helper/text.js#renderRichText`\n // which ensures that image will not be rendered before correct size calcualted.\n\n if (bgImg) {\n bgImg = imageHelper.findExistImage(bgImg);\n\n if (imageHelper.isImageReady(bgImg)) {\n tokenWidth = Math.max(tokenWidth, bgImg.width * tokenHeight / bgImg.height);\n }\n }\n }\n\n var paddingW = textPadding ? textPadding[1] + textPadding[3] : 0;\n tokenWidth += paddingW;\n var remianTruncWidth = truncateWidth != null ? truncateWidth - lineWidth : null;\n\n if (remianTruncWidth != null && remianTruncWidth < tokenWidth) {\n if (!tokenWidthNotSpecified || remianTruncWidth < paddingW) {\n token.text = '';\n token.textWidth = tokenWidth = 0;\n } else {\n token.text = truncateText(token.text, remianTruncWidth - paddingW, font, truncate.ellipsis, {\n minChar: truncate.minChar\n });\n token.textWidth = getWidth(token.text, font);\n tokenWidth = token.textWidth + paddingW;\n }\n }\n }\n\n lineWidth += token.width = tokenWidth;\n tokenStyle && (lineHeight = Math.max(lineHeight, token.lineHeight));\n }\n\n line.width = lineWidth;\n line.lineHeight = lineHeight;\n contentHeight += lineHeight;\n contentWidth = Math.max(contentWidth, lineWidth);\n }\n\n contentBlock.outerWidth = contentBlock.width = retrieve2(style.textWidth, contentWidth);\n contentBlock.outerHeight = contentBlock.height = retrieve2(style.textHeight, contentHeight);\n\n if (stlPadding) {\n contentBlock.outerWidth += stlPadding[1] + stlPadding[3];\n contentBlock.outerHeight += stlPadding[0] + stlPadding[2];\n }\n\n for (var i = 0; i < pendingList.length; i++) {\n var token = pendingList[i];\n var percentWidth = token.percentWidth; // Should not base on outerWidth, because token can not be placed out of padding.\n\n token.width = parseInt(percentWidth, 10) / 100 * contentWidth;\n }\n\n return contentBlock;\n}\n\nfunction pushTokens(block, str, styleName) {\n var isEmptyStr = str === '';\n var strs = str.split('\\n');\n var lines = block.lines;\n\n for (var i = 0; i < strs.length; i++) {\n var text = strs[i];\n var token = {\n styleName: styleName,\n text: text,\n isLineHolder: !text && !isEmptyStr\n }; // The first token should be appended to the last line.\n\n if (!i) {\n var tokens = (lines[lines.length - 1] || (lines[0] = {\n tokens: []\n })).tokens; // Consider cases:\n // (1) ''.split('\\n') => ['', '\\n', ''], the '' at the first item\n // (which is a placeholder) should be replaced by new token.\n // (2) A image backage, where token likes {a|}.\n // (3) A redundant '' will affect textAlign in line.\n // (4) tokens with the same tplName should not be merged, because\n // they should be displayed in different box (with border and padding).\n\n var tokensLen = tokens.length;\n tokensLen === 1 && tokens[0].isLineHolder ? tokens[0] = token : // Consider text is '', only insert when it is the \"lineHolder\" or\n // \"emptyStr\". Otherwise a redundant '' will affect textAlign in line.\n (text || !tokensLen || isEmptyStr) && tokens.push(token);\n } // Other tokens always start a new line.\n else {\n // If there is '', insert it as a placeholder.\n lines.push({\n tokens: [token]\n });\n }\n }\n}\n\nfunction makeFont(style) {\n // FIXME in node-canvas fontWeight is before fontStyle\n // Use `fontSize` `fontFamily` to check whether font properties are defined.\n var font = (style.fontSize || style.fontFamily) && [style.fontStyle, style.fontWeight, (style.fontSize || 12) + 'px', // If font properties are defined, `fontFamily` should not be ignored.\n style.fontFamily || 'sans-serif'].join(' ');\n return font && trim(font) || style.textFont || style.font;\n}\n\nexports.DEFAULT_FONT = DEFAULT_FONT;\nexports.$override = $override;\nexports.getWidth = getWidth;\nexports.getBoundingRect = getBoundingRect;\nexports.adjustTextX = adjustTextX;\nexports.adjustTextY = adjustTextY;\nexports.calculateTextPosition = calculateTextPosition;\nexports.adjustTextPositionOnRect = adjustTextPositionOnRect;\nexports.truncateText = truncateText;\nexports.getLineHeight = getLineHeight;\nexports.measureText = measureText;\nexports.parsePlainText = parsePlainText;\nexports.parseRichText = parseRichText;\nexports.makeFont = makeFont;","var PI2 = Math.PI * 2;\n\nfunction normalizeRadian(angle) {\n angle %= PI2;\n\n if (angle < 0) {\n angle += PI2;\n }\n\n return angle;\n}\n\nexports.normalizeRadian = normalizeRadian;","function windingLine(x0, y0, x1, y1, x, y) {\n if (y > y0 && y > y1 || y < y0 && y < y1) {\n return 0;\n } // Ignore horizontal line\n\n\n if (y1 === y0) {\n return 0;\n }\n\n var dir = y1 < y0 ? 1 : -1;\n var t = (y - y0) / (y1 - y0); // Avoid winding error when intersection point is the connect point of two line of polygon\n\n if (t === 1 || t === 0) {\n dir = y1 < y0 ? 0.5 : -0.5;\n }\n\n var x_ = t * (x1 - x0) + x0; // If (x, y) on the line, considered as \"contain\".\n\n return x_ === x ? Infinity : x_ > x ? dir : 0;\n}\n\nmodule.exports = windingLine;","var zrUtil = require(\"../core/util\");\n\nvar Element = require(\"../Element\");\n\nvar BoundingRect = require(\"../core/BoundingRect\");\n\n/**\n * Group是一个容器,可以插入子节点,Group的变换也会被应用到子节点上\n * @module zrender/graphic/Group\n * @example\n * var Group = require('zrender/container/Group');\n * var Circle = require('zrender/graphic/shape/Circle');\n * var g = new Group();\n * g.position[0] = 100;\n * g.position[1] = 100;\n * g.add(new Circle({\n * style: {\n * x: 100,\n * y: 100,\n * r: 20,\n * }\n * }));\n * zr.add(g);\n */\n\n/**\n * @alias module:zrender/graphic/Group\n * @constructor\n * @extends module:zrender/mixin/Transformable\n * @extends module:zrender/mixin/Eventful\n */\nvar Group = function (opts) {\n opts = opts || {};\n Element.call(this, opts);\n\n for (var key in opts) {\n if (opts.hasOwnProperty(key)) {\n this[key] = opts[key];\n }\n }\n\n this._children = [];\n this.__storage = null;\n this.__dirty = true;\n};\n\nGroup.prototype = {\n constructor: Group,\n isGroup: true,\n\n /**\n * @type {string}\n */\n type: 'group',\n\n /**\n * 所有子孙元素是否响应鼠标事件\n * @name module:/zrender/container/Group#silent\n * @type {boolean}\n * @default false\n */\n silent: false,\n\n /**\n * @return {Array.}\n */\n children: function () {\n return this._children.slice();\n },\n\n /**\n * 获取指定 index 的儿子节点\n * @param {number} idx\n * @return {module:zrender/Element}\n */\n childAt: function (idx) {\n return this._children[idx];\n },\n\n /**\n * 获取指定名字的儿子节点\n * @param {string} name\n * @return {module:zrender/Element}\n */\n childOfName: function (name) {\n var children = this._children;\n\n for (var i = 0; i < children.length; i++) {\n if (children[i].name === name) {\n return children[i];\n }\n }\n },\n\n /**\n * @return {number}\n */\n childCount: function () {\n return this._children.length;\n },\n\n /**\n * 添加子节点到最后\n * @param {module:zrender/Element} child\n */\n add: function (child) {\n if (child && child !== this && child.parent !== this) {\n this._children.push(child);\n\n this._doAdd(child);\n }\n\n return this;\n },\n\n /**\n * 添加子节点在 nextSibling 之前\n * @param {module:zrender/Element} child\n * @param {module:zrender/Element} nextSibling\n */\n addBefore: function (child, nextSibling) {\n if (child && child !== this && child.parent !== this && nextSibling && nextSibling.parent === this) {\n var children = this._children;\n var idx = children.indexOf(nextSibling);\n\n if (idx >= 0) {\n children.splice(idx, 0, child);\n\n this._doAdd(child);\n }\n }\n\n return this;\n },\n _doAdd: function (child) {\n if (child.parent) {\n child.parent.remove(child);\n }\n\n child.parent = this;\n var storage = this.__storage;\n var zr = this.__zr;\n\n if (storage && storage !== child.__storage) {\n storage.addToStorage(child);\n\n if (child instanceof Group) {\n child.addChildrenToStorage(storage);\n }\n }\n\n zr && zr.refresh();\n },\n\n /**\n * 移除子节点\n * @param {module:zrender/Element} child\n */\n remove: function (child) {\n var zr = this.__zr;\n var storage = this.__storage;\n var children = this._children;\n var idx = zrUtil.indexOf(children, child);\n\n if (idx < 0) {\n return this;\n }\n\n children.splice(idx, 1);\n child.parent = null;\n\n if (storage) {\n storage.delFromStorage(child);\n\n if (child instanceof Group) {\n child.delChildrenFromStorage(storage);\n }\n }\n\n zr && zr.refresh();\n return this;\n },\n\n /**\n * 移除所有子节点\n */\n removeAll: function () {\n var children = this._children;\n var storage = this.__storage;\n var child;\n var i;\n\n for (i = 0; i < children.length; i++) {\n child = children[i];\n\n if (storage) {\n storage.delFromStorage(child);\n\n if (child instanceof Group) {\n child.delChildrenFromStorage(storage);\n }\n }\n\n child.parent = null;\n }\n\n children.length = 0;\n return this;\n },\n\n /**\n * 遍历所有子节点\n * @param {Function} cb\n * @param {} context\n */\n eachChild: function (cb, context) {\n var children = this._children;\n\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n cb.call(context, child, i);\n }\n\n return this;\n },\n\n /**\n * 深度优先遍历所有子孙节点\n * @param {Function} cb\n * @param {} context\n */\n traverse: function (cb, context) {\n for (var i = 0; i < this._children.length; i++) {\n var child = this._children[i];\n cb.call(context, child);\n\n if (child.type === 'group') {\n child.traverse(cb, context);\n }\n }\n\n return this;\n },\n addChildrenToStorage: function (storage) {\n for (var i = 0; i < this._children.length; i++) {\n var child = this._children[i];\n storage.addToStorage(child);\n\n if (child instanceof Group) {\n child.addChildrenToStorage(storage);\n }\n }\n },\n delChildrenFromStorage: function (storage) {\n for (var i = 0; i < this._children.length; i++) {\n var child = this._children[i];\n storage.delFromStorage(child);\n\n if (child instanceof Group) {\n child.delChildrenFromStorage(storage);\n }\n }\n },\n dirty: function () {\n this.__dirty = true;\n this.__zr && this.__zr.refresh();\n return this;\n },\n\n /**\n * @return {module:zrender/core/BoundingRect}\n */\n getBoundingRect: function (includeChildren) {\n // TODO Caching\n var rect = null;\n var tmpRect = new BoundingRect(0, 0, 0, 0);\n var children = includeChildren || this._children;\n var tmpMat = [];\n\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n\n if (child.ignore || child.invisible) {\n continue;\n }\n\n var childRect = child.getBoundingRect();\n var transform = child.getLocalTransform(tmpMat); // TODO\n // The boundingRect cacluated by transforming original\n // rect may be bigger than the actual bundingRect when rotation\n // is used. (Consider a circle rotated aginst its center, where\n // the actual boundingRect should be the same as that not be\n // rotated.) But we can not find better approach to calculate\n // actual boundingRect yet, considering performance.\n\n if (transform) {\n tmpRect.copy(childRect);\n tmpRect.applyTransform(transform);\n rect = rect || tmpRect.clone();\n rect.union(tmpRect);\n } else {\n rect = rect || childRect.clone();\n rect.union(childRect);\n }\n }\n\n return rect || tmpRect;\n }\n};\nzrUtil.inherits(Group, Element);\nvar _default = Group;\nmodule.exports = _default;","var vec2 = require(\"./vector\");\n\nvar matrix = require(\"./matrix\");\n\n/**\n * @module echarts/core/BoundingRect\n */\nvar v2ApplyTransform = vec2.applyTransform;\nvar mathMin = Math.min;\nvar mathMax = Math.max;\n/**\n * @alias module:echarts/core/BoundingRect\n */\n\nfunction BoundingRect(x, y, width, height) {\n if (width < 0) {\n x = x + width;\n width = -width;\n }\n\n if (height < 0) {\n y = y + height;\n height = -height;\n }\n /**\n * @type {number}\n */\n\n\n this.x = x;\n /**\n * @type {number}\n */\n\n this.y = y;\n /**\n * @type {number}\n */\n\n this.width = width;\n /**\n * @type {number}\n */\n\n this.height = height;\n}\n\nBoundingRect.prototype = {\n constructor: BoundingRect,\n\n /**\n * @param {module:echarts/core/BoundingRect} other\n */\n union: function (other) {\n var x = mathMin(other.x, this.x);\n var y = mathMin(other.y, this.y);\n this.width = mathMax(other.x + other.width, this.x + this.width) - x;\n this.height = mathMax(other.y + other.height, this.y + this.height) - y;\n this.x = x;\n this.y = y;\n },\n\n /**\n * @param {Array.} m\n * @methods\n */\n applyTransform: function () {\n var lt = [];\n var rb = [];\n var lb = [];\n var rt = [];\n return function (m) {\n // In case usage like this\n // el.getBoundingRect().applyTransform(el.transform)\n // And element has no transform\n if (!m) {\n return;\n }\n\n lt[0] = lb[0] = this.x;\n lt[1] = rt[1] = this.y;\n rb[0] = rt[0] = this.x + this.width;\n rb[1] = lb[1] = this.y + this.height;\n v2ApplyTransform(lt, lt, m);\n v2ApplyTransform(rb, rb, m);\n v2ApplyTransform(lb, lb, m);\n v2ApplyTransform(rt, rt, m);\n this.x = mathMin(lt[0], rb[0], lb[0], rt[0]);\n this.y = mathMin(lt[1], rb[1], lb[1], rt[1]);\n var maxX = mathMax(lt[0], rb[0], lb[0], rt[0]);\n var maxY = mathMax(lt[1], rb[1], lb[1], rt[1]);\n this.width = maxX - this.x;\n this.height = maxY - this.y;\n };\n }(),\n\n /**\n * Calculate matrix of transforming from self to target rect\n * @param {module:zrender/core/BoundingRect} b\n * @return {Array.}\n */\n calculateTransform: function (b) {\n var a = this;\n var sx = b.width / a.width;\n var sy = b.height / a.height;\n var m = matrix.create(); // 矩阵右乘\n\n matrix.translate(m, m, [-a.x, -a.y]);\n matrix.scale(m, m, [sx, sy]);\n matrix.translate(m, m, [b.x, b.y]);\n return m;\n },\n\n /**\n * @param {(module:echarts/core/BoundingRect|Object)} b\n * @return {boolean}\n */\n intersect: function (b) {\n if (!b) {\n return false;\n }\n\n if (!(b instanceof BoundingRect)) {\n // Normalize negative width/height.\n b = BoundingRect.create(b);\n }\n\n var a = this;\n var ax0 = a.x;\n var ax1 = a.x + a.width;\n var ay0 = a.y;\n var ay1 = a.y + a.height;\n var bx0 = b.x;\n var bx1 = b.x + b.width;\n var by0 = b.y;\n var by1 = b.y + b.height;\n return !(ax1 < bx0 || bx1 < ax0 || ay1 < by0 || by1 < ay0);\n },\n contain: function (x, y) {\n var rect = this;\n return x >= rect.x && x <= rect.x + rect.width && y >= rect.y && y <= rect.y + rect.height;\n },\n\n /**\n * @return {module:echarts/core/BoundingRect}\n */\n clone: function () {\n return new BoundingRect(this.x, this.y, this.width, this.height);\n },\n\n /**\n * Copy from another rect\n */\n copy: function (other) {\n this.x = other.x;\n this.y = other.y;\n this.width = other.width;\n this.height = other.height;\n },\n plain: function () {\n return {\n x: this.x,\n y: this.y,\n width: this.width,\n height: this.height\n };\n }\n};\n/**\n * @param {Object|module:zrender/core/BoundingRect} rect\n * @param {number} rect.x\n * @param {number} rect.y\n * @param {number} rect.width\n * @param {number} rect.height\n * @return {module:zrender/core/BoundingRect}\n */\n\nBoundingRect.create = function (rect) {\n return new BoundingRect(rect.x, rect.y, rect.width, rect.height);\n};\n\nvar _default = BoundingRect;\nmodule.exports = _default;","var eventUtil = require(\"./event\");\n\n/**\n * Only implements needed gestures for mobile.\n */\nvar GestureMgr = function () {\n /**\n * @private\n * @type {Array.}\n */\n this._track = [];\n};\n\nGestureMgr.prototype = {\n constructor: GestureMgr,\n recognize: function (event, target, root) {\n this._doTrack(event, target, root);\n\n return this._recognize(event);\n },\n clear: function () {\n this._track.length = 0;\n return this;\n },\n _doTrack: function (event, target, root) {\n var touches = event.touches;\n\n if (!touches) {\n return;\n }\n\n var trackItem = {\n points: [],\n touches: [],\n target: target,\n event: event\n };\n\n for (var i = 0, len = touches.length; i < len; i++) {\n var touch = touches[i];\n var pos = eventUtil.clientToLocal(root, touch, {});\n trackItem.points.push([pos.zrX, pos.zrY]);\n trackItem.touches.push(touch);\n }\n\n this._track.push(trackItem);\n },\n _recognize: function (event) {\n for (var eventName in recognizers) {\n if (recognizers.hasOwnProperty(eventName)) {\n var gestureInfo = recognizers[eventName](this._track, event);\n\n if (gestureInfo) {\n return gestureInfo;\n }\n }\n }\n }\n};\n\nfunction dist(pointPair) {\n var dx = pointPair[1][0] - pointPair[0][0];\n var dy = pointPair[1][1] - pointPair[0][1];\n return Math.sqrt(dx * dx + dy * dy);\n}\n\nfunction center(pointPair) {\n return [(pointPair[0][0] + pointPair[1][0]) / 2, (pointPair[0][1] + pointPair[1][1]) / 2];\n}\n\nvar recognizers = {\n pinch: function (track, event) {\n var trackLen = track.length;\n\n if (!trackLen) {\n return;\n }\n\n var pinchEnd = (track[trackLen - 1] || {}).points;\n var pinchPre = (track[trackLen - 2] || {}).points || pinchEnd;\n\n if (pinchPre && pinchPre.length > 1 && pinchEnd && pinchEnd.length > 1) {\n var pinchScale = dist(pinchEnd) / dist(pinchPre);\n !isFinite(pinchScale) && (pinchScale = 1);\n event.pinchScale = pinchScale;\n var pinchCenter = center(pinchEnd);\n event.pinchX = pinchCenter[0];\n event.pinchY = pinchCenter[1];\n return {\n type: 'pinch',\n target: track[0].target,\n event: event\n };\n }\n } // Only pinch currently.\n\n};\nvar _default = GestureMgr;\nmodule.exports = _default;","// Simple LRU cache use doubly linked list\n// @module zrender/core/LRU\n\n/**\n * Simple double linked list. Compared with array, it has O(1) remove operation.\n * @constructor\n */\nvar LinkedList = function () {\n /**\n * @type {module:zrender/core/LRU~Entry}\n */\n this.head = null;\n /**\n * @type {module:zrender/core/LRU~Entry}\n */\n\n this.tail = null;\n this._len = 0;\n};\n\nvar linkedListProto = LinkedList.prototype;\n/**\n * Insert a new value at the tail\n * @param {} val\n * @return {module:zrender/core/LRU~Entry}\n */\n\nlinkedListProto.insert = function (val) {\n var entry = new Entry(val);\n this.insertEntry(entry);\n return entry;\n};\n/**\n * Insert an entry at the tail\n * @param {module:zrender/core/LRU~Entry} entry\n */\n\n\nlinkedListProto.insertEntry = function (entry) {\n if (!this.head) {\n this.head = this.tail = entry;\n } else {\n this.tail.next = entry;\n entry.prev = this.tail;\n entry.next = null;\n this.tail = entry;\n }\n\n this._len++;\n};\n/**\n * Remove entry.\n * @param {module:zrender/core/LRU~Entry} entry\n */\n\n\nlinkedListProto.remove = function (entry) {\n var prev = entry.prev;\n var next = entry.next;\n\n if (prev) {\n prev.next = next;\n } else {\n // Is head\n this.head = next;\n }\n\n if (next) {\n next.prev = prev;\n } else {\n // Is tail\n this.tail = prev;\n }\n\n entry.next = entry.prev = null;\n this._len--;\n};\n/**\n * @return {number}\n */\n\n\nlinkedListProto.len = function () {\n return this._len;\n};\n/**\n * Clear list\n */\n\n\nlinkedListProto.clear = function () {\n this.head = this.tail = null;\n this._len = 0;\n};\n/**\n * @constructor\n * @param {} val\n */\n\n\nvar Entry = function (val) {\n /**\n * @type {}\n */\n this.value = val;\n /**\n * @type {module:zrender/core/LRU~Entry}\n */\n\n this.next;\n /**\n * @type {module:zrender/core/LRU~Entry}\n */\n\n this.prev;\n};\n/**\n * LRU Cache\n * @constructor\n * @alias module:zrender/core/LRU\n */\n\n\nvar LRU = function (maxSize) {\n this._list = new LinkedList();\n this._map = {};\n this._maxSize = maxSize || 10;\n this._lastRemovedEntry = null;\n};\n\nvar LRUProto = LRU.prototype;\n/**\n * @param {string} key\n * @param {} value\n * @return {} Removed value\n */\n\nLRUProto.put = function (key, value) {\n var list = this._list;\n var map = this._map;\n var removed = null;\n\n if (map[key] == null) {\n var len = list.len(); // Reuse last removed entry\n\n var entry = this._lastRemovedEntry;\n\n if (len >= this._maxSize && len > 0) {\n // Remove the least recently used\n var leastUsedEntry = list.head;\n list.remove(leastUsedEntry);\n delete map[leastUsedEntry.key];\n removed = leastUsedEntry.value;\n this._lastRemovedEntry = leastUsedEntry;\n }\n\n if (entry) {\n entry.value = value;\n } else {\n entry = new Entry(value);\n }\n\n entry.key = key;\n list.insertEntry(entry);\n map[key] = entry;\n }\n\n return removed;\n};\n/**\n * @param {string} key\n * @return {}\n */\n\n\nLRUProto.get = function (key) {\n var entry = this._map[key];\n var list = this._list;\n\n if (entry != null) {\n // Put the latest used entry in the tail\n if (entry !== list.tail) {\n list.remove(entry);\n list.insertEntry(entry);\n }\n\n return entry.value;\n }\n};\n/**\n * Clear the cache\n */\n\n\nLRUProto.clear = function () {\n this._list.clear();\n\n this._map = {};\n};\n\nvar _default = LRU;\nmodule.exports = _default;","var curve = require(\"./curve\");\n\nvar vec2 = require(\"./vector\");\n\nvar bbox = require(\"./bbox\");\n\nvar BoundingRect = require(\"./BoundingRect\");\n\nvar _config = require(\"../config\");\n\nvar dpr = _config.devicePixelRatio;\n\n/**\n * Path 代理,可以在`buildPath`中用于替代`ctx`, 会保存每个path操作的命令到pathCommands属性中\n * 可以用于 isInsidePath 判断以及获取boundingRect\n *\n * @module zrender/core/PathProxy\n * @author Yi Shen (http://www.github.com/pissang)\n */\n// TODO getTotalLength, getPointAtLength\n\n/* global Float32Array */\nvar CMD = {\n M: 1,\n L: 2,\n C: 3,\n Q: 4,\n A: 5,\n Z: 6,\n // Rect\n R: 7\n}; // var CMD_MEM_SIZE = {\n// M: 3,\n// L: 3,\n// C: 7,\n// Q: 5,\n// A: 9,\n// R: 5,\n// Z: 1\n// };\n\nvar min = [];\nvar max = [];\nvar min2 = [];\nvar max2 = [];\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nvar mathCos = Math.cos;\nvar mathSin = Math.sin;\nvar mathSqrt = Math.sqrt;\nvar mathAbs = Math.abs;\nvar hasTypedArray = typeof Float32Array !== 'undefined';\n/**\n * @alias module:zrender/core/PathProxy\n * @constructor\n */\n\nvar PathProxy = function (notSaveData) {\n this._saveData = !(notSaveData || false);\n\n if (this._saveData) {\n /**\n * Path data. Stored as flat array\n * @type {Array.}\n */\n this.data = [];\n }\n\n this._ctx = null;\n};\n/**\n * 快速计算Path包围盒(并不是最小包围盒)\n * @return {Object}\n */\n\n\nPathProxy.prototype = {\n constructor: PathProxy,\n _xi: 0,\n _yi: 0,\n _x0: 0,\n _y0: 0,\n // Unit x, Unit y. Provide for avoiding drawing that too short line segment\n _ux: 0,\n _uy: 0,\n _len: 0,\n _lineDash: null,\n _dashOffset: 0,\n _dashIdx: 0,\n _dashSum: 0,\n\n /**\n * @readOnly\n */\n setScale: function (sx, sy, segmentIgnoreThreshold) {\n // Compat. Previously there is no segmentIgnoreThreshold.\n segmentIgnoreThreshold = segmentIgnoreThreshold || 0;\n this._ux = mathAbs(segmentIgnoreThreshold / dpr / sx) || 0;\n this._uy = mathAbs(segmentIgnoreThreshold / dpr / sy) || 0;\n },\n getContext: function () {\n return this._ctx;\n },\n\n /**\n * @param {CanvasRenderingContext2D} ctx\n * @return {module:zrender/core/PathProxy}\n */\n beginPath: function (ctx) {\n this._ctx = ctx;\n ctx && ctx.beginPath();\n ctx && (this.dpr = ctx.dpr); // Reset\n\n if (this._saveData) {\n this._len = 0;\n }\n\n if (this._lineDash) {\n this._lineDash = null;\n this._dashOffset = 0;\n }\n\n return this;\n },\n\n /**\n * @param {number} x\n * @param {number} y\n * @return {module:zrender/core/PathProxy}\n */\n moveTo: function (x, y) {\n this.addData(CMD.M, x, y);\n this._ctx && this._ctx.moveTo(x, y); // x0, y0, xi, yi 是记录在 _dashedXXXXTo 方法中使用\n // xi, yi 记录当前点, x0, y0 在 closePath 的时候回到起始点。\n // 有可能在 beginPath 之后直接调用 lineTo,这时候 x0, y0 需要\n // 在 lineTo 方法中记录,这里先不考虑这种情况,dashed line 也只在 IE10- 中不支持\n\n this._x0 = x;\n this._y0 = y;\n this._xi = x;\n this._yi = y;\n return this;\n },\n\n /**\n * @param {number} x\n * @param {number} y\n * @return {module:zrender/core/PathProxy}\n */\n lineTo: function (x, y) {\n var exceedUnit = mathAbs(x - this._xi) > this._ux || mathAbs(y - this._yi) > this._uy // Force draw the first segment\n || this._len < 5;\n this.addData(CMD.L, x, y);\n\n if (this._ctx && exceedUnit) {\n this._needsDash() ? this._dashedLineTo(x, y) : this._ctx.lineTo(x, y);\n }\n\n if (exceedUnit) {\n this._xi = x;\n this._yi = y;\n }\n\n return this;\n },\n\n /**\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @return {module:zrender/core/PathProxy}\n */\n bezierCurveTo: function (x1, y1, x2, y2, x3, y3) {\n this.addData(CMD.C, x1, y1, x2, y2, x3, y3);\n\n if (this._ctx) {\n this._needsDash() ? this._dashedBezierTo(x1, y1, x2, y2, x3, y3) : this._ctx.bezierCurveTo(x1, y1, x2, y2, x3, y3);\n }\n\n this._xi = x3;\n this._yi = y3;\n return this;\n },\n\n /**\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @return {module:zrender/core/PathProxy}\n */\n quadraticCurveTo: function (x1, y1, x2, y2) {\n this.addData(CMD.Q, x1, y1, x2, y2);\n\n if (this._ctx) {\n this._needsDash() ? this._dashedQuadraticTo(x1, y1, x2, y2) : this._ctx.quadraticCurveTo(x1, y1, x2, y2);\n }\n\n this._xi = x2;\n this._yi = y2;\n return this;\n },\n\n /**\n * @param {number} cx\n * @param {number} cy\n * @param {number} r\n * @param {number} startAngle\n * @param {number} endAngle\n * @param {boolean} anticlockwise\n * @return {module:zrender/core/PathProxy}\n */\n arc: function (cx, cy, r, startAngle, endAngle, anticlockwise) {\n this.addData(CMD.A, cx, cy, r, r, startAngle, endAngle - startAngle, 0, anticlockwise ? 0 : 1);\n this._ctx && this._ctx.arc(cx, cy, r, startAngle, endAngle, anticlockwise);\n this._xi = mathCos(endAngle) * r + cx;\n this._yi = mathSin(endAngle) * r + cy;\n return this;\n },\n // TODO\n arcTo: function (x1, y1, x2, y2, radius) {\n if (this._ctx) {\n this._ctx.arcTo(x1, y1, x2, y2, radius);\n }\n\n return this;\n },\n // TODO\n rect: function (x, y, w, h) {\n this._ctx && this._ctx.rect(x, y, w, h);\n this.addData(CMD.R, x, y, w, h);\n return this;\n },\n\n /**\n * @return {module:zrender/core/PathProxy}\n */\n closePath: function () {\n this.addData(CMD.Z);\n var ctx = this._ctx;\n var x0 = this._x0;\n var y0 = this._y0;\n\n if (ctx) {\n this._needsDash() && this._dashedLineTo(x0, y0);\n ctx.closePath();\n }\n\n this._xi = x0;\n this._yi = y0;\n return this;\n },\n\n /**\n * Context 从外部传入,因为有可能是 rebuildPath 完之后再 fill。\n * stroke 同样\n * @param {CanvasRenderingContext2D} ctx\n * @return {module:zrender/core/PathProxy}\n */\n fill: function (ctx) {\n ctx && ctx.fill();\n this.toStatic();\n },\n\n /**\n * @param {CanvasRenderingContext2D} ctx\n * @return {module:zrender/core/PathProxy}\n */\n stroke: function (ctx) {\n ctx && ctx.stroke();\n this.toStatic();\n },\n\n /**\n * 必须在其它绘制命令前调用\n * Must be invoked before all other path drawing methods\n * @return {module:zrender/core/PathProxy}\n */\n setLineDash: function (lineDash) {\n if (lineDash instanceof Array) {\n this._lineDash = lineDash;\n this._dashIdx = 0;\n var lineDashSum = 0;\n\n for (var i = 0; i < lineDash.length; i++) {\n lineDashSum += lineDash[i];\n }\n\n this._dashSum = lineDashSum;\n }\n\n return this;\n },\n\n /**\n * 必须在其它绘制命令前调用\n * Must be invoked before all other path drawing methods\n * @return {module:zrender/core/PathProxy}\n */\n setLineDashOffset: function (offset) {\n this._dashOffset = offset;\n return this;\n },\n\n /**\n *\n * @return {boolean}\n */\n len: function () {\n return this._len;\n },\n\n /**\n * 直接设置 Path 数据\n */\n setData: function (data) {\n var len = data.length;\n\n if (!(this.data && this.data.length === len) && hasTypedArray) {\n this.data = new Float32Array(len);\n }\n\n for (var i = 0; i < len; i++) {\n this.data[i] = data[i];\n }\n\n this._len = len;\n },\n\n /**\n * 添加子路径\n * @param {module:zrender/core/PathProxy|Array.} path\n */\n appendPath: function (path) {\n if (!(path instanceof Array)) {\n path = [path];\n }\n\n var len = path.length;\n var appendSize = 0;\n var offset = this._len;\n\n for (var i = 0; i < len; i++) {\n appendSize += path[i].len();\n }\n\n if (hasTypedArray && this.data instanceof Float32Array) {\n this.data = new Float32Array(offset + appendSize);\n }\n\n for (var i = 0; i < len; i++) {\n var appendPathData = path[i].data;\n\n for (var k = 0; k < appendPathData.length; k++) {\n this.data[offset++] = appendPathData[k];\n }\n }\n\n this._len = offset;\n },\n\n /**\n * 填充 Path 数据。\n * 尽量复用而不申明新的数组。大部分图形重绘的指令数据长度都是不变的。\n */\n addData: function (cmd) {\n if (!this._saveData) {\n return;\n }\n\n var data = this.data;\n\n if (this._len + arguments.length > data.length) {\n // 因为之前的数组已经转换成静态的 Float32Array\n // 所以不够用时需要扩展一个新的动态数组\n this._expandData();\n\n data = this.data;\n }\n\n for (var i = 0; i < arguments.length; i++) {\n data[this._len++] = arguments[i];\n }\n\n this._prevCmd = cmd;\n },\n _expandData: function () {\n // Only if data is Float32Array\n if (!(this.data instanceof Array)) {\n var newData = [];\n\n for (var i = 0; i < this._len; i++) {\n newData[i] = this.data[i];\n }\n\n this.data = newData;\n }\n },\n\n /**\n * If needs js implemented dashed line\n * @return {boolean}\n * @private\n */\n _needsDash: function () {\n return this._lineDash;\n },\n _dashedLineTo: function (x1, y1) {\n var dashSum = this._dashSum;\n var offset = this._dashOffset;\n var lineDash = this._lineDash;\n var ctx = this._ctx;\n var x0 = this._xi;\n var y0 = this._yi;\n var dx = x1 - x0;\n var dy = y1 - y0;\n var dist = mathSqrt(dx * dx + dy * dy);\n var x = x0;\n var y = y0;\n var dash;\n var nDash = lineDash.length;\n var idx;\n dx /= dist;\n dy /= dist;\n\n if (offset < 0) {\n // Convert to positive offset\n offset = dashSum + offset;\n }\n\n offset %= dashSum;\n x -= offset * dx;\n y -= offset * dy;\n\n while (dx > 0 && x <= x1 || dx < 0 && x >= x1 || dx === 0 && (dy > 0 && y <= y1 || dy < 0 && y >= y1)) {\n idx = this._dashIdx;\n dash = lineDash[idx];\n x += dx * dash;\n y += dy * dash;\n this._dashIdx = (idx + 1) % nDash; // Skip positive offset\n\n if (dx > 0 && x < x0 || dx < 0 && x > x0 || dy > 0 && y < y0 || dy < 0 && y > y0) {\n continue;\n }\n\n ctx[idx % 2 ? 'moveTo' : 'lineTo'](dx >= 0 ? mathMin(x, x1) : mathMax(x, x1), dy >= 0 ? mathMin(y, y1) : mathMax(y, y1));\n } // Offset for next lineTo\n\n\n dx = x - x1;\n dy = y - y1;\n this._dashOffset = -mathSqrt(dx * dx + dy * dy);\n },\n // Not accurate dashed line to\n _dashedBezierTo: function (x1, y1, x2, y2, x3, y3) {\n var dashSum = this._dashSum;\n var offset = this._dashOffset;\n var lineDash = this._lineDash;\n var ctx = this._ctx;\n var x0 = this._xi;\n var y0 = this._yi;\n var t;\n var dx;\n var dy;\n var cubicAt = curve.cubicAt;\n var bezierLen = 0;\n var idx = this._dashIdx;\n var nDash = lineDash.length;\n var x;\n var y;\n var tmpLen = 0;\n\n if (offset < 0) {\n // Convert to positive offset\n offset = dashSum + offset;\n }\n\n offset %= dashSum; // Bezier approx length\n\n for (t = 0; t < 1; t += 0.1) {\n dx = cubicAt(x0, x1, x2, x3, t + 0.1) - cubicAt(x0, x1, x2, x3, t);\n dy = cubicAt(y0, y1, y2, y3, t + 0.1) - cubicAt(y0, y1, y2, y3, t);\n bezierLen += mathSqrt(dx * dx + dy * dy);\n } // Find idx after add offset\n\n\n for (; idx < nDash; idx++) {\n tmpLen += lineDash[idx];\n\n if (tmpLen > offset) {\n break;\n }\n }\n\n t = (tmpLen - offset) / bezierLen;\n\n while (t <= 1) {\n x = cubicAt(x0, x1, x2, x3, t);\n y = cubicAt(y0, y1, y2, y3, t); // Use line to approximate dashed bezier\n // Bad result if dash is long\n\n idx % 2 ? ctx.moveTo(x, y) : ctx.lineTo(x, y);\n t += lineDash[idx] / bezierLen;\n idx = (idx + 1) % nDash;\n } // Finish the last segment and calculate the new offset\n\n\n idx % 2 !== 0 && ctx.lineTo(x3, y3);\n dx = x3 - x;\n dy = y3 - y;\n this._dashOffset = -mathSqrt(dx * dx + dy * dy);\n },\n _dashedQuadraticTo: function (x1, y1, x2, y2) {\n // Convert quadratic to cubic using degree elevation\n var x3 = x2;\n var y3 = y2;\n x2 = (x2 + 2 * x1) / 3;\n y2 = (y2 + 2 * y1) / 3;\n x1 = (this._xi + 2 * x1) / 3;\n y1 = (this._yi + 2 * y1) / 3;\n\n this._dashedBezierTo(x1, y1, x2, y2, x3, y3);\n },\n\n /**\n * 转成静态的 Float32Array 减少堆内存占用\n * Convert dynamic array to static Float32Array\n */\n toStatic: function () {\n var data = this.data;\n\n if (data instanceof Array) {\n data.length = this._len;\n\n if (hasTypedArray) {\n this.data = new Float32Array(data);\n }\n }\n },\n\n /**\n * @return {module:zrender/core/BoundingRect}\n */\n getBoundingRect: function () {\n min[0] = min[1] = min2[0] = min2[1] = Number.MAX_VALUE;\n max[0] = max[1] = max2[0] = max2[1] = -Number.MAX_VALUE;\n var data = this.data;\n var xi = 0;\n var yi = 0;\n var x0 = 0;\n var y0 = 0;\n\n for (var i = 0; i < data.length;) {\n var cmd = data[i++];\n\n if (i === 1) {\n // 如果第一个命令是 L, C, Q\n // 则 previous point 同绘制命令的第一个 point\n //\n // 第一个命令为 Arc 的情况下会在后面特殊处理\n xi = data[i];\n yi = data[i + 1];\n x0 = xi;\n y0 = yi;\n }\n\n switch (cmd) {\n case CMD.M:\n // moveTo 命令重新创建一个新的 subpath, 并且更新新的起点\n // 在 closePath 的时候使用\n x0 = data[i++];\n y0 = data[i++];\n xi = x0;\n yi = y0;\n min2[0] = x0;\n min2[1] = y0;\n max2[0] = x0;\n max2[1] = y0;\n break;\n\n case CMD.L:\n bbox.fromLine(xi, yi, data[i], data[i + 1], min2, max2);\n xi = data[i++];\n yi = data[i++];\n break;\n\n case CMD.C:\n bbox.fromCubic(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], min2, max2);\n xi = data[i++];\n yi = data[i++];\n break;\n\n case CMD.Q:\n bbox.fromQuadratic(xi, yi, data[i++], data[i++], data[i], data[i + 1], min2, max2);\n xi = data[i++];\n yi = data[i++];\n break;\n\n case CMD.A:\n // TODO Arc 判断的开销比较大\n var cx = data[i++];\n var cy = data[i++];\n var rx = data[i++];\n var ry = data[i++];\n var startAngle = data[i++];\n var endAngle = data[i++] + startAngle; // TODO Arc 旋转\n\n i += 1;\n var anticlockwise = 1 - data[i++];\n\n if (i === 1) {\n // 直接使用 arc 命令\n // 第一个命令起点还未定义\n x0 = mathCos(startAngle) * rx + cx;\n y0 = mathSin(startAngle) * ry + cy;\n }\n\n bbox.fromArc(cx, cy, rx, ry, startAngle, endAngle, anticlockwise, min2, max2);\n xi = mathCos(endAngle) * rx + cx;\n yi = mathSin(endAngle) * ry + cy;\n break;\n\n case CMD.R:\n x0 = xi = data[i++];\n y0 = yi = data[i++];\n var width = data[i++];\n var height = data[i++]; // Use fromLine\n\n bbox.fromLine(x0, y0, x0 + width, y0 + height, min2, max2);\n break;\n\n case CMD.Z:\n xi = x0;\n yi = y0;\n break;\n } // Union\n\n\n vec2.min(min, min, min2);\n vec2.max(max, max, max2);\n } // No data\n\n\n if (i === 0) {\n min[0] = min[1] = max[0] = max[1] = 0;\n }\n\n return new BoundingRect(min[0], min[1], max[0] - min[0], max[1] - min[1]);\n },\n\n /**\n * Rebuild path from current data\n * Rebuild path will not consider javascript implemented line dash.\n * @param {CanvasRenderingContext2D} ctx\n */\n rebuildPath: function (ctx) {\n var d = this.data;\n var x0;\n var y0;\n var xi;\n var yi;\n var x;\n var y;\n var ux = this._ux;\n var uy = this._uy;\n var len = this._len;\n\n for (var i = 0; i < len;) {\n var cmd = d[i++];\n\n if (i === 1) {\n // 如果第一个命令是 L, C, Q\n // 则 previous point 同绘制命令的第一个 point\n //\n // 第一个命令为 Arc 的情况下会在后面特殊处理\n xi = d[i];\n yi = d[i + 1];\n x0 = xi;\n y0 = yi;\n }\n\n switch (cmd) {\n case CMD.M:\n x0 = xi = d[i++];\n y0 = yi = d[i++];\n ctx.moveTo(xi, yi);\n break;\n\n case CMD.L:\n x = d[i++];\n y = d[i++]; // Not draw too small seg between\n\n if (mathAbs(x - xi) > ux || mathAbs(y - yi) > uy || i === len - 1) {\n ctx.lineTo(x, y);\n xi = x;\n yi = y;\n }\n\n break;\n\n case CMD.C:\n ctx.bezierCurveTo(d[i++], d[i++], d[i++], d[i++], d[i++], d[i++]);\n xi = d[i - 2];\n yi = d[i - 1];\n break;\n\n case CMD.Q:\n ctx.quadraticCurveTo(d[i++], d[i++], d[i++], d[i++]);\n xi = d[i - 2];\n yi = d[i - 1];\n break;\n\n case CMD.A:\n var cx = d[i++];\n var cy = d[i++];\n var rx = d[i++];\n var ry = d[i++];\n var theta = d[i++];\n var dTheta = d[i++];\n var psi = d[i++];\n var fs = d[i++];\n var r = rx > ry ? rx : ry;\n var scaleX = rx > ry ? 1 : rx / ry;\n var scaleY = rx > ry ? ry / rx : 1;\n var isEllipse = Math.abs(rx - ry) > 1e-3;\n var endAngle = theta + dTheta;\n\n if (isEllipse) {\n ctx.translate(cx, cy);\n ctx.rotate(psi);\n ctx.scale(scaleX, scaleY);\n ctx.arc(0, 0, r, theta, endAngle, 1 - fs);\n ctx.scale(1 / scaleX, 1 / scaleY);\n ctx.rotate(-psi);\n ctx.translate(-cx, -cy);\n } else {\n ctx.arc(cx, cy, r, theta, endAngle, 1 - fs);\n }\n\n if (i === 1) {\n // 直接使用 arc 命令\n // 第一个命令起点还未定义\n x0 = mathCos(theta) * rx + cx;\n y0 = mathSin(theta) * ry + cy;\n }\n\n xi = mathCos(endAngle) * rx + cx;\n yi = mathSin(endAngle) * ry + cy;\n break;\n\n case CMD.R:\n x0 = xi = d[i];\n y0 = yi = d[i + 1];\n ctx.rect(d[i++], d[i++], d[i++], d[i++]);\n break;\n\n case CMD.Z:\n ctx.closePath();\n xi = x0;\n yi = y0;\n }\n }\n }\n};\nPathProxy.CMD = CMD;\nvar _default = PathProxy;\nmodule.exports = _default;","// Myers' Diff Algorithm\n// Modified from https://github.com/kpdecker/jsdiff/blob/master/src/diff/base.js\nfunction Diff() {}\n\nDiff.prototype = {\n diff: function (oldArr, newArr, equals) {\n if (!equals) {\n equals = function (a, b) {\n return a === b;\n };\n }\n\n this.equals = equals;\n var self = this;\n oldArr = oldArr.slice();\n newArr = newArr.slice(); // Allow subclasses to massage the input prior to running\n\n var newLen = newArr.length;\n var oldLen = oldArr.length;\n var editLength = 1;\n var maxEditLength = newLen + oldLen;\n var bestPath = [{\n newPos: -1,\n components: []\n }]; // Seed editLength = 0, i.e. the content starts with the same values\n\n var oldPos = this.extractCommon(bestPath[0], newArr, oldArr, 0);\n\n if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {\n var indices = [];\n\n for (var i = 0; i < newArr.length; i++) {\n indices.push(i);\n } // Identity per the equality and tokenizer\n\n\n return [{\n indices: indices,\n count: newArr.length\n }];\n } // Main worker method. checks all permutations of a given edit length for acceptance.\n\n\n function execEditLength() {\n for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {\n var basePath;\n var addPath = bestPath[diagonalPath - 1];\n var removePath = bestPath[diagonalPath + 1];\n var oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;\n\n if (addPath) {\n // No one else is going to attempt to use this value, clear it\n bestPath[diagonalPath - 1] = undefined;\n }\n\n var canAdd = addPath && addPath.newPos + 1 < newLen;\n var canRemove = removePath && 0 <= oldPos && oldPos < oldLen;\n\n if (!canAdd && !canRemove) {\n // If this path is a terminal then prune\n bestPath[diagonalPath] = undefined;\n continue;\n } // Select the diagonal that we want to branch from. We select the prior\n // path whose position in the new string is the farthest from the origin\n // and does not pass the bounds of the diff graph\n\n\n if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {\n basePath = clonePath(removePath);\n self.pushComponent(basePath.components, undefined, true);\n } else {\n basePath = addPath; // No need to clone, we've pulled it from the list\n\n basePath.newPos++;\n self.pushComponent(basePath.components, true, undefined);\n }\n\n oldPos = self.extractCommon(basePath, newArr, oldArr, diagonalPath); // If we have hit the end of both strings, then we are done\n\n if (basePath.newPos + 1 >= newLen && oldPos + 1 >= oldLen) {\n return buildValues(self, basePath.components, newArr, oldArr);\n } else {\n // Otherwise track this path as a potential candidate and continue.\n bestPath[diagonalPath] = basePath;\n }\n }\n\n editLength++;\n }\n\n while (editLength <= maxEditLength) {\n var ret = execEditLength();\n\n if (ret) {\n return ret;\n }\n }\n },\n pushComponent: function (components, added, removed) {\n var last = components[components.length - 1];\n\n if (last && last.added === added && last.removed === removed) {\n // We need to clone here as the component clone operation is just\n // as shallow array clone\n components[components.length - 1] = {\n count: last.count + 1,\n added: added,\n removed: removed\n };\n } else {\n components.push({\n count: 1,\n added: added,\n removed: removed\n });\n }\n },\n extractCommon: function (basePath, newArr, oldArr, diagonalPath) {\n var newLen = newArr.length;\n var oldLen = oldArr.length;\n var newPos = basePath.newPos;\n var oldPos = newPos - diagonalPath;\n var commonCount = 0;\n\n while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newArr[newPos + 1], oldArr[oldPos + 1])) {\n newPos++;\n oldPos++;\n commonCount++;\n }\n\n if (commonCount) {\n basePath.components.push({\n count: commonCount\n });\n }\n\n basePath.newPos = newPos;\n return oldPos;\n },\n tokenize: function (value) {\n return value.slice();\n },\n join: function (value) {\n return value.slice();\n }\n};\n\nfunction buildValues(diff, components, newArr, oldArr) {\n var componentPos = 0;\n var componentLen = components.length;\n var newPos = 0;\n var oldPos = 0;\n\n for (; componentPos < componentLen; componentPos++) {\n var component = components[componentPos];\n\n if (!component.removed) {\n var indices = [];\n\n for (var i = newPos; i < newPos + component.count; i++) {\n indices.push(i);\n }\n\n component.indices = indices;\n newPos += component.count; // Common case\n\n if (!component.added) {\n oldPos += component.count;\n }\n } else {\n var indices = [];\n\n for (var i = oldPos; i < oldPos + component.count; i++) {\n indices.push(i);\n }\n\n component.indices = indices;\n oldPos += component.count;\n }\n }\n\n return components;\n}\n\nfunction clonePath(path) {\n return {\n newPos: path.newPos,\n components: path.components.slice(0)\n };\n}\n\nvar arrayDiff = new Diff();\n\nfunction _default(oldArr, newArr, callback) {\n return arrayDiff.diff(oldArr, newArr, callback);\n}\n\nmodule.exports = _default;","var vec2 = require(\"./vector\");\n\nvar curve = require(\"./curve\");\n\n/**\n * @author Yi Shen(https://github.com/pissang)\n */\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nvar mathSin = Math.sin;\nvar mathCos = Math.cos;\nvar PI2 = Math.PI * 2;\nvar start = vec2.create();\nvar end = vec2.create();\nvar extremity = vec2.create();\n/**\n * 从顶点数组中计算出最小包围盒,写入`min`和`max`中\n * @module zrender/core/bbox\n * @param {Array} points 顶点数组\n * @param {number} min\n * @param {number} max\n */\n\nfunction fromPoints(points, min, max) {\n if (points.length === 0) {\n return;\n }\n\n var p = points[0];\n var left = p[0];\n var right = p[0];\n var top = p[1];\n var bottom = p[1];\n var i;\n\n for (i = 1; i < points.length; i++) {\n p = points[i];\n left = mathMin(left, p[0]);\n right = mathMax(right, p[0]);\n top = mathMin(top, p[1]);\n bottom = mathMax(bottom, p[1]);\n }\n\n min[0] = left;\n min[1] = top;\n max[0] = right;\n max[1] = bottom;\n}\n/**\n * @memberOf module:zrender/core/bbox\n * @param {number} x0\n * @param {number} y0\n * @param {number} x1\n * @param {number} y1\n * @param {Array.} min\n * @param {Array.} max\n */\n\n\nfunction fromLine(x0, y0, x1, y1, min, max) {\n min[0] = mathMin(x0, x1);\n min[1] = mathMin(y0, y1);\n max[0] = mathMax(x0, x1);\n max[1] = mathMax(y0, y1);\n}\n\nvar xDim = [];\nvar yDim = [];\n/**\n * 从三阶贝塞尔曲线(p0, p1, p2, p3)中计算出最小包围盒,写入`min`和`max`中\n * @memberOf module:zrender/core/bbox\n * @param {number} x0\n * @param {number} y0\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @param {Array.} min\n * @param {Array.} max\n */\n\nfunction fromCubic(x0, y0, x1, y1, x2, y2, x3, y3, min, max) {\n var cubicExtrema = curve.cubicExtrema;\n var cubicAt = curve.cubicAt;\n var i;\n var n = cubicExtrema(x0, x1, x2, x3, xDim);\n min[0] = Infinity;\n min[1] = Infinity;\n max[0] = -Infinity;\n max[1] = -Infinity;\n\n for (i = 0; i < n; i++) {\n var x = cubicAt(x0, x1, x2, x3, xDim[i]);\n min[0] = mathMin(x, min[0]);\n max[0] = mathMax(x, max[0]);\n }\n\n n = cubicExtrema(y0, y1, y2, y3, yDim);\n\n for (i = 0; i < n; i++) {\n var y = cubicAt(y0, y1, y2, y3, yDim[i]);\n min[1] = mathMin(y, min[1]);\n max[1] = mathMax(y, max[1]);\n }\n\n min[0] = mathMin(x0, min[0]);\n max[0] = mathMax(x0, max[0]);\n min[0] = mathMin(x3, min[0]);\n max[0] = mathMax(x3, max[0]);\n min[1] = mathMin(y0, min[1]);\n max[1] = mathMax(y0, max[1]);\n min[1] = mathMin(y3, min[1]);\n max[1] = mathMax(y3, max[1]);\n}\n/**\n * 从二阶贝塞尔曲线(p0, p1, p2)中计算出最小包围盒,写入`min`和`max`中\n * @memberOf module:zrender/core/bbox\n * @param {number} x0\n * @param {number} y0\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {Array.} min\n * @param {Array.} max\n */\n\n\nfunction fromQuadratic(x0, y0, x1, y1, x2, y2, min, max) {\n var quadraticExtremum = curve.quadraticExtremum;\n var quadraticAt = curve.quadraticAt; // Find extremities, where derivative in x dim or y dim is zero\n\n var tx = mathMax(mathMin(quadraticExtremum(x0, x1, x2), 1), 0);\n var ty = mathMax(mathMin(quadraticExtremum(y0, y1, y2), 1), 0);\n var x = quadraticAt(x0, x1, x2, tx);\n var y = quadraticAt(y0, y1, y2, ty);\n min[0] = mathMin(x0, x2, x);\n min[1] = mathMin(y0, y2, y);\n max[0] = mathMax(x0, x2, x);\n max[1] = mathMax(y0, y2, y);\n}\n/**\n * 从圆弧中计算出最小包围盒,写入`min`和`max`中\n * @method\n * @memberOf module:zrender/core/bbox\n * @param {number} x\n * @param {number} y\n * @param {number} rx\n * @param {number} ry\n * @param {number} startAngle\n * @param {number} endAngle\n * @param {number} anticlockwise\n * @param {Array.} min\n * @param {Array.} max\n */\n\n\nfunction fromArc(x, y, rx, ry, startAngle, endAngle, anticlockwise, min, max) {\n var vec2Min = vec2.min;\n var vec2Max = vec2.max;\n var diff = Math.abs(startAngle - endAngle);\n\n if (diff % PI2 < 1e-4 && diff > 1e-4) {\n // Is a circle\n min[0] = x - rx;\n min[1] = y - ry;\n max[0] = x + rx;\n max[1] = y + ry;\n return;\n }\n\n start[0] = mathCos(startAngle) * rx + x;\n start[1] = mathSin(startAngle) * ry + y;\n end[0] = mathCos(endAngle) * rx + x;\n end[1] = mathSin(endAngle) * ry + y;\n vec2Min(min, start, end);\n vec2Max(max, start, end); // Thresh to [0, Math.PI * 2]\n\n startAngle = startAngle % PI2;\n\n if (startAngle < 0) {\n startAngle = startAngle + PI2;\n }\n\n endAngle = endAngle % PI2;\n\n if (endAngle < 0) {\n endAngle = endAngle + PI2;\n }\n\n if (startAngle > endAngle && !anticlockwise) {\n endAngle += PI2;\n } else if (startAngle < endAngle && anticlockwise) {\n startAngle += PI2;\n }\n\n if (anticlockwise) {\n var tmp = endAngle;\n endAngle = startAngle;\n startAngle = tmp;\n } // var number = 0;\n // var step = (anticlockwise ? -Math.PI : Math.PI) / 2;\n\n\n for (var angle = 0; angle < endAngle; angle += Math.PI / 2) {\n if (angle > startAngle) {\n extremity[0] = mathCos(angle) * rx + x;\n extremity[1] = mathSin(angle) * ry + y;\n vec2Min(min, extremity, min);\n vec2Max(max, extremity, max);\n }\n }\n}\n\nexports.fromPoints = fromPoints;\nexports.fromLine = fromLine;\nexports.fromCubic = fromCubic;\nexports.fromQuadratic = fromQuadratic;\nexports.fromArc = fromArc;","var _vector = require(\"./vector\");\n\nvar v2Create = _vector.create;\nvar v2DistSquare = _vector.distSquare;\n\n/**\n * 曲线辅助模块\n * @module zrender/core/curve\n * @author pissang(https://www.github.com/pissang)\n */\nvar mathPow = Math.pow;\nvar mathSqrt = Math.sqrt;\nvar EPSILON = 1e-8;\nvar EPSILON_NUMERIC = 1e-4;\nvar THREE_SQRT = mathSqrt(3);\nvar ONE_THIRD = 1 / 3; // 临时变量\n\nvar _v0 = v2Create();\n\nvar _v1 = v2Create();\n\nvar _v2 = v2Create();\n\nfunction isAroundZero(val) {\n return val > -EPSILON && val < EPSILON;\n}\n\nfunction isNotAroundZero(val) {\n return val > EPSILON || val < -EPSILON;\n}\n/**\n * 计算三次贝塞尔值\n * @memberOf module:zrender/core/curve\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @param {number} p3\n * @param {number} t\n * @return {number}\n */\n\n\nfunction cubicAt(p0, p1, p2, p3, t) {\n var onet = 1 - t;\n return onet * onet * (onet * p0 + 3 * t * p1) + t * t * (t * p3 + 3 * onet * p2);\n}\n/**\n * 计算三次贝塞尔导数值\n * @memberOf module:zrender/core/curve\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @param {number} p3\n * @param {number} t\n * @return {number}\n */\n\n\nfunction cubicDerivativeAt(p0, p1, p2, p3, t) {\n var onet = 1 - t;\n return 3 * (((p1 - p0) * onet + 2 * (p2 - p1) * t) * onet + (p3 - p2) * t * t);\n}\n/**\n * 计算三次贝塞尔方程根,使用盛金公式\n * @memberOf module:zrender/core/curve\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @param {number} p3\n * @param {number} val\n * @param {Array.} roots\n * @return {number} 有效根数目\n */\n\n\nfunction cubicRootAt(p0, p1, p2, p3, val, roots) {\n // Evaluate roots of cubic functions\n var a = p3 + 3 * (p1 - p2) - p0;\n var b = 3 * (p2 - p1 * 2 + p0);\n var c = 3 * (p1 - p0);\n var d = p0 - val;\n var A = b * b - 3 * a * c;\n var B = b * c - 9 * a * d;\n var C = c * c - 3 * b * d;\n var n = 0;\n\n if (isAroundZero(A) && isAroundZero(B)) {\n if (isAroundZero(b)) {\n roots[0] = 0;\n } else {\n var t1 = -c / b; //t1, t2, t3, b is not zero\n\n if (t1 >= 0 && t1 <= 1) {\n roots[n++] = t1;\n }\n }\n } else {\n var disc = B * B - 4 * A * C;\n\n if (isAroundZero(disc)) {\n var K = B / A;\n var t1 = -b / a + K; // t1, a is not zero\n\n var t2 = -K / 2; // t2, t3\n\n if (t1 >= 0 && t1 <= 1) {\n roots[n++] = t1;\n }\n\n if (t2 >= 0 && t2 <= 1) {\n roots[n++] = t2;\n }\n } else if (disc > 0) {\n var discSqrt = mathSqrt(disc);\n var Y1 = A * b + 1.5 * a * (-B + discSqrt);\n var Y2 = A * b + 1.5 * a * (-B - discSqrt);\n\n if (Y1 < 0) {\n Y1 = -mathPow(-Y1, ONE_THIRD);\n } else {\n Y1 = mathPow(Y1, ONE_THIRD);\n }\n\n if (Y2 < 0) {\n Y2 = -mathPow(-Y2, ONE_THIRD);\n } else {\n Y2 = mathPow(Y2, ONE_THIRD);\n }\n\n var t1 = (-b - (Y1 + Y2)) / (3 * a);\n\n if (t1 >= 0 && t1 <= 1) {\n roots[n++] = t1;\n }\n } else {\n var T = (2 * A * b - 3 * a * B) / (2 * mathSqrt(A * A * A));\n var theta = Math.acos(T) / 3;\n var ASqrt = mathSqrt(A);\n var tmp = Math.cos(theta);\n var t1 = (-b - 2 * ASqrt * tmp) / (3 * a);\n var t2 = (-b + ASqrt * (tmp + THREE_SQRT * Math.sin(theta))) / (3 * a);\n var t3 = (-b + ASqrt * (tmp - THREE_SQRT * Math.sin(theta))) / (3 * a);\n\n if (t1 >= 0 && t1 <= 1) {\n roots[n++] = t1;\n }\n\n if (t2 >= 0 && t2 <= 1) {\n roots[n++] = t2;\n }\n\n if (t3 >= 0 && t3 <= 1) {\n roots[n++] = t3;\n }\n }\n }\n\n return n;\n}\n/**\n * 计算三次贝塞尔方程极限值的位置\n * @memberOf module:zrender/core/curve\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @param {number} p3\n * @param {Array.} extrema\n * @return {number} 有效数目\n */\n\n\nfunction cubicExtrema(p0, p1, p2, p3, extrema) {\n var b = 6 * p2 - 12 * p1 + 6 * p0;\n var a = 9 * p1 + 3 * p3 - 3 * p0 - 9 * p2;\n var c = 3 * p1 - 3 * p0;\n var n = 0;\n\n if (isAroundZero(a)) {\n if (isNotAroundZero(b)) {\n var t1 = -c / b;\n\n if (t1 >= 0 && t1 <= 1) {\n extrema[n++] = t1;\n }\n }\n } else {\n var disc = b * b - 4 * a * c;\n\n if (isAroundZero(disc)) {\n extrema[0] = -b / (2 * a);\n } else if (disc > 0) {\n var discSqrt = mathSqrt(disc);\n var t1 = (-b + discSqrt) / (2 * a);\n var t2 = (-b - discSqrt) / (2 * a);\n\n if (t1 >= 0 && t1 <= 1) {\n extrema[n++] = t1;\n }\n\n if (t2 >= 0 && t2 <= 1) {\n extrema[n++] = t2;\n }\n }\n }\n\n return n;\n}\n/**\n * 细分三次贝塞尔曲线\n * @memberOf module:zrender/core/curve\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @param {number} p3\n * @param {number} t\n * @param {Array.} out\n */\n\n\nfunction cubicSubdivide(p0, p1, p2, p3, t, out) {\n var p01 = (p1 - p0) * t + p0;\n var p12 = (p2 - p1) * t + p1;\n var p23 = (p3 - p2) * t + p2;\n var p012 = (p12 - p01) * t + p01;\n var p123 = (p23 - p12) * t + p12;\n var p0123 = (p123 - p012) * t + p012; // Seg0\n\n out[0] = p0;\n out[1] = p01;\n out[2] = p012;\n out[3] = p0123; // Seg1\n\n out[4] = p0123;\n out[5] = p123;\n out[6] = p23;\n out[7] = p3;\n}\n/**\n * 投射点到三次贝塞尔曲线上,返回投射距离。\n * 投射点有可能会有一个或者多个,这里只返回其中距离最短的一个。\n * @param {number} x0\n * @param {number} y0\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @param {number} x\n * @param {number} y\n * @param {Array.} [out] 投射点\n * @return {number}\n */\n\n\nfunction cubicProjectPoint(x0, y0, x1, y1, x2, y2, x3, y3, x, y, out) {\n // http://pomax.github.io/bezierinfo/#projections\n var t;\n var interval = 0.005;\n var d = Infinity;\n var prev;\n var next;\n var d1;\n var d2;\n _v0[0] = x;\n _v0[1] = y; // 先粗略估计一下可能的最小距离的 t 值\n // PENDING\n\n for (var _t = 0; _t < 1; _t += 0.05) {\n _v1[0] = cubicAt(x0, x1, x2, x3, _t);\n _v1[1] = cubicAt(y0, y1, y2, y3, _t);\n d1 = v2DistSquare(_v0, _v1);\n\n if (d1 < d) {\n t = _t;\n d = d1;\n }\n }\n\n d = Infinity; // At most 32 iteration\n\n for (var i = 0; i < 32; i++) {\n if (interval < EPSILON_NUMERIC) {\n break;\n }\n\n prev = t - interval;\n next = t + interval; // t - interval\n\n _v1[0] = cubicAt(x0, x1, x2, x3, prev);\n _v1[1] = cubicAt(y0, y1, y2, y3, prev);\n d1 = v2DistSquare(_v1, _v0);\n\n if (prev >= 0 && d1 < d) {\n t = prev;\n d = d1;\n } else {\n // t + interval\n _v2[0] = cubicAt(x0, x1, x2, x3, next);\n _v2[1] = cubicAt(y0, y1, y2, y3, next);\n d2 = v2DistSquare(_v2, _v0);\n\n if (next <= 1 && d2 < d) {\n t = next;\n d = d2;\n } else {\n interval *= 0.5;\n }\n }\n } // t\n\n\n if (out) {\n out[0] = cubicAt(x0, x1, x2, x3, t);\n out[1] = cubicAt(y0, y1, y2, y3, t);\n } // console.log(interval, i);\n\n\n return mathSqrt(d);\n}\n/**\n * 计算二次方贝塞尔值\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @param {number} t\n * @return {number}\n */\n\n\nfunction quadraticAt(p0, p1, p2, t) {\n var onet = 1 - t;\n return onet * (onet * p0 + 2 * t * p1) + t * t * p2;\n}\n/**\n * 计算二次方贝塞尔导数值\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @param {number} t\n * @return {number}\n */\n\n\nfunction quadraticDerivativeAt(p0, p1, p2, t) {\n return 2 * ((1 - t) * (p1 - p0) + t * (p2 - p1));\n}\n/**\n * 计算二次方贝塞尔方程根\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @param {number} t\n * @param {Array.} roots\n * @return {number} 有效根数目\n */\n\n\nfunction quadraticRootAt(p0, p1, p2, val, roots) {\n var a = p0 - 2 * p1 + p2;\n var b = 2 * (p1 - p0);\n var c = p0 - val;\n var n = 0;\n\n if (isAroundZero(a)) {\n if (isNotAroundZero(b)) {\n var t1 = -c / b;\n\n if (t1 >= 0 && t1 <= 1) {\n roots[n++] = t1;\n }\n }\n } else {\n var disc = b * b - 4 * a * c;\n\n if (isAroundZero(disc)) {\n var t1 = -b / (2 * a);\n\n if (t1 >= 0 && t1 <= 1) {\n roots[n++] = t1;\n }\n } else if (disc > 0) {\n var discSqrt = mathSqrt(disc);\n var t1 = (-b + discSqrt) / (2 * a);\n var t2 = (-b - discSqrt) / (2 * a);\n\n if (t1 >= 0 && t1 <= 1) {\n roots[n++] = t1;\n }\n\n if (t2 >= 0 && t2 <= 1) {\n roots[n++] = t2;\n }\n }\n }\n\n return n;\n}\n/**\n * 计算二次贝塞尔方程极限值\n * @memberOf module:zrender/core/curve\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @return {number}\n */\n\n\nfunction quadraticExtremum(p0, p1, p2) {\n var divider = p0 + p2 - 2 * p1;\n\n if (divider === 0) {\n // p1 is center of p0 and p2\n return 0.5;\n } else {\n return (p0 - p1) / divider;\n }\n}\n/**\n * 细分二次贝塞尔曲线\n * @memberOf module:zrender/core/curve\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @param {number} t\n * @param {Array.} out\n */\n\n\nfunction quadraticSubdivide(p0, p1, p2, t, out) {\n var p01 = (p1 - p0) * t + p0;\n var p12 = (p2 - p1) * t + p1;\n var p012 = (p12 - p01) * t + p01; // Seg0\n\n out[0] = p0;\n out[1] = p01;\n out[2] = p012; // Seg1\n\n out[3] = p012;\n out[4] = p12;\n out[5] = p2;\n}\n/**\n * 投射点到二次贝塞尔曲线上,返回投射距离。\n * 投射点有可能会有一个或者多个,这里只返回其中距离最短的一个。\n * @param {number} x0\n * @param {number} y0\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x\n * @param {number} y\n * @param {Array.} out 投射点\n * @return {number}\n */\n\n\nfunction quadraticProjectPoint(x0, y0, x1, y1, x2, y2, x, y, out) {\n // http://pomax.github.io/bezierinfo/#projections\n var t;\n var interval = 0.005;\n var d = Infinity;\n _v0[0] = x;\n _v0[1] = y; // 先粗略估计一下可能的最小距离的 t 值\n // PENDING\n\n for (var _t = 0; _t < 1; _t += 0.05) {\n _v1[0] = quadraticAt(x0, x1, x2, _t);\n _v1[1] = quadraticAt(y0, y1, y2, _t);\n var d1 = v2DistSquare(_v0, _v1);\n\n if (d1 < d) {\n t = _t;\n d = d1;\n }\n }\n\n d = Infinity; // At most 32 iteration\n\n for (var i = 0; i < 32; i++) {\n if (interval < EPSILON_NUMERIC) {\n break;\n }\n\n var prev = t - interval;\n var next = t + interval; // t - interval\n\n _v1[0] = quadraticAt(x0, x1, x2, prev);\n _v1[1] = quadraticAt(y0, y1, y2, prev);\n var d1 = v2DistSquare(_v1, _v0);\n\n if (prev >= 0 && d1 < d) {\n t = prev;\n d = d1;\n } else {\n // t + interval\n _v2[0] = quadraticAt(x0, x1, x2, next);\n _v2[1] = quadraticAt(y0, y1, y2, next);\n var d2 = v2DistSquare(_v2, _v0);\n\n if (next <= 1 && d2 < d) {\n t = next;\n d = d2;\n } else {\n interval *= 0.5;\n }\n }\n } // t\n\n\n if (out) {\n out[0] = quadraticAt(x0, x1, x2, t);\n out[1] = quadraticAt(y0, y1, y2, t);\n } // console.log(interval, i);\n\n\n return mathSqrt(d);\n}\n\nexports.cubicAt = cubicAt;\nexports.cubicDerivativeAt = cubicDerivativeAt;\nexports.cubicRootAt = cubicRootAt;\nexports.cubicExtrema = cubicExtrema;\nexports.cubicSubdivide = cubicSubdivide;\nexports.cubicProjectPoint = cubicProjectPoint;\nexports.quadraticAt = quadraticAt;\nexports.quadraticDerivativeAt = quadraticDerivativeAt;\nexports.quadraticRootAt = quadraticRootAt;\nexports.quadraticExtremum = quadraticExtremum;\nexports.quadraticSubdivide = quadraticSubdivide;\nexports.quadraticProjectPoint = quadraticProjectPoint;","var env = require(\"./env\");\n\nvar _fourPointsTransform = require(\"./fourPointsTransform\");\n\nvar buildTransformer = _fourPointsTransform.buildTransformer;\nvar EVENT_SAVED_PROP = '___zrEVENTSAVED';\nvar _calcOut = [];\n/**\n * Transform \"local coord\" from `elFrom` to `elTarget`.\n * \"local coord\": the coord based on the input `el`. The origin point is at\n * the position of \"left: 0; top: 0;\" in the `el`.\n *\n * Support when CSS transform is used.\n *\n * Having the `out` (that is, `[outX, outY]`), we can create an DOM element\n * and set the CSS style as \"left: outX; top: outY;\" and append it to `elTarge`\n * to locate the element.\n *\n * For example, this code below positions a child of `document.body` on the event\n * point, no matter whether `body` has `margin`/`paddin`/`transfrom`/... :\n * ```js\n * transformLocalCoord(out, container, document.body, event.offsetX, event.offsetY);\n * if (!eqNaN(out[0])) {\n * // Then locate the tip element on the event point.\n * var tipEl = document.createElement('div');\n * tipEl.style.cssText = 'position: absolute; left:' + out[0] + ';top:' + out[1] + ';';\n * document.body.appendChild(tipEl);\n * }\n * ```\n *\n * Notice: In some env this method is not supported. If called, `out` will be `[NaN, NaN]`.\n *\n * @param {Array.} out [inX: number, inY: number] The output..\n * If can not transform, `out` will not be modified but return `false`.\n * @param {HTMLElement} elFrom The `[inX, inY]` is based on elFrom.\n * @param {HTMLElement} elTarget The `out` is based on elTarget.\n * @param {number} inX\n * @param {number} inY\n * @return {boolean} Whether transform successfully.\n */\n\nfunction transformLocalCoord(out, elFrom, elTarget, inX, inY) {\n return transformCoordWithViewport(_calcOut, elFrom, inX, inY, true) && transformCoordWithViewport(out, elTarget, _calcOut[0], _calcOut[1]);\n}\n/**\n * Transform between a \"viewport coord\" and a \"local coord\".\n * \"viewport coord\": the coord based on the left-top corner of the viewport\n * of the browser.\n * \"local coord\": the coord based on the input `el`. The origin point is at\n * the position of \"left: 0; top: 0;\" in the `el`.\n *\n * Support the case when CSS transform is used on el.\n *\n * @param {Array.} out [inX: number, inY: number] The output. If `inverse: false`,\n * it represents \"local coord\", otherwise \"vireport coord\".\n * If can not transform, `out` will not be modified but return `false`.\n * @param {HTMLElement} el The \"local coord\" is based on the `el`, see comment above.\n * @param {number} inX If `inverse: false`,\n * it represents \"vireport coord\", otherwise \"local coord\".\n * @param {number} inY If `inverse: false`,\n * it represents \"vireport coord\", otherwise \"local coord\".\n * @param {boolean} [inverse=false]\n * `true`: from \"viewport coord\" to \"local coord\".\n * `false`: from \"local coord\" to \"viewport coord\".\n * @return {boolean} Whether transform successfully.\n */\n\n\nfunction transformCoordWithViewport(out, el, inX, inY, inverse) {\n if (el.getBoundingClientRect && env.domSupported && !isCanvasEl(el)) {\n var saved = el[EVENT_SAVED_PROP] || (el[EVENT_SAVED_PROP] = {});\n var markers = prepareCoordMarkers(el, saved);\n var transformer = preparePointerTransformer(markers, saved, inverse);\n\n if (transformer) {\n transformer(out, inX, inY);\n return true;\n }\n }\n\n return false;\n}\n\nfunction prepareCoordMarkers(el, saved) {\n var markers = saved.markers;\n\n if (markers) {\n return markers;\n }\n\n markers = saved.markers = [];\n var propLR = ['left', 'right'];\n var propTB = ['top', 'bottom'];\n\n for (var i = 0; i < 4; i++) {\n var marker = document.createElement('div');\n var stl = marker.style;\n var idxLR = i % 2;\n var idxTB = (i >> 1) % 2;\n stl.cssText = ['position: absolute', 'visibility: hidden', 'padding: 0', 'margin: 0', 'border-width: 0', 'user-select: none', 'width:0', 'height:0', // 'width: 5px',\n // 'height: 5px',\n propLR[idxLR] + ':0', propTB[idxTB] + ':0', propLR[1 - idxLR] + ':auto', propTB[1 - idxTB] + ':auto', ''].join('!important;');\n el.appendChild(marker);\n markers.push(marker);\n }\n\n return markers;\n}\n\nfunction preparePointerTransformer(markers, saved, inverse) {\n var transformerName = inverse ? 'invTrans' : 'trans';\n var transformer = saved[transformerName];\n var oldSrcCoords = saved.srcCoords;\n var oldCoordTheSame = true;\n var srcCoords = [];\n var destCoords = [];\n\n for (var i = 0; i < 4; i++) {\n var rect = markers[i].getBoundingClientRect();\n var ii = 2 * i;\n var x = rect.left;\n var y = rect.top;\n srcCoords.push(x, y);\n oldCoordTheSame = oldCoordTheSame && oldSrcCoords && x === oldSrcCoords[ii] && y === oldSrcCoords[ii + 1];\n destCoords.push(markers[i].offsetLeft, markers[i].offsetTop);\n } // Cache to avoid time consuming of `buildTransformer`.\n\n\n return oldCoordTheSame && transformer ? transformer : (saved.srcCoords = srcCoords, saved[transformerName] = inverse ? buildTransformer(destCoords, srcCoords) : buildTransformer(srcCoords, destCoords));\n}\n\nfunction isCanvasEl(el) {\n return el.nodeName.toUpperCase() === 'CANVAS';\n}\n\nexports.transformLocalCoord = transformLocalCoord;\nexports.transformCoordWithViewport = transformCoordWithViewport;\nexports.isCanvasEl = isCanvasEl;","/**\n * echarts设备环境识别\n *\n * @desc echarts基于Canvas,纯Javascript图表库,提供直观,生动,可交互,可个性化定制的数据统计图表。\n * @author firede[firede@firede.us]\n * @desc thanks zepto.\n */\n\n/* global wx */\nvar env = {};\n\nif (typeof wx === 'object' && typeof wx.getSystemInfoSync === 'function') {\n // In Weixin Application\n env = {\n browser: {},\n os: {},\n node: false,\n wxa: true,\n // Weixin Application\n canvasSupported: true,\n svgSupported: false,\n touchEventsSupported: true,\n domSupported: false\n };\n} else if (typeof document === 'undefined' && typeof self !== 'undefined') {\n // In worker\n env = {\n browser: {},\n os: {},\n node: false,\n worker: true,\n canvasSupported: true,\n domSupported: false\n };\n} else if (typeof navigator === 'undefined') {\n // In node\n env = {\n browser: {},\n os: {},\n node: true,\n worker: false,\n // Assume canvas is supported\n canvasSupported: true,\n svgSupported: true,\n domSupported: false\n };\n} else {\n env = detect(navigator.userAgent);\n}\n\nvar _default = env; // Zepto.js\n// (c) 2010-2013 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\nfunction detect(ua) {\n var os = {};\n var browser = {}; // var webkit = ua.match(/Web[kK]it[\\/]{0,1}([\\d.]+)/);\n // var android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/);\n // var ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n // var ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n // var iphone = !ipad && ua.match(/(iPhone\\sOS)\\s([\\d_]+)/);\n // var webos = ua.match(/(webOS|hpwOS)[\\s\\/]([\\d.]+)/);\n // var touchpad = webos && ua.match(/TouchPad/);\n // var kindle = ua.match(/Kindle\\/([\\d.]+)/);\n // var silk = ua.match(/Silk\\/([\\d._]+)/);\n // var blackberry = ua.match(/(BlackBerry).*Version\\/([\\d.]+)/);\n // var bb10 = ua.match(/(BB10).*Version\\/([\\d.]+)/);\n // var rimtabletos = ua.match(/(RIM\\sTablet\\sOS)\\s([\\d.]+)/);\n // var playbook = ua.match(/PlayBook/);\n // var chrome = ua.match(/Chrome\\/([\\d.]+)/) || ua.match(/CriOS\\/([\\d.]+)/);\n\n var firefox = ua.match(/Firefox\\/([\\d.]+)/); // var safari = webkit && ua.match(/Mobile\\//) && !chrome;\n // var webview = ua.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/) && !chrome;\n\n var ie = ua.match(/MSIE\\s([\\d.]+)/) // IE 11 Trident/7.0; rv:11.0\n || ua.match(/Trident\\/.+?rv:(([\\d.]+))/);\n var edge = ua.match(/Edge\\/([\\d.]+)/); // IE 12 and 12+\n\n var weChat = /micromessenger/i.test(ua); // Todo: clean this up with a better OS/browser seperation:\n // - discern (more) between multiple browsers on android\n // - decide if kindle fire in silk mode is android or not\n // - Firefox on Android doesn't specify the Android version\n // - possibly devide in os, device and browser hashes\n // if (browser.webkit = !!webkit) browser.version = webkit[1];\n // if (android) os.android = true, os.version = android[2];\n // if (iphone && !ipod) os.ios = os.iphone = true, os.version = iphone[2].replace(/_/g, '.');\n // if (ipad) os.ios = os.ipad = true, os.version = ipad[2].replace(/_/g, '.');\n // if (ipod) os.ios = os.ipod = true, os.version = ipod[3] ? ipod[3].replace(/_/g, '.') : null;\n // if (webos) os.webos = true, os.version = webos[2];\n // if (touchpad) os.touchpad = true;\n // if (blackberry) os.blackberry = true, os.version = blackberry[2];\n // if (bb10) os.bb10 = true, os.version = bb10[2];\n // if (rimtabletos) os.rimtabletos = true, os.version = rimtabletos[2];\n // if (playbook) browser.playbook = true;\n // if (kindle) os.kindle = true, os.version = kindle[1];\n // if (silk) browser.silk = true, browser.version = silk[1];\n // if (!silk && os.android && ua.match(/Kindle Fire/)) browser.silk = true;\n // if (chrome) browser.chrome = true, browser.version = chrome[1];\n\n if (firefox) {\n browser.firefox = true;\n browser.version = firefox[1];\n } // if (safari && (ua.match(/Safari/) || !!os.ios)) browser.safari = true;\n // if (webview) browser.webview = true;\n\n\n if (ie) {\n browser.ie = true;\n browser.version = ie[1];\n }\n\n if (edge) {\n browser.edge = true;\n browser.version = edge[1];\n } // It is difficult to detect WeChat in Win Phone precisely, because ua can\n // not be set on win phone. So we do not consider Win Phone.\n\n\n if (weChat) {\n browser.weChat = true;\n } // os.tablet = !!(ipad || playbook || (android && !ua.match(/Mobile/)) ||\n // (firefox && ua.match(/Tablet/)) || (ie && !ua.match(/Phone/) && ua.match(/Touch/)));\n // os.phone = !!(!os.tablet && !os.ipod && (android || iphone || webos ||\n // (chrome && ua.match(/Android/)) || (chrome && ua.match(/CriOS\\/([\\d.]+)/)) ||\n // (firefox && ua.match(/Mobile/)) || (ie && ua.match(/Touch/))));\n\n\n return {\n browser: browser,\n os: os,\n node: false,\n // 原生canvas支持,改极端点了\n // canvasSupported : !(browser.ie && parseFloat(browser.version) < 9)\n canvasSupported: !!document.createElement('canvas').getContext,\n svgSupported: typeof SVGRect !== 'undefined',\n // works on most browsers\n // IE10/11 does not support touch event, and MS Edge supports them but not by\n // default, so we dont check navigator.maxTouchPoints for them here.\n touchEventsSupported: 'ontouchstart' in window && !browser.ie && !browser.edge,\n // .\n pointerEventsSupported: // (1) Firefox supports pointer but not by default, only MS browsers are reliable on pointer\n // events currently. So we dont use that on other browsers unless tested sufficiently.\n // For example, in iOS 13 Mobile Chromium 78, if the touching behavior starts page\n // scroll, the `pointermove` event can not be fired any more. That will break some\n // features like \"pan horizontally to move something and pan vertically to page scroll\".\n // The horizontal pan probably be interrupted by the casually triggered page scroll.\n // (2) Although IE 10 supports pointer event, it use old style and is different from the\n // standard. So we exclude that. (IE 10 is hardly used on touch device)\n 'onpointerdown' in window && (browser.edge || browser.ie && browser.version >= 11),\n // passiveSupported: detectPassiveSupport()\n domSupported: typeof document !== 'undefined'\n };\n} // See https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection\n// function detectPassiveSupport() {\n// // Test via a getter in the options object to see if the passive property is accessed\n// var supportsPassive = false;\n// try {\n// var opts = Object.defineProperty({}, 'passive', {\n// get: function() {\n// supportsPassive = true;\n// }\n// });\n// window.addEventListener('testPassive', function() {}, opts);\n// } catch (e) {\n// }\n// return supportsPassive;\n// }\n\n\nmodule.exports = _default;","var Eventful = require(\"../mixin/Eventful\");\n\nexports.Dispatcher = Eventful;\n\nvar env = require(\"./env\");\n\nvar _dom = require(\"./dom\");\n\nvar isCanvasEl = _dom.isCanvasEl;\nvar transformCoordWithViewport = _dom.transformCoordWithViewport;\n\n/**\n * Utilities for mouse or touch events.\n */\nvar isDomLevel2 = typeof window !== 'undefined' && !!window.addEventListener;\nvar MOUSE_EVENT_REG = /^(?:mouse|pointer|contextmenu|drag|drop)|click/;\nvar _calcOut = [];\n/**\n * Get the `zrX` and `zrY`, which are relative to the top-left of\n * the input `el`.\n * CSS transform (2D & 3D) is supported.\n *\n * The strategy to fetch the coords:\n * + If `calculate` is not set as `true`, users of this method should\n * ensure that `el` is the same or the same size & location as `e.target`.\n * Otherwise the result coords are probably not expected. Because we\n * firstly try to get coords from e.offsetX/e.offsetY.\n * + If `calculate` is set as `true`, the input `el` can be any element\n * and we force to calculate the coords based on `el`.\n * + The input `el` should be positionable (not position:static).\n *\n * The force `calculate` can be used in case like:\n * When mousemove event triggered on ec tooltip, `e.target` is not `el`(zr painter.dom).\n *\n * @param {HTMLElement} el DOM element.\n * @param {Event} e Mouse event or touch event.\n * @param {Object} out Get `out.zrX` and `out.zrY` as the result.\n * @param {boolean} [calculate=false] Whether to force calculate\n * the coordinates but not use ones provided by browser.\n */\n\nfunction clientToLocal(el, e, out, calculate) {\n out = out || {}; // According to the W3C Working Draft, offsetX and offsetY should be relative\n // to the padding edge of the target element. The only browser using this convention\n // is IE. Webkit uses the border edge, Opera uses the content edge, and FireFox does\n // not support the properties.\n // (see http://www.jacklmoore.com/notes/mouse-position/)\n // In zr painter.dom, padding edge equals to border edge.\n\n if (calculate || !env.canvasSupported) {\n calculateZrXY(el, e, out);\n } // Caution: In FireFox, layerX/layerY Mouse position relative to the closest positioned\n // ancestor element, so we should make sure el is positioned (e.g., not position:static).\n // BTW1, Webkit don't return the same results as FF in non-simple cases (like add\n // zoom-factor, overflow / opacity layers, transforms ...)\n // BTW2, (ev.offsetY || ev.pageY - $(ev.target).offset().top) is not correct in preserve-3d.\n // \n // BTW3, In ff, offsetX/offsetY is always 0.\n else if (env.browser.firefox && e.layerX != null && e.layerX !== e.offsetX) {\n out.zrX = e.layerX;\n out.zrY = e.layerY;\n } // For IE6+, chrome, safari, opera. (When will ff support offsetX?)\n else if (e.offsetX != null) {\n out.zrX = e.offsetX;\n out.zrY = e.offsetY;\n } // For some other device, e.g., IOS safari.\n else {\n calculateZrXY(el, e, out);\n }\n\n return out;\n}\n\nfunction calculateZrXY(el, e, out) {\n // BlackBerry 5, iOS 3 (original iPhone) don't have getBoundingRect.\n if (env.domSupported && el.getBoundingClientRect) {\n var ex = e.clientX;\n var ey = e.clientY;\n\n if (isCanvasEl(el)) {\n // Original approach, which do not support CSS transform.\n // marker can not be locationed in a canvas container\n // (getBoundingClientRect is always 0). We do not support\n // that input a pre-created canvas to zr while using css\n // transform in iOS.\n var box = el.getBoundingClientRect();\n out.zrX = ex - box.left;\n out.zrY = ey - box.top;\n return;\n } else {\n if (transformCoordWithViewport(_calcOut, el, ex, ey)) {\n out.zrX = _calcOut[0];\n out.zrY = _calcOut[1];\n return;\n }\n }\n }\n\n out.zrX = out.zrY = 0;\n}\n/**\n * Find native event compat for legency IE.\n * Should be called at the begining of a native event listener.\n *\n * @param {Event} [e] Mouse event or touch event or pointer event.\n * For lagency IE, we use `window.event` is used.\n * @return {Event} The native event.\n */\n\n\nfunction getNativeEvent(e) {\n return e || window.event;\n}\n/**\n * Normalize the coordinates of the input event.\n *\n * Get the `e.zrX` and `e.zrY`, which are relative to the top-left of\n * the input `el`.\n * Get `e.zrDelta` if using mouse wheel.\n * Get `e.which`, see the comment inside this function.\n *\n * Do not calculate repeatly if `zrX` and `zrY` already exist.\n *\n * Notice: see comments in `clientToLocal`. check the relationship\n * between the result coords and the parameters `el` and `calculate`.\n *\n * @param {HTMLElement} el DOM element.\n * @param {Event} [e] See `getNativeEvent`.\n * @param {boolean} [calculate=false] Whether to force calculate\n * the coordinates but not use ones provided by browser.\n * @return {UIEvent} The normalized native UIEvent.\n */\n\n\nfunction normalizeEvent(el, e, calculate) {\n e = getNativeEvent(e);\n\n if (e.zrX != null) {\n return e;\n }\n\n var eventType = e.type;\n var isTouch = eventType && eventType.indexOf('touch') >= 0;\n\n if (!isTouch) {\n clientToLocal(el, e, e, calculate);\n e.zrDelta = e.wheelDelta ? e.wheelDelta / 120 : -(e.detail || 0) / 3;\n } else {\n var touch = eventType !== 'touchend' ? e.targetTouches[0] : e.changedTouches[0];\n touch && clientToLocal(el, touch, e, calculate);\n } // Add which for click: 1 === left; 2 === middle; 3 === right; otherwise: 0;\n // See jQuery: https://github.com/jquery/jquery/blob/master/src/event.js\n // If e.which has been defined, it may be readonly,\n // see: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/which\n\n\n var button = e.button;\n\n if (e.which == null && button !== undefined && MOUSE_EVENT_REG.test(e.type)) {\n e.which = button & 1 ? 1 : button & 2 ? 3 : button & 4 ? 2 : 0;\n } // [Caution]: `e.which` from browser is not always reliable. For example,\n // when press left button and `mousemove (pointermove)` in Edge, the `e.which`\n // is 65536 and the `e.button` is -1. But the `mouseup (pointerup)` and\n // `mousedown (pointerdown)` is the same as Chrome does.\n\n\n return e;\n}\n/**\n * @param {HTMLElement} el\n * @param {string} name\n * @param {Function} handler\n * @param {Object|boolean} opt If boolean, means `opt.capture`\n * @param {boolean} [opt.capture=false]\n * @param {boolean} [opt.passive=false]\n */\n\n\nfunction addEventListener(el, name, handler, opt) {\n if (isDomLevel2) {\n // Reproduct the console warning:\n // [Violation] Added non-passive event listener to a scroll-blocking event.\n // Consider marking event handler as 'passive' to make the page more responsive.\n // Just set console log level: verbose in chrome dev tool.\n // then the warning log will be printed when addEventListener called.\n // See https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n // We have not yet found a neat way to using passive. Because in zrender the dom event\n // listener delegate all of the upper events of element. Some of those events need\n // to prevent default. For example, the feature `preventDefaultMouseMove` of echarts.\n // Before passive can be adopted, these issues should be considered:\n // (1) Whether and how a zrender user specifies an event listener passive. And by default,\n // passive or not.\n // (2) How to tread that some zrender event listener is passive, and some is not. If\n // we use other way but not preventDefault of mousewheel and touchmove, browser\n // compatibility should be handled.\n // var opts = (env.passiveSupported && name === 'mousewheel')\n // ? {passive: true}\n // // By default, the third param of el.addEventListener is `capture: false`.\n // : void 0;\n // el.addEventListener(name, handler /* , opts */);\n el.addEventListener(name, handler, opt);\n } else {\n // For simplicity, do not implement `setCapture` for IE9-.\n el.attachEvent('on' + name, handler);\n }\n}\n/**\n * Parameter are the same as `addEventListener`.\n *\n * Notice that if a listener is registered twice, one with capture and one without,\n * remove each one separately. Removal of a capturing listener does not affect a\n * non-capturing version of the same listener, and vice versa.\n */\n\n\nfunction removeEventListener(el, name, handler, opt) {\n if (isDomLevel2) {\n el.removeEventListener(name, handler, opt);\n } else {\n el.detachEvent('on' + name, handler);\n }\n}\n/**\n * preventDefault and stopPropagation.\n * Notice: do not use this method in zrender. It can only be\n * used by upper applications if necessary.\n *\n * @param {Event} e A mouse or touch event.\n */\n\n\nvar stop = isDomLevel2 ? function (e) {\n e.preventDefault();\n e.stopPropagation();\n e.cancelBubble = true;\n} : function (e) {\n e.returnValue = false;\n e.cancelBubble = true;\n};\n/**\n * This method only works for mouseup and mousedown. The functionality is restricted\n * for fault tolerance, See the `e.which` compatibility above.\n *\n * @param {MouseEvent} e\n * @return {boolean}\n */\n\nfunction isMiddleOrRightButtonOnMouseUpDown(e) {\n return e.which === 2 || e.which === 3;\n}\n/**\n * To be removed.\n * @deprecated\n */\n\n\nfunction notLeftMouse(e) {\n // If e.which is undefined, considered as left mouse event.\n return e.which > 1;\n} // For backward compatibility\n\n\nexports.clientToLocal = clientToLocal;\nexports.getNativeEvent = getNativeEvent;\nexports.normalizeEvent = normalizeEvent;\nexports.addEventListener = addEventListener;\nexports.removeEventListener = removeEventListener;\nexports.stop = stop;\nexports.isMiddleOrRightButtonOnMouseUpDown = isMiddleOrRightButtonOnMouseUpDown;\nexports.notLeftMouse = notLeftMouse;","/**\n * The algoritm is learnt from\n * https://franklinta.com/2014/09/08/computing-css-matrix3d-transforms/\n * And we made some optimization for matrix inversion.\n * Other similar approaches:\n * \"cv::getPerspectiveTransform\", \"Direct Linear Transformation\".\n */\nvar LN2 = Math.log(2);\n\nfunction determinant(rows, rank, rowStart, rowMask, colMask, detCache) {\n var cacheKey = rowMask + '-' + colMask;\n var fullRank = rows.length;\n\n if (detCache.hasOwnProperty(cacheKey)) {\n return detCache[cacheKey];\n }\n\n if (rank === 1) {\n // In this case the colMask must be like: `11101111`. We can find the place of `0`.\n var colStart = Math.round(Math.log((1 << fullRank) - 1 & ~colMask) / LN2);\n return rows[rowStart][colStart];\n }\n\n var subRowMask = rowMask | 1 << rowStart;\n var subRowStart = rowStart + 1;\n\n while (rowMask & 1 << subRowStart) {\n subRowStart++;\n }\n\n var sum = 0;\n\n for (var j = 0, colLocalIdx = 0; j < fullRank; j++) {\n var colTag = 1 << j;\n\n if (!(colTag & colMask)) {\n sum += (colLocalIdx % 2 ? -1 : 1) * rows[rowStart][j] // det(subMatrix(0, j))\n * determinant(rows, rank - 1, subRowStart, subRowMask, colMask | colTag, detCache);\n colLocalIdx++;\n }\n }\n\n detCache[cacheKey] = sum;\n return sum;\n}\n/**\n * Usage:\n * ```js\n * var transformer = buildTransformer(\n * [10, 44, 100, 44, 100, 300, 10, 300],\n * [50, 54, 130, 14, 140, 330, 14, 220]\n * );\n * var out = [];\n * transformer && transformer([11, 33], out);\n * ```\n *\n * Notice: `buildTransformer` may take more than 10ms in some Android device.\n *\n * @param {Array.} src source four points, [x0, y0, x1, y1, x2, y2, x3, y3]\n * @param {Array.} dest destination four points, [x0, y0, x1, y1, x2, y2, x3, y3]\n * @return {Function} transformer If fail, return null/undefined.\n */\n\n\nfunction buildTransformer(src, dest) {\n var mA = [[src[0], src[1], 1, 0, 0, 0, -dest[0] * src[0], -dest[0] * src[1]], [0, 0, 0, src[0], src[1], 1, -dest[1] * src[0], -dest[1] * src[1]], [src[2], src[3], 1, 0, 0, 0, -dest[2] * src[2], -dest[2] * src[3]], [0, 0, 0, src[2], src[3], 1, -dest[3] * src[2], -dest[3] * src[3]], [src[4], src[5], 1, 0, 0, 0, -dest[4] * src[4], -dest[4] * src[5]], [0, 0, 0, src[4], src[5], 1, -dest[5] * src[4], -dest[5] * src[5]], [src[6], src[7], 1, 0, 0, 0, -dest[6] * src[6], -dest[6] * src[7]], [0, 0, 0, src[6], src[7], 1, -dest[7] * src[6], -dest[7] * src[7]]];\n var detCache = {};\n var det = determinant(mA, 8, 0, 0, 0, detCache);\n\n if (det === 0) {\n // can not make transformer when and only when\n // any three of the markers are collinear.\n return;\n } // `invert(mA) * dest`, that is, `adj(mA) / det * dest`.\n\n\n var vh = [];\n\n for (var i = 0; i < 8; i++) {\n for (var j = 0; j < 8; j++) {\n vh[j] == null && (vh[j] = 0);\n vh[j] += ((i + j) % 2 ? -1 : 1) * // det(subMatrix(i, j))\n determinant(mA, 7, i === 0 ? 1 : 0, 1 << i, 1 << j, detCache) / det * dest[i];\n }\n }\n\n return function (out, srcPointX, srcPointY) {\n var pk = srcPointX * vh[6] + srcPointY * vh[7] + 1;\n out[0] = (srcPointX * vh[0] + srcPointY * vh[1] + vh[2]) / pk;\n out[1] = (srcPointX * vh[3] + srcPointY * vh[4] + vh[5]) / pk;\n };\n}\n\nexports.buildTransformer = buildTransformer;","/**\n * zrender: 生成唯一id\n *\n * @author errorrik (errorrik@gmail.com)\n */\nvar idStart = 0x0907;\n\nfunction _default() {\n return idStart++;\n}\n\nmodule.exports = _default;","var _config = require(\"../config\");\n\nvar debugMode = _config.debugMode;\n\nvar logError = function () {};\n\nif (debugMode === 1) {\n logError = console.error;\n}\n\nvar _default = logError;\nmodule.exports = _default;","/**\n * 3x2矩阵操作类\n * @exports zrender/tool/matrix\n */\n\n/* global Float32Array */\nvar ArrayCtor = typeof Float32Array === 'undefined' ? Array : Float32Array;\n/**\n * Create a identity matrix.\n * @return {Float32Array|Array.}\n */\n\nfunction create() {\n var out = new ArrayCtor(6);\n identity(out);\n return out;\n}\n/**\n * 设置矩阵为单位矩阵\n * @param {Float32Array|Array.} out\n */\n\n\nfunction identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n return out;\n}\n/**\n * 复制矩阵\n * @param {Float32Array|Array.} out\n * @param {Float32Array|Array.} m\n */\n\n\nfunction copy(out, m) {\n out[0] = m[0];\n out[1] = m[1];\n out[2] = m[2];\n out[3] = m[3];\n out[4] = m[4];\n out[5] = m[5];\n return out;\n}\n/**\n * 矩阵相乘\n * @param {Float32Array|Array.} out\n * @param {Float32Array|Array.} m1\n * @param {Float32Array|Array.} m2\n */\n\n\nfunction mul(out, m1, m2) {\n // Consider matrix.mul(m, m2, m);\n // where out is the same as m2.\n // So use temp variable to escape error.\n var out0 = m1[0] * m2[0] + m1[2] * m2[1];\n var out1 = m1[1] * m2[0] + m1[3] * m2[1];\n var out2 = m1[0] * m2[2] + m1[2] * m2[3];\n var out3 = m1[1] * m2[2] + m1[3] * m2[3];\n var out4 = m1[0] * m2[4] + m1[2] * m2[5] + m1[4];\n var out5 = m1[1] * m2[4] + m1[3] * m2[5] + m1[5];\n out[0] = out0;\n out[1] = out1;\n out[2] = out2;\n out[3] = out3;\n out[4] = out4;\n out[5] = out5;\n return out;\n}\n/**\n * 平移变换\n * @param {Float32Array|Array.} out\n * @param {Float32Array|Array.} a\n * @param {Float32Array|Array.} v\n */\n\n\nfunction translate(out, a, v) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4] + v[0];\n out[5] = a[5] + v[1];\n return out;\n}\n/**\n * 旋转变换\n * @param {Float32Array|Array.} out\n * @param {Float32Array|Array.} a\n * @param {number} rad\n */\n\n\nfunction rotate(out, a, rad) {\n var aa = a[0];\n var ac = a[2];\n var atx = a[4];\n var ab = a[1];\n var ad = a[3];\n var aty = a[5];\n var st = Math.sin(rad);\n var ct = Math.cos(rad);\n out[0] = aa * ct + ab * st;\n out[1] = -aa * st + ab * ct;\n out[2] = ac * ct + ad * st;\n out[3] = -ac * st + ct * ad;\n out[4] = ct * atx + st * aty;\n out[5] = ct * aty - st * atx;\n return out;\n}\n/**\n * 缩放变换\n * @param {Float32Array|Array.} out\n * @param {Float32Array|Array.} a\n * @param {Float32Array|Array.} v\n */\n\n\nfunction scale(out, a, v) {\n var vx = v[0];\n var vy = v[1];\n out[0] = a[0] * vx;\n out[1] = a[1] * vy;\n out[2] = a[2] * vx;\n out[3] = a[3] * vy;\n out[4] = a[4] * vx;\n out[5] = a[5] * vy;\n return out;\n}\n/**\n * 求逆矩阵\n * @param {Float32Array|Array.} out\n * @param {Float32Array|Array.} a\n */\n\n\nfunction invert(out, a) {\n var aa = a[0];\n var ac = a[2];\n var atx = a[4];\n var ab = a[1];\n var ad = a[3];\n var aty = a[5];\n var det = aa * ad - ab * ac;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = ad * det;\n out[1] = -ab * det;\n out[2] = -ac * det;\n out[3] = aa * det;\n out[4] = (ac * aty - ad * atx) * det;\n out[5] = (ab * atx - aa * aty) * det;\n return out;\n}\n/**\n * Clone a new matrix.\n * @param {Float32Array|Array.} a\n */\n\n\nfunction clone(a) {\n var b = create();\n copy(b, a);\n return b;\n}\n\nexports.create = create;\nexports.identity = identity;\nexports.copy = copy;\nexports.mul = mul;\nexports.translate = translate;\nexports.rotate = rotate;\nexports.scale = scale;\nexports.invert = invert;\nexports.clone = clone;","// https://github.com/mziccard/node-timsort\nvar DEFAULT_MIN_MERGE = 32;\nvar DEFAULT_MIN_GALLOPING = 7;\nvar DEFAULT_TMP_STORAGE_LENGTH = 256;\n\nfunction minRunLength(n) {\n var r = 0;\n\n while (n >= DEFAULT_MIN_MERGE) {\n r |= n & 1;\n n >>= 1;\n }\n\n return n + r;\n}\n\nfunction makeAscendingRun(array, lo, hi, compare) {\n var runHi = lo + 1;\n\n if (runHi === hi) {\n return 1;\n }\n\n if (compare(array[runHi++], array[lo]) < 0) {\n while (runHi < hi && compare(array[runHi], array[runHi - 1]) < 0) {\n runHi++;\n }\n\n reverseRun(array, lo, runHi);\n } else {\n while (runHi < hi && compare(array[runHi], array[runHi - 1]) >= 0) {\n runHi++;\n }\n }\n\n return runHi - lo;\n}\n\nfunction reverseRun(array, lo, hi) {\n hi--;\n\n while (lo < hi) {\n var t = array[lo];\n array[lo++] = array[hi];\n array[hi--] = t;\n }\n}\n\nfunction binaryInsertionSort(array, lo, hi, start, compare) {\n if (start === lo) {\n start++;\n }\n\n for (; start < hi; start++) {\n var pivot = array[start];\n var left = lo;\n var right = start;\n var mid;\n\n while (left < right) {\n mid = left + right >>> 1;\n\n if (compare(pivot, array[mid]) < 0) {\n right = mid;\n } else {\n left = mid + 1;\n }\n }\n\n var n = start - left;\n\n switch (n) {\n case 3:\n array[left + 3] = array[left + 2];\n\n case 2:\n array[left + 2] = array[left + 1];\n\n case 1:\n array[left + 1] = array[left];\n break;\n\n default:\n while (n > 0) {\n array[left + n] = array[left + n - 1];\n n--;\n }\n\n }\n\n array[left] = pivot;\n }\n}\n\nfunction gallopLeft(value, array, start, length, hint, compare) {\n var lastOffset = 0;\n var maxOffset = 0;\n var offset = 1;\n\n if (compare(value, array[start + hint]) > 0) {\n maxOffset = length - hint;\n\n while (offset < maxOffset && compare(value, array[start + hint + offset]) > 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n lastOffset += hint;\n offset += hint;\n } else {\n maxOffset = hint + 1;\n\n while (offset < maxOffset && compare(value, array[start + hint - offset]) <= 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n var tmp = lastOffset;\n lastOffset = hint - offset;\n offset = hint - tmp;\n }\n\n lastOffset++;\n\n while (lastOffset < offset) {\n var m = lastOffset + (offset - lastOffset >>> 1);\n\n if (compare(value, array[start + m]) > 0) {\n lastOffset = m + 1;\n } else {\n offset = m;\n }\n }\n\n return offset;\n}\n\nfunction gallopRight(value, array, start, length, hint, compare) {\n var lastOffset = 0;\n var maxOffset = 0;\n var offset = 1;\n\n if (compare(value, array[start + hint]) < 0) {\n maxOffset = hint + 1;\n\n while (offset < maxOffset && compare(value, array[start + hint - offset]) < 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n var tmp = lastOffset;\n lastOffset = hint - offset;\n offset = hint - tmp;\n } else {\n maxOffset = length - hint;\n\n while (offset < maxOffset && compare(value, array[start + hint + offset]) >= 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n lastOffset += hint;\n offset += hint;\n }\n\n lastOffset++;\n\n while (lastOffset < offset) {\n var m = lastOffset + (offset - lastOffset >>> 1);\n\n if (compare(value, array[start + m]) < 0) {\n offset = m;\n } else {\n lastOffset = m + 1;\n }\n }\n\n return offset;\n}\n\nfunction TimSort(array, compare) {\n var minGallop = DEFAULT_MIN_GALLOPING;\n var length = 0;\n var tmpStorageLength = DEFAULT_TMP_STORAGE_LENGTH;\n var stackLength = 0;\n var runStart;\n var runLength;\n var stackSize = 0;\n length = array.length;\n\n if (length < 2 * DEFAULT_TMP_STORAGE_LENGTH) {\n tmpStorageLength = length >>> 1;\n }\n\n var tmp = [];\n stackLength = length < 120 ? 5 : length < 1542 ? 10 : length < 119151 ? 19 : 40;\n runStart = [];\n runLength = [];\n\n function pushRun(_runStart, _runLength) {\n runStart[stackSize] = _runStart;\n runLength[stackSize] = _runLength;\n stackSize += 1;\n }\n\n function mergeRuns() {\n while (stackSize > 1) {\n var n = stackSize - 2;\n\n if (n >= 1 && runLength[n - 1] <= runLength[n] + runLength[n + 1] || n >= 2 && runLength[n - 2] <= runLength[n] + runLength[n - 1]) {\n if (runLength[n - 1] < runLength[n + 1]) {\n n--;\n }\n } else if (runLength[n] > runLength[n + 1]) {\n break;\n }\n\n mergeAt(n);\n }\n }\n\n function forceMergeRuns() {\n while (stackSize > 1) {\n var n = stackSize - 2;\n\n if (n > 0 && runLength[n - 1] < runLength[n + 1]) {\n n--;\n }\n\n mergeAt(n);\n }\n }\n\n function mergeAt(i) {\n var start1 = runStart[i];\n var length1 = runLength[i];\n var start2 = runStart[i + 1];\n var length2 = runLength[i + 1];\n runLength[i] = length1 + length2;\n\n if (i === stackSize - 3) {\n runStart[i + 1] = runStart[i + 2];\n runLength[i + 1] = runLength[i + 2];\n }\n\n stackSize--;\n var k = gallopRight(array[start2], array, start1, length1, 0, compare);\n start1 += k;\n length1 -= k;\n\n if (length1 === 0) {\n return;\n }\n\n length2 = gallopLeft(array[start1 + length1 - 1], array, start2, length2, length2 - 1, compare);\n\n if (length2 === 0) {\n return;\n }\n\n if (length1 <= length2) {\n mergeLow(start1, length1, start2, length2);\n } else {\n mergeHigh(start1, length1, start2, length2);\n }\n }\n\n function mergeLow(start1, length1, start2, length2) {\n var i = 0;\n\n for (i = 0; i < length1; i++) {\n tmp[i] = array[start1 + i];\n }\n\n var cursor1 = 0;\n var cursor2 = start2;\n var dest = start1;\n array[dest++] = array[cursor2++];\n\n if (--length2 === 0) {\n for (i = 0; i < length1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n\n return;\n }\n\n if (length1 === 1) {\n for (i = 0; i < length2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n\n array[dest + length2] = tmp[cursor1];\n return;\n }\n\n var _minGallop = minGallop;\n var count1;\n var count2;\n var exit;\n\n while (1) {\n count1 = 0;\n count2 = 0;\n exit = false;\n\n do {\n if (compare(array[cursor2], tmp[cursor1]) < 0) {\n array[dest++] = array[cursor2++];\n count2++;\n count1 = 0;\n\n if (--length2 === 0) {\n exit = true;\n break;\n }\n } else {\n array[dest++] = tmp[cursor1++];\n count1++;\n count2 = 0;\n\n if (--length1 === 1) {\n exit = true;\n break;\n }\n }\n } while ((count1 | count2) < _minGallop);\n\n if (exit) {\n break;\n }\n\n do {\n count1 = gallopRight(array[cursor2], tmp, cursor1, length1, 0, compare);\n\n if (count1 !== 0) {\n for (i = 0; i < count1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n\n dest += count1;\n cursor1 += count1;\n length1 -= count1;\n\n if (length1 <= 1) {\n exit = true;\n break;\n }\n }\n\n array[dest++] = array[cursor2++];\n\n if (--length2 === 0) {\n exit = true;\n break;\n }\n\n count2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare);\n\n if (count2 !== 0) {\n for (i = 0; i < count2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n\n dest += count2;\n cursor2 += count2;\n length2 -= count2;\n\n if (length2 === 0) {\n exit = true;\n break;\n }\n }\n\n array[dest++] = tmp[cursor1++];\n\n if (--length1 === 1) {\n exit = true;\n break;\n }\n\n _minGallop--;\n } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\n if (exit) {\n break;\n }\n\n if (_minGallop < 0) {\n _minGallop = 0;\n }\n\n _minGallop += 2;\n }\n\n minGallop = _minGallop;\n minGallop < 1 && (minGallop = 1);\n\n if (length1 === 1) {\n for (i = 0; i < length2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n\n array[dest + length2] = tmp[cursor1];\n } else if (length1 === 0) {\n throw new Error(); // throw new Error('mergeLow preconditions were not respected');\n } else {\n for (i = 0; i < length1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n }\n }\n\n function mergeHigh(start1, length1, start2, length2) {\n var i = 0;\n\n for (i = 0; i < length2; i++) {\n tmp[i] = array[start2 + i];\n }\n\n var cursor1 = start1 + length1 - 1;\n var cursor2 = length2 - 1;\n var dest = start2 + length2 - 1;\n var customCursor = 0;\n var customDest = 0;\n array[dest--] = array[cursor1--];\n\n if (--length1 === 0) {\n customCursor = dest - (length2 - 1);\n\n for (i = 0; i < length2; i++) {\n array[customCursor + i] = tmp[i];\n }\n\n return;\n }\n\n if (length2 === 1) {\n dest -= length1;\n cursor1 -= length1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = length1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n array[dest] = tmp[cursor2];\n return;\n }\n\n var _minGallop = minGallop;\n\n while (true) {\n var count1 = 0;\n var count2 = 0;\n var exit = false;\n\n do {\n if (compare(tmp[cursor2], array[cursor1]) < 0) {\n array[dest--] = array[cursor1--];\n count1++;\n count2 = 0;\n\n if (--length1 === 0) {\n exit = true;\n break;\n }\n } else {\n array[dest--] = tmp[cursor2--];\n count2++;\n count1 = 0;\n\n if (--length2 === 1) {\n exit = true;\n break;\n }\n }\n } while ((count1 | count2) < _minGallop);\n\n if (exit) {\n break;\n }\n\n do {\n count1 = length1 - gallopRight(tmp[cursor2], array, start1, length1, length1 - 1, compare);\n\n if (count1 !== 0) {\n dest -= count1;\n cursor1 -= count1;\n length1 -= count1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = count1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n if (length1 === 0) {\n exit = true;\n break;\n }\n }\n\n array[dest--] = tmp[cursor2--];\n\n if (--length2 === 1) {\n exit = true;\n break;\n }\n\n count2 = length2 - gallopLeft(array[cursor1], tmp, 0, length2, length2 - 1, compare);\n\n if (count2 !== 0) {\n dest -= count2;\n cursor2 -= count2;\n length2 -= count2;\n customDest = dest + 1;\n customCursor = cursor2 + 1;\n\n for (i = 0; i < count2; i++) {\n array[customDest + i] = tmp[customCursor + i];\n }\n\n if (length2 <= 1) {\n exit = true;\n break;\n }\n }\n\n array[dest--] = array[cursor1--];\n\n if (--length1 === 0) {\n exit = true;\n break;\n }\n\n _minGallop--;\n } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\n if (exit) {\n break;\n }\n\n if (_minGallop < 0) {\n _minGallop = 0;\n }\n\n _minGallop += 2;\n }\n\n minGallop = _minGallop;\n\n if (minGallop < 1) {\n minGallop = 1;\n }\n\n if (length2 === 1) {\n dest -= length1;\n cursor1 -= length1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = length1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n array[dest] = tmp[cursor2];\n } else if (length2 === 0) {\n throw new Error(); // throw new Error('mergeHigh preconditions were not respected');\n } else {\n customCursor = dest - (length2 - 1);\n\n for (i = 0; i < length2; i++) {\n array[customCursor + i] = tmp[i];\n }\n }\n }\n\n this.mergeRuns = mergeRuns;\n this.forceMergeRuns = forceMergeRuns;\n this.pushRun = pushRun;\n}\n\nfunction sort(array, compare, lo, hi) {\n if (!lo) {\n lo = 0;\n }\n\n if (!hi) {\n hi = array.length;\n }\n\n var remaining = hi - lo;\n\n if (remaining < 2) {\n return;\n }\n\n var runLength = 0;\n\n if (remaining < DEFAULT_MIN_MERGE) {\n runLength = makeAscendingRun(array, lo, hi, compare);\n binaryInsertionSort(array, lo, hi, lo + runLength, compare);\n return;\n }\n\n var ts = new TimSort(array, compare);\n var minRun = minRunLength(remaining);\n\n do {\n runLength = makeAscendingRun(array, lo, hi, compare);\n\n if (runLength < minRun) {\n var force = remaining;\n\n if (force > minRun) {\n force = minRun;\n }\n\n binaryInsertionSort(array, lo, lo + force, lo + runLength, compare);\n runLength = force;\n }\n\n ts.pushRun(lo, runLength);\n ts.mergeRuns();\n remaining -= runLength;\n lo += runLength;\n } while (remaining !== 0);\n\n ts.forceMergeRuns();\n}\n\nmodule.exports = sort;","/**\n * @module zrender/core/util\n */\n// 用于处理merge时无法遍历Date等对象的问题\nvar BUILTIN_OBJECT = {\n '[object Function]': 1,\n '[object RegExp]': 1,\n '[object Date]': 1,\n '[object Error]': 1,\n '[object CanvasGradient]': 1,\n '[object CanvasPattern]': 1,\n // For node-canvas\n '[object Image]': 1,\n '[object Canvas]': 1\n};\nvar TYPED_ARRAY = {\n '[object Int8Array]': 1,\n '[object Uint8Array]': 1,\n '[object Uint8ClampedArray]': 1,\n '[object Int16Array]': 1,\n '[object Uint16Array]': 1,\n '[object Int32Array]': 1,\n '[object Uint32Array]': 1,\n '[object Float32Array]': 1,\n '[object Float64Array]': 1\n};\nvar objToString = Object.prototype.toString;\nvar arrayProto = Array.prototype;\nvar nativeForEach = arrayProto.forEach;\nvar nativeFilter = arrayProto.filter;\nvar nativeSlice = arrayProto.slice;\nvar nativeMap = arrayProto.map;\nvar nativeReduce = arrayProto.reduce; // Avoid assign to an exported variable, for transforming to cjs.\n\nvar methods = {};\n\nfunction $override(name, fn) {\n // Clear ctx instance for different environment\n if (name === 'createCanvas') {\n _ctx = null;\n }\n\n methods[name] = fn;\n}\n/**\n * Those data types can be cloned:\n * Plain object, Array, TypedArray, number, string, null, undefined.\n * Those data types will be assgined using the orginal data:\n * BUILTIN_OBJECT\n * Instance of user defined class will be cloned to a plain object, without\n * properties in prototype.\n * Other data types is not supported (not sure what will happen).\n *\n * Caution: do not support clone Date, for performance consideration.\n * (There might be a large number of date in `series.data`).\n * So date should not be modified in and out of echarts.\n *\n * @param {*} source\n * @return {*} new\n */\n\n\nfunction clone(source) {\n if (source == null || typeof source !== 'object') {\n return source;\n }\n\n var result = source;\n var typeStr = objToString.call(source);\n\n if (typeStr === '[object Array]') {\n if (!isPrimitive(source)) {\n result = [];\n\n for (var i = 0, len = source.length; i < len; i++) {\n result[i] = clone(source[i]);\n }\n }\n } else if (TYPED_ARRAY[typeStr]) {\n if (!isPrimitive(source)) {\n var Ctor = source.constructor;\n\n if (source.constructor.from) {\n result = Ctor.from(source);\n } else {\n result = new Ctor(source.length);\n\n for (var i = 0, len = source.length; i < len; i++) {\n result[i] = clone(source[i]);\n }\n }\n }\n } else if (!BUILTIN_OBJECT[typeStr] && !isPrimitive(source) && !isDom(source)) {\n result = {};\n\n for (var key in source) {\n if (source.hasOwnProperty(key)) {\n result[key] = clone(source[key]);\n }\n }\n }\n\n return result;\n}\n/**\n * @memberOf module:zrender/core/util\n * @param {*} target\n * @param {*} source\n * @param {boolean} [overwrite=false]\n */\n\n\nfunction merge(target, source, overwrite) {\n // We should escapse that source is string\n // and enter for ... in ...\n if (!isObject(source) || !isObject(target)) {\n return overwrite ? clone(source) : target;\n }\n\n for (var key in source) {\n if (source.hasOwnProperty(key)) {\n var targetProp = target[key];\n var sourceProp = source[key];\n\n if (isObject(sourceProp) && isObject(targetProp) && !isArray(sourceProp) && !isArray(targetProp) && !isDom(sourceProp) && !isDom(targetProp) && !isBuiltInObject(sourceProp) && !isBuiltInObject(targetProp) && !isPrimitive(sourceProp) && !isPrimitive(targetProp)) {\n // 如果需要递归覆盖,就递归调用merge\n merge(targetProp, sourceProp, overwrite);\n } else if (overwrite || !(key in target)) {\n // 否则只处理overwrite为true,或者在目标对象中没有此属性的情况\n // NOTE,在 target[key] 不存在的时候也是直接覆盖\n target[key] = clone(source[key], true);\n }\n }\n }\n\n return target;\n}\n/**\n * @param {Array} targetAndSources The first item is target, and the rests are source.\n * @param {boolean} [overwrite=false]\n * @return {*} target\n */\n\n\nfunction mergeAll(targetAndSources, overwrite) {\n var result = targetAndSources[0];\n\n for (var i = 1, len = targetAndSources.length; i < len; i++) {\n result = merge(result, targetAndSources[i], overwrite);\n }\n\n return result;\n}\n/**\n * @param {*} target\n * @param {*} source\n * @memberOf module:zrender/core/util\n */\n\n\nfunction extend(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n\n return target;\n}\n/**\n * @param {*} target\n * @param {*} source\n * @param {boolean} [overlay=false]\n * @memberOf module:zrender/core/util\n */\n\n\nfunction defaults(target, source, overlay) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && (overlay ? source[key] != null : target[key] == null)) {\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nvar createCanvas = function () {\n return methods.createCanvas();\n};\n\nmethods.createCanvas = function () {\n return document.createElement('canvas');\n}; // FIXME\n\n\nvar _ctx;\n\nfunction getContext() {\n if (!_ctx) {\n // Use util.createCanvas instead of createCanvas\n // because createCanvas may be overwritten in different environment\n _ctx = createCanvas().getContext('2d');\n }\n\n return _ctx;\n}\n/**\n * 查询数组中元素的index\n * @memberOf module:zrender/core/util\n */\n\n\nfunction indexOf(array, value) {\n if (array) {\n if (array.indexOf) {\n return array.indexOf(value);\n }\n\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n }\n\n return -1;\n}\n/**\n * 构造类继承关系\n *\n * @memberOf module:zrender/core/util\n * @param {Function} clazz 源类\n * @param {Function} baseClazz 基类\n */\n\n\nfunction inherits(clazz, baseClazz) {\n var clazzPrototype = clazz.prototype;\n\n function F() {}\n\n F.prototype = baseClazz.prototype;\n clazz.prototype = new F();\n\n for (var prop in clazzPrototype) {\n if (clazzPrototype.hasOwnProperty(prop)) {\n clazz.prototype[prop] = clazzPrototype[prop];\n }\n }\n\n clazz.prototype.constructor = clazz;\n clazz.superClass = baseClazz;\n}\n/**\n * @memberOf module:zrender/core/util\n * @param {Object|Function} target\n * @param {Object|Function} sorce\n * @param {boolean} overlay\n */\n\n\nfunction mixin(target, source, overlay) {\n target = 'prototype' in target ? target.prototype : target;\n source = 'prototype' in source ? source.prototype : source;\n defaults(target, source, overlay);\n}\n/**\n * Consider typed array.\n * @param {Array|TypedArray} data\n */\n\n\nfunction isArrayLike(data) {\n if (!data) {\n return;\n }\n\n if (typeof data === 'string') {\n return false;\n }\n\n return typeof data.length === 'number';\n}\n/**\n * 数组或对象遍历\n * @memberOf module:zrender/core/util\n * @param {Object|Array} obj\n * @param {Function} cb\n * @param {*} [context]\n */\n\n\nfunction each(obj, cb, context) {\n if (!(obj && cb)) {\n return;\n }\n\n if (obj.forEach && obj.forEach === nativeForEach) {\n obj.forEach(cb, context);\n } else if (obj.length === +obj.length) {\n for (var i = 0, len = obj.length; i < len; i++) {\n cb.call(context, obj[i], i, obj);\n }\n } else {\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n cb.call(context, obj[key], key, obj);\n }\n }\n }\n}\n/**\n * 数组映射\n * @memberOf module:zrender/core/util\n * @param {Array} obj\n * @param {Function} cb\n * @param {*} [context]\n * @return {Array}\n */\n\n\nfunction map(obj, cb, context) {\n if (!(obj && cb)) {\n return;\n }\n\n if (obj.map && obj.map === nativeMap) {\n return obj.map(cb, context);\n } else {\n var result = [];\n\n for (var i = 0, len = obj.length; i < len; i++) {\n result.push(cb.call(context, obj[i], i, obj));\n }\n\n return result;\n }\n}\n/**\n * @memberOf module:zrender/core/util\n * @param {Array} obj\n * @param {Function} cb\n * @param {Object} [memo]\n * @param {*} [context]\n * @return {Array}\n */\n\n\nfunction reduce(obj, cb, memo, context) {\n if (!(obj && cb)) {\n return;\n }\n\n if (obj.reduce && obj.reduce === nativeReduce) {\n return obj.reduce(cb, memo, context);\n } else {\n for (var i = 0, len = obj.length; i < len; i++) {\n memo = cb.call(context, memo, obj[i], i, obj);\n }\n\n return memo;\n }\n}\n/**\n * 数组过滤\n * @memberOf module:zrender/core/util\n * @param {Array} obj\n * @param {Function} cb\n * @param {*} [context]\n * @return {Array}\n */\n\n\nfunction filter(obj, cb, context) {\n if (!(obj && cb)) {\n return;\n }\n\n if (obj.filter && obj.filter === nativeFilter) {\n return obj.filter(cb, context);\n } else {\n var result = [];\n\n for (var i = 0, len = obj.length; i < len; i++) {\n if (cb.call(context, obj[i], i, obj)) {\n result.push(obj[i]);\n }\n }\n\n return result;\n }\n}\n/**\n * 数组项查找\n * @memberOf module:zrender/core/util\n * @param {Array} obj\n * @param {Function} cb\n * @param {*} [context]\n * @return {*}\n */\n\n\nfunction find(obj, cb, context) {\n if (!(obj && cb)) {\n return;\n }\n\n for (var i = 0, len = obj.length; i < len; i++) {\n if (cb.call(context, obj[i], i, obj)) {\n return obj[i];\n }\n }\n}\n/**\n * @memberOf module:zrender/core/util\n * @param {Function} func\n * @param {*} context\n * @return {Function}\n */\n\n\nfunction bind(func, context) {\n var args = nativeSlice.call(arguments, 2);\n return function () {\n return func.apply(context, args.concat(nativeSlice.call(arguments)));\n };\n}\n/**\n * @memberOf module:zrender/core/util\n * @param {Function} func\n * @return {Function}\n */\n\n\nfunction curry(func) {\n var args = nativeSlice.call(arguments, 1);\n return function () {\n return func.apply(this, args.concat(nativeSlice.call(arguments)));\n };\n}\n/**\n * @memberOf module:zrender/core/util\n * @param {*} value\n * @return {boolean}\n */\n\n\nfunction isArray(value) {\n return objToString.call(value) === '[object Array]';\n}\n/**\n * @memberOf module:zrender/core/util\n * @param {*} value\n * @return {boolean}\n */\n\n\nfunction isFunction(value) {\n return typeof value === 'function';\n}\n/**\n * @memberOf module:zrender/core/util\n * @param {*} value\n * @return {boolean}\n */\n\n\nfunction isString(value) {\n return objToString.call(value) === '[object String]';\n}\n/**\n * @memberOf module:zrender/core/util\n * @param {*} value\n * @return {boolean}\n */\n\n\nfunction isObject(value) {\n // Avoid a V8 JIT bug in Chrome 19-20.\n // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.\n var type = typeof value;\n return type === 'function' || !!value && type === 'object';\n}\n/**\n * @memberOf module:zrender/core/util\n * @param {*} value\n * @return {boolean}\n */\n\n\nfunction isBuiltInObject(value) {\n return !!BUILTIN_OBJECT[objToString.call(value)];\n}\n/**\n * @memberOf module:zrender/core/util\n * @param {*} value\n * @return {boolean}\n */\n\n\nfunction isTypedArray(value) {\n return !!TYPED_ARRAY[objToString.call(value)];\n}\n/**\n * @memberOf module:zrender/core/util\n * @param {*} value\n * @return {boolean}\n */\n\n\nfunction isDom(value) {\n return typeof value === 'object' && typeof value.nodeType === 'number' && typeof value.ownerDocument === 'object';\n}\n/**\n * Whether is exactly NaN. Notice isNaN('a') returns true.\n * @param {*} value\n * @return {boolean}\n */\n\n\nfunction eqNaN(value) {\n /* eslint-disable-next-line no-self-compare */\n return value !== value;\n}\n/**\n * If value1 is not null, then return value1, otherwise judget rest of values.\n * Low performance.\n * @memberOf module:zrender/core/util\n * @return {*} Final value\n */\n\n\nfunction retrieve(values) {\n for (var i = 0, len = arguments.length; i < len; i++) {\n if (arguments[i] != null) {\n return arguments[i];\n }\n }\n}\n\nfunction retrieve2(value0, value1) {\n return value0 != null ? value0 : value1;\n}\n\nfunction retrieve3(value0, value1, value2) {\n return value0 != null ? value0 : value1 != null ? value1 : value2;\n}\n/**\n * @memberOf module:zrender/core/util\n * @param {Array} arr\n * @param {number} startIndex\n * @param {number} endIndex\n * @return {Array}\n */\n\n\nfunction slice() {\n return Function.call.apply(nativeSlice, arguments);\n}\n/**\n * Normalize css liked array configuration\n * e.g.\n * 3 => [3, 3, 3, 3]\n * [4, 2] => [4, 2, 4, 2]\n * [4, 3, 2] => [4, 3, 2, 3]\n * @param {number|Array.} val\n * @return {Array.}\n */\n\n\nfunction normalizeCssArray(val) {\n if (typeof val === 'number') {\n return [val, val, val, val];\n }\n\n var len = val.length;\n\n if (len === 2) {\n // vertical | horizontal\n return [val[0], val[1], val[0], val[1]];\n } else if (len === 3) {\n // top | horizontal | bottom\n return [val[0], val[1], val[2], val[1]];\n }\n\n return val;\n}\n/**\n * @memberOf module:zrender/core/util\n * @param {boolean} condition\n * @param {string} message\n */\n\n\nfunction assert(condition, message) {\n if (!condition) {\n throw new Error(message);\n }\n}\n/**\n * @memberOf module:zrender/core/util\n * @param {string} str string to be trimed\n * @return {string} trimed string\n */\n\n\nfunction trim(str) {\n if (str == null) {\n return null;\n } else if (typeof str.trim === 'function') {\n return str.trim();\n } else {\n return str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n }\n}\n\nvar primitiveKey = '__ec_primitive__';\n/**\n * Set an object as primitive to be ignored traversing children in clone or merge\n */\n\nfunction setAsPrimitive(obj) {\n obj[primitiveKey] = true;\n}\n\nfunction isPrimitive(obj) {\n return obj[primitiveKey];\n}\n/**\n * @constructor\n * @param {Object} obj Only apply `ownProperty`.\n */\n\n\nfunction HashMap(obj) {\n var isArr = isArray(obj); // Key should not be set on this, otherwise\n // methods get/set/... may be overrided.\n\n this.data = {};\n var thisMap = this;\n obj instanceof HashMap ? obj.each(visit) : obj && each(obj, visit);\n\n function visit(value, key) {\n isArr ? thisMap.set(value, key) : thisMap.set(key, value);\n }\n}\n\nHashMap.prototype = {\n constructor: HashMap,\n // Do not provide `has` method to avoid defining what is `has`.\n // (We usually treat `null` and `undefined` as the same, different\n // from ES6 Map).\n get: function (key) {\n return this.data.hasOwnProperty(key) ? this.data[key] : null;\n },\n set: function (key, value) {\n // Comparing with invocation chaining, `return value` is more commonly\n // used in this case: `var someVal = map.set('a', genVal());`\n return this.data[key] = value;\n },\n // Although util.each can be performed on this hashMap directly, user\n // should not use the exposed keys, who are prefixed.\n each: function (cb, context) {\n context !== void 0 && (cb = bind(cb, context));\n /* eslint-disable guard-for-in */\n\n for (var key in this.data) {\n this.data.hasOwnProperty(key) && cb(this.data[key], key);\n }\n /* eslint-enable guard-for-in */\n\n },\n // Do not use this method if performance sensitive.\n removeKey: function (key) {\n delete this.data[key];\n }\n};\n\nfunction createHashMap(obj) {\n return new HashMap(obj);\n}\n\nfunction concatArray(a, b) {\n var newArray = new a.constructor(a.length + b.length);\n\n for (var i = 0; i < a.length; i++) {\n newArray[i] = a[i];\n }\n\n var offset = a.length;\n\n for (i = 0; i < b.length; i++) {\n newArray[i + offset] = b[i];\n }\n\n return newArray;\n}\n\nfunction noop() {}\n\nexports.$override = $override;\nexports.clone = clone;\nexports.merge = merge;\nexports.mergeAll = mergeAll;\nexports.extend = extend;\nexports.defaults = defaults;\nexports.createCanvas = createCanvas;\nexports.getContext = getContext;\nexports.indexOf = indexOf;\nexports.inherits = inherits;\nexports.mixin = mixin;\nexports.isArrayLike = isArrayLike;\nexports.each = each;\nexports.map = map;\nexports.reduce = reduce;\nexports.filter = filter;\nexports.find = find;\nexports.bind = bind;\nexports.curry = curry;\nexports.isArray = isArray;\nexports.isFunction = isFunction;\nexports.isString = isString;\nexports.isObject = isObject;\nexports.isBuiltInObject = isBuiltInObject;\nexports.isTypedArray = isTypedArray;\nexports.isDom = isDom;\nexports.eqNaN = eqNaN;\nexports.retrieve = retrieve;\nexports.retrieve2 = retrieve2;\nexports.retrieve3 = retrieve3;\nexports.slice = slice;\nexports.normalizeCssArray = normalizeCssArray;\nexports.assert = assert;\nexports.trim = trim;\nexports.setAsPrimitive = setAsPrimitive;\nexports.isPrimitive = isPrimitive;\nexports.createHashMap = createHashMap;\nexports.concatArray = concatArray;\nexports.noop = noop;"],"names":["dpr","window","Math","max","devicePixelRatio","debugMode","exports","_util","normalizeRadian","PI2","PI","containStroke","cx","cy","r","startAngle","endAngle","anticlockwise","lineWidth","x","y","_l","d","sqrt","abs","tmp","angle","atan2","curve","x0","y0","x1","y1","x2","y2","x3","y3","cubicProjectPoint","_a","_b","_s","PathProxy","line","cubic","quadratic","arc","windingLine","CMD","EPSILON","isAroundEqual","a","b","roots","extrema","swapExtrema","windingCubic","nRoots","cubicRootAt","y0_","y1_","w","nExtrema","i","t","unit","x_","cubicAt","cubicExtrema","windingQuadratic","quadraticRootAt","quadraticExtremum","y_","quadraticAt","windingArc","diff","dir","containPath","data","isStroke","xi","yi","length","cmd","M","L","C","Q","A","rx","ry","theta","dTheta","cos","sin","_x","R","width","height","Z","contain","pathData","points","p","p2","p0","_curve","quadraticProjectPoint","BoundingRect","imageHelper","getContext","extend","retrieve2","retrieve3","trim","textWidthCache","textWidthCacheCounter","TEXT_CACHE_MAX","STYLE_REG","DEFAULT_FONT","methods","$override","name","fn","getWidth","text","font","key","textLines","split","l","measureText","getBoundingRect","textAlign","textVerticalAlign","textPadding","textLineHeight","rich","truncate","getRichTextRect","getPlainTextRect","contentBlock","parsePlainText","outerWidth","outerHeight","adjustTextX","adjustTextY","rect","lineHeight","parseRichText","calculateTextPosition","out","style","textPosition","distance","textDistance","halfHeight","adjustTextPositionOnRect","dummyStyle","truncateText","containerWidth","ellipsis","options","prepareTruncateOptions","len","truncateSingleLine","join","maxIterations","minChar","cnCharWidth","ascCharWidth","placeholder","contentWidth","ellipsisWidth","textLine","j","subLength","estimateLength","floor","substr","charCode","charCodeAt","getLineHeight","padding","lines","canCacheByTextString","truncOuterHeight","truncOuterWidth","result","lastIndex","exec","matchedIndex","index","pushTokens","substring","contentHeight","pendingList","stlPadding","truncateWidth","truncateHeight","tokens","token","tokenStyle","styleName","tokenHeight","textHeight","textWidth","tokenWidth","tokenWidthNotSpecified","charAt","percentWidth","push","textBackgroundColor","bgImg","image","findExistImage","isImageReady","paddingW","remianTruncWidth","parseInt","block","str","isEmptyStr","strs","isLineHolder","tokensLen","makeFont","fontSize","fontFamily","fontStyle","fontWeight","textFont","ctx","Infinity","module","zrUtil","Element","Group","opts","call","this","hasOwnProperty","_children","__storage","__dirty","prototype","constructor","isGroup","type","silent","children","slice","childAt","idx","childOfName","childCount","add","child","parent","_doAdd","addBefore","nextSibling","indexOf","splice","remove","storage","zr","__zr","addToStorage","addChildrenToStorage","refresh","delFromStorage","delChildrenFromStorage","removeAll","eachChild","cb","context","traverse","dirty","includeChildren","tmpRect","tmpMat","ignore","invisible","childRect","transform","getLocalTransform","copy","applyTransform","clone","union","inherits","_default","vec2","matrix","v2ApplyTransform","mathMin","min","mathMax","other","lt","rb","lb","rt","m","maxX","maxY","calculateTransform","sx","sy","create","translate","scale","intersect","ax0","ax1","ay0","ay1","bx0","bx1","by0","by1","plain","eventUtil","GestureMgr","_track","dist","pointPair","dx","dy","center","recognize","event","target","root","_doTrack","_recognize","clear","touches","trackItem","touch","pos","clientToLocal","zrX","zrY","eventName","recognizers","gestureInfo","pinch","track","trackLen","pinchEnd","pinchPre","pinchScale","isFinite","pinchCenter","pinchX","pinchY","LinkedList","head","tail","_len","linkedListProto","insert","val","entry","Entry","insertEntry","next","prev","value","LRU","maxSize","_list","_map","_maxSize","_lastRemovedEntry","LRUProto","put","list","map","removed","leastUsedEntry","get","bbox","_config","min2","max2","mathCos","mathSin","mathSqrt","mathAbs","hasTypedArray","Float32Array","notSaveData","_saveData","_ctx","_xi","_yi","_x0","_y0","_ux","_uy","_lineDash","_dashOffset","_dashIdx","_dashSum","setScale","segmentIgnoreThreshold","beginPath","moveTo","addData","lineTo","exceedUnit","_needsDash","_dashedLineTo","bezierCurveTo","_dashedBezierTo","quadraticCurveTo","_dashedQuadraticTo","arcTo","radius","h","closePath","fill","toStatic","stroke","setLineDash","lineDash","Array","lineDashSum","setLineDashOffset","offset","setData","appendPath","path","appendSize","appendPathData","k","arguments","_expandData","_prevCmd","newData","dash","dashSum","nDash","bezierLen","tmpLen","Number","MAX_VALUE","fromLine","fromCubic","fromQuadratic","fromArc","rebuildPath","ux","uy","psi","fs","scaleX","scaleY","isEllipse","rotate","Diff","buildValues","components","newArr","oldArr","componentPos","componentLen","newPos","oldPos","component","indices","count","added","clonePath","equals","self","newLen","oldLen","editLength","maxEditLength","bestPath","extractCommon","execEditLength","diagonalPath","basePath","addPath","removePath","undefined","canAdd","canRemove","pushComponent","ret","last","commonCount","tokenize","arrayDiff","callback","start","end","extremity","fromPoints","left","right","top","bottom","xDim","yDim","n","tx","ty","vec2Min","vec2Max","_vector","v2Create","v2DistSquare","distSquare","mathPow","pow","EPSILON_NUMERIC","THREE_SQRT","ONE_THIRD","_v0","_v1","_v2","isAroundZero","isNotAroundZero","p1","p3","onet","cubicDerivativeAt","c","B","t1","disc","K","t2","discSqrt","Y1","Y2","T","acos","ASqrt","t3","cubicSubdivide","p01","p12","p23","p012","p123","p0123","d1","d2","interval","_t","quadraticDerivativeAt","divider","quadraticSubdivide","env","_fourPointsTransform","buildTransformer","EVENT_SAVED_PROP","_calcOut","transformLocalCoord","elFrom","elTarget","inX","inY","transformCoordWithViewport","el","inverse","getBoundingClientRect","domSupported","isCanvasEl","saved","markers","prepareCoordMarkers","transformer","preparePointerTransformer","propLR","propTB","marker","document","createElement","stl","idxLR","idxTB","cssText","appendChild","transformerName","oldSrcCoords","srcCoords","oldCoordTheSame","destCoords","ii","offsetLeft","offsetTop","nodeName","toUpperCase","wx","getSystemInfoSync","browser","os","node","wxa","canvasSupported","svgSupported","touchEventsSupported","worker","navigator","detect","userAgent","ua","firefox","match","ie","edge","weChat","test","version","SVGRect","pointerEventsSupported","Eventful","Dispatcher","_dom","isDomLevel2","addEventListener","MOUSE_EVENT_REG","e","calculate","calculateZrXY","layerX","offsetX","layerY","offsetY","ex","clientX","ey","clientY","box","getNativeEvent","normalizeEvent","eventType","isTouch","targetTouches","changedTouches","zrDelta","wheelDelta","detail","button","which","handler","opt","attachEvent","removeEventListener","detachEvent","stop","preventDefault","stopPropagation","cancelBubble","returnValue","isMiddleOrRightButtonOnMouseUpDown","notLeftMouse","LN2","log","determinant","rows","rank","rowStart","rowMask","colMask","detCache","cacheKey","fullRank","colStart","round","subRowMask","subRowStart","sum","colLocalIdx","colTag","src","dest","mA","det","vh","srcPointX","srcPointY","pk","idStart","logError","console","error","ArrayCtor","identity","mul","m1","m2","out0","out1","out2","out3","out4","out5","v","rad","aa","ac","atx","ab","ad","aty","st","ct","vx","vy","invert","DEFAULT_MIN_MERGE","DEFAULT_MIN_GALLOPING","minRunLength","makeAscendingRun","array","lo","hi","compare","runHi","reverseRun","binaryInsertionSort","mid","pivot","gallopLeft","hint","lastOffset","maxOffset","gallopRight","TimSort","runStart","runLength","minGallop","stackSize","pushRun","_runStart","_runLength","mergeRuns","mergeAt","forceMergeRuns","start1","length1","start2","length2","mergeLow","mergeHigh","cursor1","cursor2","count1","count2","exit","_minGallop","Error","customCursor","customDest","sort","remaining","ts","minRun","force","BUILTIN_OBJECT","TYPED_ARRAY","objToString","Object","toString","arrayProto","nativeForEach","forEach","nativeFilter","filter","nativeSlice","nativeMap","nativeReduce","reduce","source","typeStr","isPrimitive","Ctor","from","isDom","merge","overwrite","isObject","targetProp","sourceProp","isArray","isBuiltInObject","mergeAll","targetAndSources","defaults","overlay","createCanvas","clazz","baseClazz","clazzPrototype","F","prop","superClass","mixin","isArrayLike","each","obj","memo","find","bind","func","args","apply","concat","curry","isFunction","isString","isTypedArray","nodeType","ownerDocument","eqNaN","retrieve","values","value0","value1","value2","Function","normalizeCssArray","assert","condition","message","replace","primitiveKey","setAsPrimitive","HashMap","isArr","thisMap","visit","set","createHashMap","concatArray","newArray","noop","removeKey"],"sourceRoot":""}