@pyreon/charts 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/lib/analysis/index.js.html +1 -1
  2. package/lib/analysis/manual.js.html +1 -1
  3. package/lib/{charts-Ckh2qxB5.js → charts-lo2KeDld.js} +164 -164
  4. package/lib/charts-lo2KeDld.js.map +1 -0
  5. package/lib/{components-BcPePBeS.js → components-ClWy1Ztp.js} +128 -128
  6. package/lib/components-ClWy1Ztp.js.map +1 -0
  7. package/lib/{core-9w0g6EOI.js → core-BiuQ3y-t.js} +11 -11
  8. package/lib/core-BiuQ3y-t.js.map +1 -0
  9. package/lib/{createSeriesData-DOHScdgk.js → createSeriesData-BGy-6PqI.js} +6 -6
  10. package/lib/createSeriesData-BGy-6PqI.js.map +1 -0
  11. package/lib/{customGraphicKeyframeAnimation-CvkEkSt_.js → customGraphicKeyframeAnimation-BIbJI8ew.js} +61 -61
  12. package/lib/customGraphicKeyframeAnimation-BIbJI8ew.js.map +1 -0
  13. package/lib/{graphic-CPJ2K90a.js → graphic-Bt7SEwll.js} +59 -59
  14. package/lib/graphic-Bt7SEwll.js.map +1 -0
  15. package/lib/index.js +60 -52
  16. package/lib/index.js.map +1 -1
  17. package/lib/manual.js +60 -52
  18. package/lib/manual.js.map +1 -1
  19. package/lib/{parseGeoJson-BlBe5Vig.js → parseGeoJson-NjUY1feF.js} +115 -115
  20. package/lib/parseGeoJson-NjUY1feF.js.map +1 -0
  21. package/lib/{renderers-Dytryvoy.js → renderers-BnAAXHfG.js} +16 -16
  22. package/lib/renderers-BnAAXHfG.js.map +1 -0
  23. package/lib/types/index.d.ts +3 -3
  24. package/lib/types/index.d.ts.map +1 -1
  25. package/lib/types/manual.d.ts +3 -3
  26. package/lib/types/manual.d.ts.map +1 -1
  27. package/package.json +14 -7
  28. package/src/chart-component.tsx +18 -10
  29. package/src/index.ts +3 -3
  30. package/src/loader.ts +70 -73
  31. package/src/manual.ts +4 -4
  32. package/src/tests/charts.test.tsx +431 -126
  33. package/src/types.ts +8 -9
  34. package/src/use-chart.ts +8 -8
  35. package/lib/charts-Ckh2qxB5.js.map +0 -1
  36. package/lib/components-BcPePBeS.js.map +0 -1
  37. package/lib/core-9w0g6EOI.js.map +0 -1
  38. package/lib/createSeriesData-DOHScdgk.js.map +0 -1
  39. package/lib/customGraphicKeyframeAnimation-CvkEkSt_.js.map +0 -1
  40. package/lib/graphic-CPJ2K90a.js.map +0 -1
  41. package/lib/parseGeoJson-BlBe5Vig.js.map +0 -1
  42. package/lib/renderers-Dytryvoy.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"customGraphicKeyframeAnimation-CvkEkSt_.js","names":["createSymbol","graphic.updateProps","graphic.Group","isObject","makeSeriesScope","graphic.Group","SymbolClz","graphic.updateProps","zrUtil.mixin","zrUtil.merge","zrUtil.defaults","axisDefault","zrUtil.map","zrUtil.filter","matrixUtil.invert","matrixUtil.identity","matrixUtil.create","graphic.Group","graphic.Line","createSymbol","matrixUtil.rotate","graphic.Text","isObject","graphic.Rect","zrUtil.retrieve","zrUtil.retrieve3","zrUtil.keys","isObject","mathMax","each","axisPointerModelHelper.fixValue","axisPointerModelHelper.getAxisPointerModel","inner","zrUtil.createHashMap","zrUtil.isArray","graphic.Rect","zrUtil.defaults","graphic.Group","zrUtil.isArray","graphic.Line","zrUtil.defaults","install","axisDefault","zrUtil.defaults","zrUtil.map","zrUtil.merge","zrUtil.clone","zrUtil.isString","zrUtil.isFunction","zrUtil.map","zrUtil.isArray","graphic.Circle","graphic.Ring","graphic.Polyline","graphic.Polygon","graphic.mergePath","zrUtil.defaults","numberUtil.parsePercent","install","echarts.registerAction","eventTool.isMiddleOrRightButtonOnMouseUpDown","interactionMutex.isTaken","trigger","Line","colorTool.parse","colorTool.parseCssFloat","colorTool.stringify","matrix.create","points","zrUtil.map","parseGeoJson","zrUtil.createHashMap","graphic.Group","graphic.Rect","graphic.Polygon","graphic.Polyline","graphic.CompoundPath","geoSourceManager","zrUtil.extend","vector.applyTransform","matrix.create","vector.copy","getCoordSys","zrUtil.createHashMap","geoSourceManager","zrUtil.retrieve2","zrUtil.isString","zrUtil.mixin","layout.createBoxLayoutReference","numberUtil.parsePercent","layout.getLayoutRect","layout.applyPreserveAspect","zrUtil.extend","zrUtil.map","zrUtil.mergeAll","zrUtil.createHashMap","geoSourceManager","zrUtil.merge","geoSourceManager","zrUtil.reduce","zrUtil.createHashMap","zrUtil.isFunction","zrUtil.isString","geoSourceManager","zrUtil.each","zrUtil.isObject","zrUtil.clone","zrUtil.bind","zrUtil.keys","zrUtil.isArray","zrUtil.isString","zrColor.fastLerp","zrColor.stringify","zrColor.modifyHSL","zrColor.modifyAlpha","zrUtil.map","zrColor.parse","zrUtil.noop","vec2.normalize","graphic.Path","symbolUtil.normalizeSymbolSize","symbolUtil.normalizeSymbolOffset","symbolUtil.createSymbol","vector.sub","graphic.Group","graphic.Group","LineGroup","graphic.Group","graphic.Rect","graphic.getTransform","graphic.transformDirection","graphic.Polyline","graphic.Polygon","graphicUtil.clipPointsByRect"],"sources":["../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/chart/helper/labelHelper.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/chart/helper/Symbol.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/chart/helper/SymbolDraw.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/CoordinateSystem.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/label/labelLayoutHelper.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/cartesian/GridModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/cartesian/AxisModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/axisDefault.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/axisCommonTypes.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/axis/axisBreakHelper.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/axisModelCreator.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/cartesian/Cartesian.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/cartesian/Cartesian2D.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/cartesian/Axis2D.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/axis/axisAction.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/axis/AxisBuilder.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/axisAlignTicks.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/cartesian/Grid.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/axisPointer/modelHelper.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/axis/AxisView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/axis/axisSplitHelper.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/axis/CartesianAxisView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/grid/installSimple.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/radar/RadarModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/radar/RadarView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/radar/IndicatorAxis.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/radar/Radar.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/radar/install.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/helper/interactionMutex.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/helper/cursorHelper.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/helper/RoamController.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/helper/roamHelper.js","../../../node_modules/.bun/zrender@6.0.0/node_modules/zrender/lib/tool/parseXML.js","../../../node_modules/.bun/zrender@6.0.0/node_modules/zrender/lib/tool/parseSVG.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/geo/GeoSVGResource.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/geo/fix/nanhai.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/geo/fix/textCoord.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/geo/fix/diaoyuIsland.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/geo/GeoJSONResource.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/geo/geoSourceManager.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/helper/MapDraw.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/View.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/geo/Geo.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/geo/geoCreator.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/geo/GeoModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/geo/GeoView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/geo/install.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/visual/VisualMapping.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/chart/helper/LinePath.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/chart/helper/Line.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/chart/helper/LineDraw.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/helper/sliderMove.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/helper/BrushController.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/helper/brushHelper.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/util/styleCompat.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/animation/customGraphicTransition.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/animation/customGraphicKeyframeAnimation.js"],"sourcesContent":["\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { retrieveRawValue } from '../../data/helper/dataProvider.js';\nimport { isArray } from 'zrender/lib/core/util.js';\n/**\n * @return label string. Not null/undefined\n */\nexport function getDefaultLabel(data, dataIndex) {\n var labelDims = data.mapDimensionsAll('defaultedLabel');\n var len = labelDims.length;\n // Simple optimization (in lots of cases, label dims length is 1)\n if (len === 1) {\n var rawVal = retrieveRawValue(data, dataIndex, labelDims[0]);\n return rawVal != null ? rawVal + '' : null;\n } else if (len) {\n var vals = [];\n for (var i = 0; i < labelDims.length; i++) {\n vals.push(retrieveRawValue(data, dataIndex, labelDims[i]));\n }\n return vals.join(' ');\n }\n}\nexport function getDefaultInterpolatedLabel(data, interpolatedValue) {\n var labelDims = data.mapDimensionsAll('defaultedLabel');\n if (!isArray(interpolatedValue)) {\n return interpolatedValue + '';\n }\n var vals = [];\n for (var i = 0; i < labelDims.length; i++) {\n var dimIndex = data.getDimensionIndex(labelDims[i]);\n if (dimIndex >= 0) {\n vals.push(interpolatedValue[dimIndex]);\n }\n }\n return vals.join(' ');\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { createSymbol, normalizeSymbolOffset, normalizeSymbolSize } from '../../util/symbol.js';\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { enterEmphasis, leaveEmphasis, toggleHoverEmphasis } from '../../util/states.js';\nimport { getDefaultLabel } from './labelHelper.js';\nimport { extend, retrieve2 } from 'zrender/lib/core/util.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport ZRImage from 'zrender/lib/graphic/Image.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nvar Symbol = /** @class */function (_super) {\n __extends(Symbol, _super);\n function Symbol(data, idx, seriesScope, opts) {\n var _this = _super.call(this) || this;\n _this.updateData(data, idx, seriesScope, opts);\n return _this;\n }\n Symbol.prototype._createSymbol = function (symbolType, data, idx, symbolSize, z2, keepAspect) {\n // Remove paths created before\n this.removeAll();\n // let symbolPath = createSymbol(\n // symbolType, -0.5, -0.5, 1, 1, color\n // );\n // If width/height are set too small (e.g., set to 1) on ios10\n // and macOS Sierra, a circle stroke become a rect, no matter what\n // the scale is set. So we set width/height as 2. See #4150.\n var symbolPath = createSymbol(symbolType, -1, -1, 2, 2, null, keepAspect);\n symbolPath.attr({\n z2: retrieve2(z2, 100),\n culling: true,\n scaleX: symbolSize[0] / 2,\n scaleY: symbolSize[1] / 2\n });\n // Rewrite drift method\n symbolPath.drift = driftSymbol;\n this._symbolType = symbolType;\n this.add(symbolPath);\n };\n /**\n * Stop animation\n * @param {boolean} toLastFrame\n */\n Symbol.prototype.stopSymbolAnimation = function (toLastFrame) {\n this.childAt(0).stopAnimation(null, toLastFrame);\n };\n Symbol.prototype.getSymbolType = function () {\n return this._symbolType;\n };\n /**\n * FIXME:\n * Caution: This method breaks the encapsulation of this module,\n * but it indeed brings convenience. So do not use the method\n * unless you detailedly know all the implements of `Symbol`,\n * especially animation.\n *\n * Get symbol path element.\n */\n Symbol.prototype.getSymbolPath = function () {\n return this.childAt(0);\n };\n /**\n * Highlight symbol\n */\n Symbol.prototype.highlight = function () {\n enterEmphasis(this.childAt(0));\n };\n /**\n * Downplay symbol\n */\n Symbol.prototype.downplay = function () {\n leaveEmphasis(this.childAt(0));\n };\n /**\n * @param {number} zlevel\n * @param {number} z\n */\n Symbol.prototype.setZ = function (zlevel, z) {\n var symbolPath = this.childAt(0);\n symbolPath.zlevel = zlevel;\n symbolPath.z = z;\n };\n Symbol.prototype.setDraggable = function (draggable, hasCursorOption) {\n var symbolPath = this.childAt(0);\n symbolPath.draggable = draggable;\n symbolPath.cursor = !hasCursorOption && draggable ? 'move' : symbolPath.cursor;\n };\n /**\n * Update symbol properties\n */\n Symbol.prototype.updateData = function (data, idx, seriesScope, opts) {\n this.silent = false;\n var symbolType = data.getItemVisual(idx, 'symbol') || 'circle';\n var seriesModel = data.hostModel;\n var symbolSize = Symbol.getSymbolSize(data, idx);\n var z2 = Symbol.getSymbolZ2(data, idx);\n var isInit = symbolType !== this._symbolType;\n var disableAnimation = opts && opts.disableAnimation;\n if (isInit) {\n var keepAspect = data.getItemVisual(idx, 'symbolKeepAspect');\n this._createSymbol(symbolType, data, idx, symbolSize, z2, keepAspect);\n } else {\n var symbolPath = this.childAt(0);\n symbolPath.silent = false;\n var target = {\n scaleX: symbolSize[0] / 2,\n scaleY: symbolSize[1] / 2\n };\n disableAnimation ? symbolPath.attr(target) : graphic.updateProps(symbolPath, target, seriesModel, idx);\n saveOldStyle(symbolPath);\n }\n this._updateCommon(data, idx, symbolSize, seriesScope, opts);\n if (isInit) {\n var symbolPath = this.childAt(0);\n if (!disableAnimation) {\n var target = {\n scaleX: this._sizeX,\n scaleY: this._sizeY,\n style: {\n // Always fadeIn. Because it has fadeOut animation when symbol is removed..\n opacity: symbolPath.style.opacity\n }\n };\n symbolPath.scaleX = symbolPath.scaleY = 0;\n symbolPath.style.opacity = 0;\n graphic.initProps(symbolPath, target, seriesModel, idx);\n }\n }\n if (disableAnimation) {\n // Must stop leave transition manually if don't call initProps or updateProps.\n this.childAt(0).stopAnimation('leave');\n }\n };\n Symbol.prototype._updateCommon = function (data, idx, symbolSize, seriesScope, opts) {\n var symbolPath = this.childAt(0);\n var seriesModel = data.hostModel;\n var emphasisItemStyle;\n var blurItemStyle;\n var selectItemStyle;\n var focus;\n var blurScope;\n var emphasisDisabled;\n var labelStatesModels;\n var hoverScale;\n var cursorStyle;\n if (seriesScope) {\n emphasisItemStyle = seriesScope.emphasisItemStyle;\n blurItemStyle = seriesScope.blurItemStyle;\n selectItemStyle = seriesScope.selectItemStyle;\n focus = seriesScope.focus;\n blurScope = seriesScope.blurScope;\n labelStatesModels = seriesScope.labelStatesModels;\n hoverScale = seriesScope.hoverScale;\n cursorStyle = seriesScope.cursorStyle;\n emphasisDisabled = seriesScope.emphasisDisabled;\n }\n if (!seriesScope || data.hasItemOption) {\n var itemModel = seriesScope && seriesScope.itemModel ? seriesScope.itemModel : data.getItemModel(idx);\n var emphasisModel = itemModel.getModel('emphasis');\n emphasisItemStyle = emphasisModel.getModel('itemStyle').getItemStyle();\n selectItemStyle = itemModel.getModel(['select', 'itemStyle']).getItemStyle();\n blurItemStyle = itemModel.getModel(['blur', 'itemStyle']).getItemStyle();\n focus = emphasisModel.get('focus');\n blurScope = emphasisModel.get('blurScope');\n emphasisDisabled = emphasisModel.get('disabled');\n labelStatesModels = getLabelStatesModels(itemModel);\n hoverScale = emphasisModel.getShallow('scale');\n cursorStyle = itemModel.getShallow('cursor');\n }\n var symbolRotate = data.getItemVisual(idx, 'symbolRotate');\n symbolPath.attr('rotation', (symbolRotate || 0) * Math.PI / 180 || 0);\n var symbolOffset = normalizeSymbolOffset(data.getItemVisual(idx, 'symbolOffset'), symbolSize);\n if (symbolOffset) {\n symbolPath.x = symbolOffset[0];\n symbolPath.y = symbolOffset[1];\n }\n cursorStyle && symbolPath.attr('cursor', cursorStyle);\n var symbolStyle = data.getItemVisual(idx, 'style');\n var visualColor = symbolStyle.fill;\n if (symbolPath instanceof ZRImage) {\n var pathStyle = symbolPath.style;\n symbolPath.useStyle(extend({\n // TODO other properties like x, y ?\n image: pathStyle.image,\n x: pathStyle.x,\n y: pathStyle.y,\n width: pathStyle.width,\n height: pathStyle.height\n }, symbolStyle));\n } else {\n if (symbolPath.__isEmptyBrush) {\n // fill and stroke will be swapped if it's empty.\n // So we cloned a new style to avoid it affecting the original style in visual storage.\n // TODO Better implementation. No empty logic!\n symbolPath.useStyle(extend({}, symbolStyle));\n } else {\n symbolPath.useStyle(symbolStyle);\n }\n // Disable decal because symbol scale will been applied on the decal.\n symbolPath.style.decal = null;\n symbolPath.setColor(visualColor, opts && opts.symbolInnerColor);\n symbolPath.style.strokeNoScale = true;\n }\n var liftZ = data.getItemVisual(idx, 'liftZ');\n var z2Origin = this._z2;\n if (liftZ != null) {\n if (z2Origin == null) {\n this._z2 = symbolPath.z2;\n symbolPath.z2 += liftZ;\n }\n } else if (z2Origin != null) {\n symbolPath.z2 = z2Origin;\n this._z2 = null;\n }\n var useNameLabel = opts && opts.useNameLabel;\n setLabelStyle(symbolPath, labelStatesModels, {\n labelFetcher: seriesModel,\n labelDataIndex: idx,\n defaultText: getLabelDefaultText,\n inheritColor: visualColor,\n defaultOpacity: symbolStyle.opacity\n });\n // Do not execute util needed.\n function getLabelDefaultText(idx) {\n return useNameLabel ? data.getName(idx) : getDefaultLabel(data, idx);\n }\n this._sizeX = symbolSize[0] / 2;\n this._sizeY = symbolSize[1] / 2;\n var emphasisState = symbolPath.ensureState('emphasis');\n emphasisState.style = emphasisItemStyle;\n symbolPath.ensureState('select').style = selectItemStyle;\n symbolPath.ensureState('blur').style = blurItemStyle;\n // null / undefined / true means to use default strategy.\n // 0 / false / negative number / NaN / Infinity means no scale.\n var scaleRatio = hoverScale == null || hoverScale === true ? Math.max(1.1, 3 / this._sizeY)\n // PENDING: restrict hoverScale > 1? It seems unreasonable to scale down\n : isFinite(hoverScale) && hoverScale > 0 ? +hoverScale : 1;\n // always set scale to allow resetting\n emphasisState.scaleX = this._sizeX * scaleRatio;\n emphasisState.scaleY = this._sizeY * scaleRatio;\n this.setSymbolScale(1);\n toggleHoverEmphasis(this, focus, blurScope, emphasisDisabled);\n };\n Symbol.prototype.setSymbolScale = function (scale) {\n this.scaleX = this.scaleY = scale;\n };\n Symbol.prototype.fadeOut = function (cb, seriesModel, opt) {\n var symbolPath = this.childAt(0);\n var dataIndex = getECData(this).dataIndex;\n var animationOpt = opt && opt.animation;\n // Avoid mistaken hover when fading out\n this.silent = symbolPath.silent = true;\n // Not show text when animating\n if (opt && opt.fadeLabel) {\n var textContent = symbolPath.getTextContent();\n if (textContent) {\n graphic.removeElement(textContent, {\n style: {\n opacity: 0\n }\n }, seriesModel, {\n dataIndex: dataIndex,\n removeOpt: animationOpt,\n cb: function () {\n symbolPath.removeTextContent();\n }\n });\n }\n } else {\n symbolPath.removeTextContent();\n }\n graphic.removeElement(symbolPath, {\n style: {\n opacity: 0\n },\n scaleX: 0,\n scaleY: 0\n }, seriesModel, {\n dataIndex: dataIndex,\n cb: cb,\n removeOpt: animationOpt\n });\n };\n Symbol.getSymbolSize = function (data, idx) {\n return normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize'));\n };\n Symbol.getSymbolZ2 = function (data, idx) {\n return data.getItemVisual(idx, 'z2');\n };\n return Symbol;\n}(graphic.Group);\nfunction driftSymbol(dx, dy) {\n this.parent.drift(dx, dy);\n}\nexport default Symbol;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as graphic from '../../util/graphic.js';\nimport SymbolClz from './Symbol.js';\nimport { isObject } from 'zrender/lib/core/util.js';\nimport { getLabelStatesModels } from '../../label/labelStyle.js';\nfunction symbolNeedsDraw(data, point, idx, opt) {\n return point && !isNaN(point[0]) && !isNaN(point[1]) && !(opt.isIgnore && opt.isIgnore(idx))\n // We do not set clipShape on group, because it will cut part of\n // the symbol element shape. We use the same clip shape here as\n // the line clip.\n && !(opt.clipShape && !opt.clipShape.contain(point[0], point[1])) && data.getItemVisual(idx, 'symbol') !== 'none';\n}\nfunction normalizeUpdateOpt(opt) {\n if (opt != null && !isObject(opt)) {\n opt = {\n isIgnore: opt\n };\n }\n return opt || {};\n}\nfunction makeSeriesScope(data) {\n var seriesModel = data.hostModel;\n var emphasisModel = seriesModel.getModel('emphasis');\n return {\n emphasisItemStyle: emphasisModel.getModel('itemStyle').getItemStyle(),\n blurItemStyle: seriesModel.getModel(['blur', 'itemStyle']).getItemStyle(),\n selectItemStyle: seriesModel.getModel(['select', 'itemStyle']).getItemStyle(),\n focus: emphasisModel.get('focus'),\n blurScope: emphasisModel.get('blurScope'),\n emphasisDisabled: emphasisModel.get('disabled'),\n hoverScale: emphasisModel.get('scale'),\n labelStatesModels: getLabelStatesModels(seriesModel),\n cursorStyle: seriesModel.get('cursor')\n };\n}\nvar SymbolDraw = /** @class */function () {\n function SymbolDraw(SymbolCtor) {\n this.group = new graphic.Group();\n this._SymbolCtor = SymbolCtor || SymbolClz;\n }\n /**\n * Update symbols draw by new data\n */\n SymbolDraw.prototype.updateData = function (data, opt) {\n // Remove progressive els.\n this._progressiveEls = null;\n opt = normalizeUpdateOpt(opt);\n var group = this.group;\n var seriesModel = data.hostModel;\n var oldData = this._data;\n var SymbolCtor = this._SymbolCtor;\n var disableAnimation = opt.disableAnimation;\n var seriesScope = makeSeriesScope(data);\n var symbolUpdateOpt = {\n disableAnimation: disableAnimation\n };\n var getSymbolPoint = opt.getSymbolPoint || function (idx) {\n return data.getItemLayout(idx);\n };\n // There is no oldLineData only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n if (!oldData) {\n group.removeAll();\n }\n data.diff(oldData).add(function (newIdx) {\n var point = getSymbolPoint(newIdx);\n if (symbolNeedsDraw(data, point, newIdx, opt)) {\n var symbolEl = new SymbolCtor(data, newIdx, seriesScope, symbolUpdateOpt);\n symbolEl.setPosition(point);\n data.setItemGraphicEl(newIdx, symbolEl);\n group.add(symbolEl);\n }\n }).update(function (newIdx, oldIdx) {\n var symbolEl = oldData.getItemGraphicEl(oldIdx);\n var point = getSymbolPoint(newIdx);\n if (!symbolNeedsDraw(data, point, newIdx, opt)) {\n group.remove(symbolEl);\n return;\n }\n var newSymbolType = data.getItemVisual(newIdx, 'symbol') || 'circle';\n var oldSymbolType = symbolEl && symbolEl.getSymbolType && symbolEl.getSymbolType();\n if (!symbolEl\n // Create a new if symbol type changed.\n || oldSymbolType && oldSymbolType !== newSymbolType) {\n group.remove(symbolEl);\n symbolEl = new SymbolCtor(data, newIdx, seriesScope, symbolUpdateOpt);\n symbolEl.setPosition(point);\n } else {\n symbolEl.updateData(data, newIdx, seriesScope, symbolUpdateOpt);\n var target = {\n x: point[0],\n y: point[1]\n };\n disableAnimation ? symbolEl.attr(target) : graphic.updateProps(symbolEl, target, seriesModel);\n }\n // Add back\n group.add(symbolEl);\n data.setItemGraphicEl(newIdx, symbolEl);\n }).remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && el.fadeOut(function () {\n group.remove(el);\n }, seriesModel);\n }).execute();\n this._getSymbolPoint = getSymbolPoint;\n this._data = data;\n };\n ;\n SymbolDraw.prototype.updateLayout = function () {\n var _this = this;\n var data = this._data;\n if (data) {\n // Not use animation\n data.eachItemGraphicEl(function (el, idx) {\n var point = _this._getSymbolPoint(idx);\n el.setPosition(point);\n el.markRedraw();\n });\n }\n };\n ;\n SymbolDraw.prototype.incrementalPrepareUpdate = function (data) {\n this._seriesScope = makeSeriesScope(data);\n this._data = null;\n this.group.removeAll();\n };\n ;\n /**\n * Update symbols draw by new data\n */\n SymbolDraw.prototype.incrementalUpdate = function (taskParams, data, opt) {\n // Clear\n this._progressiveEls = [];\n opt = normalizeUpdateOpt(opt);\n function updateIncrementalAndHover(el) {\n if (!el.isGroup) {\n el.incremental = true;\n el.ensureState('emphasis').hoverLayer = true;\n }\n }\n for (var idx = taskParams.start; idx < taskParams.end; idx++) {\n var point = data.getItemLayout(idx);\n if (symbolNeedsDraw(data, point, idx, opt)) {\n var el = new this._SymbolCtor(data, idx, this._seriesScope);\n el.traverse(updateIncrementalAndHover);\n el.setPosition(point);\n this.group.add(el);\n data.setItemGraphicEl(idx, el);\n this._progressiveEls.push(el);\n }\n }\n };\n ;\n SymbolDraw.prototype.eachRendered = function (cb) {\n graphic.traverseElements(this._progressiveEls || this.group, cb);\n };\n SymbolDraw.prototype.remove = function (enableAnimation) {\n var group = this.group;\n var data = this._data;\n // Incremental model do not have this._data.\n if (data && enableAnimation) {\n data.eachItemGraphicEl(function (el) {\n el.fadeOut(function () {\n group.remove(el);\n }, data.hostModel);\n });\n } else {\n group.removeAll();\n }\n };\n ;\n return SymbolDraw;\n}();\nexport default SymbolDraw;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport function isCoordinateSystemType(coordSys, type) {\n return coordSys.type === type;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { OrientedBoundingRect, WH, XY, ensureCopyRect, ensureCopyTransform, expandOrShrinkRect, isBoundingRectAxisAligned } from '../util/graphic.js';\nimport { LabelMarginType } from './labelStyle.js';\nvar LABEL_LAYOUT_BASE_PROPS = ['label', 'labelLine', 'layoutOption', 'priority', 'defaultAttr', 'marginForce', 'minMarginForce', 'marginDefault', 'suggestIgnore'];\nvar LABEL_LAYOUT_DIRTY_BIT_OTHERS = 1;\nvar LABEL_LAYOUT_DIRTY_BIT_OBB = 2;\nvar LABEL_LAYOUT_DIRTY_ALL = LABEL_LAYOUT_DIRTY_BIT_OTHERS | LABEL_LAYOUT_DIRTY_BIT_OBB;\nexport function setLabelLayoutDirty(labelGeometry, dirtyOrClear, dirtyBits) {\n dirtyBits = dirtyBits || LABEL_LAYOUT_DIRTY_ALL;\n dirtyOrClear ? labelGeometry.dirty |= dirtyBits : labelGeometry.dirty &= ~dirtyBits;\n}\nfunction isLabelLayoutDirty(labelGeometry, dirtyBits) {\n dirtyBits = dirtyBits || LABEL_LAYOUT_DIRTY_ALL;\n return labelGeometry.dirty == null || !!(labelGeometry.dirty & dirtyBits);\n}\n/**\n * [CAUTION]\n * - No auto dirty propagation mechanism yet. If the transform of the raw label or any of its ancestors is\n * changed, must sync the changes to the props of `LabelGeometry` by:\n * either explicitly call:\n * `setLabelLayoutDirty(labelLayout, true); ensureLabelLayoutWithGeometry(labelLayout);`\n * or call (if only translation is performed):\n * `labelLayoutApplyTranslation(labelLayout);`\n * - `label.ignore` is not necessarily falsy, and not considered in computing `LabelGeometry`,\n * since it might be modified by some overlap resolving handling.\n * - To duplicate or make a variation:\n * use `newLabelLayoutWithGeometry`.\n *\n * The result can also be the input of this method.\n * @return `NullUndefined` if and only if `labelLayout` is `NullUndefined`.\n */\nexport function ensureLabelLayoutWithGeometry(labelLayout) {\n if (!labelLayout) {\n return;\n }\n if (isLabelLayoutDirty(labelLayout)) {\n computeLabelGeometry(labelLayout, labelLayout.label, labelLayout);\n }\n return labelLayout;\n}\n/**\n * The props in `out` will be filled if existing, or created.\n */\nexport function computeLabelGeometry(out, label, opt) {\n // [CAUTION] These props may be modified directly for performance consideration,\n // therefore, do not output the internal data structure of zrender Element.\n var rawTransform = label.getComputedTransform();\n out.transform = ensureCopyTransform(out.transform, rawTransform);\n // NOTE: should call `getBoundingRect` after `getComputedTransform`, or may get an inaccurate bounding rect.\n // The reason is that `getComputedTransform` calls `__host.updateInnerText()` internally, which updates the label\n // by `textConfig` mounted on the host.\n // PENDING: add a dirty bit for that in zrender?\n var outLocalRect = out.localRect = ensureCopyRect(out.localRect, label.getBoundingRect());\n var labelStyleExt = label.style;\n var margin = labelStyleExt.margin;\n var marginForce = opt && opt.marginForce;\n var minMarginForce = opt && opt.minMarginForce;\n var marginDefault = opt && opt.marginDefault;\n var marginType = labelStyleExt.__marginType;\n if (marginType == null && marginDefault) {\n margin = marginDefault;\n marginType = LabelMarginType.textMargin;\n }\n // `textMargin` and `minMargin` can not exist both.\n for (var i = 0; i < 4; i++) {\n _tmpLabelMargin[i] = marginType === LabelMarginType.minMargin && minMarginForce && minMarginForce[i] != null ? minMarginForce[i] : marginForce && marginForce[i] != null ? marginForce[i] : margin ? margin[i] : 0;\n }\n if (marginType === LabelMarginType.textMargin) {\n expandOrShrinkRect(outLocalRect, _tmpLabelMargin, false, false);\n }\n var outGlobalRect = out.rect = ensureCopyRect(out.rect, outLocalRect);\n if (rawTransform) {\n outGlobalRect.applyTransform(rawTransform);\n }\n // Notice: label.style.margin is actually `minMargin / 2`, handled by `setTextStyleCommon`.\n if (marginType === LabelMarginType.minMargin) {\n expandOrShrinkRect(outGlobalRect, _tmpLabelMargin, false, false);\n }\n out.axisAligned = isBoundingRectAxisAligned(rawTransform);\n (out.label = out.label || {}).ignore = label.ignore;\n setLabelLayoutDirty(out, false);\n setLabelLayoutDirty(out, true, LABEL_LAYOUT_DIRTY_BIT_OBB);\n // Do not remove `obb` (if existing) for reuse, just reset the dirty bit.\n return out;\n}\nvar _tmpLabelMargin = [0, 0, 0, 0];\n/**\n * The props in `out` will be filled if existing, or created.\n */\nexport function computeLabelGeometry2(out, rawLocalRect, rawTransform) {\n out.transform = ensureCopyTransform(out.transform, rawTransform);\n out.localRect = ensureCopyRect(out.localRect, rawLocalRect);\n out.rect = ensureCopyRect(out.rect, rawLocalRect);\n if (rawTransform) {\n out.rect.applyTransform(rawTransform);\n }\n out.axisAligned = isBoundingRectAxisAligned(rawTransform);\n out.obb = undefined; // Reset to undefined, will be created by `ensureOBB` when using.\n (out.label = out.label || {}).ignore = false;\n return out;\n}\n/**\n * This is a shortcut of\n * ```js\n * labelLayout.label.x = newX;\n * labelLayout.label.y = newY;\n * setLabelLayoutDirty(labelLayout, true);\n * ensureLabelLayoutWithGeometry(labelLayout);\n * ```\n * and provide better performance in this common case.\n */\nexport function labelLayoutApplyTranslation(labelLayout, offset) {\n if (!labelLayout) {\n return;\n }\n labelLayout.label.x += offset.x;\n labelLayout.label.y += offset.y;\n labelLayout.label.markRedraw();\n var transform = labelLayout.transform;\n if (transform) {\n transform[4] += offset.x;\n transform[5] += offset.y;\n }\n var globalRect = labelLayout.rect;\n if (globalRect) {\n globalRect.x += offset.x;\n globalRect.y += offset.y;\n }\n var obb = labelLayout.obb;\n if (obb) {\n obb.fromBoundingRect(labelLayout.localRect, transform);\n }\n}\n/**\n * To duplicate or make a variation of a label layout.\n * Copy the only relevant properties to avoid the conflict or wrongly reuse of the props of `LabelLayoutWithGeometry`.\n */\nexport function newLabelLayoutWithGeometry(newBaseWithDefaults, source) {\n for (var i = 0; i < LABEL_LAYOUT_BASE_PROPS.length; i++) {\n var prop = LABEL_LAYOUT_BASE_PROPS[i];\n if (newBaseWithDefaults[prop] == null) {\n newBaseWithDefaults[prop] = source[prop];\n }\n }\n return ensureLabelLayoutWithGeometry(newBaseWithDefaults);\n}\n/**\n * Create obb if no one, can cache it.\n */\nfunction ensureOBB(labelGeometry) {\n var obb = labelGeometry.obb;\n if (!obb || isLabelLayoutDirty(labelGeometry, LABEL_LAYOUT_DIRTY_BIT_OBB)) {\n labelGeometry.obb = obb = obb || new OrientedBoundingRect();\n obb.fromBoundingRect(labelGeometry.localRect, labelGeometry.transform);\n setLabelLayoutDirty(labelGeometry, false, LABEL_LAYOUT_DIRTY_BIT_OBB);\n }\n return obb;\n}\n/**\n * Adjust labels on x/y direction to avoid overlap.\n *\n * PENDING: the current implementation is based on the global bounding rect rather than the local rect,\n * which may be not preferable in some edge cases when the label has rotation, but works for most cases,\n * since rotation is unnecessary when there is sufficient space, while squeezing is applied regardless\n * of overlapping when there is no enough space.\n *\n * NOTICE:\n * - The input `list` and its content will be modified (sort, label.x/y, rect).\n * - The caller should sync the modifications to the other parts by\n * `setLabelLayoutDirty` and `ensureLabelLayoutWithGeometry` if needed.\n *\n * @return adjusted\n */\nexport function shiftLayoutOnXY(list, xyDimIdx,\n// 0 for x, 1 for y\nminBound,\n// for x, leftBound; for y, topBound\nmaxBound,\n// for x, rightBound; for y, bottomBound\n// If average the shifts on all labels and add them to 0\n// TODO: Not sure if should enable it.\n// Pros: The angle of lines will distribute more equally\n// Cons: In some layout. It may not what user wanted. like in pie. the label of last sector is usually changed unexpectedly.\nbalanceShift) {\n var len = list.length;\n var xyDim = XY[xyDimIdx];\n var sizeDim = WH[xyDimIdx];\n if (len < 2) {\n return false;\n }\n list.sort(function (a, b) {\n return a.rect[xyDim] - b.rect[xyDim];\n });\n var lastPos = 0;\n var delta;\n var adjusted = false;\n // const shifts = [];\n var totalShifts = 0;\n for (var i = 0; i < len; i++) {\n var item = list[i];\n var rect = item.rect;\n delta = rect[xyDim] - lastPos;\n if (delta < 0) {\n // shiftForward(i, len, -delta);\n rect[xyDim] -= delta;\n item.label[xyDim] -= delta;\n adjusted = true;\n }\n var shift = Math.max(-delta, 0);\n // shifts.push(shift);\n totalShifts += shift;\n lastPos = rect[xyDim] + rect[sizeDim];\n }\n if (totalShifts > 0 && balanceShift) {\n // Shift back to make the distribution more equally.\n shiftList(-totalShifts / len, 0, len);\n }\n // TODO bleedMargin?\n var first = list[0];\n var last = list[len - 1];\n var minGap;\n var maxGap;\n updateMinMaxGap();\n // If ends exceed two bounds, squeeze at most 80%, then take the gap of two bounds.\n minGap < 0 && squeezeGaps(-minGap, 0.8);\n maxGap < 0 && squeezeGaps(maxGap, 0.8);\n updateMinMaxGap();\n takeBoundsGap(minGap, maxGap, 1);\n takeBoundsGap(maxGap, minGap, -1);\n // Handle bailout when there is not enough space.\n updateMinMaxGap();\n if (minGap < 0) {\n squeezeWhenBailout(-minGap);\n }\n if (maxGap < 0) {\n squeezeWhenBailout(maxGap);\n }\n function updateMinMaxGap() {\n minGap = first.rect[xyDim] - minBound;\n maxGap = maxBound - last.rect[xyDim] - last.rect[sizeDim];\n }\n function takeBoundsGap(gapThisBound, gapOtherBound, moveDir) {\n if (gapThisBound < 0) {\n // Move from other gap if can.\n var moveFromMaxGap = Math.min(gapOtherBound, -gapThisBound);\n if (moveFromMaxGap > 0) {\n shiftList(moveFromMaxGap * moveDir, 0, len);\n var remained = moveFromMaxGap + gapThisBound;\n if (remained < 0) {\n squeezeGaps(-remained * moveDir, 1);\n }\n } else {\n squeezeGaps(-gapThisBound * moveDir, 1);\n }\n }\n }\n function shiftList(delta, start, end) {\n if (delta !== 0) {\n adjusted = true;\n }\n for (var i = start; i < end; i++) {\n var item = list[i];\n var rect = item.rect;\n rect[xyDim] += delta;\n item.label[xyDim] += delta;\n }\n }\n // Squeeze gaps if the labels exceed margin.\n function squeezeGaps(delta, maxSqeezePercent) {\n var gaps = [];\n var totalGaps = 0;\n for (var i = 1; i < len; i++) {\n var prevItemRect = list[i - 1].rect;\n var gap = Math.max(list[i].rect[xyDim] - prevItemRect[xyDim] - prevItemRect[sizeDim], 0);\n gaps.push(gap);\n totalGaps += gap;\n }\n if (!totalGaps) {\n return;\n }\n var squeezePercent = Math.min(Math.abs(delta) / totalGaps, maxSqeezePercent);\n if (delta > 0) {\n for (var i = 0; i < len - 1; i++) {\n // Distribute the shift delta to all gaps.\n var movement = gaps[i] * squeezePercent;\n // Forward\n shiftList(movement, 0, i + 1);\n }\n } else {\n // Backward\n for (var i = len - 1; i > 0; i--) {\n // Distribute the shift delta to all gaps.\n var movement = gaps[i - 1] * squeezePercent;\n shiftList(-movement, i, len);\n }\n }\n }\n /**\n * Squeeze to allow overlap if there is no more space available.\n * Let other overlapping strategy like hideOverlap do the job instead of keep exceeding the bounds.\n */\n function squeezeWhenBailout(delta) {\n var dir = delta < 0 ? -1 : 1;\n delta = Math.abs(delta);\n var moveForEachLabel = Math.ceil(delta / (len - 1));\n for (var i = 0; i < len - 1; i++) {\n if (dir > 0) {\n // Forward\n shiftList(moveForEachLabel, 0, i + 1);\n } else {\n // Backward\n shiftList(-moveForEachLabel, len - i - 1, len);\n }\n delta -= moveForEachLabel;\n if (delta <= 0) {\n return;\n }\n }\n }\n return adjusted;\n}\n/**\n * @see `SavedLabelAttr` in `LabelManager.ts`\n * @see `hideOverlap`\n */\nexport function restoreIgnore(labelList) {\n for (var i = 0; i < labelList.length; i++) {\n var labelItem = labelList[i];\n var defaultAttr = labelItem.defaultAttr;\n var labelLine = labelItem.labelLine;\n labelItem.label.attr('ignore', defaultAttr.ignore);\n labelLine && labelLine.attr('ignore', defaultAttr.labelGuideIgnore);\n }\n}\n/**\n * [NOTICE - restore]:\n * 'series:layoutlabels' may be triggered during some shortcut passes, such as zooming in series.graph/geo\n * (`updateLabelLayout`), where the modified `Element` props should be restorable from `defaultAttr`.\n * @see `SavedLabelAttr` in `LabelManager.ts`\n * `restoreIgnore` can be called to perform the restore, if needed.\n *\n * [NOTICE - state]:\n * Regarding Element's states, this method is only designed for the normal state.\n * PENDING: although currently this method is effectively called in other states in `updateLabelLayout` case,\n * the bad case is not noticeable in the zooming scenario.\n */\nexport function hideOverlap(labelList) {\n var displayedLabels = [];\n // TODO, render overflow visible first, put in the displayedLabels.\n labelList.sort(function (a, b) {\n return (b.suggestIgnore ? 1 : 0) - (a.suggestIgnore ? 1 : 0) || b.priority - a.priority;\n });\n function hideEl(el) {\n if (!el.ignore) {\n // Show on emphasis.\n var emphasisState = el.ensureState('emphasis');\n if (emphasisState.ignore == null) {\n emphasisState.ignore = false;\n }\n }\n el.ignore = true;\n }\n for (var i = 0; i < labelList.length; i++) {\n var labelItem = ensureLabelLayoutWithGeometry(labelList[i]);\n // The current `el.ignore` is involved, since some previous overlap\n // resolving strategies may have set `el.ignore` to true.\n if (labelItem.label.ignore) {\n continue;\n }\n var label = labelItem.label;\n var labelLine = labelItem.labelLine;\n // NOTICE: even when the with/height of globalRect of a label is 0, the label line should\n // still be displayed, since we should follow the concept of \"truncation\", meaning that\n // something exists even if it cannot be fully displayed. A visible label line is necessary\n // to allow users to get a tooltip with label info on hover.\n var overlapped = false;\n for (var j = 0; j < displayedLabels.length; j++) {\n if (labelIntersect(labelItem, displayedLabels[j], null, {\n touchThreshold: 0.05\n })) {\n overlapped = true;\n break;\n }\n }\n // TODO Callback to determine if this overlap should be handled?\n if (overlapped) {\n hideEl(label);\n labelLine && hideEl(labelLine);\n } else {\n displayedLabels.push(labelItem);\n }\n }\n}\n/**\n * Enable fast check for performance; use obb if inevitable.\n * If `mtv` is used, `targetLayoutInfo` can be moved based on the values filled into `mtv`.\n *\n * This method is based only on the current `Element` states (regardless of other states).\n * Typically this method (and the entire layout process) is performed in normal state.\n */\nexport function labelIntersect(baseLayoutInfo, targetLayoutInfo, mtv, intersectOpt) {\n if (!baseLayoutInfo || !targetLayoutInfo) {\n return false;\n }\n if (baseLayoutInfo.label && baseLayoutInfo.label.ignore || targetLayoutInfo.label && targetLayoutInfo.label.ignore) {\n return false;\n }\n // Fast rejection.\n if (!baseLayoutInfo.rect.intersect(targetLayoutInfo.rect, mtv, intersectOpt)) {\n return false;\n }\n if (baseLayoutInfo.axisAligned && targetLayoutInfo.axisAligned) {\n return true; // obb is the same as the normal bounding rect.\n }\n return ensureOBB(baseLayoutInfo).intersect(ensureOBB(targetLayoutInfo), mtv, intersectOpt);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nimport { getLayoutParams, mergeLayoutParam } from '../../util/layout.js';\nimport tokens from '../../visual/tokens.js';\n// For backward compatibility, do not use a margin. Although the labels might touch the edge of\n// the canvas, the chart canvas probably does not have an border or a different background color within a page.\nexport var OUTER_BOUNDS_DEFAULT = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n};\nexport var OUTER_BOUNDS_CLAMP_DEFAULT = ['25%', '25%'];\nvar GridModel = /** @class */function (_super) {\n __extends(GridModel, _super);\n function GridModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GridModel.prototype.mergeDefaultAndTheme = function (option, ecModel) {\n var outerBoundsCp = getLayoutParams(option.outerBounds);\n _super.prototype.mergeDefaultAndTheme.apply(this, arguments);\n if (outerBoundsCp && option.outerBounds) {\n mergeLayoutParam(option.outerBounds, outerBoundsCp);\n }\n };\n GridModel.prototype.mergeOption = function (newOption, ecModel) {\n _super.prototype.mergeOption.apply(this, arguments);\n if (this.option.outerBounds && newOption.outerBounds) {\n mergeLayoutParam(this.option.outerBounds, newOption.outerBounds);\n }\n };\n GridModel.type = 'grid';\n GridModel.dependencies = ['xAxis', 'yAxis'];\n GridModel.layoutMode = 'box';\n GridModel.defaultOption = {\n show: false,\n // zlevel: 0,\n z: 0,\n left: '15%',\n top: 65,\n right: '10%',\n bottom: 80,\n // If grid size contain label\n containLabel: false,\n outerBoundsMode: 'auto',\n outerBounds: OUTER_BOUNDS_DEFAULT,\n outerBoundsContain: 'all',\n outerBoundsClampWidth: OUTER_BOUNDS_CLAMP_DEFAULT[0],\n outerBoundsClampHeight: OUTER_BOUNDS_CLAMP_DEFAULT[1],\n // width: {totalWidth} - left - right,\n // height: {totalHeight} - top - bottom,\n backgroundColor: tokens.color.transparent,\n borderWidth: 1,\n borderColor: tokens.color.neutral30\n };\n return GridModel;\n}(ComponentModel);\nexport default GridModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ComponentModel from '../../model/Component.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nvar CartesianAxisModel = /** @class */function (_super) {\n __extends(CartesianAxisModel, _super);\n function CartesianAxisModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CartesianAxisModel.prototype.getCoordSysModel = function () {\n return this.getReferringComponents('grid', SINGLE_REFERRING).models[0];\n };\n CartesianAxisModel.type = 'cartesian2dAxis';\n return CartesianAxisModel;\n}(ComponentModel);\nexport { CartesianAxisModel };\nzrUtil.mixin(CartesianAxisModel, AxisModelCommonMixin);\nexport default CartesianAxisModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport tokens from '../visual/tokens.js';\nvar defaultOption = {\n show: true,\n // zlevel: 0,\n z: 0,\n // Inverse the axis.\n inverse: false,\n // Axis name displayed.\n name: '',\n // 'start' | 'middle' | 'end'\n nameLocation: 'end',\n // By degree. By default auto rotate by nameLocation.\n nameRotate: null,\n nameTruncate: {\n maxWidth: null,\n ellipsis: '...',\n placeholder: '.'\n },\n // Use global text style by default.\n nameTextStyle: {\n // textMargin: never, // The default value will be specified based on `nameLocation`.\n },\n // The gap between axisName and axisLine.\n nameGap: 15,\n // Default `false` to support tooltip.\n silent: false,\n // Default `false` to avoid legacy user event listener fail.\n triggerEvent: false,\n tooltip: {\n show: false\n },\n axisPointer: {},\n axisLine: {\n show: true,\n onZero: true,\n onZeroAxisIndex: null,\n lineStyle: {\n color: tokens.color.axisLine,\n width: 1,\n type: 'solid'\n },\n // The arrow at both ends the the axis.\n symbol: ['none', 'none'],\n symbolSize: [10, 15],\n breakLine: true\n },\n axisTick: {\n show: true,\n // Whether axisTick is inside the grid or outside the grid.\n inside: false,\n // The length of axisTick.\n length: 5,\n lineStyle: {\n width: 1\n }\n },\n axisLabel: {\n show: true,\n // Whether axisLabel is inside the grid or outside the grid.\n inside: false,\n rotate: 0,\n // true | false | null/undefined (auto)\n showMinLabel: null,\n // true | false | null/undefined (auto)\n showMaxLabel: null,\n margin: 8,\n // formatter: null,\n fontSize: 12,\n color: tokens.color.axisLabel,\n // In scenarios like axis labels, when labels text's progression direction matches the label\n // layout direction (e.g., when all letters are in a single line), extra start/end margin is\n // needed to prevent the text from appearing visually joined. In the other case, when lables\n // are stacked (e.g., having rotation or horizontal labels on yAxis), the layout needs to be\n // compact, so NO extra top/bottom margin should be applied.\n textMargin: [0, 3]\n },\n splitLine: {\n show: true,\n showMinLine: true,\n showMaxLine: true,\n lineStyle: {\n color: tokens.color.axisSplitLine,\n width: 1,\n type: 'solid'\n }\n },\n splitArea: {\n show: false,\n areaStyle: {\n color: [tokens.color.backgroundTint, tokens.color.backgroundTransparent]\n }\n },\n breakArea: {\n show: true,\n itemStyle: {\n color: tokens.color.neutral00,\n // Break border color should be darker than the splitLine\n // because it has opacity and should be more prominent\n borderColor: tokens.color.border,\n borderWidth: 1,\n borderType: [3, 3],\n opacity: 0.6\n },\n zigzagAmplitude: 4,\n zigzagMinSpan: 4,\n zigzagMaxSpan: 20,\n zigzagZ: 100,\n expandOnClick: true\n },\n breakLabelLayout: {\n moveOverlap: 'auto'\n }\n};\nvar categoryAxis = zrUtil.merge({\n // The gap at both ends of the axis. For categoryAxis, boolean.\n boundaryGap: true,\n // Set false to faster category collection.\n deduplication: null,\n jitter: 0,\n jitterOverlap: true,\n jitterMargin: 2,\n // splitArea: {\n // show: false\n // },\n splitLine: {\n show: false\n },\n axisTick: {\n // If tick is align with label when boundaryGap is true\n alignWithLabel: false,\n interval: 'auto',\n show: 'auto'\n },\n axisLabel: {\n interval: 'auto'\n }\n}, defaultOption);\nvar valueAxis = zrUtil.merge({\n boundaryGap: [0, 0],\n axisLine: {\n // Not shown when other axis is categoryAxis in cartesian\n show: 'auto'\n },\n axisTick: {\n // Not shown when other axis is categoryAxis in cartesian\n show: 'auto'\n },\n // TODO\n // min/max: [30, datamin, 60] or [20, datamin] or [datamin, 60]\n splitNumber: 5,\n minorTick: {\n // Minor tick, not available for cateogry axis.\n show: false,\n // Split number of minor ticks. The value should be in range of (0, 100)\n splitNumber: 5,\n // Length of minor tick\n length: 3,\n // Line style\n lineStyle: {\n // Default to be same with axisTick\n }\n },\n minorSplitLine: {\n show: false,\n lineStyle: {\n color: tokens.color.axisMinorSplitLine,\n width: 1\n }\n }\n}, defaultOption);\nvar timeAxis = zrUtil.merge({\n splitNumber: 6,\n axisLabel: {\n // To eliminate labels that are not nice\n showMinLabel: false,\n showMaxLabel: false,\n rich: {\n primary: {\n fontWeight: 'bold'\n }\n }\n },\n splitLine: {\n show: false\n }\n}, valueAxis);\nvar logAxis = zrUtil.defaults({\n logBase: 10\n}, valueAxis);\nexport default {\n category: categoryAxis,\n value: valueAxis,\n time: timeAxis,\n log: logAxis\n};","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport var AXIS_TYPES = {\n value: 1,\n category: 1,\n time: 1,\n log: 1\n};","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _impl = null;\nexport function registerAxisBreakHelperImpl(impl) {\n if (!_impl) {\n _impl = impl;\n }\n}\nexport function getAxisBreakHelper() {\n return _impl;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport axisDefault from './axisDefault.js';\nimport { getLayoutParams, mergeLayoutParam, fetchLayoutMode } from '../util/layout.js';\nimport OrdinalMeta from '../data/OrdinalMeta.js';\nimport { AXIS_TYPES } from './axisCommonTypes.js';\nimport { each, merge } from 'zrender/lib/core/util.js';\nimport { getAxisBreakHelper } from '../component/axis/axisBreakHelper.js';\n/**\n * Generate sub axis model class\n * @param axisName 'x' 'y' 'radius' 'angle' 'parallel' ...\n */\nexport default function axisModelCreator(registers, axisName, BaseAxisModelClass, extraDefaultOption) {\n each(AXIS_TYPES, function (v, axisType) {\n var defaultOption = merge(merge({}, axisDefault[axisType], true), extraDefaultOption, true);\n var AxisModel = /** @class */function (_super) {\n __extends(AxisModel, _super);\n function AxisModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = axisName + 'Axis.' + axisType;\n return _this;\n }\n AxisModel.prototype.mergeDefaultAndTheme = function (option, ecModel) {\n var layoutMode = fetchLayoutMode(this);\n var inputPositionParams = layoutMode ? getLayoutParams(option) : {};\n var themeModel = ecModel.getTheme();\n merge(option, themeModel.get(axisType + 'Axis'));\n merge(option, this.getDefaultOption());\n option.type = getAxisType(option);\n if (layoutMode) {\n mergeLayoutParam(option, inputPositionParams, layoutMode);\n }\n };\n AxisModel.prototype.optionUpdated = function () {\n var thisOption = this.option;\n if (thisOption.type === 'category') {\n this.__ordinalMeta = OrdinalMeta.createByAxisModel(this);\n }\n };\n /**\n * Should not be called before all of 'getInitailData' finished.\n * Because categories are collected during initializing data.\n */\n AxisModel.prototype.getCategories = function (rawData) {\n var option = this.option;\n // FIXME\n // warning if called before all of 'getInitailData' finished.\n if (option.type === 'category') {\n if (rawData) {\n return option.data;\n }\n return this.__ordinalMeta.categories;\n }\n };\n AxisModel.prototype.getOrdinalMeta = function () {\n return this.__ordinalMeta;\n };\n AxisModel.prototype.updateAxisBreaks = function (payload) {\n var axisBreakHelper = getAxisBreakHelper();\n return axisBreakHelper ? axisBreakHelper.updateModelAxisBreak(this, payload) : {\n breaks: []\n };\n };\n AxisModel.type = axisName + 'Axis.' + axisType;\n AxisModel.defaultOption = defaultOption;\n return AxisModel;\n }(BaseAxisModelClass);\n registers.registerComponentModel(AxisModel);\n });\n registers.registerSubTypeDefaulter(axisName + 'Axis', getAxisType);\n}\nfunction getAxisType(option) {\n // Default axis with data is category axis\n return option.type || (option.data ? 'category' : 'value');\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nvar Cartesian = /** @class */function () {\n function Cartesian(name) {\n this.type = 'cartesian';\n this._dimList = [];\n this._axes = {};\n this.name = name || '';\n }\n Cartesian.prototype.getAxis = function (dim) {\n return this._axes[dim];\n };\n Cartesian.prototype.getAxes = function () {\n return zrUtil.map(this._dimList, function (dim) {\n return this._axes[dim];\n }, this);\n };\n Cartesian.prototype.getAxesByScale = function (scaleType) {\n scaleType = scaleType.toLowerCase();\n return zrUtil.filter(this.getAxes(), function (axis) {\n return axis.scale.type === scaleType;\n });\n };\n Cartesian.prototype.addAxis = function (axis) {\n var dim = axis.dim;\n this._axes[dim] = axis;\n this._dimList.push(dim);\n };\n return Cartesian;\n}();\n;\nexport default Cartesian;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport Cartesian from './Cartesian.js';\nimport { invert } from 'zrender/lib/core/matrix.js';\nimport { applyTransform } from 'zrender/lib/core/vector.js';\nexport var cartesian2DDimensions = ['x', 'y'];\nfunction canCalculateAffineTransform(scale) {\n return (scale.type === 'interval' || scale.type === 'time') && !scale.hasBreaks();\n}\nvar Cartesian2D = /** @class */function (_super) {\n __extends(Cartesian2D, _super);\n function Cartesian2D() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'cartesian2d';\n _this.dimensions = cartesian2DDimensions;\n return _this;\n }\n /**\n * Calculate an affine transform matrix if two axes are time or value.\n * It's mainly for accelartion on the large time series data.\n */\n Cartesian2D.prototype.calcAffineTransform = function () {\n this._transform = this._invTransform = null;\n var xAxisScale = this.getAxis('x').scale;\n var yAxisScale = this.getAxis('y').scale;\n if (!canCalculateAffineTransform(xAxisScale) || !canCalculateAffineTransform(yAxisScale)) {\n return;\n }\n var xScaleExtent = xAxisScale.getExtent();\n var yScaleExtent = yAxisScale.getExtent();\n var start = this.dataToPoint([xScaleExtent[0], yScaleExtent[0]]);\n var end = this.dataToPoint([xScaleExtent[1], yScaleExtent[1]]);\n var xScaleSpan = xScaleExtent[1] - xScaleExtent[0];\n var yScaleSpan = yScaleExtent[1] - yScaleExtent[0];\n if (!xScaleSpan || !yScaleSpan) {\n return;\n }\n // Accelerate data to point calculation on the special large time series data.\n var scaleX = (end[0] - start[0]) / xScaleSpan;\n var scaleY = (end[1] - start[1]) / yScaleSpan;\n var translateX = start[0] - xScaleExtent[0] * scaleX;\n var translateY = start[1] - yScaleExtent[0] * scaleY;\n var m = this._transform = [scaleX, 0, 0, scaleY, translateX, translateY];\n this._invTransform = invert([], m);\n };\n /**\n * Base axis will be used on stacking.\n */\n Cartesian2D.prototype.getBaseAxis = function () {\n return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAxis('x');\n };\n Cartesian2D.prototype.containPoint = function (point) {\n var axisX = this.getAxis('x');\n var axisY = this.getAxis('y');\n return axisX.contain(axisX.toLocalCoord(point[0])) && axisY.contain(axisY.toLocalCoord(point[1]));\n };\n Cartesian2D.prototype.containData = function (data) {\n return this.getAxis('x').containData(data[0]) && this.getAxis('y').containData(data[1]);\n };\n Cartesian2D.prototype.containZone = function (data1, data2) {\n var zoneDiag1 = this.dataToPoint(data1);\n var zoneDiag2 = this.dataToPoint(data2);\n var area = this.getArea();\n var zone = new BoundingRect(zoneDiag1[0], zoneDiag1[1], zoneDiag2[0] - zoneDiag1[0], zoneDiag2[1] - zoneDiag1[1]);\n return area.intersect(zone);\n };\n Cartesian2D.prototype.dataToPoint = function (data, clamp, out) {\n out = out || [];\n var xVal = data[0];\n var yVal = data[1];\n // [CAVEAT]: Do not add time consuming operation within and before fast path.\n // Fast path.\n if (this._transform\n // It's supported that if data is like `[Inifity, 123]`, where only Y pixel calculated.\n && xVal != null && isFinite(xVal) && yVal != null && isFinite(yVal)) {\n return applyTransform(out, data, this._transform);\n }\n var xAxis = this.getAxis('x');\n var yAxis = this.getAxis('y');\n out[0] = xAxis.toGlobalCoord(xAxis.dataToCoord(xVal, clamp));\n out[1] = yAxis.toGlobalCoord(yAxis.dataToCoord(yVal, clamp));\n return out;\n };\n Cartesian2D.prototype.clampData = function (data, out) {\n var xScale = this.getAxis('x').scale;\n var yScale = this.getAxis('y').scale;\n var xAxisExtent = xScale.getExtent();\n var yAxisExtent = yScale.getExtent();\n var x = xScale.parse(data[0]);\n var y = yScale.parse(data[1]);\n out = out || [];\n out[0] = Math.min(Math.max(Math.min(xAxisExtent[0], xAxisExtent[1]), x), Math.max(xAxisExtent[0], xAxisExtent[1]));\n out[1] = Math.min(Math.max(Math.min(yAxisExtent[0], yAxisExtent[1]), y), Math.max(yAxisExtent[0], yAxisExtent[1]));\n return out;\n };\n Cartesian2D.prototype.pointToData = function (point, clamp, out) {\n out = out || [];\n if (this._invTransform) {\n return applyTransform(out, point, this._invTransform);\n }\n var xAxis = this.getAxis('x');\n var yAxis = this.getAxis('y');\n out[0] = xAxis.coordToData(xAxis.toLocalCoord(point[0]), clamp);\n out[1] = yAxis.coordToData(yAxis.toLocalCoord(point[1]), clamp);\n return out;\n };\n Cartesian2D.prototype.getOtherAxis = function (axis) {\n return this.getAxis(axis.dim === 'x' ? 'y' : 'x');\n };\n /**\n * Get rect area of cartesian.\n * Area will have a contain function to determine if a point is in the coordinate system.\n */\n Cartesian2D.prototype.getArea = function (tolerance) {\n tolerance = tolerance || 0;\n var xExtent = this.getAxis('x').getGlobalExtent();\n var yExtent = this.getAxis('y').getGlobalExtent();\n var x = Math.min(xExtent[0], xExtent[1]) - tolerance;\n var y = Math.min(yExtent[0], yExtent[1]) - tolerance;\n var width = Math.max(xExtent[0], xExtent[1]) - x + tolerance;\n var height = Math.max(yExtent[0], yExtent[1]) - y + tolerance;\n return new BoundingRect(x, y, width, height);\n };\n return Cartesian2D;\n}(Cartesian);\n;\nexport default Cartesian2D;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../Axis.js';\nvar Axis2D = /** @class */function (_super) {\n __extends(Axis2D, _super);\n function Axis2D(dim, scale, coordExtent, axisType, position) {\n var _this = _super.call(this, dim, scale, coordExtent) || this;\n /**\n * Index of axis, can be used as key\n * Injected outside.\n */\n _this.index = 0;\n _this.type = axisType || 'value';\n _this.position = position || 'bottom';\n return _this;\n }\n Axis2D.prototype.isHorizontal = function () {\n var position = this.position;\n return position === 'top' || position === 'bottom';\n };\n /**\n * Each item cooresponds to this.getExtent(), which\n * means globalExtent[0] may greater than globalExtent[1],\n * unless `asc` is input.\n *\n * @param {boolean} [asc]\n * @return {Array.<number>}\n */\n Axis2D.prototype.getGlobalExtent = function (asc) {\n var ret = this.getExtent();\n ret[0] = this.toGlobalCoord(ret[0]);\n ret[1] = this.toGlobalCoord(ret[1]);\n asc && ret[0] > ret[1] && ret.reverse();\n return ret;\n };\n Axis2D.prototype.pointToData = function (point, clamp) {\n return this.coordToData(this.toLocalCoord(point[this.dim === 'x' ? 0 : 1]), clamp);\n };\n /**\n * Set ordinalSortInfo\n * @param info new OrdinalSortInfo\n */\n Axis2D.prototype.setCategorySortInfo = function (info) {\n if (this.type !== 'category') {\n return false;\n }\n this.model.option.categorySortInfo = info;\n this.scale.setSortInfo(info);\n };\n return Axis2D;\n}(Axis);\nexport default Axis2D;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { parseFinder } from '../../util/model.js';\nimport { defaults, each } from 'zrender/lib/core/util.js';\nexport var AXIS_BREAK_EXPAND_ACTION_TYPE = 'expandAxisBreak';\nexport var AXIS_BREAK_COLLAPSE_ACTION_TYPE = 'collapseAxisBreak';\nexport var AXIS_BREAK_TOGGLE_ACTION_TYPE = 'toggleAxisBreak';\nvar AXIS_BREAK_CHANGED_EVENT_TYPE = 'axisbreakchanged';\nvar expandAxisBreakActionInfo = {\n type: AXIS_BREAK_EXPAND_ACTION_TYPE,\n event: AXIS_BREAK_CHANGED_EVENT_TYPE,\n update: 'update',\n refineEvent: refineAxisBreakChangeEvent\n};\nvar collapseAxisBreakActionInfo = {\n type: AXIS_BREAK_COLLAPSE_ACTION_TYPE,\n event: AXIS_BREAK_CHANGED_EVENT_TYPE,\n update: 'update',\n refineEvent: refineAxisBreakChangeEvent\n};\nvar toggleAxisBreakActionInfo = {\n type: AXIS_BREAK_TOGGLE_ACTION_TYPE,\n event: AXIS_BREAK_CHANGED_EVENT_TYPE,\n update: 'update',\n refineEvent: refineAxisBreakChangeEvent\n};\nfunction refineAxisBreakChangeEvent(actionResultBatch, payload, ecModel, api) {\n var breaks = [];\n each(actionResultBatch, function (actionResult) {\n breaks = breaks.concat(actionResult.eventBreaks);\n });\n return {\n eventContent: {\n breaks: breaks\n }\n };\n}\nexport function registerAction(registers) {\n registers.registerAction(expandAxisBreakActionInfo, actionHandler);\n registers.registerAction(collapseAxisBreakActionInfo, actionHandler);\n registers.registerAction(toggleAxisBreakActionInfo, actionHandler);\n function actionHandler(payload, ecModel) {\n var eventBreaks = [];\n var finderResult = parseFinder(ecModel, payload);\n function dealUpdate(modelProp, indexProp) {\n each(finderResult[modelProp], function (axisModel) {\n var result = axisModel.updateAxisBreaks(payload);\n each(result.breaks, function (item) {\n var _a;\n eventBreaks.push(defaults((_a = {}, _a[indexProp] = axisModel.componentIndex, _a), item));\n });\n });\n }\n dealUpdate('xAxisModels', 'xAxisIndex');\n dealUpdate('yAxisModels', 'yAxisIndex');\n dealUpdate('singleAxisModels', 'singleAxisIndex');\n return {\n eventBreaks: eventBreaks\n };\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { retrieve, defaults, extend, each, isObject, isString, isNumber, isFunction, retrieve2, assert, map, retrieve3, filter } from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport Model from '../../model/Model.js';\nimport { isRadianAroundZero, remRadian } from '../../util/number.js';\nimport { createSymbol, normalizeSymbolOffset } from '../../util/symbol.js';\nimport * as matrixUtil from 'zrender/lib/core/matrix.js';\nimport { applyTransform as v2ApplyTransform } from 'zrender/lib/core/vector.js';\nimport { isNameLocationCenter, shouldShowAllLabels } from '../../coord/axisHelper.js';\nimport { hideOverlap, labelIntersect, computeLabelGeometry2, ensureLabelLayoutWithGeometry, labelLayoutApplyTranslation, setLabelLayoutDirty, newLabelLayoutWithGeometry } from '../../label/labelLayoutHelper.js';\nimport { makeInner } from '../../util/model.js';\nimport { getAxisBreakHelper } from './axisBreakHelper.js';\nimport { AXIS_BREAK_EXPAND_ACTION_TYPE } from './axisAction.js';\nimport { getScaleBreakHelper } from '../../scale/break.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport Point from 'zrender/lib/core/Point.js';\nimport { copyTransform } from 'zrender/lib/core/Transformable.js';\nimport { AxisTickLabelComputingKind, createAxisLabelsComputingContext } from '../../coord/axisTickLabelBuilder.js';\nvar PI = Math.PI;\nvar DEFAULT_CENTER_NAME_MARGIN_LEVELS = [[1, 2, 1, 2], [5, 3, 5, 3], [8, 3, 8, 3]];\nvar DEFAULT_ENDS_NAME_MARGIN_LEVELS = [[0, 1, 0, 1], [0, 3, 0, 3], [0, 3, 0, 3]];\nexport var getLabelInner = makeInner();\nvar getTickInner = makeInner();\n/**\n * A context shared by difference axisBuilder instances.\n * For cross-axes overlap resolving.\n *\n * Lifecycle constraint: should not over a pass of ec main process.\n * If model is changed, the context must be disposed.\n *\n * @see AxisBuilderLocalContext\n */\nvar AxisBuilderSharedContext = /** @class */function () {\n function AxisBuilderSharedContext(resolveAxisNameOverlap) {\n /**\n * [CAUTION] Do not modify this data structure outside this class.\n */\n this.recordMap = {};\n this.resolveAxisNameOverlap = resolveAxisNameOverlap;\n }\n AxisBuilderSharedContext.prototype.ensureRecord = function (axisModel) {\n var dim = axisModel.axis.dim;\n var idx = axisModel.componentIndex;\n var recordMap = this.recordMap;\n var records = recordMap[dim] || (recordMap[dim] = []);\n return records[idx] || (records[idx] = {\n ready: {}\n });\n };\n return AxisBuilderSharedContext;\n}();\nexport { AxisBuilderSharedContext };\n;\n/**\n * [CAUTION]\n * 1. The call of this function must be after axisLabel overlap handlings\n * (such as `hideOverlap`, `fixMinMaxLabelShow`) and after transform calculating.\n * 2. Can be called multiple times and should be idempotent.\n */\nfunction resetOverlapRecordToShared(cfg, shared, axisModel, labelLayoutList) {\n var axis = axisModel.axis;\n var record = shared.ensureRecord(axisModel);\n var labelInfoList = [];\n var stOccupiedRect;\n var useStOccupiedRect = hasAxisName(cfg.axisName) && isNameLocationCenter(cfg.nameLocation);\n each(labelLayoutList, function (layout) {\n var layoutInfo = ensureLabelLayoutWithGeometry(layout);\n if (!layoutInfo || layoutInfo.label.ignore) {\n return;\n }\n labelInfoList.push(layoutInfo);\n var transGroup = record.transGroup;\n if (useStOccupiedRect) {\n // Transform to \"standard axis\" for creating stOccupiedRect (the label rects union).\n transGroup.transform ? matrixUtil.invert(_stTransTmp, transGroup.transform) : matrixUtil.identity(_stTransTmp);\n if (layoutInfo.transform) {\n matrixUtil.mul(_stTransTmp, _stTransTmp, layoutInfo.transform);\n }\n BoundingRect.copy(_stLabelRectTmp, layoutInfo.localRect);\n _stLabelRectTmp.applyTransform(_stTransTmp);\n stOccupiedRect ? stOccupiedRect.union(_stLabelRectTmp) : BoundingRect.copy(stOccupiedRect = new BoundingRect(0, 0, 0, 0), _stLabelRectTmp);\n }\n });\n var sortByDim = Math.abs(record.dirVec.x) > 0.1 ? 'x' : 'y';\n var sortByValue = record.transGroup[sortByDim];\n labelInfoList.sort(function (info1, info2) {\n return Math.abs(info1.label[sortByDim] - sortByValue) - Math.abs(info2.label[sortByDim] - sortByValue);\n });\n if (useStOccupiedRect && stOccupiedRect) {\n var extent = axis.getExtent();\n var axisLineX = Math.min(extent[0], extent[1]);\n var axisLineWidth = Math.max(extent[0], extent[1]) - axisLineX;\n // If `nameLocation` is 'middle', enlarge axis labels boundingRect to axisLine to avoid bad\n // case like that axis name is placed in the gap between axis labels and axis line.\n // If only one label exists, the entire band should be occupied for\n // visual consistency, so extent it to [0, canvas width].\n stOccupiedRect.union(new BoundingRect(axisLineX, 0, axisLineWidth, 1));\n }\n record.stOccupiedRect = stOccupiedRect;\n record.labelInfoList = labelInfoList;\n}\nvar _stTransTmp = matrixUtil.create();\nvar _stLabelRectTmp = new BoundingRect(0, 0, 0, 0);\n/**\n * The default resolver does not involve other axes within the same coordinate system.\n */\nexport var resolveAxisNameOverlapDefault = function (cfg, ctx, axisModel, nameLayoutInfo, nameMoveDirVec, thisRecord) {\n if (isNameLocationCenter(cfg.nameLocation)) {\n var stOccupiedRect = thisRecord.stOccupiedRect;\n if (stOccupiedRect) {\n moveIfOverlap(computeLabelGeometry2({}, stOccupiedRect, thisRecord.transGroup.transform), nameLayoutInfo, nameMoveDirVec);\n }\n } else {\n moveIfOverlapByLinearLabels(thisRecord.labelInfoList, thisRecord.dirVec, nameLayoutInfo, nameMoveDirVec);\n }\n};\n// [NOTICE] not consider ignore.\nfunction moveIfOverlap(basedLayoutInfo, movableLayoutInfo, moveDirVec) {\n var mtv = new Point();\n if (labelIntersect(basedLayoutInfo, movableLayoutInfo, mtv, {\n direction: Math.atan2(moveDirVec.y, moveDirVec.x),\n bidirectional: false,\n touchThreshold: 0.05\n })) {\n labelLayoutApplyTranslation(movableLayoutInfo, mtv);\n }\n}\nexport function moveIfOverlapByLinearLabels(baseLayoutInfoList, baseDirVec, movableLayoutInfo, moveDirVec) {\n // Detect and move from far to close.\n var sameDir = Point.dot(moveDirVec, baseDirVec) >= 0;\n for (var idx = 0, len = baseLayoutInfoList.length; idx < len; idx++) {\n var labelInfo = baseLayoutInfoList[sameDir ? idx : len - 1 - idx];\n if (!labelInfo.label.ignore) {\n moveIfOverlap(labelInfo, movableLayoutInfo, moveDirVec);\n }\n }\n}\n/**\n * @caution\n * - Ensure it is called after the data processing stage finished.\n * - It might be called before `CahrtView#render`, sush as called at `CoordinateSystem#update`,\n * thus ensure the result the same whenever it is called.\n *\n * A builder for a straight-line axis.\n *\n * A final axis is translated and rotated from a \"standard axis\".\n * So opt.position and opt.rotation is required.\n *\n * A \"standard axis\" is the axis [0,0]-->[abs(axisExtent[1]-axisExtent[0]),0]\n * for example: [0,0]-->[50,0]\n */\nvar AxisBuilder = /** @class */function () {\n /**\n * [CAUTION]: axisModel.axis.extent/scale must be ready to use.\n */\n function AxisBuilder(axisModel, api, opt, shared) {\n this.group = new graphic.Group();\n this._axisModel = axisModel;\n this._api = api;\n this._local = {};\n this._shared = shared || new AxisBuilderSharedContext(resolveAxisNameOverlapDefault);\n this._resetCfgDetermined(opt);\n }\n /**\n * Regarding axis label related configurations, only the change of label.x/y is supported; other\n * changes are not necessary and not performant. To be specific, only `axis.position`\n * (and consequently `labelOffset`) and `axis.extent` can be changed, and assume everything in\n * `axisModel` are not changed.\n * Axis line related configurations can be changed since this method can only be called\n * before they are created.\n */\n AxisBuilder.prototype.updateCfg = function (opt) {\n if (process.env.NODE_ENV !== 'production') {\n var ready = this._shared.ensureRecord(this._axisModel).ready;\n // After that, changing cfg is not supported; avoid unnecessary complexity.\n assert(!ready.axisLine && !ready.axisTickLabelDetermine);\n // Have to be called again if cfg changed.\n ready.axisName = ready.axisTickLabelEstimate = false;\n }\n var raw = this._cfg.raw;\n raw.position = opt.position;\n raw.labelOffset = opt.labelOffset;\n this._resetCfgDetermined(raw);\n };\n /**\n * [CAUTION] For debug usage. Never change it outside!\n */\n AxisBuilder.prototype.__getRawCfg = function () {\n return this._cfg.raw;\n };\n AxisBuilder.prototype._resetCfgDetermined = function (raw) {\n var axisModel = this._axisModel;\n // FIXME:\n // Currently there is no uniformed way to set default values if an option\n // is specified null/undefined by user (intentionally or unintentionally),\n // e.g. null/undefined is not a illegal value for `nameLocation`.\n // Try to use `getDefaultOption` to address it. But radar has no `getDefaultOption`.\n var axisModelDefaultOption = axisModel.getDefaultOption ? axisModel.getDefaultOption() : {};\n // Default value\n var axisName = retrieve2(raw.axisName, axisModel.get('name'));\n var nameMoveOverlapOption = axisModel.get('nameMoveOverlap');\n if (nameMoveOverlapOption == null || nameMoveOverlapOption === 'auto') {\n nameMoveOverlapOption = retrieve2(raw.defaultNameMoveOverlap, true);\n }\n var cfg = {\n raw: raw,\n position: raw.position,\n rotation: raw.rotation,\n nameDirection: retrieve2(raw.nameDirection, 1),\n tickDirection: retrieve2(raw.tickDirection, 1),\n labelDirection: retrieve2(raw.labelDirection, 1),\n labelOffset: retrieve2(raw.labelOffset, 0),\n silent: retrieve2(raw.silent, true),\n axisName: axisName,\n nameLocation: retrieve3(axisModel.get('nameLocation'), axisModelDefaultOption.nameLocation, 'end'),\n shouldNameMoveOverlap: hasAxisName(axisName) && nameMoveOverlapOption,\n optionHideOverlap: axisModel.get(['axisLabel', 'hideOverlap']),\n showMinorTicks: axisModel.get(['minorTick', 'show'])\n };\n if (process.env.NODE_ENV !== 'production') {\n assert(cfg.position != null);\n assert(cfg.rotation != null);\n }\n this._cfg = cfg;\n // FIXME Not use a separate text group?\n var transformGroup = new graphic.Group({\n x: cfg.position[0],\n y: cfg.position[1],\n rotation: cfg.rotation\n });\n transformGroup.updateTransform();\n this._transformGroup = transformGroup;\n var record = this._shared.ensureRecord(axisModel);\n record.transGroup = this._transformGroup;\n record.dirVec = new Point(Math.cos(-cfg.rotation), Math.sin(-cfg.rotation));\n };\n AxisBuilder.prototype.build = function (axisPartNameMap, extraParams) {\n var _this = this;\n if (!axisPartNameMap) {\n axisPartNameMap = {\n axisLine: true,\n axisTickLabelEstimate: false,\n axisTickLabelDetermine: true,\n axisName: true\n };\n }\n each(AXIS_BUILDER_AXIS_PART_NAMES, function (partName) {\n if (axisPartNameMap[partName]) {\n builders[partName](_this._cfg, _this._local, _this._shared, _this._axisModel, _this.group, _this._transformGroup, _this._api, extraParams || {});\n }\n });\n return this;\n };\n /**\n * Currently only get text align/verticalAlign by rotation.\n * NO `position` is involved, otherwise it have to be performed for each `updateAxisLabelChangableProps`.\n */\n AxisBuilder.innerTextLayout = function (axisRotation, textRotation, direction) {\n var rotationDiff = remRadian(textRotation - axisRotation);\n var textAlign;\n var textVerticalAlign;\n if (isRadianAroundZero(rotationDiff)) {\n // Label is parallel with axis line.\n textVerticalAlign = direction > 0 ? 'top' : 'bottom';\n textAlign = 'center';\n } else if (isRadianAroundZero(rotationDiff - PI)) {\n // Label is inverse parallel with axis line.\n textVerticalAlign = direction > 0 ? 'bottom' : 'top';\n textAlign = 'center';\n } else {\n textVerticalAlign = 'middle';\n if (rotationDiff > 0 && rotationDiff < PI) {\n textAlign = direction > 0 ? 'right' : 'left';\n } else {\n textAlign = direction > 0 ? 'left' : 'right';\n }\n }\n return {\n rotation: rotationDiff,\n textAlign: textAlign,\n textVerticalAlign: textVerticalAlign\n };\n };\n AxisBuilder.makeAxisEventDataBase = function (axisModel) {\n var eventData = {\n componentType: axisModel.mainType,\n componentIndex: axisModel.componentIndex\n };\n eventData[axisModel.mainType + 'Index'] = axisModel.componentIndex;\n return eventData;\n };\n AxisBuilder.isLabelSilent = function (axisModel) {\n var tooltipOpt = axisModel.get('tooltip');\n return axisModel.get('silent')\n // Consider mouse cursor, add these restrictions.\n || !(axisModel.get('triggerEvent') || tooltipOpt && tooltipOpt.show);\n };\n return AxisBuilder;\n}();\n;\n// Sorted by dependency order.\nvar AXIS_BUILDER_AXIS_PART_NAMES = ['axisLine', 'axisTickLabelEstimate', 'axisTickLabelDetermine', 'axisName'];\nvar builders = {\n axisLine: function (cfg, local, shared, axisModel, group, transformGroup, api) {\n if (process.env.NODE_ENV !== 'production') {\n var ready = shared.ensureRecord(axisModel).ready;\n assert(!ready.axisLine);\n ready.axisLine = true;\n }\n var shown = axisModel.get(['axisLine', 'show']);\n if (shown === 'auto') {\n shown = true;\n if (cfg.raw.axisLineAutoShow != null) {\n shown = !!cfg.raw.axisLineAutoShow;\n }\n }\n if (!shown) {\n return;\n }\n var extent = axisModel.axis.getExtent();\n var matrix = transformGroup.transform;\n var pt1 = [extent[0], 0];\n var pt2 = [extent[1], 0];\n var inverse = pt1[0] > pt2[0];\n if (matrix) {\n v2ApplyTransform(pt1, pt1, matrix);\n v2ApplyTransform(pt2, pt2, matrix);\n }\n var lineStyle = extend({\n lineCap: 'round'\n }, axisModel.getModel(['axisLine', 'lineStyle']).getLineStyle());\n var pathBaseProp = {\n strokeContainThreshold: cfg.raw.strokeContainThreshold || 5,\n silent: true,\n z2: 1,\n style: lineStyle\n };\n if (axisModel.get(['axisLine', 'breakLine']) && axisModel.axis.scale.hasBreaks()) {\n getAxisBreakHelper().buildAxisBreakLine(axisModel, group, transformGroup, pathBaseProp);\n } else {\n var line = new graphic.Line(extend({\n shape: {\n x1: pt1[0],\n y1: pt1[1],\n x2: pt2[0],\n y2: pt2[1]\n }\n }, pathBaseProp));\n graphic.subPixelOptimizeLine(line.shape, line.style.lineWidth);\n line.anid = 'line';\n group.add(line);\n }\n var arrows = axisModel.get(['axisLine', 'symbol']);\n if (arrows != null) {\n var arrowSize = axisModel.get(['axisLine', 'symbolSize']);\n if (isString(arrows)) {\n // Use the same arrow for start and end point\n arrows = [arrows, arrows];\n }\n if (isString(arrowSize) || isNumber(arrowSize)) {\n // Use the same size for width and height\n arrowSize = [arrowSize, arrowSize];\n }\n var arrowOffset = normalizeSymbolOffset(axisModel.get(['axisLine', 'symbolOffset']) || 0, arrowSize);\n var symbolWidth_1 = arrowSize[0];\n var symbolHeight_1 = arrowSize[1];\n each([{\n rotate: cfg.rotation + Math.PI / 2,\n offset: arrowOffset[0],\n r: 0\n }, {\n rotate: cfg.rotation - Math.PI / 2,\n offset: arrowOffset[1],\n r: Math.sqrt((pt1[0] - pt2[0]) * (pt1[0] - pt2[0]) + (pt1[1] - pt2[1]) * (pt1[1] - pt2[1]))\n }], function (point, index) {\n if (arrows[index] !== 'none' && arrows[index] != null) {\n var symbol = createSymbol(arrows[index], -symbolWidth_1 / 2, -symbolHeight_1 / 2, symbolWidth_1, symbolHeight_1, lineStyle.stroke, true);\n // Calculate arrow position with offset\n var r = point.r + point.offset;\n var pt = inverse ? pt2 : pt1;\n symbol.attr({\n rotation: point.rotate,\n x: pt[0] + r * Math.cos(cfg.rotation),\n y: pt[1] - r * Math.sin(cfg.rotation),\n silent: true,\n z2: 11\n });\n group.add(symbol);\n }\n });\n }\n },\n /**\n * [CAUTION] This method can be called multiple times, following the change due to `resetCfg` called\n * in size measurement. Thus this method should be idempotent, and should be performant.\n */\n axisTickLabelEstimate: function (cfg, local, shared, axisModel, group, transformGroup, api, extraParams) {\n if (process.env.NODE_ENV !== 'production') {\n var ready = shared.ensureRecord(axisModel).ready;\n assert(!ready.axisTickLabelDetermine);\n ready.axisTickLabelEstimate = true;\n }\n var needCallLayout = dealLastTickLabelResultReusable(local, group, extraParams);\n if (needCallLayout) {\n layOutAxisTickLabel(cfg, local, shared, axisModel, group, transformGroup, api, AxisTickLabelComputingKind.estimate);\n }\n },\n /**\n * Finish axis tick label build.\n * Can be only called once.\n */\n axisTickLabelDetermine: function (cfg, local, shared, axisModel, group, transformGroup, api, extraParams) {\n if (process.env.NODE_ENV !== 'production') {\n var ready = shared.ensureRecord(axisModel).ready;\n ready.axisTickLabelDetermine = true;\n }\n var needCallLayout = dealLastTickLabelResultReusable(local, group, extraParams);\n if (needCallLayout) {\n layOutAxisTickLabel(cfg, local, shared, axisModel, group, transformGroup, api, AxisTickLabelComputingKind.determine);\n }\n var ticksEls = buildAxisMajorTicks(cfg, group, transformGroup, axisModel);\n syncLabelIgnoreToMajorTicks(cfg, local.labelLayoutList, ticksEls);\n buildAxisMinorTicks(cfg, group, transformGroup, axisModel, cfg.tickDirection);\n },\n /**\n * [CAUTION] This method can be called multiple times, following the change due to `resetCfg` called\n * in size measurement. Thus this method should be idempotent, and should be performant.\n */\n axisName: function (cfg, local, shared, axisModel, group, transformGroup, api, extraParams) {\n var sharedRecord = shared.ensureRecord(axisModel);\n if (process.env.NODE_ENV !== 'production') {\n var ready = sharedRecord.ready;\n assert(ready.axisTickLabelEstimate || ready.axisTickLabelDetermine);\n ready.axisName = true;\n }\n // Remove the existing name result created in estimation phase.\n if (local.nameEl) {\n group.remove(local.nameEl);\n local.nameEl = sharedRecord.nameLayout = sharedRecord.nameLocation = null;\n }\n var name = cfg.axisName;\n if (!hasAxisName(name)) {\n return;\n }\n var nameLocation = cfg.nameLocation;\n var nameDirection = cfg.nameDirection;\n var textStyleModel = axisModel.getModel('nameTextStyle');\n var gap = axisModel.get('nameGap') || 0;\n var extent = axisModel.axis.getExtent();\n var gapStartEndSignal = axisModel.axis.inverse ? -1 : 1;\n var pos = new Point(0, 0);\n var nameMoveDirVec = new Point(0, 0);\n if (nameLocation === 'start') {\n pos.x = extent[0] - gapStartEndSignal * gap;\n nameMoveDirVec.x = -gapStartEndSignal;\n } else if (nameLocation === 'end') {\n pos.x = extent[1] + gapStartEndSignal * gap;\n nameMoveDirVec.x = gapStartEndSignal;\n } else {\n // 'middle' or 'center'\n pos.x = (extent[0] + extent[1]) / 2;\n pos.y = cfg.labelOffset + nameDirection * gap;\n nameMoveDirVec.y = nameDirection;\n }\n var mt = matrixUtil.create();\n nameMoveDirVec.transform(matrixUtil.rotate(mt, mt, cfg.rotation));\n var nameRotation = axisModel.get('nameRotate');\n if (nameRotation != null) {\n nameRotation = nameRotation * PI / 180; // To radian.\n }\n var labelLayout;\n var axisNameAvailableWidth;\n if (isNameLocationCenter(nameLocation)) {\n labelLayout = AxisBuilder.innerTextLayout(cfg.rotation, nameRotation != null ? nameRotation : cfg.rotation,\n // Adapt to axis.\n nameDirection);\n } else {\n labelLayout = endTextLayout(cfg.rotation, nameLocation, nameRotation || 0, extent);\n axisNameAvailableWidth = cfg.raw.axisNameAvailableWidth;\n if (axisNameAvailableWidth != null) {\n axisNameAvailableWidth = Math.abs(axisNameAvailableWidth / Math.sin(labelLayout.rotation));\n !isFinite(axisNameAvailableWidth) && (axisNameAvailableWidth = null);\n }\n }\n var textFont = textStyleModel.getFont();\n var truncateOpt = axisModel.get('nameTruncate', true) || {};\n var ellipsis = truncateOpt.ellipsis;\n var maxWidth = retrieve(cfg.raw.nameTruncateMaxWidth, truncateOpt.maxWidth, axisNameAvailableWidth);\n var nameMarginLevel = extraParams.nameMarginLevel || 0;\n var textEl = new graphic.Text({\n x: pos.x,\n y: pos.y,\n rotation: labelLayout.rotation,\n silent: AxisBuilder.isLabelSilent(axisModel),\n style: createTextStyle(textStyleModel, {\n text: name,\n font: textFont,\n overflow: 'truncate',\n width: maxWidth,\n ellipsis: ellipsis,\n fill: textStyleModel.getTextColor() || axisModel.get(['axisLine', 'lineStyle', 'color']),\n align: textStyleModel.get('align') || labelLayout.textAlign,\n verticalAlign: textStyleModel.get('verticalAlign') || labelLayout.textVerticalAlign\n }),\n z2: 1\n });\n graphic.setTooltipConfig({\n el: textEl,\n componentModel: axisModel,\n itemName: name\n });\n textEl.__fullText = name;\n // Id for animation\n textEl.anid = 'name';\n if (axisModel.get('triggerEvent')) {\n var eventData = AxisBuilder.makeAxisEventDataBase(axisModel);\n eventData.targetType = 'axisName';\n eventData.name = name;\n getECData(textEl).eventData = eventData;\n }\n transformGroup.add(textEl);\n textEl.updateTransform();\n local.nameEl = textEl;\n var nameLayout = sharedRecord.nameLayout = ensureLabelLayoutWithGeometry({\n label: textEl,\n priority: textEl.z2,\n defaultAttr: {\n ignore: textEl.ignore\n },\n marginDefault: isNameLocationCenter(nameLocation)\n // Make axis name visually far from axis labels.\n // (but not too aggressive, consider multiple small charts)\n ? DEFAULT_CENTER_NAME_MARGIN_LEVELS[nameMarginLevel]\n // top/button margin is set to `0` to inserted the xAxis name into the indention\n // above the axis labels to save space. (see example below.)\n : DEFAULT_ENDS_NAME_MARGIN_LEVELS[nameMarginLevel]\n });\n sharedRecord.nameLocation = nameLocation;\n group.add(textEl);\n textEl.decomposeTransform();\n if (cfg.shouldNameMoveOverlap && nameLayout) {\n var record = shared.ensureRecord(axisModel);\n if (process.env.NODE_ENV !== 'production') {\n assert(record.labelInfoList);\n }\n shared.resolveAxisNameOverlap(cfg, shared, axisModel, nameLayout, nameMoveDirVec, record);\n }\n }\n};\nfunction layOutAxisTickLabel(cfg, local, shared, axisModel, group, transformGroup, api, kind) {\n if (!axisLabelBuildResultExists(local)) {\n buildAxisLabel(cfg, local, group, kind, axisModel, api);\n }\n var labelLayoutList = local.labelLayoutList;\n updateAxisLabelChangableProps(cfg, axisModel, labelLayoutList, transformGroup);\n adjustBreakLabels(axisModel, cfg.rotation, labelLayoutList);\n var optionHideOverlap = cfg.optionHideOverlap;\n fixMinMaxLabelShow(axisModel, labelLayoutList, optionHideOverlap);\n if (optionHideOverlap) {\n // This bit fixes the label overlap issue for the time chart.\n // See https://github.com/apache/echarts/issues/14266 for more.\n hideOverlap(\n // Filter the already ignored labels by the previous overlap resolving methods.\n filter(labelLayoutList, function (layout) {\n return layout && !layout.label.ignore;\n }));\n }\n // Always call it even this axis has no name, since it serves in overlapping detection\n // and grid outerBounds on other axis.\n resetOverlapRecordToShared(cfg, shared, axisModel, labelLayoutList);\n}\n;\nfunction endTextLayout(rotation, textPosition, textRotate, extent) {\n var rotationDiff = remRadian(textRotate - rotation);\n var textAlign;\n var textVerticalAlign;\n var inverse = extent[0] > extent[1];\n var onLeft = textPosition === 'start' && !inverse || textPosition !== 'start' && inverse;\n if (isRadianAroundZero(rotationDiff - PI / 2)) {\n textVerticalAlign = onLeft ? 'bottom' : 'top';\n textAlign = 'center';\n } else if (isRadianAroundZero(rotationDiff - PI * 1.5)) {\n textVerticalAlign = onLeft ? 'top' : 'bottom';\n textAlign = 'center';\n } else {\n textVerticalAlign = 'middle';\n if (rotationDiff < PI * 1.5 && rotationDiff > PI / 2) {\n textAlign = onLeft ? 'left' : 'right';\n } else {\n textAlign = onLeft ? 'right' : 'left';\n }\n }\n return {\n rotation: rotationDiff,\n textAlign: textAlign,\n textVerticalAlign: textVerticalAlign\n };\n}\n/**\n * Assume `labelLayoutList` has no `label.ignore: true`.\n * Assume `labelLayoutList` have been sorted by value ascending order.\n */\nfunction fixMinMaxLabelShow(axisModel, labelLayoutList, optionHideOverlap) {\n if (shouldShowAllLabels(axisModel.axis)) {\n return;\n }\n // FIXME\n // Have not consider onBand yet, where tick els is more than label els.\n // Assert no ignore in labels.\n function deal(showMinMaxLabel, outmostLabelIdx, innerLabelIdx) {\n var outmostLabelLayout = ensureLabelLayoutWithGeometry(labelLayoutList[outmostLabelIdx]);\n var innerLabelLayout = ensureLabelLayoutWithGeometry(labelLayoutList[innerLabelIdx]);\n if (!outmostLabelLayout || !innerLabelLayout) {\n return;\n }\n if (showMinMaxLabel === false || outmostLabelLayout.suggestIgnore) {\n ignoreEl(outmostLabelLayout.label);\n return;\n }\n if (innerLabelLayout.suggestIgnore) {\n ignoreEl(innerLabelLayout.label);\n return;\n }\n // PENDING: Originally we thought `optionHideOverlap === false` means do not hide anything,\n // since currently the bounding rect of text might not accurate enough and might slightly bigger,\n // which causes false positive. But `optionHideOverlap: null/undfined` is falsy and likely\n // be treated as false.\n // In most fonts the glyph does not reach the boundary of the bounding rect.\n // This is needed to avoid too aggressive to hide two elements that meet at the edge\n // due to compact layout by the same bounding rect or OBB.\n var touchThreshold = 0.1;\n // This treatment is for backward compatibility. And `!optionHideOverlap` implies that\n // the user accepts the visual touch between adjacent labels, thus \"hide min/max label\"\n // should be conservative, since the space might be sufficient in this case.\n if (!optionHideOverlap) {\n var marginForce = [0, 0, 0, 0];\n // Make a copy to apply `ignoreMargin`.\n outmostLabelLayout = newLabelLayoutWithGeometry({\n marginForce: marginForce\n }, outmostLabelLayout);\n innerLabelLayout = newLabelLayoutWithGeometry({\n marginForce: marginForce\n }, innerLabelLayout);\n }\n if (labelIntersect(outmostLabelLayout, innerLabelLayout, null, {\n touchThreshold: touchThreshold\n })) {\n if (showMinMaxLabel) {\n ignoreEl(innerLabelLayout.label);\n } else {\n ignoreEl(outmostLabelLayout.label);\n }\n }\n }\n // If min or max are user set, we need to check\n // If the tick on min(max) are overlap on their neighbour tick\n // If they are overlapped, we need to hide the min(max) tick label\n var showMinLabel = axisModel.get(['axisLabel', 'showMinLabel']);\n var showMaxLabel = axisModel.get(['axisLabel', 'showMaxLabel']);\n var labelsLen = labelLayoutList.length;\n deal(showMinLabel, 0, 1);\n deal(showMaxLabel, labelsLen - 1, labelsLen - 2);\n}\n// PENDING: Is it necessary to display a tick while the corresponding label is ignored?\nfunction syncLabelIgnoreToMajorTicks(cfg, labelLayoutList, tickEls) {\n if (cfg.showMinorTicks) {\n // It probably unreaasonable to hide major ticks when show minor ticks.\n return;\n }\n each(labelLayoutList, function (labelLayout) {\n if (labelLayout && labelLayout.label.ignore) {\n for (var idx = 0; idx < tickEls.length; idx++) {\n var tickEl = tickEls[idx];\n // Assume small array, linear search is fine for performance.\n // PENDING: measure?\n var tickInner = getTickInner(tickEl);\n var labelInner = getLabelInner(labelLayout.label);\n if (tickInner.tickValue != null && !tickInner.onBand && tickInner.tickValue === labelInner.tickValue) {\n ignoreEl(tickEl);\n return;\n }\n }\n }\n });\n}\nfunction ignoreEl(el) {\n el && (el.ignore = true);\n}\nfunction createTicks(ticksCoords, tickTransform, tickEndCoord, tickLineStyle, anidPrefix) {\n var tickEls = [];\n var pt1 = [];\n var pt2 = [];\n for (var i = 0; i < ticksCoords.length; i++) {\n var tickCoord = ticksCoords[i].coord;\n pt1[0] = tickCoord;\n pt1[1] = 0;\n pt2[0] = tickCoord;\n pt2[1] = tickEndCoord;\n if (tickTransform) {\n v2ApplyTransform(pt1, pt1, tickTransform);\n v2ApplyTransform(pt2, pt2, tickTransform);\n }\n // Tick line, Not use group transform to have better line draw\n var tickEl = new graphic.Line({\n shape: {\n x1: pt1[0],\n y1: pt1[1],\n x2: pt2[0],\n y2: pt2[1]\n },\n style: tickLineStyle,\n z2: 2,\n autoBatch: true,\n silent: true\n });\n graphic.subPixelOptimizeLine(tickEl.shape, tickEl.style.lineWidth);\n tickEl.anid = anidPrefix + '_' + ticksCoords[i].tickValue;\n tickEls.push(tickEl);\n var inner = getTickInner(tickEl);\n inner.onBand = !!ticksCoords[i].onBand;\n inner.tickValue = ticksCoords[i].tickValue;\n }\n return tickEls;\n}\nfunction buildAxisMajorTicks(cfg, group, transformGroup, axisModel) {\n var axis = axisModel.axis;\n var tickModel = axisModel.getModel('axisTick');\n var shown = tickModel.get('show');\n if (shown === 'auto') {\n shown = true;\n if (cfg.raw.axisTickAutoShow != null) {\n shown = !!cfg.raw.axisTickAutoShow;\n }\n }\n if (!shown || axis.scale.isBlank()) {\n return [];\n }\n var lineStyleModel = tickModel.getModel('lineStyle');\n var tickEndCoord = cfg.tickDirection * tickModel.get('length');\n var ticksCoords = axis.getTicksCoords();\n var ticksEls = createTicks(ticksCoords, transformGroup.transform, tickEndCoord, defaults(lineStyleModel.getLineStyle(), {\n stroke: axisModel.get(['axisLine', 'lineStyle', 'color'])\n }), 'ticks');\n for (var i = 0; i < ticksEls.length; i++) {\n group.add(ticksEls[i]);\n }\n return ticksEls;\n}\nfunction buildAxisMinorTicks(cfg, group, transformGroup, axisModel, tickDirection) {\n var axis = axisModel.axis;\n var minorTickModel = axisModel.getModel('minorTick');\n if (!cfg.showMinorTicks || axis.scale.isBlank()) {\n return;\n }\n var minorTicksCoords = axis.getMinorTicksCoords();\n if (!minorTicksCoords.length) {\n return;\n }\n var lineStyleModel = minorTickModel.getModel('lineStyle');\n var tickEndCoord = tickDirection * minorTickModel.get('length');\n var minorTickLineStyle = defaults(lineStyleModel.getLineStyle(), defaults(axisModel.getModel('axisTick').getLineStyle(), {\n stroke: axisModel.get(['axisLine', 'lineStyle', 'color'])\n }));\n for (var i = 0; i < minorTicksCoords.length; i++) {\n var minorTicksEls = createTicks(minorTicksCoords[i], transformGroup.transform, tickEndCoord, minorTickLineStyle, 'minorticks_' + i);\n for (var k = 0; k < minorTicksEls.length; k++) {\n group.add(minorTicksEls[k]);\n }\n }\n}\n// Return whether need to call `layOutAxisTickLabel` again.\nfunction dealLastTickLabelResultReusable(local, group, extraParams) {\n if (axisLabelBuildResultExists(local)) {\n var axisLabelsCreationContext = local.axisLabelsCreationContext;\n if (process.env.NODE_ENV !== 'production') {\n assert(local.labelGroup && axisLabelsCreationContext);\n }\n var noPxChangeTryDetermine = axisLabelsCreationContext.out.noPxChangeTryDetermine;\n if (extraParams.noPxChange) {\n var canDetermine = true;\n for (var idx = 0; idx < noPxChangeTryDetermine.length; idx++) {\n canDetermine = canDetermine && noPxChangeTryDetermine[idx]();\n }\n if (canDetermine) {\n return false;\n }\n }\n if (noPxChangeTryDetermine.length) {\n // Remove the result of `buildAxisLabel`\n group.remove(local.labelGroup);\n axisLabelBuildResultSet(local, null, null, null);\n }\n }\n return true;\n}\nfunction buildAxisLabel(cfg, local, group, kind, axisModel, api) {\n var axis = axisModel.axis;\n var show = retrieve(cfg.raw.axisLabelShow, axisModel.get(['axisLabel', 'show']));\n var labelGroup = new graphic.Group();\n group.add(labelGroup);\n var axisLabelCreationCtx = createAxisLabelsComputingContext(kind);\n if (!show || axis.scale.isBlank()) {\n axisLabelBuildResultSet(local, [], labelGroup, axisLabelCreationCtx);\n return;\n }\n var labelModel = axisModel.getModel('axisLabel');\n var labels = axis.getViewLabels(axisLabelCreationCtx);\n // Special label rotate.\n var labelRotation = (retrieve(cfg.raw.labelRotate, labelModel.get('rotate')) || 0) * PI / 180;\n var labelLayout = AxisBuilder.innerTextLayout(cfg.rotation, labelRotation, cfg.labelDirection);\n var rawCategoryData = axisModel.getCategories && axisModel.getCategories(true);\n var labelEls = [];\n var triggerEvent = axisModel.get('triggerEvent');\n var z2Min = Infinity;\n var z2Max = -Infinity;\n each(labels, function (labelItem, index) {\n var _a;\n var tickValue = axis.scale.type === 'ordinal' ? axis.scale.getRawOrdinalNumber(labelItem.tickValue) : labelItem.tickValue;\n var formattedLabel = labelItem.formattedLabel;\n var rawLabel = labelItem.rawLabel;\n var itemLabelModel = labelModel;\n if (rawCategoryData && rawCategoryData[tickValue]) {\n var rawCategoryItem = rawCategoryData[tickValue];\n if (isObject(rawCategoryItem) && rawCategoryItem.textStyle) {\n itemLabelModel = new Model(rawCategoryItem.textStyle, labelModel, axisModel.ecModel);\n }\n }\n var textColor = itemLabelModel.getTextColor() || axisModel.get(['axisLine', 'lineStyle', 'color']);\n var align = itemLabelModel.getShallow('align', true) || labelLayout.textAlign;\n var alignMin = retrieve2(itemLabelModel.getShallow('alignMinLabel', true), align);\n var alignMax = retrieve2(itemLabelModel.getShallow('alignMaxLabel', true), align);\n var verticalAlign = itemLabelModel.getShallow('verticalAlign', true) || itemLabelModel.getShallow('baseline', true) || labelLayout.textVerticalAlign;\n var verticalAlignMin = retrieve2(itemLabelModel.getShallow('verticalAlignMinLabel', true), verticalAlign);\n var verticalAlignMax = retrieve2(itemLabelModel.getShallow('verticalAlignMaxLabel', true), verticalAlign);\n var z2 = 10 + (((_a = labelItem.time) === null || _a === void 0 ? void 0 : _a.level) || 0);\n z2Min = Math.min(z2Min, z2);\n z2Max = Math.max(z2Max, z2);\n var textEl = new graphic.Text({\n // --- transform props start ---\n // All of the transform props MUST not be set here, but should be set in\n // `updateAxisLabelChangableProps`, because they may change in estimation,\n // and need to calculate based on global coord sys by `decomposeTransform`.\n x: 0,\n y: 0,\n rotation: 0,\n // --- transform props end ---\n silent: AxisBuilder.isLabelSilent(axisModel),\n z2: z2,\n style: createTextStyle(itemLabelModel, {\n text: formattedLabel,\n align: index === 0 ? alignMin : index === labels.length - 1 ? alignMax : align,\n verticalAlign: index === 0 ? verticalAlignMin : index === labels.length - 1 ? verticalAlignMax : verticalAlign,\n fill: isFunction(textColor) ? textColor(\n // (1) In category axis with data zoom, tick is not the original\n // index of axis.data. So tick should not be exposed to user\n // in category axis.\n // (2) Compatible with previous version, which always use formatted label as\n // input. But in interval scale the formatted label is like '223,445', which\n // maked user replace ','. So we modify it to return original val but remain\n // it as 'string' to avoid error in replacing.\n axis.type === 'category' ? rawLabel : axis.type === 'value' ? tickValue + '' : tickValue, index) : textColor\n })\n });\n textEl.anid = 'label_' + tickValue;\n var inner = getLabelInner(textEl);\n inner[\"break\"] = labelItem[\"break\"];\n inner.tickValue = tickValue;\n inner.layoutRotation = labelLayout.rotation;\n graphic.setTooltipConfig({\n el: textEl,\n componentModel: axisModel,\n itemName: formattedLabel,\n formatterParamsExtra: {\n isTruncated: function () {\n return textEl.isTruncated;\n },\n value: rawLabel,\n tickIndex: index\n }\n });\n // Pack data for mouse event\n if (triggerEvent) {\n var eventData = AxisBuilder.makeAxisEventDataBase(axisModel);\n eventData.targetType = 'axisLabel';\n eventData.value = rawLabel;\n eventData.tickIndex = index;\n if (labelItem[\"break\"]) {\n eventData[\"break\"] = {\n // type: labelItem.break.type,\n start: labelItem[\"break\"].parsedBreak.vmin,\n end: labelItem[\"break\"].parsedBreak.vmax\n };\n }\n if (axis.type === 'category') {\n eventData.dataIndex = tickValue;\n }\n getECData(textEl).eventData = eventData;\n if (labelItem[\"break\"]) {\n addBreakEventHandler(axisModel, api, textEl, labelItem[\"break\"]);\n }\n }\n labelEls.push(textEl);\n labelGroup.add(textEl);\n });\n var labelLayoutList = map(labelEls, function (label) {\n return {\n label: label,\n priority: getLabelInner(label)[\"break\"] ? label.z2 + (z2Max - z2Min + 1) // Make break labels be highest priority.\n : label.z2,\n defaultAttr: {\n ignore: label.ignore\n }\n };\n });\n axisLabelBuildResultSet(local, labelLayoutList, labelGroup, axisLabelCreationCtx);\n}\n// Indicate that `layOutAxisTickLabel` has been called.\nfunction axisLabelBuildResultExists(local) {\n return !!local.labelLayoutList;\n}\nfunction axisLabelBuildResultSet(local, labelLayoutList, labelGroup, axisLabelsCreationContext) {\n // Ensure the same lifetime.\n local.labelLayoutList = labelLayoutList;\n local.labelGroup = labelGroup;\n local.axisLabelsCreationContext = axisLabelsCreationContext;\n}\nfunction updateAxisLabelChangableProps(cfg, axisModel, labelLayoutList, transformGroup) {\n var labelMargin = axisModel.get(['axisLabel', 'margin']);\n each(labelLayoutList, function (layout, idx) {\n var geometry = ensureLabelLayoutWithGeometry(layout);\n if (!geometry) {\n return;\n }\n var labelEl = geometry.label;\n var inner = getLabelInner(labelEl);\n // See the comment in `suggestIgnore`.\n geometry.suggestIgnore = labelEl.ignore;\n // Currently no `ignore:true` is set in `buildAxisLabel`\n // But `ignore:true` may be set subsequently for overlap handling, thus reset it here.\n labelEl.ignore = false;\n copyTransform(_tmpLayoutEl, _tmpLayoutElReset);\n _tmpLayoutEl.x = axisModel.axis.dataToCoord(inner.tickValue);\n _tmpLayoutEl.y = cfg.labelOffset + cfg.labelDirection * labelMargin;\n _tmpLayoutEl.rotation = inner.layoutRotation;\n transformGroup.add(_tmpLayoutEl);\n _tmpLayoutEl.updateTransform();\n transformGroup.remove(_tmpLayoutEl);\n _tmpLayoutEl.decomposeTransform();\n copyTransform(labelEl, _tmpLayoutEl);\n labelEl.markRedraw();\n setLabelLayoutDirty(geometry, true);\n ensureLabelLayoutWithGeometry(geometry);\n });\n}\nvar _tmpLayoutEl = new graphic.Rect();\nvar _tmpLayoutElReset = new graphic.Rect();\nfunction hasAxisName(axisName) {\n return !!axisName;\n}\nfunction addBreakEventHandler(axisModel, api, textEl, visualBreak) {\n textEl.on('click', function (params) {\n var payload = {\n type: AXIS_BREAK_EXPAND_ACTION_TYPE,\n breaks: [{\n start: visualBreak.parsedBreak.breakOption.start,\n end: visualBreak.parsedBreak.breakOption.end\n }]\n };\n payload[axisModel.axis.dim + \"AxisIndex\"] = axisModel.componentIndex;\n api.dispatchAction(payload);\n });\n}\nfunction adjustBreakLabels(axisModel, axisRotation, labelLayoutList) {\n var scaleBreakHelper = getScaleBreakHelper();\n if (!scaleBreakHelper) {\n return;\n }\n var breakLabelIndexPairs = scaleBreakHelper.retrieveAxisBreakPairs(labelLayoutList, function (layoutInfo) {\n return layoutInfo && getLabelInner(layoutInfo.label)[\"break\"];\n }, true);\n var moveOverlap = axisModel.get(['breakLabelLayout', 'moveOverlap'], true);\n if (moveOverlap === true || moveOverlap === 'auto') {\n each(breakLabelIndexPairs, function (idxPair) {\n getAxisBreakHelper().adjustBreakLabelPair(axisModel.axis.inverse, axisRotation, [ensureLabelLayoutWithGeometry(labelLayoutList[idxPair[0]]), ensureLabelLayoutWithGeometry(labelLayoutList[idxPair[1]])]);\n });\n }\n}\nexport default AxisBuilder;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nimport AxisBuilder from '../../component/axis/AxisBuilder.js';\nimport { isIntervalOrLogScale } from '../../scale/helper.js';\n/**\n * [__CAUTION__]\n * MUST guarantee: if only the input `rect` and `axis.extent` changed,\n * only `layout.position` changes.\n * This character is replied on `grid.contain` calculation in `AxisBuilder`.\n * @see updateCartesianAxisViewCommonPartBuilder\n *\n * Can only be called after coordinate system creation stage.\n * (Can be called before coordinate system update stage).\n */\nexport function layout(rect, axisModel, opt) {\n opt = opt || {};\n var axis = axisModel.axis;\n var layout = {};\n var otherAxisOnZeroOf = axis.getAxesOnZeroOf()[0];\n var rawAxisPosition = axis.position;\n var axisPosition = otherAxisOnZeroOf ? 'onZero' : rawAxisPosition;\n var axisDim = axis.dim;\n var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height];\n var idx = {\n left: 0,\n right: 1,\n top: 0,\n bottom: 1,\n onZero: 2\n };\n var axisOffset = axisModel.get('offset') || 0;\n var posBound = axisDim === 'x' ? [rectBound[2] - axisOffset, rectBound[3] + axisOffset] : [rectBound[0] - axisOffset, rectBound[1] + axisOffset];\n if (otherAxisOnZeroOf) {\n var onZeroCoord = otherAxisOnZeroOf.toGlobalCoord(otherAxisOnZeroOf.dataToCoord(0));\n posBound[idx.onZero] = Math.max(Math.min(onZeroCoord, posBound[1]), posBound[0]);\n }\n // Axis position\n layout.position = [axisDim === 'y' ? posBound[idx[axisPosition]] : rectBound[0], axisDim === 'x' ? posBound[idx[axisPosition]] : rectBound[3]];\n // Axis rotation\n layout.rotation = Math.PI / 2 * (axisDim === 'x' ? 0 : 1);\n // Tick and label direction, x y is axisDim\n var dirMap = {\n top: -1,\n bottom: 1,\n left: -1,\n right: 1\n };\n layout.labelDirection = layout.tickDirection = layout.nameDirection = dirMap[rawAxisPosition];\n layout.labelOffset = otherAxisOnZeroOf ? posBound[idx[rawAxisPosition]] - posBound[idx.onZero] : 0;\n if (axisModel.get(['axisTick', 'inside'])) {\n layout.tickDirection = -layout.tickDirection;\n }\n if (zrUtil.retrieve(opt.labelInside, axisModel.get(['axisLabel', 'inside']))) {\n layout.labelDirection = -layout.labelDirection;\n }\n // Special label rotation\n var labelRotate = axisModel.get(['axisLabel', 'rotate']);\n layout.labelRotate = axisPosition === 'top' ? -labelRotate : labelRotate;\n // Over splitLine and splitArea\n layout.z2 = 1;\n return layout;\n}\nexport function isCartesian2DDeclaredSeries(seriesModel) {\n return seriesModel.get('coordinateSystem') === 'cartesian2d';\n}\n/**\n * Note: If pie (or other similar series) use cartesian2d, here\n * option `seriesModel.get('coordinateSystem') === 'cartesian2d'`\n * and `seriesModel.coordinateSystem !== cartesian2dCoordSysInstance`\n * and `seriesModel.boxCoordinateSystem === cartesian2dCoordSysInstance`,\n * the logic below is probably wrong, therefore skip it temporarily.\n */\nexport function isCartesian2DInjectedAsDataCoordSys(seriesModel) {\n return seriesModel.coordinateSystem && seriesModel.coordinateSystem.type === 'cartesian2d';\n}\nexport function findAxisModels(seriesModel) {\n var axisModelMap = {\n xAxisModel: null,\n yAxisModel: null\n };\n zrUtil.each(axisModelMap, function (v, key) {\n var axisType = key.replace(/Model$/, '');\n var axisModel = seriesModel.getReferringComponents(axisType, SINGLE_REFERRING).models[0];\n if (process.env.NODE_ENV !== 'production') {\n if (!axisModel) {\n throw new Error(axisType + ' \"' + zrUtil.retrieve3(seriesModel.get(axisType + 'Index'), seriesModel.get(axisType + 'Id'), 0) + '\" not found');\n }\n }\n axisModelMap[key] = axisModel;\n });\n return axisModelMap;\n}\nexport function createCartesianAxisViewCommonPartBuilder(gridRect, cartesians, axisModel, api, ctx, defaultNameMoveOverlap) {\n var layoutResult = layout(gridRect, axisModel);\n var axisLineAutoShow = false;\n var axisTickAutoShow = false;\n // Not show axisTick or axisLine if other axis is category / time\n for (var i = 0; i < cartesians.length; i++) {\n if (isIntervalOrLogScale(cartesians[i].getOtherAxis(axisModel.axis).scale)) {\n // Still show axis tick or axisLine if other axis is value / log\n axisLineAutoShow = axisTickAutoShow = true;\n if (axisModel.axis.type === 'category' && axisModel.axis.onBand) {\n axisTickAutoShow = false;\n }\n }\n }\n layoutResult.axisLineAutoShow = axisLineAutoShow;\n layoutResult.axisTickAutoShow = axisTickAutoShow;\n layoutResult.defaultNameMoveOverlap = defaultNameMoveOverlap;\n return new AxisBuilder(axisModel, api, layoutResult, ctx);\n}\nexport function updateCartesianAxisViewCommonPartBuilder(axisBuilder, gridRect, axisModel) {\n var newRaw = layout(gridRect, axisModel);\n if (process.env.NODE_ENV !== 'production') {\n var oldRaw_1 = axisBuilder.__getRawCfg();\n zrUtil.each(zrUtil.keys(newRaw), function (prop) {\n if (prop !== 'position' && prop !== 'labelOffset') {\n zrUtil.assert(newRaw[prop] === oldRaw_1[prop]);\n }\n });\n }\n axisBuilder.updateCfg(newRaw);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { getPrecisionSafe, round } from '../util/number.js';\nimport IntervalScale from '../scale/Interval.js';\nimport { getScaleExtent, retrieveAxisBreaksOption } from './axisHelper.js';\nimport { warn } from '../util/log.js';\nimport { logTransform, increaseInterval, isValueNice } from '../scale/helper.js';\nexport function alignScaleTicks(scale, axisModel, alignToScale) {\n var _a;\n var intervalScaleProto = IntervalScale.prototype;\n // NOTE: There is a precondition for log scale here:\n // In log scale we store _interval and _extent of exponent value.\n // So if we use the method of InternalScale to set/get these data.\n // It process the exponent value, which is linear and what we want here.\n var alignToTicks = intervalScaleProto.getTicks.call(alignToScale);\n var alignToNicedTicks = intervalScaleProto.getTicks.call(alignToScale, {\n expandToNicedExtent: true\n });\n var alignToSplitNumber = alignToTicks.length - 1;\n var alignToInterval = intervalScaleProto.getInterval.call(alignToScale);\n var scaleExtent = getScaleExtent(scale, axisModel);\n var rawExtent = scaleExtent.extent;\n var isMinFixed = scaleExtent.fixMin;\n var isMaxFixed = scaleExtent.fixMax;\n if (scale.type === 'log') {\n rawExtent = logTransform(scale.base, rawExtent, true);\n }\n scale.setBreaksFromOption(retrieveAxisBreaksOption(axisModel));\n scale.setExtent(rawExtent[0], rawExtent[1]);\n scale.calcNiceExtent({\n splitNumber: alignToSplitNumber,\n fixMin: isMinFixed,\n fixMax: isMaxFixed\n });\n var extent = intervalScaleProto.getExtent.call(scale);\n // Need to update the rawExtent.\n // Because value in rawExtent may be not parsed. e.g. 'dataMin', 'dataMax'\n if (isMinFixed) {\n rawExtent[0] = extent[0];\n }\n if (isMaxFixed) {\n rawExtent[1] = extent[1];\n }\n var interval = intervalScaleProto.getInterval.call(scale);\n var min = rawExtent[0];\n var max = rawExtent[1];\n if (isMinFixed && isMaxFixed) {\n // User set min, max, divide to get new interval\n interval = (max - min) / alignToSplitNumber;\n } else if (isMinFixed) {\n max = rawExtent[0] + interval * alignToSplitNumber;\n // User set min, expand extent on the other side\n while (max < rawExtent[1] && isFinite(max) && isFinite(rawExtent[1])) {\n interval = increaseInterval(interval);\n max = rawExtent[0] + interval * alignToSplitNumber;\n }\n } else if (isMaxFixed) {\n // User set max, expand extent on the other side\n min = rawExtent[1] - interval * alignToSplitNumber;\n while (min > rawExtent[0] && isFinite(min) && isFinite(rawExtent[0])) {\n interval = increaseInterval(interval);\n min = rawExtent[1] - interval * alignToSplitNumber;\n }\n } else {\n var nicedSplitNumber = scale.getTicks().length - 1;\n if (nicedSplitNumber > alignToSplitNumber) {\n interval = increaseInterval(interval);\n }\n var range = interval * alignToSplitNumber;\n max = Math.ceil(rawExtent[1] / interval) * interval;\n min = round(max - range);\n // Not change the result that crossing zero.\n if (min < 0 && rawExtent[0] >= 0) {\n min = 0;\n max = round(range);\n } else if (max > 0 && rawExtent[1] <= 0) {\n max = 0;\n min = -round(range);\n }\n }\n // Adjust min, max based on the extent of alignTo. When min or max is set in alignTo scale\n var t0 = (alignToTicks[0].value - alignToNicedTicks[0].value) / alignToInterval;\n var t1 = (alignToTicks[alignToSplitNumber].value - alignToNicedTicks[alignToSplitNumber].value) / alignToInterval;\n // NOTE: Must in setExtent -> setInterval -> setNiceExtent order.\n intervalScaleProto.setExtent.call(scale, min + interval * t0, max + interval * t1);\n intervalScaleProto.setInterval.call(scale, interval);\n if (t0 || t1) {\n intervalScaleProto.setNiceExtent.call(scale, min + interval, max - interval);\n }\n if (process.env.NODE_ENV !== 'production') {\n var ticks = intervalScaleProto.getTicks.call(scale);\n if (ticks[1] && (!isValueNice(interval) || getPrecisionSafe(ticks[1].value) > getPrecisionSafe(interval))) {\n warn(\"The ticks may be not readable when set min: \" + axisModel.get('min') + \", max: \" + axisModel.get('max') + (\" and alignTicks: true. (\" + ((_a = axisModel.axis) === null || _a === void 0 ? void 0 : _a.dim) + \"AxisIndex: \" + axisModel.componentIndex + \")\"), true);\n }\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Grid is a region which contains at most 4 cartesian systems\n *\n * TODO Default cartesian\n */\nimport { isObject, each, indexOf, retrieve3, keys, assert, eqNaN, find, retrieve2 } from 'zrender/lib/core/util.js';\nimport { createBoxLayoutReference, getLayoutRect } from '../../util/layout.js';\nimport { createScaleByModel, ifAxisCrossZero, niceScaleExtent, getDataDimensionsOnAxis, isNameLocationCenter, shouldAxisShow } from '../../coord/axisHelper.js';\nimport Cartesian2D, { cartesian2DDimensions } from './Cartesian2D.js';\nimport Axis2D from './Axis2D.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\n// Depends on GridModel, AxisModel, which performs preprocess.\nimport { OUTER_BOUNDS_CLAMP_DEFAULT, OUTER_BOUNDS_DEFAULT } from './GridModel.js';\nimport { findAxisModels, createCartesianAxisViewCommonPartBuilder, updateCartesianAxisViewCommonPartBuilder, isCartesian2DInjectedAsDataCoordSys } from './cartesianAxisHelper.js';\nimport { isIntervalOrLogScale } from '../../scale/helper.js';\nimport { alignScaleTicks } from '../axisAlignTicks.js';\nimport { expandOrShrinkRect, WH, XY } from '../../util/graphic.js';\nimport { AxisBuilderSharedContext, resolveAxisNameOverlapDefault, moveIfOverlapByLinearLabels, getLabelInner } from '../../component/axis/AxisBuilder.js';\nimport { error, log } from '../../util/log.js';\nimport { AxisTickLabelComputingKind } from '../axisTickLabelBuilder.js';\nimport { injectCoordSysByOption } from '../../core/CoordinateSystem.js';\nimport { mathMax, parsePositionSizeOption } from '../../util/number.js';\n// margin is [top, right, bottom, left]\nvar XY_TO_MARGIN_IDX = [[3, 1], [0, 2] // xyIdx 1 => 'y'\n];\nvar Grid = /** @class */function () {\n function Grid(gridModel, ecModel, api) {\n // FIXME:TS where used (different from registered type 'cartesian2d')?\n this.type = 'grid';\n this._coordsMap = {};\n this._coordsList = [];\n this._axesMap = {};\n this._axesList = [];\n this.axisPointerEnabled = true;\n this.dimensions = cartesian2DDimensions;\n this._initCartesian(gridModel, ecModel, api);\n this.model = gridModel;\n }\n Grid.prototype.getRect = function () {\n return this._rect;\n };\n Grid.prototype.update = function (ecModel, api) {\n var axesMap = this._axesMap;\n this._updateScale(ecModel, this.model);\n function updateAxisTicks(axes) {\n var alignTo;\n // Axis is added in order of axisIndex.\n var axesIndices = keys(axes);\n var len = axesIndices.length;\n if (!len) {\n return;\n }\n var axisNeedsAlign = [];\n // Process once and calculate the ticks for those don't use alignTicks.\n for (var i = len - 1; i >= 0; i--) {\n var idx = +axesIndices[i]; // Convert to number.\n var axis = axes[idx];\n var model = axis.model;\n var scale = axis.scale;\n if (\n // Only value and log axis without interval support alignTicks.\n isIntervalOrLogScale(scale) && model.get('alignTicks') && model.get('interval') == null) {\n axisNeedsAlign.push(axis);\n } else {\n niceScaleExtent(scale, model);\n if (isIntervalOrLogScale(scale)) {\n // Can only align to interval or log axis.\n alignTo = axis;\n }\n }\n }\n ;\n // All axes has set alignTicks. Pick the first one.\n // PENDING. Should we find the axis that both set interval, min, max and align to this one?\n if (axisNeedsAlign.length) {\n if (!alignTo) {\n alignTo = axisNeedsAlign.pop();\n niceScaleExtent(alignTo.scale, alignTo.model);\n }\n each(axisNeedsAlign, function (axis) {\n alignScaleTicks(axis.scale, axis.model, alignTo.scale);\n });\n }\n }\n updateAxisTicks(axesMap.x);\n updateAxisTicks(axesMap.y);\n // Key: axisDim_axisIndex, value: boolean, whether onZero target.\n var onZeroRecords = {};\n each(axesMap.x, function (xAxis) {\n fixAxisOnZero(axesMap, 'y', xAxis, onZeroRecords);\n });\n each(axesMap.y, function (yAxis) {\n fixAxisOnZero(axesMap, 'x', yAxis, onZeroRecords);\n });\n // Resize again if containLabel is enabled\n // FIXME It may cause getting wrong grid size in data processing stage\n this.resize(this.model, api);\n };\n /**\n * Resize the grid.\n *\n * [NOTE]\n * If both \"grid.containLabel/grid.contain\" and pixel-required-data-processing (such as, \"dataSampling\")\n * exist, circular dependency occurs in logic.\n * The final compromised sequence is:\n * 1. Calculate \"axis.extent\" (pixel extent) and AffineTransform based on only \"grid layout options\".\n * Not accurate if \"grid.containLabel/grid.contain\" is required, but it is a compromise to avoid\n * circular dependency.\n * 2. Perform \"series data processing\" (where \"dataSampling\" requires \"axis.extent\").\n * 3. Calculate \"scale.extent\" (data extent) based on \"processed series data\".\n * 4. Modify \"axis.extent\" for \"grid.containLabel/grid.contain\":\n * 4.1. Calculate \"axis labels\" based on \"scale.extent\".\n * 4.2. Modify \"axis.extent\" by the bounding rects of \"axis labels and names\".\n */\n Grid.prototype.resize = function (gridModel, api, beforeDataProcessing) {\n var layoutRef = createBoxLayoutReference(gridModel, api);\n var gridRect = this._rect = getLayoutRect(gridModel.getBoxLayoutParams(), layoutRef.refContainer);\n // PENDING: whether to support that if the input `coord` is out of the base coord sys,\n // do not render anything. At present, the behavior is undefined.\n var axesMap = this._axesMap;\n var coordsList = this._coordsList;\n var optionContainLabel = gridModel.get('containLabel'); // No `.get(, true)` for backward compat.\n updateAllAxisExtentTransByGridRect(axesMap, gridRect);\n if (!beforeDataProcessing) {\n var axisBuilderSharedCtx = createAxisBiulders(gridRect, coordsList, axesMap, optionContainLabel, api);\n var noPxChange = void 0;\n if (optionContainLabel) {\n if (legacyLayOutGridByContainLabel) {\n // console.time('legacyLayOutGridByContainLabel');\n legacyLayOutGridByContainLabel(this._axesList, gridRect);\n updateAllAxisExtentTransByGridRect(axesMap, gridRect);\n // console.timeEnd('legacyLayOutGridByContainLabel');\n } else {\n if (process.env.NODE_ENV !== 'production') {\n log('Specified `grid.containLabel` but no `use(LegacyGridContainLabel)`;' + 'use `grid.outerBounds` instead.', true);\n }\n noPxChange = layOutGridByOuterBounds(gridRect.clone(), 'axisLabel', null, gridRect, axesMap, axisBuilderSharedCtx, layoutRef);\n }\n } else {\n var _a = prepareOuterBounds(gridModel, gridRect, layoutRef),\n outerBoundsRect = _a.outerBoundsRect,\n parsedOuterBoundsContain = _a.parsedOuterBoundsContain,\n outerBoundsClamp = _a.outerBoundsClamp;\n if (outerBoundsRect) {\n // console.time('layOutGridByOuterBounds');\n noPxChange = layOutGridByOuterBounds(outerBoundsRect, parsedOuterBoundsContain, outerBoundsClamp, gridRect, axesMap, axisBuilderSharedCtx, layoutRef);\n // console.timeEnd('layOutGridByOuterBounds');\n }\n }\n // console.time('buildAxesView_determine');\n createOrUpdateAxesView(gridRect, axesMap, AxisTickLabelComputingKind.determine, null, noPxChange, layoutRef);\n // console.timeEnd('buildAxesView_determine');\n } // End of beforeDataProcessing\n each(this._coordsList, function (coord) {\n // Calculate affine matrix to accelerate the data to point transform.\n // If all the axes scales are time or value.\n coord.calcAffineTransform();\n });\n };\n Grid.prototype.getAxis = function (dim, axisIndex) {\n var axesMapOnDim = this._axesMap[dim];\n if (axesMapOnDim != null) {\n return axesMapOnDim[axisIndex || 0];\n }\n };\n Grid.prototype.getAxes = function () {\n return this._axesList.slice();\n };\n Grid.prototype.getCartesian = function (xAxisIndex, yAxisIndex) {\n if (xAxisIndex != null && yAxisIndex != null) {\n var key = 'x' + xAxisIndex + 'y' + yAxisIndex;\n return this._coordsMap[key];\n }\n if (isObject(xAxisIndex)) {\n yAxisIndex = xAxisIndex.yAxisIndex;\n xAxisIndex = xAxisIndex.xAxisIndex;\n }\n for (var i = 0, coordList = this._coordsList; i < coordList.length; i++) {\n if (coordList[i].getAxis('x').index === xAxisIndex || coordList[i].getAxis('y').index === yAxisIndex) {\n return coordList[i];\n }\n }\n };\n Grid.prototype.getCartesians = function () {\n return this._coordsList.slice();\n };\n /**\n * @implements\n */\n Grid.prototype.convertToPixel = function (ecModel, finder, value) {\n var target = this._findConvertTarget(finder);\n return target.cartesian ? target.cartesian.dataToPoint(value) : target.axis ? target.axis.toGlobalCoord(target.axis.dataToCoord(value)) : null;\n };\n /**\n * @implements\n */\n Grid.prototype.convertFromPixel = function (ecModel, finder, value) {\n var target = this._findConvertTarget(finder);\n return target.cartesian ? target.cartesian.pointToData(value) : target.axis ? target.axis.coordToData(target.axis.toLocalCoord(value)) : null;\n };\n Grid.prototype._findConvertTarget = function (finder) {\n var seriesModel = finder.seriesModel;\n var xAxisModel = finder.xAxisModel || seriesModel && seriesModel.getReferringComponents('xAxis', SINGLE_REFERRING).models[0];\n var yAxisModel = finder.yAxisModel || seriesModel && seriesModel.getReferringComponents('yAxis', SINGLE_REFERRING).models[0];\n var gridModel = finder.gridModel;\n var coordsList = this._coordsList;\n var cartesian;\n var axis;\n if (seriesModel) {\n cartesian = seriesModel.coordinateSystem;\n indexOf(coordsList, cartesian) < 0 && (cartesian = null);\n } else if (xAxisModel && yAxisModel) {\n cartesian = this.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex);\n } else if (xAxisModel) {\n axis = this.getAxis('x', xAxisModel.componentIndex);\n } else if (yAxisModel) {\n axis = this.getAxis('y', yAxisModel.componentIndex);\n }\n // Lowest priority.\n else if (gridModel) {\n var grid = gridModel.coordinateSystem;\n if (grid === this) {\n cartesian = this._coordsList[0];\n }\n }\n return {\n cartesian: cartesian,\n axis: axis\n };\n };\n /**\n * @implements\n */\n Grid.prototype.containPoint = function (point) {\n var coord = this._coordsList[0];\n if (coord) {\n return coord.containPoint(point);\n }\n };\n /**\n * Initialize cartesian coordinate systems\n */\n Grid.prototype._initCartesian = function (gridModel, ecModel, api) {\n var _this = this;\n var grid = this;\n var axisPositionUsed = {\n left: false,\n right: false,\n top: false,\n bottom: false\n };\n var axesMap = {\n x: {},\n y: {}\n };\n var axesCount = {\n x: 0,\n y: 0\n };\n // Create axis\n ecModel.eachComponent('xAxis', createAxisCreator('x'), this);\n ecModel.eachComponent('yAxis', createAxisCreator('y'), this);\n if (!axesCount.x || !axesCount.y) {\n // Roll back when there no either x or y axis\n this._axesMap = {};\n this._axesList = [];\n return;\n }\n this._axesMap = axesMap;\n // Create cartesian2d\n each(axesMap.x, function (xAxis, xAxisIndex) {\n each(axesMap.y, function (yAxis, yAxisIndex) {\n var key = 'x' + xAxisIndex + 'y' + yAxisIndex;\n var cartesian = new Cartesian2D(key);\n cartesian.master = _this;\n cartesian.model = gridModel;\n _this._coordsMap[key] = cartesian;\n _this._coordsList.push(cartesian);\n cartesian.addAxis(xAxis);\n cartesian.addAxis(yAxis);\n });\n });\n function createAxisCreator(dimName) {\n return function (axisModel, idx) {\n if (!isAxisUsedInTheGrid(axisModel, gridModel)) {\n return;\n }\n var axisPosition = axisModel.get('position');\n if (dimName === 'x') {\n // Fix position\n if (axisPosition !== 'top' && axisPosition !== 'bottom') {\n // Default bottom of X\n axisPosition = axisPositionUsed.bottom ? 'top' : 'bottom';\n }\n } else {\n // Fix position\n if (axisPosition !== 'left' && axisPosition !== 'right') {\n // Default left of Y\n axisPosition = axisPositionUsed.left ? 'right' : 'left';\n }\n }\n axisPositionUsed[axisPosition] = true;\n var axis = new Axis2D(dimName, createScaleByModel(axisModel), [0, 0], axisModel.get('type'), axisPosition);\n var isCategory = axis.type === 'category';\n axis.onBand = isCategory && axisModel.get('boundaryGap');\n axis.inverse = axisModel.get('inverse');\n // Inject axis into axisModel\n axisModel.axis = axis;\n // Inject axisModel into axis\n axis.model = axisModel;\n // Inject grid info axis\n axis.grid = grid;\n // Index of axis, can be used as key\n axis.index = idx;\n grid._axesList.push(axis);\n axesMap[dimName][idx] = axis;\n axesCount[dimName]++;\n };\n }\n };\n /**\n * Update cartesian properties from series.\n */\n Grid.prototype._updateScale = function (ecModel, gridModel) {\n // Reset scale\n each(this._axesList, function (axis) {\n axis.scale.setExtent(Infinity, -Infinity);\n if (axis.type === 'category') {\n var categorySortInfo = axis.model.get('categorySortInfo');\n axis.scale.setSortInfo(categorySortInfo);\n }\n });\n ecModel.eachSeries(function (seriesModel) {\n // If pie (or other similar series) use cartesian2d, the unionExtent logic below is\n // wrong, therefore skip it temporarily. See also in `defaultAxisExtentFromData.ts`.\n // TODO: support union extent in this case.\n if (isCartesian2DInjectedAsDataCoordSys(seriesModel)) {\n var axesModelMap = findAxisModels(seriesModel);\n var xAxisModel = axesModelMap.xAxisModel;\n var yAxisModel = axesModelMap.yAxisModel;\n if (!isAxisUsedInTheGrid(xAxisModel, gridModel) || !isAxisUsedInTheGrid(yAxisModel, gridModel)) {\n return;\n }\n var cartesian = this.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex);\n var data = seriesModel.getData();\n var xAxis = cartesian.getAxis('x');\n var yAxis = cartesian.getAxis('y');\n unionExtent(data, xAxis);\n unionExtent(data, yAxis);\n }\n }, this);\n function unionExtent(data, axis) {\n each(getDataDimensionsOnAxis(data, axis.dim), function (dim) {\n axis.scale.unionExtentFromData(data, dim);\n });\n }\n };\n /**\n * @param dim 'x' or 'y' or 'auto' or null/undefined\n */\n Grid.prototype.getTooltipAxes = function (dim) {\n var baseAxes = [];\n var otherAxes = [];\n each(this.getCartesians(), function (cartesian) {\n var baseAxis = dim != null && dim !== 'auto' ? cartesian.getAxis(dim) : cartesian.getBaseAxis();\n var otherAxis = cartesian.getOtherAxis(baseAxis);\n indexOf(baseAxes, baseAxis) < 0 && baseAxes.push(baseAxis);\n indexOf(otherAxes, otherAxis) < 0 && otherAxes.push(otherAxis);\n });\n return {\n baseAxes: baseAxes,\n otherAxes: otherAxes\n };\n };\n Grid.create = function (ecModel, api) {\n var grids = [];\n ecModel.eachComponent('grid', function (gridModel, idx) {\n var grid = new Grid(gridModel, ecModel, api);\n grid.name = 'grid_' + idx;\n // dataSampling requires axis extent, so resize\n // should be performed in create stage.\n grid.resize(gridModel, api, true);\n gridModel.coordinateSystem = grid;\n grids.push(grid);\n });\n // Inject the coordinateSystems into seriesModel\n ecModel.eachSeries(function (seriesModel) {\n injectCoordSysByOption({\n targetModel: seriesModel,\n coordSysType: 'cartesian2d',\n coordSysProvider: coordSysProvider\n });\n function coordSysProvider() {\n var axesModelMap = findAxisModels(seriesModel);\n var xAxisModel = axesModelMap.xAxisModel;\n var yAxisModel = axesModelMap.yAxisModel;\n var gridModel = xAxisModel.getCoordSysModel();\n if (process.env.NODE_ENV !== 'production') {\n if (!gridModel) {\n throw new Error('Grid \"' + retrieve3(xAxisModel.get('gridIndex'), xAxisModel.get('gridId'), 0) + '\" not found');\n }\n if (xAxisModel.getCoordSysModel() !== yAxisModel.getCoordSysModel()) {\n throw new Error('xAxis and yAxis must use the same grid');\n }\n }\n var grid = gridModel.coordinateSystem;\n return grid.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex);\n }\n });\n return grids;\n };\n // For deciding which dimensions to use when creating list data\n Grid.dimensions = cartesian2DDimensions;\n return Grid;\n}();\n/**\n * Check if the axis is used in the specified grid.\n */\nfunction isAxisUsedInTheGrid(axisModel, gridModel) {\n return axisModel.getCoordSysModel() === gridModel;\n}\nfunction fixAxisOnZero(axesMap, otherAxisDim, axis,\n// Key: see `getOnZeroRecordKey`\nonZeroRecords) {\n axis.getAxesOnZeroOf = function () {\n // TODO: onZero of multiple axes.\n return otherAxisOnZeroOf ? [otherAxisOnZeroOf] : [];\n };\n // onZero can not be enabled in these two situations:\n // 1. When any other axis is a category axis.\n // 2. When no axis is cross 0 point.\n var otherAxes = axesMap[otherAxisDim];\n var otherAxisOnZeroOf;\n var axisModel = axis.model;\n var onZero = axisModel.get(['axisLine', 'onZero']);\n var onZeroAxisIndex = axisModel.get(['axisLine', 'onZeroAxisIndex']);\n if (!onZero) {\n return;\n }\n // If target axis is specified.\n if (onZeroAxisIndex != null) {\n if (canOnZeroToAxis(otherAxes[onZeroAxisIndex])) {\n otherAxisOnZeroOf = otherAxes[onZeroAxisIndex];\n }\n } else {\n // Find the first available other axis.\n for (var idx in otherAxes) {\n if (otherAxes.hasOwnProperty(idx) && canOnZeroToAxis(otherAxes[idx])\n // Consider that two Y axes on one value axis,\n // if both onZero, the two Y axes overlap.\n && !onZeroRecords[getOnZeroRecordKey(otherAxes[idx])]) {\n otherAxisOnZeroOf = otherAxes[idx];\n break;\n }\n }\n }\n if (otherAxisOnZeroOf) {\n onZeroRecords[getOnZeroRecordKey(otherAxisOnZeroOf)] = true;\n }\n function getOnZeroRecordKey(axis) {\n return axis.dim + '_' + axis.index;\n }\n}\nfunction canOnZeroToAxis(axis) {\n return axis && axis.type !== 'category' && axis.type !== 'time' && ifAxisCrossZero(axis);\n}\nfunction updateAxisTransform(axis, coordBase) {\n var axisExtent = axis.getExtent();\n var axisExtentSum = axisExtent[0] + axisExtent[1];\n // Fast transform\n axis.toGlobalCoord = axis.dim === 'x' ? function (coord) {\n return coord + coordBase;\n } : function (coord) {\n return axisExtentSum - coord + coordBase;\n };\n axis.toLocalCoord = axis.dim === 'x' ? function (coord) {\n return coord - coordBase;\n } : function (coord) {\n return axisExtentSum - coord + coordBase;\n };\n}\nfunction updateAllAxisExtentTransByGridRect(axesMap, gridRect) {\n each(axesMap.x, function (axis) {\n return updateAxisExtentTransByGridRect(axis, gridRect.x, gridRect.width);\n });\n each(axesMap.y, function (axis) {\n return updateAxisExtentTransByGridRect(axis, gridRect.y, gridRect.height);\n });\n}\nfunction updateAxisExtentTransByGridRect(axis, gridXY, gridWH) {\n var extent = [0, gridWH];\n var idx = axis.inverse ? 1 : 0;\n axis.setExtent(extent[idx], extent[1 - idx]);\n updateAxisTransform(axis, gridXY);\n}\nvar legacyLayOutGridByContainLabel;\nexport function registerLegacyGridContainLabelImpl(impl) {\n legacyLayOutGridByContainLabel = impl;\n}\n// Return noPxChange.\nfunction layOutGridByOuterBounds(outerBoundsRect, outerBoundsContain, outerBoundsClamp, gridRect, axesMap, axisBuilderSharedCtx, layoutRef) {\n if (process.env.NODE_ENV !== 'production') {\n assert(outerBoundsContain === 'all' || outerBoundsContain === 'axisLabel');\n }\n // Assume `updateAllAxisExtentTransByGridRect` has been performed once before this call.\n // [NOTE]:\n // - The bounding rect of the axis elements might be sensitve to variations in `axis.extent` due to strategies\n // like hideOverlap/moveOverlap. @see the comment in `LabelLayoutBase['suggestIgnore']`.\n // - The final `gridRect` might be slightly smaller than the ideally expected result if labels are giant and\n // get hidden due to overlapping. More iterations could improve precision, but not performant. We consider\n // the current result acceptable, since no alignment among charts can be guaranteed when using this feature.\n createOrUpdateAxesView(gridRect, axesMap, AxisTickLabelComputingKind.estimate, outerBoundsContain, false, layoutRef);\n var margin = [0, 0, 0, 0];\n fillLabelNameOverflowOnOneDimension(0);\n fillLabelNameOverflowOnOneDimension(1);\n // If axis is blank, no label can be used to detect overflow.\n // gridRect itself should not overflow.\n fillMarginOnOneDimension(gridRect, 0, NaN);\n fillMarginOnOneDimension(gridRect, 1, NaN);\n var noPxChange = find(margin, function (item) {\n return item > 0;\n }) == null;\n expandOrShrinkRect(gridRect, margin, true, true, outerBoundsClamp);\n updateAllAxisExtentTransByGridRect(axesMap, gridRect);\n return noPxChange;\n function fillLabelNameOverflowOnOneDimension(xyIdx) {\n each(axesMap[XY[xyIdx]], function (axis) {\n if (!shouldAxisShow(axis.model)) {\n return;\n }\n // FIXME: zr Group.union may wrongly union (0, 0, 0, 0) and not performant.\n // unionRect.union(axis.axisBuilder.group.getBoundingRect());\n // If ussing Group.getBoundingRect to calculate shrink space, it is not strictly accurate when\n // the outermost label is ignored and the secondary label is very long and contribute to the\n // union extension:\n // -|---|---|---|\n // 1,000,000,000\n // Therefore we calculate them one by one.\n // Also considered axis may be blank or no labels.\n var sharedRecord = axisBuilderSharedCtx.ensureRecord(axis.model);\n var labelInfoList = sharedRecord.labelInfoList;\n if (labelInfoList) {\n for (var idx = 0; idx < labelInfoList.length; idx++) {\n var labelInfo = labelInfoList[idx];\n var proportion = axis.scale.normalize(getLabelInner(labelInfo.label).tickValue);\n proportion = xyIdx === 1 ? 1 - proportion : proportion;\n // xAxis use proportion on x, yAxis use proprotion on y, otherwise not.\n fillMarginOnOneDimension(labelInfo.rect, xyIdx, proportion);\n fillMarginOnOneDimension(labelInfo.rect, 1 - xyIdx, NaN);\n }\n }\n var nameLayout = sharedRecord.nameLayout;\n if (nameLayout) {\n var proportion = isNameLocationCenter(sharedRecord.nameLocation) ? 0.5 : NaN;\n fillMarginOnOneDimension(nameLayout.rect, xyIdx, proportion);\n fillMarginOnOneDimension(nameLayout.rect, 1 - xyIdx, NaN);\n }\n });\n }\n function fillMarginOnOneDimension(itemRect, xyIdx, proportion // NaN mean no use proportion\n ) {\n var overflow1 = outerBoundsRect[XY[xyIdx]] - itemRect[XY[xyIdx]];\n var overflow2 = itemRect[WH[xyIdx]] + itemRect[XY[xyIdx]] - (outerBoundsRect[WH[xyIdx]] + outerBoundsRect[XY[xyIdx]]);\n overflow1 = applyProportion(overflow1, 1 - proportion);\n overflow2 = applyProportion(overflow2, proportion);\n var minIdx = XY_TO_MARGIN_IDX[xyIdx][0];\n var maxIdx = XY_TO_MARGIN_IDX[xyIdx][1];\n margin[minIdx] = mathMax(margin[minIdx], overflow1);\n margin[maxIdx] = mathMax(margin[maxIdx], overflow2);\n }\n function applyProportion(overflow, proportion) {\n // proportion is not likely to near zero. If so, give up shrink\n if (overflow > 0 && !eqNaN(proportion) && proportion > 1e-4) {\n overflow /= proportion;\n }\n return overflow;\n }\n}\nfunction createAxisBiulders(gridRect, cartesians, axesMap, optionContainLabel, api) {\n var axisBuilderSharedCtx = new AxisBuilderSharedContext(resolveAxisNameOverlapForGrid);\n each(axesMap, function (axisList) {\n return each(axisList, function (axis) {\n if (shouldAxisShow(axis.model)) {\n // See `AxisBaseOptionCommon['nameMoveOverlap']`.\n var defaultNameMoveOverlap = !optionContainLabel;\n axis.axisBuilder = createCartesianAxisViewCommonPartBuilder(gridRect, cartesians, axis.model, api, axisBuilderSharedCtx, defaultNameMoveOverlap);\n }\n });\n });\n return axisBuilderSharedCtx;\n}\n/**\n * Promote the axis-elements-building from \"view render\" stage to \"coordinate system resize\" stage.\n * This is aimed to resovle overlap across multiple axes, since currently it's hard to reconcile\n * multiple axes in \"view render\" stage.\n *\n * [CAUTION] But this promotion assumes that the subsequent \"visual mapping\" stage does not affect\n * this axis-elements-building; otherwise we have to refactor it again.\n */\nfunction createOrUpdateAxesView(gridRect, axesMap, kind, outerBoundsContain, noPxChange, layoutRef) {\n var isDetermine = kind === AxisTickLabelComputingKind.determine;\n each(axesMap, function (axisList) {\n return each(axisList, function (axis) {\n if (shouldAxisShow(axis.model)) {\n updateCartesianAxisViewCommonPartBuilder(axis.axisBuilder, gridRect, axis.model);\n axis.axisBuilder.build(isDetermine ? {\n axisTickLabelDetermine: true\n } : {\n axisTickLabelEstimate: true\n }, {\n noPxChange: noPxChange\n });\n }\n });\n });\n var nameMarginLevelMap = {\n x: 0,\n y: 0\n };\n calcNameMarginLevel(0);\n calcNameMarginLevel(1);\n function calcNameMarginLevel(xyIdx) {\n nameMarginLevelMap[XY[1 - xyIdx]] = gridRect[WH[xyIdx]] <= layoutRef.refContainer[WH[xyIdx]] * 0.5 ? 0 : 1 - xyIdx === 1 ? 2 : 1;\n }\n each(axesMap, function (axisList, xy) {\n return each(axisList, function (axis) {\n if (shouldAxisShow(axis.model)) {\n if (outerBoundsContain === 'all' || isDetermine) {\n // To resolve overlap, `axisName` layout depends on `axisTickLabel` layout result\n // (all of the axes of the same `grid`; consider multiple x or y axes).\n axis.axisBuilder.build({\n axisName: true\n }, {\n nameMarginLevel: nameMarginLevelMap[xy]\n });\n }\n if (isDetermine) {\n axis.axisBuilder.build({\n axisLine: true\n });\n }\n }\n });\n });\n}\nfunction prepareOuterBounds(gridModel, rawRridRect, layoutRef) {\n var outerBoundsRect;\n var optionOuterBoundsMode = gridModel.get('outerBoundsMode', true);\n if (optionOuterBoundsMode === 'same') {\n outerBoundsRect = rawRridRect.clone();\n } else if (optionOuterBoundsMode == null || optionOuterBoundsMode === 'auto') {\n outerBoundsRect = getLayoutRect(gridModel.get('outerBounds', true) || OUTER_BOUNDS_DEFAULT, layoutRef.refContainer);\n } else if (optionOuterBoundsMode !== 'none') {\n if (process.env.NODE_ENV !== 'production') {\n error(\"Invalid grid[\" + gridModel.componentIndex + \"].outerBoundsMode.\");\n }\n }\n var optionOuterBoundsContain = gridModel.get('outerBoundsContain', true);\n var parsedOuterBoundsContain;\n if (optionOuterBoundsContain == null || optionOuterBoundsContain === 'auto') {\n parsedOuterBoundsContain = 'all';\n } else if (indexOf(['all', 'axisLabel'], optionOuterBoundsContain) < 0) {\n if (process.env.NODE_ENV !== 'production') {\n error(\"Invalid grid[\" + gridModel.componentIndex + \"].outerBoundsContain.\");\n }\n parsedOuterBoundsContain = 'all';\n } else {\n parsedOuterBoundsContain = optionOuterBoundsContain;\n }\n var outerBoundsClamp = [parsePositionSizeOption(retrieve2(gridModel.get('outerBoundsClampWidth', true), OUTER_BOUNDS_CLAMP_DEFAULT[0]), rawRridRect.width), parsePositionSizeOption(retrieve2(gridModel.get('outerBoundsClampHeight', true), OUTER_BOUNDS_CLAMP_DEFAULT[1]), rawRridRect.height)];\n return {\n outerBoundsRect: outerBoundsRect,\n parsedOuterBoundsContain: parsedOuterBoundsContain,\n outerBoundsClamp: outerBoundsClamp\n };\n}\nvar resolveAxisNameOverlapForGrid = function (cfg, ctx, axisModel, nameLayoutInfo, nameMoveDirVec, thisRecord) {\n var perpendicularDim = axisModel.axis.dim === 'x' ? 'y' : 'x';\n resolveAxisNameOverlapDefault(cfg, ctx, axisModel, nameLayoutInfo, nameMoveDirVec, thisRecord);\n // If nameLocation 'center', and there are multiple axes parallel to this axis, do not adjust by\n // other axes, because the axis name should be close to its axis line as much as possible even\n // if overlapping; otherwise it might cause misleading.\n // If nameLocation 'center', do not adjust by perpendicular axes, since they are not likely to overlap.\n // If nameLocation 'start'/'end', move name within the same direction to escape overlap with the\n // perpendicular axes.\n if (!isNameLocationCenter(cfg.nameLocation)) {\n each(ctx.recordMap[perpendicularDim], function (perpenRecord) {\n // perpendicular axis may be no name.\n if (perpenRecord && perpenRecord.labelInfoList && perpenRecord.dirVec) {\n moveIfOverlapByLinearLabels(perpenRecord.labelInfoList, perpenRecord.dirVec, nameLayoutInfo, nameMoveDirVec);\n }\n });\n }\n};\nexport default Grid;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport Model from '../../model/Model.js';\nimport { each, curry, clone, defaults, isArray, indexOf } from 'zrender/lib/core/util.js';\n// Build axisPointerModel, mergin tooltip.axisPointer model for each axis.\n// allAxesInfo should be updated when setOption performed.\nexport function collect(ecModel, api) {\n var result = {\n /**\n * key: makeKey(axis.model)\n * value: {\n * axis,\n * coordSys,\n * axisPointerModel,\n * triggerTooltip,\n * triggerEmphasis,\n * involveSeries,\n * snap,\n * seriesModels,\n * seriesDataCount\n * }\n */\n axesInfo: {},\n seriesInvolved: false,\n /**\n * key: makeKey(coordSys.model)\n * value: Object: key makeKey(axis.model), value: axisInfo\n */\n coordSysAxesInfo: {},\n coordSysMap: {}\n };\n collectAxesInfo(result, ecModel, api);\n // Check seriesInvolved for performance, in case too many series in some chart.\n result.seriesInvolved && collectSeriesInfo(result, ecModel);\n return result;\n}\nfunction collectAxesInfo(result, ecModel, api) {\n var globalTooltipModel = ecModel.getComponent('tooltip');\n var globalAxisPointerModel = ecModel.getComponent('axisPointer');\n // links can only be set on global.\n var linksOption = globalAxisPointerModel.get('link', true) || [];\n var linkGroups = [];\n // Collect axes info.\n each(api.getCoordinateSystems(), function (coordSys) {\n // Some coordinate system do not support axes, like geo.\n if (!coordSys.axisPointerEnabled) {\n return;\n }\n var coordSysKey = makeKey(coordSys.model);\n var axesInfoInCoordSys = result.coordSysAxesInfo[coordSysKey] = {};\n result.coordSysMap[coordSysKey] = coordSys;\n // Set tooltip (like 'cross') is a convenient way to show axisPointer\n // for user. So we enable setting tooltip on coordSys model.\n var coordSysModel = coordSys.model;\n var baseTooltipModel = coordSysModel.getModel('tooltip', globalTooltipModel);\n each(coordSys.getAxes(), curry(saveTooltipAxisInfo, false, null));\n // If axis tooltip used, choose tooltip axis for each coordSys.\n // Notice this case: coordSys is `grid` but not `cartesian2D` here.\n if (coordSys.getTooltipAxes && globalTooltipModel\n // If tooltip.showContent is set as false, tooltip will not\n // show but axisPointer will show as normal.\n && baseTooltipModel.get('show')) {\n // Compatible with previous logic. But series.tooltip.trigger: 'axis'\n // or series.data[n].tooltip.trigger: 'axis' are not support any more.\n var triggerAxis = baseTooltipModel.get('trigger') === 'axis';\n var cross = baseTooltipModel.get(['axisPointer', 'type']) === 'cross';\n var tooltipAxes = coordSys.getTooltipAxes(baseTooltipModel.get(['axisPointer', 'axis']));\n if (triggerAxis || cross) {\n each(tooltipAxes.baseAxes, curry(saveTooltipAxisInfo, cross ? 'cross' : true, triggerAxis));\n }\n if (cross) {\n each(tooltipAxes.otherAxes, curry(saveTooltipAxisInfo, 'cross', false));\n }\n }\n // fromTooltip: true | false | 'cross'\n // triggerTooltip: true | false | null\n function saveTooltipAxisInfo(fromTooltip, triggerTooltip, axis) {\n var axisPointerModel = axis.model.getModel('axisPointer', globalAxisPointerModel);\n var axisPointerShow = axisPointerModel.get('show');\n if (!axisPointerShow || axisPointerShow === 'auto' && !fromTooltip && !isHandleTrigger(axisPointerModel)) {\n return;\n }\n if (triggerTooltip == null) {\n triggerTooltip = axisPointerModel.get('triggerTooltip');\n }\n axisPointerModel = fromTooltip ? makeAxisPointerModel(axis, baseTooltipModel, globalAxisPointerModel, ecModel, fromTooltip, triggerTooltip) : axisPointerModel;\n var snap = axisPointerModel.get('snap');\n var triggerEmphasis = axisPointerModel.get('triggerEmphasis');\n var axisKey = makeKey(axis.model);\n var involveSeries = triggerTooltip || snap || axis.type === 'category';\n // If result.axesInfo[key] exist, override it (tooltip has higher priority).\n var axisInfo = result.axesInfo[axisKey] = {\n key: axisKey,\n axis: axis,\n coordSys: coordSys,\n axisPointerModel: axisPointerModel,\n triggerTooltip: triggerTooltip,\n triggerEmphasis: triggerEmphasis,\n involveSeries: involveSeries,\n snap: snap,\n useHandle: isHandleTrigger(axisPointerModel),\n seriesModels: [],\n linkGroup: null\n };\n axesInfoInCoordSys[axisKey] = axisInfo;\n result.seriesInvolved = result.seriesInvolved || involveSeries;\n var groupIndex = getLinkGroupIndex(linksOption, axis);\n if (groupIndex != null) {\n var linkGroup = linkGroups[groupIndex] || (linkGroups[groupIndex] = {\n axesInfo: {}\n });\n linkGroup.axesInfo[axisKey] = axisInfo;\n linkGroup.mapper = linksOption[groupIndex].mapper;\n axisInfo.linkGroup = linkGroup;\n }\n }\n });\n}\nfunction makeAxisPointerModel(axis, baseTooltipModel, globalAxisPointerModel, ecModel, fromTooltip, triggerTooltip) {\n var tooltipAxisPointerModel = baseTooltipModel.getModel('axisPointer');\n var fields = ['type', 'snap', 'lineStyle', 'shadowStyle', 'label', 'animation', 'animationDurationUpdate', 'animationEasingUpdate', 'z'];\n var volatileOption = {};\n each(fields, function (field) {\n volatileOption[field] = clone(tooltipAxisPointerModel.get(field));\n });\n // category axis do not auto snap, otherwise some tick that do not\n // has value can not be hovered. value/time/log axis default snap if\n // triggered from tooltip and trigger tooltip.\n volatileOption.snap = axis.type !== 'category' && !!triggerTooltip;\n // Compatible with previous behavior, tooltip axis does not show label by default.\n // Only these properties can be overridden from tooltip to axisPointer.\n if (tooltipAxisPointerModel.get('type') === 'cross') {\n volatileOption.type = 'line';\n }\n var labelOption = volatileOption.label || (volatileOption.label = {});\n // Follow the convention, do not show label when triggered by tooltip by default.\n labelOption.show == null && (labelOption.show = false);\n if (fromTooltip === 'cross') {\n // When 'cross', both axes show labels.\n var tooltipAxisPointerLabelShow = tooltipAxisPointerModel.get(['label', 'show']);\n labelOption.show = tooltipAxisPointerLabelShow != null ? tooltipAxisPointerLabelShow : true;\n // If triggerTooltip, this is a base axis, which should better not use cross style\n // (cross style is dashed by default)\n if (!triggerTooltip) {\n var crossStyle = volatileOption.lineStyle = tooltipAxisPointerModel.get('crossStyle');\n crossStyle && defaults(labelOption, crossStyle.textStyle);\n }\n }\n return axis.model.getModel('axisPointer', new Model(volatileOption, globalAxisPointerModel, ecModel));\n}\nfunction collectSeriesInfo(result, ecModel) {\n // Prepare data for axis trigger\n ecModel.eachSeries(function (seriesModel) {\n // Notice this case: this coordSys is `cartesian2D` but not `grid`.\n var coordSys = seriesModel.coordinateSystem;\n var seriesTooltipTrigger = seriesModel.get(['tooltip', 'trigger'], true);\n var seriesTooltipShow = seriesModel.get(['tooltip', 'show'], true);\n if (!coordSys || !coordSys.model // PENDING: radar do not have a model.\n || seriesTooltipTrigger === 'none' || seriesTooltipTrigger === false || seriesTooltipTrigger === 'item' || seriesTooltipShow === false || seriesModel.get(['axisPointer', 'show'], true) === false) {\n return;\n }\n each(result.coordSysAxesInfo[makeKey(coordSys.model)], function (axisInfo) {\n var axis = axisInfo.axis;\n if (coordSys.getAxis(axis.dim) === axis) {\n axisInfo.seriesModels.push(seriesModel);\n axisInfo.seriesDataCount == null && (axisInfo.seriesDataCount = 0);\n axisInfo.seriesDataCount += seriesModel.getData().count();\n }\n });\n });\n}\n/**\n * For example:\n * {\n * axisPointer: {\n * links: [{\n * xAxisIndex: [2, 4],\n * yAxisIndex: 'all'\n * }, {\n * xAxisId: ['a5', 'a7'],\n * xAxisName: 'xxx'\n * }]\n * }\n * }\n */\nfunction getLinkGroupIndex(linksOption, axis) {\n var axisModel = axis.model;\n var dim = axis.dim;\n for (var i = 0; i < linksOption.length; i++) {\n var linkOption = linksOption[i] || {};\n if (checkPropInLink(linkOption[dim + 'AxisId'], axisModel.id) || checkPropInLink(linkOption[dim + 'AxisIndex'], axisModel.componentIndex) || checkPropInLink(linkOption[dim + 'AxisName'], axisModel.name)) {\n return i;\n }\n }\n}\nfunction checkPropInLink(linkPropValue, axisPropValue) {\n return linkPropValue === 'all' || isArray(linkPropValue) && indexOf(linkPropValue, axisPropValue) >= 0 || linkPropValue === axisPropValue;\n}\nexport function fixValue(axisModel) {\n var axisInfo = getAxisInfo(axisModel);\n if (!axisInfo) {\n return;\n }\n var axisPointerModel = axisInfo.axisPointerModel;\n var scale = axisInfo.axis.scale;\n var option = axisPointerModel.option;\n var status = axisPointerModel.get('status');\n var value = axisPointerModel.get('value');\n // Parse init value for category and time axis.\n if (value != null) {\n value = scale.parse(value);\n }\n var useHandle = isHandleTrigger(axisPointerModel);\n // If `handle` used, `axisPointer` will always be displayed, so value\n // and status should be initialized.\n if (status == null) {\n option.status = useHandle ? 'show' : 'hide';\n }\n var extent = scale.getExtent().slice();\n extent[0] > extent[1] && extent.reverse();\n if (\n // Pick a value on axis when initializing.\n value == null\n // If both `handle` and `dataZoom` are used, value may be out of axis extent,\n // where we should re-pick a value to keep `handle` displaying normally.\n || value > extent[1]) {\n // Make handle displayed on the end of the axis when init, which looks better.\n value = extent[1];\n }\n if (value < extent[0]) {\n value = extent[0];\n }\n option.value = value;\n if (useHandle) {\n option.status = axisInfo.axis.scale.isBlank() ? 'hide' : 'show';\n }\n}\nexport function getAxisInfo(axisModel) {\n var coordSysAxesInfo = (axisModel.ecModel.getComponent('axisPointer') || {}).coordSysAxesInfo;\n return coordSysAxesInfo && coordSysAxesInfo.axesInfo[makeKey(axisModel)];\n}\nexport function getAxisPointerModel(axisModel) {\n var axisInfo = getAxisInfo(axisModel);\n return axisInfo && axisInfo.axisPointerModel;\n}\nfunction isHandleTrigger(axisPointerModel) {\n return !!axisPointerModel.get(['handle', 'show']);\n}\n/**\n * @param {module:echarts/model/Model} model\n * @return {string} unique key\n */\nexport function makeKey(model) {\n return model.type + '||' + model.id;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as axisPointerModelHelper from '../axisPointer/modelHelper.js';\nimport ComponentView from '../../view/Component.js';\nvar axisPointerClazz = {};\n/**\n * Base class of AxisView.\n */\nvar AxisView = /** @class */function (_super) {\n __extends(AxisView, _super);\n function AxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = AxisView.type;\n return _this;\n }\n /**\n * @override\n */\n AxisView.prototype.render = function (axisModel, ecModel, api, payload) {\n // FIXME\n // This process should proformed after coordinate systems updated\n // (axis scale updated), and should be performed each time update.\n // So put it here temporarily, although it is not appropriate to\n // put a model-writing procedure in `view`.\n this.axisPointerClass && axisPointerModelHelper.fixValue(axisModel);\n _super.prototype.render.apply(this, arguments);\n this._doUpdateAxisPointerClass(axisModel, api, true);\n };\n /**\n * Action handler.\n */\n AxisView.prototype.updateAxisPointer = function (axisModel, ecModel, api, payload) {\n this._doUpdateAxisPointerClass(axisModel, api, false);\n };\n /**\n * @override\n */\n AxisView.prototype.remove = function (ecModel, api) {\n var axisPointer = this._axisPointer;\n axisPointer && axisPointer.remove(api);\n };\n /**\n * @override\n */\n AxisView.prototype.dispose = function (ecModel, api) {\n this._disposeAxisPointer(api);\n _super.prototype.dispose.apply(this, arguments);\n };\n AxisView.prototype._doUpdateAxisPointerClass = function (axisModel, api, forceRender) {\n var Clazz = AxisView.getAxisPointerClass(this.axisPointerClass);\n if (!Clazz) {\n return;\n }\n var axisPointerModel = axisPointerModelHelper.getAxisPointerModel(axisModel);\n axisPointerModel ? (this._axisPointer || (this._axisPointer = new Clazz())).render(axisModel, axisPointerModel, api, forceRender) : this._disposeAxisPointer(api);\n };\n AxisView.prototype._disposeAxisPointer = function (api) {\n this._axisPointer && this._axisPointer.dispose(api);\n this._axisPointer = null;\n };\n AxisView.registerAxisPointerClass = function (type, clazz) {\n if (process.env.NODE_ENV !== 'production') {\n if (axisPointerClazz[type]) {\n throw new Error('axisPointer ' + type + ' exists');\n }\n }\n axisPointerClazz[type] = clazz;\n };\n ;\n AxisView.getAxisPointerClass = function (type) {\n return type && axisPointerClazz[type];\n };\n ;\n AxisView.type = 'axis';\n return AxisView;\n}(ComponentView);\nexport default AxisView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { makeInner } from '../../util/model.js';\nvar inner = makeInner();\nexport function rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, gridModel) {\n var axis = axisModel.axis;\n if (axis.scale.isBlank()) {\n return;\n }\n // TODO: TYPE\n var splitAreaModel = axisModel.getModel('splitArea');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var areaColors = areaStyleModel.get('color');\n var gridRect = gridModel.coordinateSystem.getRect();\n var ticksCoords = axis.getTicksCoords({\n tickModel: splitAreaModel,\n clamp: true,\n breakTicks: 'none',\n pruneByBreak: 'preserve_extent_bound'\n });\n if (!ticksCoords.length) {\n return;\n }\n // For Making appropriate splitArea animation, the color and anid\n // should be corresponding to previous one if possible.\n var areaColorsLen = areaColors.length;\n var lastSplitAreaColors = inner(axisView).splitAreaColors;\n var newSplitAreaColors = zrUtil.createHashMap();\n var colorIndex = 0;\n if (lastSplitAreaColors) {\n for (var i = 0; i < ticksCoords.length; i++) {\n var cIndex = lastSplitAreaColors.get(ticksCoords[i].tickValue);\n if (cIndex != null) {\n colorIndex = (cIndex + (areaColorsLen - 1) * i) % areaColorsLen;\n break;\n }\n }\n }\n var prev = axis.toGlobalCoord(ticksCoords[0].coord);\n var areaStyle = areaStyleModel.getAreaStyle();\n areaColors = zrUtil.isArray(areaColors) ? areaColors : [areaColors];\n for (var i = 1; i < ticksCoords.length; i++) {\n var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);\n var x = void 0;\n var y = void 0;\n var width = void 0;\n var height = void 0;\n if (axis.isHorizontal()) {\n x = prev;\n y = gridRect.y;\n width = tickCoord - x;\n height = gridRect.height;\n prev = x + width;\n } else {\n x = gridRect.x;\n y = prev;\n width = gridRect.width;\n height = tickCoord - y;\n prev = y + height;\n }\n var tickValue = ticksCoords[i - 1].tickValue;\n tickValue != null && newSplitAreaColors.set(tickValue, colorIndex);\n axisGroup.add(new graphic.Rect({\n anid: tickValue != null ? 'area_' + tickValue : null,\n shape: {\n x: x,\n y: y,\n width: width,\n height: height\n },\n style: zrUtil.defaults({\n fill: areaColors[colorIndex]\n }, areaStyle),\n autoBatch: true,\n silent: true\n }));\n colorIndex = (colorIndex + 1) % areaColorsLen;\n }\n inner(axisView).splitAreaColors = newSplitAreaColors;\n}\nexport function rectCoordAxisHandleRemove(axisView) {\n inner(axisView).splitAreaColors = null;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport AxisView from './AxisView.js';\nimport { rectCoordAxisBuildSplitArea, rectCoordAxisHandleRemove } from './axisSplitHelper.js';\nimport { getAxisBreakHelper } from './axisBreakHelper.js';\nimport { shouldAxisShow } from '../../coord/axisHelper.js';\nvar selfBuilderAttrs = ['splitArea', 'splitLine', 'minorSplitLine', 'breakArea'];\nvar CartesianAxisView = /** @class */function (_super) {\n __extends(CartesianAxisView, _super);\n function CartesianAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CartesianAxisView.type;\n _this.axisPointerClass = 'CartesianAxisPointer';\n return _this;\n }\n /**\n * @override\n */\n CartesianAxisView.prototype.render = function (axisModel, ecModel, api, payload) {\n this.group.removeAll();\n var oldAxisGroup = this._axisGroup;\n this._axisGroup = new graphic.Group();\n this.group.add(this._axisGroup);\n if (!shouldAxisShow(axisModel)) {\n return;\n }\n this._axisGroup.add(axisModel.axis.axisBuilder.group);\n zrUtil.each(selfBuilderAttrs, function (name) {\n if (axisModel.get([name, 'show'])) {\n axisElementBuilders[name](this, this._axisGroup, axisModel, axisModel.getCoordSysModel(), api);\n }\n }, this);\n // THIS is a special case for bar racing chart.\n // Update the axis label from the natural initial layout to\n // sorted layout should has no animation.\n var isInitialSortFromBarRacing = payload && payload.type === 'changeAxisOrder' && payload.isInitSort;\n if (!isInitialSortFromBarRacing) {\n graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel);\n }\n _super.prototype.render.call(this, axisModel, ecModel, api, payload);\n };\n CartesianAxisView.prototype.remove = function () {\n rectCoordAxisHandleRemove(this);\n };\n CartesianAxisView.type = 'cartesianAxis';\n return CartesianAxisView;\n}(AxisView);\nvar axisElementBuilders = {\n splitLine: function (axisView, axisGroup, axisModel, gridModel, api) {\n var axis = axisModel.axis;\n if (axis.scale.isBlank()) {\n return;\n }\n var splitLineModel = axisModel.getModel('splitLine');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var lineColors = lineStyleModel.get('color');\n var showMinLine = splitLineModel.get('showMinLine') !== false;\n var showMaxLine = splitLineModel.get('showMaxLine') !== false;\n lineColors = zrUtil.isArray(lineColors) ? lineColors : [lineColors];\n var gridRect = gridModel.coordinateSystem.getRect();\n var isHorizontal = axis.isHorizontal();\n var lineCount = 0;\n var ticksCoords = axis.getTicksCoords({\n tickModel: splitLineModel,\n breakTicks: 'none',\n pruneByBreak: 'preserve_extent_bound'\n });\n var p1 = [];\n var p2 = [];\n var lineStyle = lineStyleModel.getLineStyle();\n for (var i = 0; i < ticksCoords.length; i++) {\n var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);\n if (i === 0 && !showMinLine || i === ticksCoords.length - 1 && !showMaxLine) {\n continue;\n }\n var tickValue = ticksCoords[i].tickValue;\n if (isHorizontal) {\n p1[0] = tickCoord;\n p1[1] = gridRect.y;\n p2[0] = tickCoord;\n p2[1] = gridRect.y + gridRect.height;\n } else {\n p1[0] = gridRect.x;\n p1[1] = tickCoord;\n p2[0] = gridRect.x + gridRect.width;\n p2[1] = tickCoord;\n }\n var colorIndex = lineCount++ % lineColors.length;\n var line = new graphic.Line({\n anid: tickValue != null ? 'line_' + tickValue : null,\n autoBatch: true,\n shape: {\n x1: p1[0],\n y1: p1[1],\n x2: p2[0],\n y2: p2[1]\n },\n style: zrUtil.defaults({\n stroke: lineColors[colorIndex]\n }, lineStyle),\n silent: true\n });\n graphic.subPixelOptimizeLine(line.shape, lineStyle.lineWidth);\n axisGroup.add(line);\n }\n },\n minorSplitLine: function (axisView, axisGroup, axisModel, gridModel, api) {\n var axis = axisModel.axis;\n var minorSplitLineModel = axisModel.getModel('minorSplitLine');\n var lineStyleModel = minorSplitLineModel.getModel('lineStyle');\n var gridRect = gridModel.coordinateSystem.getRect();\n var isHorizontal = axis.isHorizontal();\n var minorTicksCoords = axis.getMinorTicksCoords();\n if (!minorTicksCoords.length) {\n return;\n }\n var p1 = [];\n var p2 = [];\n var lineStyle = lineStyleModel.getLineStyle();\n for (var i = 0; i < minorTicksCoords.length; i++) {\n for (var k = 0; k < minorTicksCoords[i].length; k++) {\n var tickCoord = axis.toGlobalCoord(minorTicksCoords[i][k].coord);\n if (isHorizontal) {\n p1[0] = tickCoord;\n p1[1] = gridRect.y;\n p2[0] = tickCoord;\n p2[1] = gridRect.y + gridRect.height;\n } else {\n p1[0] = gridRect.x;\n p1[1] = tickCoord;\n p2[0] = gridRect.x + gridRect.width;\n p2[1] = tickCoord;\n }\n var line = new graphic.Line({\n anid: 'minor_line_' + minorTicksCoords[i][k].tickValue,\n autoBatch: true,\n shape: {\n x1: p1[0],\n y1: p1[1],\n x2: p2[0],\n y2: p2[1]\n },\n style: lineStyle,\n silent: true\n });\n graphic.subPixelOptimizeLine(line.shape, lineStyle.lineWidth);\n axisGroup.add(line);\n }\n }\n },\n splitArea: function (axisView, axisGroup, axisModel, gridModel, api) {\n rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, gridModel);\n },\n breakArea: function (axisView, axisGroup, axisModel, gridModel, api) {\n var axisBreakHelper = getAxisBreakHelper();\n var scale = axisModel.axis.scale;\n if (axisBreakHelper && scale.type !== 'ordinal') {\n axisBreakHelper.rectCoordBuildBreakAxis(axisGroup, axisView, axisModel, gridModel.coordinateSystem.getRect(), api);\n }\n }\n};\nvar CartesianXAxisView = /** @class */function (_super) {\n __extends(CartesianXAxisView, _super);\n function CartesianXAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CartesianXAxisView.type;\n return _this;\n }\n CartesianXAxisView.type = 'xAxis';\n return CartesianXAxisView;\n}(CartesianAxisView);\nexport { CartesianXAxisView };\nvar CartesianYAxisView = /** @class */function (_super) {\n __extends(CartesianYAxisView, _super);\n function CartesianYAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CartesianXAxisView.type;\n return _this;\n }\n CartesianYAxisView.type = 'yAxis';\n return CartesianYAxisView;\n}(CartesianAxisView);\nexport { CartesianYAxisView };\nexport default CartesianAxisView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentView from '../../view/Component.js';\nimport GridModel from '../../coord/cartesian/GridModel.js';\nimport { Rect } from '../../util/graphic.js';\nimport { defaults } from 'zrender/lib/core/util.js';\nimport { CartesianAxisModel } from '../../coord/cartesian/AxisModel.js';\nimport axisModelCreator from '../../coord/axisModelCreator.js';\nimport Grid from '../../coord/cartesian/Grid.js';\nimport { CartesianXAxisView, CartesianYAxisView } from '../axis/CartesianAxisView.js';\n// Grid view\nvar GridView = /** @class */function (_super) {\n __extends(GridView, _super);\n function GridView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'grid';\n return _this;\n }\n GridView.prototype.render = function (gridModel, ecModel) {\n this.group.removeAll();\n if (gridModel.get('show')) {\n this.group.add(new Rect({\n shape: gridModel.coordinateSystem.getRect(),\n style: defaults({\n fill: gridModel.get('backgroundColor')\n }, gridModel.getItemStyle()),\n silent: true,\n z2: -1\n }));\n }\n };\n GridView.type = 'grid';\n return GridView;\n}(ComponentView);\nvar extraOption = {\n // gridIndex: 0,\n // gridId: '',\n offset: 0\n};\nexport function install(registers) {\n registers.registerComponentView(GridView);\n registers.registerComponentModel(GridModel);\n registers.registerCoordinateSystem('cartesian2d', Grid);\n axisModelCreator(registers, 'x', CartesianAxisModel, extraOption);\n axisModelCreator(registers, 'y', CartesianAxisModel, extraOption);\n registers.registerComponentView(CartesianXAxisView);\n registers.registerComponentView(CartesianYAxisView);\n registers.registerPreprocessor(function (option) {\n // Only create grid when need\n if (option.xAxis && option.yAxis && !option.grid) {\n option.grid = {};\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport axisDefault from '../axisDefault.js';\nimport Model from '../../model/Model.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nimport ComponentModel from '../../model/Component.js';\nimport tokens from '../../visual/tokens.js';\nvar valueAxisDefault = axisDefault.value;\nfunction defaultsShow(opt, show) {\n return zrUtil.defaults({\n show: show\n }, opt);\n}\nvar RadarModel = /** @class */function (_super) {\n __extends(RadarModel, _super);\n function RadarModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadarModel.type;\n return _this;\n }\n RadarModel.prototype.optionUpdated = function () {\n var boundaryGap = this.get('boundaryGap');\n var splitNumber = this.get('splitNumber');\n var scale = this.get('scale');\n var axisLine = this.get('axisLine');\n var axisTick = this.get('axisTick');\n // let axisType = this.get('axisType');\n var axisLabel = this.get('axisLabel');\n var nameTextStyle = this.get('axisName');\n var showName = this.get(['axisName', 'show']);\n var nameFormatter = this.get(['axisName', 'formatter']);\n var nameGap = this.get('axisNameGap');\n var triggerEvent = this.get('triggerEvent');\n var indicatorModels = zrUtil.map(this.get('indicator') || [], function (indicatorOpt) {\n // PENDING\n if (indicatorOpt.max != null && indicatorOpt.max > 0 && !indicatorOpt.min) {\n indicatorOpt.min = 0;\n } else if (indicatorOpt.min != null && indicatorOpt.min < 0 && !indicatorOpt.max) {\n indicatorOpt.max = 0;\n }\n var iNameTextStyle = nameTextStyle;\n if (indicatorOpt.color != null) {\n iNameTextStyle = zrUtil.defaults({\n color: indicatorOpt.color\n }, nameTextStyle);\n }\n // Use same configuration\n var innerIndicatorOpt = zrUtil.merge(zrUtil.clone(indicatorOpt), {\n boundaryGap: boundaryGap,\n splitNumber: splitNumber,\n scale: scale,\n axisLine: axisLine,\n axisTick: axisTick,\n // axisType: axisType,\n axisLabel: axisLabel,\n // Compatible with 2 and use text\n name: indicatorOpt.text,\n showName: showName,\n nameLocation: 'end',\n nameGap: nameGap,\n // min: 0,\n nameTextStyle: iNameTextStyle,\n triggerEvent: triggerEvent\n }, false);\n if (zrUtil.isString(nameFormatter)) {\n var indName = innerIndicatorOpt.name;\n innerIndicatorOpt.name = nameFormatter.replace('{value}', indName != null ? indName : '');\n } else if (zrUtil.isFunction(nameFormatter)) {\n innerIndicatorOpt.name = nameFormatter(innerIndicatorOpt.name, innerIndicatorOpt);\n }\n var model = new Model(innerIndicatorOpt, null, this.ecModel);\n zrUtil.mixin(model, AxisModelCommonMixin.prototype);\n // For triggerEvent.\n model.mainType = 'radar';\n model.componentIndex = this.componentIndex;\n return model;\n }, this);\n this._indicatorModels = indicatorModels;\n };\n RadarModel.prototype.getIndicatorModels = function () {\n return this._indicatorModels;\n };\n RadarModel.type = 'radar';\n RadarModel.defaultOption = {\n // zlevel: 0,\n z: 0,\n center: ['50%', '50%'],\n radius: '50%',\n startAngle: 90,\n axisName: {\n show: true,\n color: tokens.color.axisLabel\n // formatter: null\n // textStyle: {}\n },\n boundaryGap: [0, 0],\n splitNumber: 5,\n axisNameGap: 15,\n scale: false,\n // Polygon or circle\n shape: 'polygon',\n axisLine: zrUtil.merge({\n lineStyle: {\n color: tokens.color.neutral20\n }\n }, valueAxisDefault.axisLine),\n axisLabel: defaultsShow(valueAxisDefault.axisLabel, false),\n axisTick: defaultsShow(valueAxisDefault.axisTick, false),\n // axisType: 'value',\n splitLine: defaultsShow(valueAxisDefault.splitLine, true),\n splitArea: defaultsShow(valueAxisDefault.splitArea, true),\n // {text, min, max}\n indicator: []\n };\n return RadarModel;\n}(ComponentModel);\nexport default RadarModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport AxisBuilder from '../axis/AxisBuilder.js';\nimport * as graphic from '../../util/graphic.js';\nimport ComponentView from '../../view/Component.js';\nvar RadarView = /** @class */function (_super) {\n __extends(RadarView, _super);\n function RadarView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadarView.type;\n return _this;\n }\n RadarView.prototype.render = function (radarModel, ecModel, api) {\n var group = this.group;\n group.removeAll();\n this._buildAxes(radarModel, api);\n this._buildSplitLineAndArea(radarModel);\n };\n RadarView.prototype._buildAxes = function (radarModel, api) {\n var radar = radarModel.coordinateSystem;\n var indicatorAxes = radar.getIndicatorAxes();\n var axisBuilders = zrUtil.map(indicatorAxes, function (indicatorAxis) {\n var axisName = indicatorAxis.model.get('showName') ? indicatorAxis.name : ''; // hide name\n var axisBuilder = new AxisBuilder(indicatorAxis.model, api, {\n axisName: axisName,\n position: [radar.cx, radar.cy],\n rotation: indicatorAxis.angle,\n labelDirection: -1,\n tickDirection: -1,\n nameDirection: 1\n });\n return axisBuilder;\n });\n zrUtil.each(axisBuilders, function (axisBuilder) {\n axisBuilder.build();\n this.group.add(axisBuilder.group);\n }, this);\n };\n RadarView.prototype._buildSplitLineAndArea = function (radarModel) {\n var radar = radarModel.coordinateSystem;\n var indicatorAxes = radar.getIndicatorAxes();\n if (!indicatorAxes.length) {\n return;\n }\n var shape = radarModel.get('shape');\n var splitLineModel = radarModel.getModel('splitLine');\n var splitAreaModel = radarModel.getModel('splitArea');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var showSplitLine = splitLineModel.get('show');\n var showSplitArea = splitAreaModel.get('show');\n var splitLineColors = lineStyleModel.get('color');\n var splitAreaColors = areaStyleModel.get('color');\n var splitLineColorsArr = zrUtil.isArray(splitLineColors) ? splitLineColors : [splitLineColors];\n var splitAreaColorsArr = zrUtil.isArray(splitAreaColors) ? splitAreaColors : [splitAreaColors];\n var splitLines = [];\n var splitAreas = [];\n function getColorIndex(areaOrLine, areaOrLineColorList, idx) {\n var colorIndex = idx % areaOrLineColorList.length;\n areaOrLine[colorIndex] = areaOrLine[colorIndex] || [];\n return colorIndex;\n }\n if (shape === 'circle') {\n var ticksRadius = indicatorAxes[0].getTicksCoords();\n var cx = radar.cx;\n var cy = radar.cy;\n for (var i = 0; i < ticksRadius.length; i++) {\n if (showSplitLine) {\n var colorIndex = getColorIndex(splitLines, splitLineColorsArr, i);\n splitLines[colorIndex].push(new graphic.Circle({\n shape: {\n cx: cx,\n cy: cy,\n r: ticksRadius[i].coord\n }\n }));\n }\n if (showSplitArea && i < ticksRadius.length - 1) {\n var colorIndex = getColorIndex(splitAreas, splitAreaColorsArr, i);\n splitAreas[colorIndex].push(new graphic.Ring({\n shape: {\n cx: cx,\n cy: cy,\n r0: ticksRadius[i].coord,\n r: ticksRadius[i + 1].coord\n }\n }));\n }\n }\n }\n // Polyyon\n else {\n var realSplitNumber_1;\n var axesTicksPoints = zrUtil.map(indicatorAxes, function (indicatorAxis, idx) {\n var ticksCoords = indicatorAxis.getTicksCoords();\n realSplitNumber_1 = realSplitNumber_1 == null ? ticksCoords.length - 1 : Math.min(ticksCoords.length - 1, realSplitNumber_1);\n return zrUtil.map(ticksCoords, function (tickCoord) {\n return radar.coordToPoint(tickCoord.coord, idx);\n });\n });\n var prevPoints = [];\n for (var i = 0; i <= realSplitNumber_1; i++) {\n var points = [];\n for (var j = 0; j < indicatorAxes.length; j++) {\n points.push(axesTicksPoints[j][i]);\n }\n // Close\n if (points[0]) {\n points.push(points[0].slice());\n } else {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Can\\'t draw value axis ' + i);\n }\n }\n if (showSplitLine) {\n var colorIndex = getColorIndex(splitLines, splitLineColorsArr, i);\n splitLines[colorIndex].push(new graphic.Polyline({\n shape: {\n points: points\n }\n }));\n }\n if (showSplitArea && prevPoints) {\n var colorIndex = getColorIndex(splitAreas, splitAreaColorsArr, i - 1);\n splitAreas[colorIndex].push(new graphic.Polygon({\n shape: {\n points: points.concat(prevPoints)\n }\n }));\n }\n prevPoints = points.slice().reverse();\n }\n }\n var lineStyle = lineStyleModel.getLineStyle();\n var areaStyle = areaStyleModel.getAreaStyle();\n // Add splitArea before splitLine\n zrUtil.each(splitAreas, function (splitAreas, idx) {\n this.group.add(graphic.mergePath(splitAreas, {\n style: zrUtil.defaults({\n stroke: 'none',\n fill: splitAreaColorsArr[idx % splitAreaColorsArr.length]\n }, areaStyle),\n silent: true\n }));\n }, this);\n zrUtil.each(splitLines, function (splitLines, idx) {\n this.group.add(graphic.mergePath(splitLines, {\n style: zrUtil.defaults({\n fill: 'none',\n stroke: splitLineColorsArr[idx % splitLineColorsArr.length]\n }, lineStyle),\n silent: true\n }));\n }, this);\n };\n RadarView.type = 'radar';\n return RadarView;\n}(ComponentView);\nexport default RadarView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../Axis.js';\nvar IndicatorAxis = /** @class */function (_super) {\n __extends(IndicatorAxis, _super);\n function IndicatorAxis(dim, scale, radiusExtent) {\n var _this = _super.call(this, dim, scale, radiusExtent) || this;\n _this.type = 'value';\n _this.angle = 0;\n _this.name = '';\n return _this;\n }\n return IndicatorAxis;\n}(Axis);\nexport default IndicatorAxis;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// TODO clockwise\nimport IndicatorAxis from './IndicatorAxis.js';\nimport IntervalScale from '../../scale/Interval.js';\nimport * as numberUtil from '../../util/number.js';\nimport { map, each, isString, isNumber } from 'zrender/lib/core/util.js';\nimport { alignScaleTicks } from '../axisAlignTicks.js';\nimport { createBoxLayoutReference } from '../../util/layout.js';\nvar Radar = /** @class */function () {\n function Radar(radarModel, ecModel, api) {\n /**\n *\n * Radar dimensions\n */\n this.dimensions = [];\n this._model = radarModel;\n this._indicatorAxes = map(radarModel.getIndicatorModels(), function (indicatorModel, idx) {\n var dim = 'indicator_' + idx;\n var indicatorAxis = new IndicatorAxis(dim, new IntervalScale()\n // (indicatorModel.get('axisType') === 'log') ? new LogScale() : new IntervalScale()\n );\n indicatorAxis.name = indicatorModel.get('name');\n // Inject model and axis\n indicatorAxis.model = indicatorModel;\n indicatorModel.axis = indicatorAxis;\n this.dimensions.push(dim);\n return indicatorAxis;\n }, this);\n this.resize(radarModel, api);\n }\n Radar.prototype.getIndicatorAxes = function () {\n return this._indicatorAxes;\n };\n Radar.prototype.dataToPoint = function (value, indicatorIndex) {\n var indicatorAxis = this._indicatorAxes[indicatorIndex];\n return this.coordToPoint(indicatorAxis.dataToCoord(value), indicatorIndex);\n };\n // TODO: API should be coordToPoint([coord, indicatorIndex])\n Radar.prototype.coordToPoint = function (coord, indicatorIndex) {\n var indicatorAxis = this._indicatorAxes[indicatorIndex];\n var angle = indicatorAxis.angle;\n var x = this.cx + coord * Math.cos(angle);\n var y = this.cy - coord * Math.sin(angle);\n return [x, y];\n };\n Radar.prototype.pointToData = function (pt) {\n var dx = pt[0] - this.cx;\n var dy = pt[1] - this.cy;\n var radius = Math.sqrt(dx * dx + dy * dy);\n dx /= radius;\n dy /= radius;\n var radian = Math.atan2(-dy, dx);\n // Find the closest angle\n // FIXME index can calculated directly\n var minRadianDiff = Infinity;\n var closestAxis;\n var closestAxisIdx = -1;\n for (var i = 0; i < this._indicatorAxes.length; i++) {\n var indicatorAxis = this._indicatorAxes[i];\n var diff = Math.abs(radian - indicatorAxis.angle);\n if (diff < minRadianDiff) {\n closestAxis = indicatorAxis;\n closestAxisIdx = i;\n minRadianDiff = diff;\n }\n }\n return [closestAxisIdx, +(closestAxis && closestAxis.coordToData(radius))];\n };\n Radar.prototype.resize = function (radarModel, api) {\n var refContainer = createBoxLayoutReference(radarModel, api).refContainer;\n var center = radarModel.get('center');\n var viewSize = Math.min(refContainer.width, refContainer.height) / 2;\n this.cx = numberUtil.parsePercent(center[0], refContainer.width) + refContainer.x;\n this.cy = numberUtil.parsePercent(center[1], refContainer.height) + refContainer.y;\n this.startAngle = radarModel.get('startAngle') * Math.PI / 180;\n // radius may be single value like `20`, `'80%'`, or array like `[10, '80%']`\n var radius = radarModel.get('radius');\n if (isString(radius) || isNumber(radius)) {\n radius = [0, radius];\n }\n this.r0 = numberUtil.parsePercent(radius[0], viewSize);\n this.r = numberUtil.parsePercent(radius[1], viewSize);\n each(this._indicatorAxes, function (indicatorAxis, idx) {\n indicatorAxis.setExtent(this.r0, this.r);\n var angle = this.startAngle + idx * Math.PI * 2 / this._indicatorAxes.length;\n // Normalize to [-PI, PI]\n angle = Math.atan2(Math.sin(angle), Math.cos(angle));\n indicatorAxis.angle = angle;\n }, this);\n };\n Radar.prototype.update = function (ecModel, api) {\n var indicatorAxes = this._indicatorAxes;\n var radarModel = this._model;\n each(indicatorAxes, function (indicatorAxis) {\n indicatorAxis.scale.setExtent(Infinity, -Infinity);\n });\n ecModel.eachSeriesByType('radar', function (radarSeries, idx) {\n if (radarSeries.get('coordinateSystem') !== 'radar'\n // @ts-ignore\n || ecModel.getComponent('radar', radarSeries.get('radarIndex')) !== radarModel) {\n return;\n }\n var data = radarSeries.getData();\n each(indicatorAxes, function (indicatorAxis) {\n indicatorAxis.scale.unionExtentFromData(data, data.mapDimension(indicatorAxis.dim));\n });\n }, this);\n var splitNumber = radarModel.get('splitNumber');\n var dummyScale = new IntervalScale();\n dummyScale.setExtent(0, splitNumber);\n dummyScale.setInterval(1);\n // Force all the axis fixing the maxSplitNumber.\n each(indicatorAxes, function (indicatorAxis, idx) {\n alignScaleTicks(indicatorAxis.scale, indicatorAxis.model, dummyScale);\n });\n };\n Radar.prototype.convertToPixel = function (ecModel, finder, value) {\n console.warn('Not implemented.');\n return null;\n };\n Radar.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n console.warn('Not implemented.');\n return null;\n };\n Radar.prototype.containPoint = function (point) {\n console.warn('Not implemented.');\n return false;\n };\n Radar.create = function (ecModel, api) {\n var radarList = [];\n ecModel.eachComponent('radar', function (radarModel) {\n var radar = new Radar(radarModel, ecModel, api);\n radarList.push(radar);\n radarModel.coordinateSystem = radar;\n });\n ecModel.eachSeriesByType('radar', function (radarSeries) {\n if (radarSeries.get('coordinateSystem') === 'radar') {\n // Inject coordinate system\n // @ts-ignore\n radarSeries.coordinateSystem = radarList[radarSeries.get('radarIndex') || 0];\n }\n });\n return radarList;\n };\n /**\n * Radar dimensions is based on the data\n */\n Radar.dimensions = [];\n return Radar;\n}();\nexport default Radar;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport RadarModel from '../../coord/radar/RadarModel.js';\nimport RadarView from './RadarView.js';\nimport Radar from '../../coord/radar/Radar.js';\nexport function install(registers) {\n registers.registerCoordinateSystem('radar', Radar);\n registers.registerComponentModel(RadarModel);\n registers.registerComponentView(RadarView);\n registers.registerVisual({\n seriesType: 'radar',\n reset: function (seriesModel) {\n var data = seriesModel.getData();\n // itemVisual symbol is for selected data\n data.each(function (idx) {\n data.setItemVisual(idx, 'legendIcon', 'roundRect');\n });\n // visual is for unselected data\n data.setVisual('legendIcon', 'roundRect');\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as echarts from '../../core/echarts.js';\nimport { noop } from 'zrender/lib/core/util.js';\nimport { makeInner } from '../../util/model.js';\nvar inner = makeInner();\nexport function take(zr, resourceKey, userKey) {\n inner(zr)[resourceKey] = userKey;\n}\nexport function release(zr, resourceKey, userKey) {\n var store = inner(zr);\n var uKey = store[resourceKey];\n if (uKey === userKey) {\n store[resourceKey] = null;\n }\n}\nexport function isTaken(zr, resourceKey) {\n return !!inner(zr)[resourceKey];\n}\n/**\n * payload: {\n * type: 'takeGlobalCursor',\n * key: 'dataZoomSelect', or 'brush', or ...,\n * If no userKey, release global cursor.\n * }\n */\n// TODO: SELF REGISTERED.\necharts.registerAction({\n type: 'takeGlobalCursor',\n event: 'globalCursorTaken',\n update: 'update'\n}, noop);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { retrieveZInfo } from '../../util/graphic.js';\nvar IRRELEVANT_EXCLUDES = {\n 'axisPointer': 1,\n 'tooltip': 1,\n 'brush': 1\n};\n/**\n * Used on roam/brush triggering determination.\n * This is to avoid that: mouse clicking on an elements that is over geo or graph,\n * but roam is triggered unexpectedly.\n */\nexport function onIrrelevantElement(e, api, targetComponent) {\n var eventElComponent = api.getComponentByElement(e.topTarget);\n if (!eventElComponent || eventElComponent === targetComponent || IRRELEVANT_EXCLUDES.hasOwnProperty(eventElComponent.mainType)) {\n return false;\n }\n // At present the `true` return is conservative. That is, the caller, such as a RoamController,\n // is more likely to get a `false` return and start a roam behavior, becuase even if the\n // `model.coordinateSystem` does not exist, the `e.topTarget` may be also a relevant element,\n // such as axis split line/area or series elements, where roam should be available. Otherwise,\n // if a dataZoom-served cartesian is full of series elements, the dataZoom-roaming can hardly\n // be triggered.\n var eventElCoordSys = eventElComponent.coordinateSystem;\n // If eventElComponent is axisModel, it works only if it is injected with coordinateSystem.\n if (!eventElCoordSys || eventElCoordSys.model === targetComponent) {\n return false;\n }\n // e.g., if a cartesian is covered by a graph, the graph has a higher presedence in roam.\n // A potential bad case is that RoamController does not prevent the cartesian from handling zr\n // event, such as click and hovering, but it's fine so far.\n // Aslo be conservative, if equals, return false.\n var eventElCmptZInfo = retrieveZInfo(eventElComponent);\n var targetCmptZInfo = retrieveZInfo(targetComponent);\n if ((eventElCmptZInfo.zlevel - targetCmptZInfo.zlevel || eventElCmptZInfo.z - targetCmptZInfo.z) <= 0) {\n return false;\n }\n return true;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Eventful from 'zrender/lib/core/Eventful.js';\nimport * as eventTool from 'zrender/lib/core/event.js';\nimport * as interactionMutex from './interactionMutex.js';\nimport { isString, bind, defaults, extend, retrieve2 } from 'zrender/lib/core/util.js';\nimport { makeInner } from '../../util/model.js';\nimport { retrieveZInfo } from '../../util/graphic.js';\nimport { onIrrelevantElement } from './cursorHelper.js';\n;\n/**\n * An manager of zoom and pan(darg) hehavior.\n * But it is not responsible for updating the view, since view updates vary and can\n * not be handled in a uniform way.\n *\n * Note: regarding view updates:\n * - Transformabe views typically use `coord/View` (e.g., geo and series.graph roaming).\n * Some commonly used view update logic has been organized into `roamHelper.ts`.\n * - Non-transformable views handle updates themselves, possibly involving re-layout,\n * (e.g., treemap).\n * - Some scenarios do not require transformation (e.g., dataZoom roaming for cartesian,\n * brush component).\n */\nvar RoamController = /** @class */function (_super) {\n __extends(RoamController, _super);\n function RoamController(zr) {\n var _this = _super.call(this) || this;\n _this._zr = zr;\n // Avoid two roamController bind the same handler\n var mousedownHandler = bind(_this._mousedownHandler, _this);\n var mousemoveHandler = bind(_this._mousemoveHandler, _this);\n var mouseupHandler = bind(_this._mouseupHandler, _this);\n var mousewheelHandler = bind(_this._mousewheelHandler, _this);\n var pinchHandler = bind(_this._pinchHandler, _this);\n /**\n * Notice:\n * - only enable needed types. For example, if 'zoom'\n * is not needed, 'zoom' should not be enabled, otherwise\n * default mousewheel behaviour (scroll page) will be disabled.\n * - This method is idempotent.\n */\n _this.enable = function (controlType, rawOpt) {\n var zInfo = rawOpt.zInfo;\n var _a = retrieveZInfo(zInfo.component),\n z = _a.z,\n zlevel = _a.zlevel;\n var zInfoParsed = {\n component: zInfo.component,\n z: z,\n zlevel: zlevel,\n // By default roam controller is the lowest z2 comparing to other elememts in a component.\n z2: retrieve2(zInfo.z2, -Infinity)\n };\n var triggerInfo = extend({}, rawOpt.triggerInfo);\n this._opt = defaults(extend({}, rawOpt), {\n zoomOnMouseWheel: true,\n moveOnMouseMove: true,\n // By default, wheel do not trigger move.\n moveOnMouseWheel: false,\n preventDefaultMouseMove: true,\n zInfoParsed: zInfoParsed,\n triggerInfo: triggerInfo\n });\n if (controlType == null) {\n controlType = true;\n }\n // A handy optimization for repeatedly calling `enable` during roaming.\n // Assert `disable` is only affected by `controlType`.\n if (!this._enabled || this._controlType !== controlType) {\n this._enabled = true;\n // Disable previous first\n this.disable();\n if (controlType === true || controlType === 'move' || controlType === 'pan') {\n addRoamZrListener(zr, 'mousedown', mousedownHandler, zInfoParsed);\n addRoamZrListener(zr, 'mousemove', mousemoveHandler, zInfoParsed);\n addRoamZrListener(zr, 'mouseup', mouseupHandler, zInfoParsed);\n }\n if (controlType === true || controlType === 'scale' || controlType === 'zoom') {\n addRoamZrListener(zr, 'mousewheel', mousewheelHandler, zInfoParsed);\n addRoamZrListener(zr, 'pinch', pinchHandler, zInfoParsed);\n }\n }\n };\n _this.disable = function () {\n this._enabled = false;\n removeRoamZrListener(zr, 'mousedown', mousedownHandler);\n removeRoamZrListener(zr, 'mousemove', mousemoveHandler);\n removeRoamZrListener(zr, 'mouseup', mouseupHandler);\n removeRoamZrListener(zr, 'mousewheel', mousewheelHandler);\n removeRoamZrListener(zr, 'pinch', pinchHandler);\n };\n return _this;\n }\n RoamController.prototype.isDragging = function () {\n return this._dragging;\n };\n RoamController.prototype.isPinching = function () {\n return this._pinching;\n };\n RoamController.prototype._checkPointer = function (e, x, y) {\n var opt = this._opt;\n var zInfoParsed = opt.zInfoParsed;\n if (onIrrelevantElement(e, opt.api, zInfoParsed.component)) {\n return false;\n }\n ;\n var triggerInfo = opt.triggerInfo;\n var roamTrigger = triggerInfo.roamTrigger;\n var inArea = false;\n if (roamTrigger === 'global') {\n inArea = true;\n }\n if (!inArea) {\n inArea = triggerInfo.isInSelf(e, x, y);\n }\n if (inArea && triggerInfo.isInClip && !triggerInfo.isInClip(e, x, y)) {\n inArea = false;\n }\n return inArea;\n };\n RoamController.prototype._decideCursorStyle = function (e, x, y, forReverse) {\n // If this cursor style decision is not strictly consistent with zrender,\n // it's fine - zr will set the cursor on the next mousemove.\n // This `grab` cursor style should take the lowest precedence. If the hovring element already\n // have a cursor, zrender will set it to be non-'default' before entering this handler.\n // (note, e.target is never silent, e.topTarget can be silent be irrelevant.)\n var target = e.target;\n if (!target && this._checkPointer(e, x, y)) {\n // To indicate users that this area is draggable, otherwise users probably cannot kwown\n // that when hovering out of the shape but still inside the bounding rect.\n return 'grab';\n }\n if (forReverse) {\n return target && target.cursor || 'default';\n }\n };\n RoamController.prototype.dispose = function () {\n this.disable();\n };\n RoamController.prototype._mousedownHandler = function (e) {\n if (eventTool.isMiddleOrRightButtonOnMouseUpDown(e) || eventConsumed(e)) {\n return;\n }\n var el = e.target;\n while (el) {\n if (el.draggable) {\n return;\n }\n // check if host is draggable\n el = el.__hostTarget || el.parent;\n }\n var x = e.offsetX;\n var y = e.offsetY;\n // To determine dragging start, only by checking on mosedown, but not mousemove.\n // Mouse can be out of target when mouse moving.\n if (this._checkPointer(e, x, y)) {\n this._x = x;\n this._y = y;\n this._dragging = true;\n }\n };\n RoamController.prototype._mousemoveHandler = function (e) {\n var zr = this._zr;\n if (e.gestureEvent === 'pinch' || interactionMutex.isTaken(zr, 'globalPan') || eventConsumed(e)) {\n return;\n }\n var x = e.offsetX;\n var y = e.offsetY;\n if (!this._dragging || !isAvailableBehavior('moveOnMouseMove', e, this._opt)) {\n var cursorStyle = this._decideCursorStyle(e, x, y, false);\n if (cursorStyle) {\n zr.setCursorStyle(cursorStyle);\n }\n return;\n }\n zr.setCursorStyle('grabbing');\n var oldX = this._x;\n var oldY = this._y;\n var dx = x - oldX;\n var dy = y - oldY;\n this._x = x;\n this._y = y;\n if (this._opt.preventDefaultMouseMove) {\n eventTool.stop(e.event);\n }\n e.__ecRoamConsumed = true;\n trigger(this, 'pan', 'moveOnMouseMove', e, {\n dx: dx,\n dy: dy,\n oldX: oldX,\n oldY: oldY,\n newX: x,\n newY: y,\n isAvailableBehavior: null\n });\n };\n RoamController.prototype._mouseupHandler = function (e) {\n if (eventConsumed(e)) {\n return;\n }\n var zr = this._zr;\n if (!eventTool.isMiddleOrRightButtonOnMouseUpDown(e)) {\n this._dragging = false;\n var cursorStyle = this._decideCursorStyle(e, e.offsetX, e.offsetY, true);\n if (cursorStyle) {\n zr.setCursorStyle(cursorStyle);\n }\n }\n };\n RoamController.prototype._mousewheelHandler = function (e) {\n if (eventConsumed(e)) {\n return;\n }\n var shouldZoom = isAvailableBehavior('zoomOnMouseWheel', e, this._opt);\n var shouldMove = isAvailableBehavior('moveOnMouseWheel', e, this._opt);\n var wheelDelta = e.wheelDelta;\n var absWheelDeltaDelta = Math.abs(wheelDelta);\n var originX = e.offsetX;\n var originY = e.offsetY;\n // wheelDelta maybe -0 in chrome mac.\n if (wheelDelta === 0 || !shouldZoom && !shouldMove) {\n return;\n }\n // If both `shouldZoom` and `shouldMove` is true, trigger\n // their event both, and the final behavior is determined\n // by event listener themselves.\n if (shouldZoom) {\n // Convenience:\n // Mac and VM Windows on Mac: scroll up: zoom out.\n // Windows: scroll up: zoom in.\n // FIXME: Should do more test in different environment.\n // wheelDelta is too complicated in difference nvironment\n // (https://developer.mozilla.org/en-US/docs/Web/Events/mousewheel),\n // although it has been normallized by zrender.\n // wheelDelta of mouse wheel is bigger than touch pad.\n var factor = absWheelDeltaDelta > 3 ? 1.4 : absWheelDeltaDelta > 1 ? 1.2 : 1.1;\n var scale = wheelDelta > 0 ? factor : 1 / factor;\n this._checkTriggerMoveZoom(this, 'zoom', 'zoomOnMouseWheel', e, {\n scale: scale,\n originX: originX,\n originY: originY,\n isAvailableBehavior: null\n });\n }\n if (shouldMove) {\n // FIXME: Should do more test in different environment.\n var absDelta = Math.abs(wheelDelta);\n // wheelDelta of mouse wheel is bigger than touch pad.\n var scrollDelta = (wheelDelta > 0 ? 1 : -1) * (absDelta > 3 ? 0.4 : absDelta > 1 ? 0.15 : 0.05);\n this._checkTriggerMoveZoom(this, 'scrollMove', 'moveOnMouseWheel', e, {\n scrollDelta: scrollDelta,\n originX: originX,\n originY: originY,\n isAvailableBehavior: null\n });\n }\n };\n RoamController.prototype._pinchHandler = function (e) {\n if (interactionMutex.isTaken(this._zr, 'globalPan') || eventConsumed(e)) {\n return;\n }\n var scale = e.pinchScale > 1 ? 1.1 : 1 / 1.1;\n this._checkTriggerMoveZoom(this, 'zoom', null, e, {\n scale: scale,\n originX: e.pinchX,\n originY: e.pinchY,\n isAvailableBehavior: null\n });\n };\n RoamController.prototype._checkTriggerMoveZoom = function (controller, eventName, behaviorToCheck, e, contollerEvent) {\n if (controller._checkPointer(e, contollerEvent.originX, contollerEvent.originY)) {\n // When mouse is out of roamController rect,\n // default befavoius should not be be disabled, otherwise\n // page sliding is disabled, contrary to expectation.\n eventTool.stop(e.event);\n e.__ecRoamConsumed = true;\n trigger(controller, eventName, behaviorToCheck, e, contollerEvent);\n }\n };\n return RoamController;\n}(Eventful);\nfunction eventConsumed(e) {\n return e.__ecRoamConsumed;\n}\nvar innerZrStore = makeInner();\nfunction ensureZrStore(zr) {\n var store = innerZrStore(zr);\n store.roam = store.roam || {};\n store.uniform = store.uniform || {};\n return store;\n}\n/**\n * Listeners are sorted by z2/z/zlevel in descending order.\n * This decides the precedence between different roam controllers if they are overlapped.\n *\n * [MEMO]: It's not easy to perfectly reconcile the conflicts caused by overlap.\n * - Consider cases:\n * - Multiple roam controllers overlapped.\n * - Usually only the topmost can trigger roam.\n * - Roam controllers overlap with other zr elements:\n * - zr elements are relevant or irrelevent to the host of the roam controller. e.g., axis split line\n * or series elements is relevant to a cartesian and should trigger roam.\n * - zr elements is above or below the roam controller host, which affects the precedence of interaction.\n * - zr elements may not silent only for triggering tooltip by hovering, which is available to roam;\n * or may not silent for click, where roam is not preferable.\n * - Approach - `addRoamZrListener+pointerChecker+onIrrelevantElement` (currently used):\n * - Resolve the precedence between different roam controllers\n * - But cannot prevent the handling on other zr elements that under the roam controller in z-order.\n * - Approach - \"use an invisible zr elements to receive the zr events to trigger roam\":\n * - More complicated in impl.\n * - May cause bad cases where zr event cannot be receive due to other non-silient zr elements covering it.\n */\nfunction addRoamZrListener(zr, eventType, listener, zInfoParsed) {\n var store = ensureZrStore(zr);\n var roam = store.roam;\n var listenerList = roam[eventType] = roam[eventType] || [];\n var idx = 0;\n for (; idx < listenerList.length; idx++) {\n var currZInfo = listenerList[idx].zInfoParsed;\n if ((currZInfo.zlevel - zInfoParsed.zlevel || currZInfo.z - zInfoParsed.z || currZInfo.z2 - zInfoParsed.z2\n // If all equals, the latter added one has a higher precedence.\n ) <= 0) {\n break;\n }\n }\n listenerList.splice(idx, 0, {\n listener: listener,\n zInfoParsed: zInfoParsed\n });\n ensureUniformListener(zr, eventType);\n}\nfunction removeRoamZrListener(zr, eventType, listener) {\n var store = ensureZrStore(zr);\n var listenerList = store.roam[eventType] || [];\n for (var idx = 0; idx < listenerList.length; idx++) {\n if (listenerList[idx].listener === listener) {\n listenerList.splice(idx, 1);\n if (!listenerList.length) {\n removeUniformListener(zr, eventType);\n }\n return;\n }\n }\n}\nfunction ensureUniformListener(zr, eventType) {\n var store = ensureZrStore(zr);\n if (!store.uniform[eventType]) {\n zr.on(eventType, store.uniform[eventType] = function (event) {\n var listenerList = store.roam[eventType];\n if (listenerList) {\n for (var i = 0; i < listenerList.length; i++) {\n listenerList[i].listener(event);\n }\n }\n });\n }\n}\nfunction removeUniformListener(zr, eventType) {\n var store = ensureZrStore(zr);\n var uniform = store.uniform;\n if (uniform[eventType]) {\n zr.off(eventType, uniform[eventType]);\n uniform[eventType] = null;\n }\n}\nfunction trigger(controller, eventName, behaviorToCheck, e, contollerEvent) {\n // Also provide behavior checker for event listener, for some case that\n // multiple components share one listener.\n contollerEvent.isAvailableBehavior = bind(isAvailableBehavior, null, behaviorToCheck, e);\n // TODO should not have type issue.\n controller.trigger(eventName, contollerEvent);\n}\n// settings: {\n// zoomOnMouseWheel\n// moveOnMouseMove\n// moveOnMouseWheel\n// }\n// The value can be: true / false / 'shift' / 'ctrl' / 'alt'.\nfunction isAvailableBehavior(behaviorToCheck, e, settings) {\n var setting = settings[behaviorToCheck];\n return !behaviorToCheck || setting && (!isString(setting) || e.event[setting + 'Key']);\n}\nexport default RoamController;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { BoundingRect } from '../../util/graphic.js';\n/**\n * [CAVEAT] `updateViewOnPan` and `updateViewOnZoom` modifies the group transform directly,\n * but the 'center' and 'zoom' in echarts option and 'View' coordinate system are not updated yet,\n * which must be performed later in 'xxxRoam' action by calling `updateCenterAndZoom`.\n * @see {updateCenterAndZoomInAction}\n */\nexport function updateViewOnPan(controllerHost, dx, dy) {\n var target = controllerHost.target;\n target.x += dx;\n target.y += dy;\n target.dirty();\n}\nexport function updateViewOnZoom(controllerHost, zoomDelta, zoomX, zoomY) {\n var target = controllerHost.target;\n var zoomLimit = controllerHost.zoomLimit;\n var newZoom = controllerHost.zoom = controllerHost.zoom || 1;\n newZoom *= zoomDelta;\n newZoom = clampByZoomLimit(newZoom, zoomLimit);\n var zoomScale = newZoom / controllerHost.zoom;\n controllerHost.zoom = newZoom;\n zoomTransformableByOrigin(target, zoomX, zoomY, zoomScale);\n target.dirty();\n}\n/**\n * A abstraction for some similar impl in roaming.\n */\nexport function updateController(seriesModel, api, pointerCheckerEl, controller, controllerHost, clipRect) {\n var tmpRect = new BoundingRect(0, 0, 0, 0);\n controller.enable(seriesModel.get('roam'), {\n api: api,\n zInfo: {\n component: seriesModel\n },\n triggerInfo: {\n roamTrigger: seriesModel.get('roamTrigger'),\n isInSelf: function (e, x, y) {\n tmpRect.copy(pointerCheckerEl.getBoundingRect());\n tmpRect.applyTransform(pointerCheckerEl.getComputedTransform());\n return tmpRect.contain(x, y);\n },\n isInClip: function (e, x, y) {\n return !clipRect || clipRect.contain(x, y);\n }\n }\n });\n controllerHost.zoomLimit = seriesModel.get('scaleLimit');\n var coordinate = seriesModel.coordinateSystem;\n controllerHost.zoom = coordinate ? coordinate.getZoom() : 1;\n var type = seriesModel.subType + 'Roam';\n controller.off('pan').off('zoom').on('pan', function (e) {\n updateViewOnPan(controllerHost, e.dx, e.dy);\n api.dispatchAction({\n seriesId: seriesModel.id,\n type: type,\n dx: e.dx,\n dy: e.dy\n });\n }).on('zoom', function (e) {\n /**\n * FIXME: should do nothing except `api.dispatchAction` here, the other logic\n * should be performed in the action handler and `updateTransform`; otherwise,\n * they are inconsistent if user triggers this action explicitly.\n */\n updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY);\n api.dispatchAction({\n seriesId: seriesModel.id,\n type: type,\n zoom: e.scale,\n originX: e.originX,\n originY: e.originY\n });\n // Only update label layout on zoom\n api.updateLabelLayout();\n });\n}\nfunction getCenterCoord(view, point) {\n // Use projected coord as center because it's linear.\n return view.pointToProjected ? view.pointToProjected(point) : view.pointToData(point);\n}\n/**\n * Should be called only in action handler.\n * @see {updateViewOnPan|updateViewOnZoom}\n */\nexport function updateCenterAndZoomInAction(view, payload, zoomLimit) {\n var previousZoom = view.getZoom();\n var center = view.getCenter();\n var deltaZoom = payload.zoom;\n var point = view.projectedToPoint ? view.projectedToPoint(center) : view.dataToPoint(center);\n if (payload.dx != null && payload.dy != null) {\n point[0] -= payload.dx;\n point[1] -= payload.dy;\n view.setCenter(getCenterCoord(view, point));\n }\n if (deltaZoom != null) {\n deltaZoom = clampByZoomLimit(previousZoom * deltaZoom, zoomLimit) / previousZoom;\n zoomTransformableByOrigin(view, payload.originX, payload.originY, deltaZoom);\n view.updateTransform();\n // [NOTICE] Tricky: `getCetnerCoord` uses `this.invTransform` modified by the `updateTransform` above.\n view.setCenter(getCenterCoord(view, point));\n view.setZoom(deltaZoom * previousZoom);\n }\n return {\n center: view.getCenter(),\n zoom: view.getZoom()\n };\n}\nfunction zoomTransformableByOrigin(target, originX, originY, deltaZoom) {\n // Keep the mouse center when scaling.\n target.x -= (originX - target.x) * (deltaZoom - 1);\n target.y -= (originY - target.y) * (deltaZoom - 1);\n target.scaleX *= deltaZoom;\n target.scaleY *= deltaZoom;\n}\nexport function clampByZoomLimit(zoom, zoomLimit) {\n if (zoomLimit) {\n var zoomMin = zoomLimit.min || 0;\n var zoomMax = zoomLimit.max || Infinity;\n zoom = Math.max(Math.min(zoomMax, zoom), zoomMin);\n }\n return zoom;\n}","import { isString } from '../core/util.js';\nexport function parseXML(svg) {\n if (isString(svg)) {\n var parser = new DOMParser();\n svg = parser.parseFromString(svg, 'text/xml');\n }\n var svgNode = svg;\n if (svgNode.nodeType === 9) {\n svgNode = svgNode.firstChild;\n }\n while (svgNode.nodeName.toLowerCase() !== 'svg' || svgNode.nodeType !== 1) {\n svgNode = svgNode.nextSibling;\n }\n return svgNode;\n}\n","import Group from '../graphic/Group.js';\nimport ZRImage from '../graphic/Image.js';\nimport Circle from '../graphic/shape/Circle.js';\nimport Rect from '../graphic/shape/Rect.js';\nimport Ellipse from '../graphic/shape/Ellipse.js';\nimport Line from '../graphic/shape/Line.js';\nimport Polygon from '../graphic/shape/Polygon.js';\nimport Polyline from '../graphic/shape/Polyline.js';\nimport * as matrix from '../core/matrix.js';\nimport { createFromString } from './path.js';\nimport { defaults, trim, each, map, keys, hasOwn } from '../core/util.js';\nimport LinearGradient from '../graphic/LinearGradient.js';\nimport RadialGradient from '../graphic/RadialGradient.js';\nimport TSpan from '../graphic/TSpan.js';\nimport { parseXML } from './parseXML.js';\nimport * as colorTool from './color.js';\n;\nvar nodeParsers;\nvar INHERITABLE_STYLE_ATTRIBUTES_MAP = {\n 'fill': 'fill',\n 'stroke': 'stroke',\n 'stroke-width': 'lineWidth',\n 'opacity': 'opacity',\n 'fill-opacity': 'fillOpacity',\n 'stroke-opacity': 'strokeOpacity',\n 'stroke-dasharray': 'lineDash',\n 'stroke-dashoffset': 'lineDashOffset',\n 'stroke-linecap': 'lineCap',\n 'stroke-linejoin': 'lineJoin',\n 'stroke-miterlimit': 'miterLimit',\n 'font-family': 'fontFamily',\n 'font-size': 'fontSize',\n 'font-style': 'fontStyle',\n 'font-weight': 'fontWeight',\n 'text-anchor': 'textAlign',\n 'visibility': 'visibility',\n 'display': 'display'\n};\nvar INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS = keys(INHERITABLE_STYLE_ATTRIBUTES_MAP);\nvar SELF_STYLE_ATTRIBUTES_MAP = {\n 'alignment-baseline': 'textBaseline',\n 'stop-color': 'stopColor'\n};\nvar SELF_STYLE_ATTRIBUTES_MAP_KEYS = keys(SELF_STYLE_ATTRIBUTES_MAP);\nvar SVGParser = (function () {\n function SVGParser() {\n this._defs = {};\n this._root = null;\n }\n SVGParser.prototype.parse = function (xml, opt) {\n opt = opt || {};\n var svg = parseXML(xml);\n if (process.env.NODE_ENV !== 'production') {\n if (!svg) {\n throw new Error('Illegal svg');\n }\n }\n this._defsUsePending = [];\n var root = new Group();\n this._root = root;\n var named = [];\n var viewBox = svg.getAttribute('viewBox') || '';\n var width = parseFloat((svg.getAttribute('width') || opt.width));\n var height = parseFloat((svg.getAttribute('height') || opt.height));\n isNaN(width) && (width = null);\n isNaN(height) && (height = null);\n parseAttributes(svg, root, null, true, false);\n var child = svg.firstChild;\n while (child) {\n this._parseNode(child, root, named, null, false, false);\n child = child.nextSibling;\n }\n applyDefs(this._defs, this._defsUsePending);\n this._defsUsePending = [];\n var viewBoxRect;\n var viewBoxTransform;\n if (viewBox) {\n var viewBoxArr = splitNumberSequence(viewBox);\n if (viewBoxArr.length >= 4) {\n viewBoxRect = {\n x: parseFloat((viewBoxArr[0] || 0)),\n y: parseFloat((viewBoxArr[1] || 0)),\n width: parseFloat(viewBoxArr[2]),\n height: parseFloat(viewBoxArr[3])\n };\n }\n }\n if (viewBoxRect && width != null && height != null) {\n viewBoxTransform = makeViewBoxTransform(viewBoxRect, { x: 0, y: 0, width: width, height: height });\n if (!opt.ignoreViewBox) {\n var elRoot = root;\n root = new Group();\n root.add(elRoot);\n elRoot.scaleX = elRoot.scaleY = viewBoxTransform.scale;\n elRoot.x = viewBoxTransform.x;\n elRoot.y = viewBoxTransform.y;\n }\n }\n if (!opt.ignoreRootClip && width != null && height != null) {\n root.setClipPath(new Rect({\n shape: { x: 0, y: 0, width: width, height: height }\n }));\n }\n return {\n root: root,\n width: width,\n height: height,\n viewBoxRect: viewBoxRect,\n viewBoxTransform: viewBoxTransform,\n named: named\n };\n };\n SVGParser.prototype._parseNode = function (xmlNode, parentGroup, named, namedFrom, isInDefs, isInText) {\n var nodeName = xmlNode.nodeName.toLowerCase();\n var el;\n var namedFromForSub = namedFrom;\n if (nodeName === 'defs') {\n isInDefs = true;\n }\n if (nodeName === 'text') {\n isInText = true;\n }\n if (nodeName === 'defs' || nodeName === 'switch') {\n el = parentGroup;\n }\n else {\n if (!isInDefs) {\n var parser_1 = nodeParsers[nodeName];\n if (parser_1 && hasOwn(nodeParsers, nodeName)) {\n el = parser_1.call(this, xmlNode, parentGroup);\n var nameAttr = xmlNode.getAttribute('name');\n if (nameAttr) {\n var newNamed = {\n name: nameAttr,\n namedFrom: null,\n svgNodeTagLower: nodeName,\n el: el\n };\n named.push(newNamed);\n if (nodeName === 'g') {\n namedFromForSub = newNamed;\n }\n }\n else if (namedFrom) {\n named.push({\n name: namedFrom.name,\n namedFrom: namedFrom,\n svgNodeTagLower: nodeName,\n el: el\n });\n }\n parentGroup.add(el);\n }\n }\n var parser = paintServerParsers[nodeName];\n if (parser && hasOwn(paintServerParsers, nodeName)) {\n var def = parser.call(this, xmlNode);\n var id = xmlNode.getAttribute('id');\n if (id) {\n this._defs[id] = def;\n }\n }\n }\n if (el && el.isGroup) {\n var child = xmlNode.firstChild;\n while (child) {\n if (child.nodeType === 1) {\n this._parseNode(child, el, named, namedFromForSub, isInDefs, isInText);\n }\n else if (child.nodeType === 3 && isInText) {\n this._parseText(child, el);\n }\n child = child.nextSibling;\n }\n }\n };\n SVGParser.prototype._parseText = function (xmlNode, parentGroup) {\n var text = new TSpan({\n style: {\n text: xmlNode.textContent\n },\n silent: true,\n x: this._textX || 0,\n y: this._textY || 0\n });\n inheritStyle(parentGroup, text);\n parseAttributes(xmlNode, text, this._defsUsePending, false, false);\n applyTextAlignment(text, parentGroup);\n var textStyle = text.style;\n var fontSize = textStyle.fontSize;\n if (fontSize && fontSize < 9) {\n textStyle.fontSize = 9;\n text.scaleX *= fontSize / 9;\n text.scaleY *= fontSize / 9;\n }\n var font = (textStyle.fontSize || textStyle.fontFamily) && [\n textStyle.fontStyle,\n textStyle.fontWeight,\n (textStyle.fontSize || 12) + 'px',\n textStyle.fontFamily || 'sans-serif'\n ].join(' ');\n textStyle.font = font;\n var rect = text.getBoundingRect();\n this._textX += rect.width;\n parentGroup.add(text);\n return text;\n };\n SVGParser.internalField = (function () {\n nodeParsers = {\n 'g': function (xmlNode, parentGroup) {\n var g = new Group();\n inheritStyle(parentGroup, g);\n parseAttributes(xmlNode, g, this._defsUsePending, false, false);\n return g;\n },\n 'rect': function (xmlNode, parentGroup) {\n var rect = new Rect();\n inheritStyle(parentGroup, rect);\n parseAttributes(xmlNode, rect, this._defsUsePending, false, false);\n rect.setShape({\n x: parseFloat(xmlNode.getAttribute('x') || '0'),\n y: parseFloat(xmlNode.getAttribute('y') || '0'),\n width: parseFloat(xmlNode.getAttribute('width') || '0'),\n height: parseFloat(xmlNode.getAttribute('height') || '0')\n });\n rect.silent = true;\n return rect;\n },\n 'circle': function (xmlNode, parentGroup) {\n var circle = new Circle();\n inheritStyle(parentGroup, circle);\n parseAttributes(xmlNode, circle, this._defsUsePending, false, false);\n circle.setShape({\n cx: parseFloat(xmlNode.getAttribute('cx') || '0'),\n cy: parseFloat(xmlNode.getAttribute('cy') || '0'),\n r: parseFloat(xmlNode.getAttribute('r') || '0')\n });\n circle.silent = true;\n return circle;\n },\n 'line': function (xmlNode, parentGroup) {\n var line = new Line();\n inheritStyle(parentGroup, line);\n parseAttributes(xmlNode, line, this._defsUsePending, false, false);\n line.setShape({\n x1: parseFloat(xmlNode.getAttribute('x1') || '0'),\n y1: parseFloat(xmlNode.getAttribute('y1') || '0'),\n x2: parseFloat(xmlNode.getAttribute('x2') || '0'),\n y2: parseFloat(xmlNode.getAttribute('y2') || '0')\n });\n line.silent = true;\n return line;\n },\n 'ellipse': function (xmlNode, parentGroup) {\n var ellipse = new Ellipse();\n inheritStyle(parentGroup, ellipse);\n parseAttributes(xmlNode, ellipse, this._defsUsePending, false, false);\n ellipse.setShape({\n cx: parseFloat(xmlNode.getAttribute('cx') || '0'),\n cy: parseFloat(xmlNode.getAttribute('cy') || '0'),\n rx: parseFloat(xmlNode.getAttribute('rx') || '0'),\n ry: parseFloat(xmlNode.getAttribute('ry') || '0')\n });\n ellipse.silent = true;\n return ellipse;\n },\n 'polygon': function (xmlNode, parentGroup) {\n var pointsStr = xmlNode.getAttribute('points');\n var pointsArr;\n if (pointsStr) {\n pointsArr = parsePoints(pointsStr);\n }\n var polygon = new Polygon({\n shape: {\n points: pointsArr || []\n },\n silent: true\n });\n inheritStyle(parentGroup, polygon);\n parseAttributes(xmlNode, polygon, this._defsUsePending, false, false);\n return polygon;\n },\n 'polyline': function (xmlNode, parentGroup) {\n var pointsStr = xmlNode.getAttribute('points');\n var pointsArr;\n if (pointsStr) {\n pointsArr = parsePoints(pointsStr);\n }\n var polyline = new Polyline({\n shape: {\n points: pointsArr || []\n },\n silent: true\n });\n inheritStyle(parentGroup, polyline);\n parseAttributes(xmlNode, polyline, this._defsUsePending, false, false);\n return polyline;\n },\n 'image': function (xmlNode, parentGroup) {\n var img = new ZRImage();\n inheritStyle(parentGroup, img);\n parseAttributes(xmlNode, img, this._defsUsePending, false, false);\n img.setStyle({\n image: xmlNode.getAttribute('xlink:href') || xmlNode.getAttribute('href'),\n x: +xmlNode.getAttribute('x'),\n y: +xmlNode.getAttribute('y'),\n width: +xmlNode.getAttribute('width'),\n height: +xmlNode.getAttribute('height')\n });\n img.silent = true;\n return img;\n },\n 'text': function (xmlNode, parentGroup) {\n var x = xmlNode.getAttribute('x') || '0';\n var y = xmlNode.getAttribute('y') || '0';\n var dx = xmlNode.getAttribute('dx') || '0';\n var dy = xmlNode.getAttribute('dy') || '0';\n this._textX = parseFloat(x) + parseFloat(dx);\n this._textY = parseFloat(y) + parseFloat(dy);\n var g = new Group();\n inheritStyle(parentGroup, g);\n parseAttributes(xmlNode, g, this._defsUsePending, false, true);\n return g;\n },\n 'tspan': function (xmlNode, parentGroup) {\n var x = xmlNode.getAttribute('x');\n var y = xmlNode.getAttribute('y');\n if (x != null) {\n this._textX = parseFloat(x);\n }\n if (y != null) {\n this._textY = parseFloat(y);\n }\n var dx = xmlNode.getAttribute('dx') || '0';\n var dy = xmlNode.getAttribute('dy') || '0';\n var g = new Group();\n inheritStyle(parentGroup, g);\n parseAttributes(xmlNode, g, this._defsUsePending, false, true);\n this._textX += parseFloat(dx);\n this._textY += parseFloat(dy);\n return g;\n },\n 'path': function (xmlNode, parentGroup) {\n var d = xmlNode.getAttribute('d') || '';\n var path = createFromString(d);\n inheritStyle(parentGroup, path);\n parseAttributes(xmlNode, path, this._defsUsePending, false, false);\n path.silent = true;\n return path;\n }\n };\n })();\n return SVGParser;\n}());\nvar paintServerParsers = {\n 'lineargradient': function (xmlNode) {\n var x1 = parseInt(xmlNode.getAttribute('x1') || '0', 10);\n var y1 = parseInt(xmlNode.getAttribute('y1') || '0', 10);\n var x2 = parseInt(xmlNode.getAttribute('x2') || '10', 10);\n var y2 = parseInt(xmlNode.getAttribute('y2') || '0', 10);\n var gradient = new LinearGradient(x1, y1, x2, y2);\n parsePaintServerUnit(xmlNode, gradient);\n parseGradientColorStops(xmlNode, gradient);\n return gradient;\n },\n 'radialgradient': function (xmlNode) {\n var cx = parseInt(xmlNode.getAttribute('cx') || '0', 10);\n var cy = parseInt(xmlNode.getAttribute('cy') || '0', 10);\n var r = parseInt(xmlNode.getAttribute('r') || '0', 10);\n var gradient = new RadialGradient(cx, cy, r);\n parsePaintServerUnit(xmlNode, gradient);\n parseGradientColorStops(xmlNode, gradient);\n return gradient;\n }\n};\nfunction parsePaintServerUnit(xmlNode, gradient) {\n var gradientUnits = xmlNode.getAttribute('gradientUnits');\n if (gradientUnits === 'userSpaceOnUse') {\n gradient.global = true;\n }\n}\nfunction parseGradientColorStops(xmlNode, gradient) {\n var stop = xmlNode.firstChild;\n while (stop) {\n if (stop.nodeType === 1\n && stop.nodeName.toLocaleLowerCase() === 'stop') {\n var offsetStr = stop.getAttribute('offset');\n var offset = void 0;\n if (offsetStr && offsetStr.indexOf('%') > 0) {\n offset = parseInt(offsetStr, 10) / 100;\n }\n else if (offsetStr) {\n offset = parseFloat(offsetStr);\n }\n else {\n offset = 0;\n }\n var styleVals = {};\n parseInlineStyle(stop, styleVals, styleVals);\n var stopColor = styleVals.stopColor\n || stop.getAttribute('stop-color')\n || '#000000';\n var stopOpacity = styleVals.stopOpacity\n || stop.getAttribute('stop-opacity');\n if (stopOpacity) {\n var rgba = colorTool.parse(stopColor);\n var stopColorOpacity = rgba && rgba[3];\n if (stopColorOpacity) {\n rgba[3] *= colorTool.parseCssFloat(stopOpacity);\n stopColor = colorTool.stringify(rgba, 'rgba');\n }\n }\n gradient.colorStops.push({\n offset: offset,\n color: stopColor\n });\n }\n stop = stop.nextSibling;\n }\n}\nfunction inheritStyle(parent, child) {\n if (parent && parent.__inheritedStyle) {\n if (!child.__inheritedStyle) {\n child.__inheritedStyle = {};\n }\n defaults(child.__inheritedStyle, parent.__inheritedStyle);\n }\n}\nfunction parsePoints(pointsString) {\n var list = splitNumberSequence(pointsString);\n var points = [];\n for (var i = 0; i < list.length; i += 2) {\n var x = parseFloat(list[i]);\n var y = parseFloat(list[i + 1]);\n points.push([x, y]);\n }\n return points;\n}\nfunction parseAttributes(xmlNode, el, defsUsePending, onlyInlineStyle, isTextGroup) {\n var disp = el;\n var inheritedStyle = disp.__inheritedStyle = disp.__inheritedStyle || {};\n var selfStyle = {};\n if (xmlNode.nodeType === 1) {\n parseTransformAttribute(xmlNode, el);\n parseInlineStyle(xmlNode, inheritedStyle, selfStyle);\n if (!onlyInlineStyle) {\n parseAttributeStyle(xmlNode, inheritedStyle, selfStyle);\n }\n }\n disp.style = disp.style || {};\n if (inheritedStyle.fill != null) {\n disp.style.fill = getFillStrokeStyle(disp, 'fill', inheritedStyle.fill, defsUsePending);\n }\n if (inheritedStyle.stroke != null) {\n disp.style.stroke = getFillStrokeStyle(disp, 'stroke', inheritedStyle.stroke, defsUsePending);\n }\n each([\n 'lineWidth', 'opacity', 'fillOpacity', 'strokeOpacity', 'miterLimit', 'fontSize'\n ], function (propName) {\n if (inheritedStyle[propName] != null) {\n disp.style[propName] = parseFloat(inheritedStyle[propName]);\n }\n });\n each([\n 'lineDashOffset', 'lineCap', 'lineJoin', 'fontWeight', 'fontFamily', 'fontStyle', 'textAlign'\n ], function (propName) {\n if (inheritedStyle[propName] != null) {\n disp.style[propName] = inheritedStyle[propName];\n }\n });\n if (isTextGroup) {\n disp.__selfStyle = selfStyle;\n }\n if (inheritedStyle.lineDash) {\n disp.style.lineDash = map(splitNumberSequence(inheritedStyle.lineDash), function (str) {\n return parseFloat(str);\n });\n }\n if (inheritedStyle.visibility === 'hidden' || inheritedStyle.visibility === 'collapse') {\n disp.invisible = true;\n }\n if (inheritedStyle.display === 'none') {\n disp.ignore = true;\n }\n}\nfunction applyTextAlignment(text, parentGroup) {\n var parentSelfStyle = parentGroup.__selfStyle;\n if (parentSelfStyle) {\n var textBaseline = parentSelfStyle.textBaseline;\n var zrTextBaseline = textBaseline;\n if (!textBaseline || textBaseline === 'auto') {\n zrTextBaseline = 'alphabetic';\n }\n else if (textBaseline === 'baseline') {\n zrTextBaseline = 'alphabetic';\n }\n else if (textBaseline === 'before-edge' || textBaseline === 'text-before-edge') {\n zrTextBaseline = 'top';\n }\n else if (textBaseline === 'after-edge' || textBaseline === 'text-after-edge') {\n zrTextBaseline = 'bottom';\n }\n else if (textBaseline === 'central' || textBaseline === 'mathematical') {\n zrTextBaseline = 'middle';\n }\n text.style.textBaseline = zrTextBaseline;\n }\n var parentInheritedStyle = parentGroup.__inheritedStyle;\n if (parentInheritedStyle) {\n var textAlign = parentInheritedStyle.textAlign;\n var zrTextAlign = textAlign;\n if (textAlign) {\n if (textAlign === 'middle') {\n zrTextAlign = 'center';\n }\n text.style.textAlign = zrTextAlign;\n }\n }\n}\nvar urlRegex = /^url\\(\\s*#(.*?)\\)/;\nfunction getFillStrokeStyle(el, method, str, defsUsePending) {\n var urlMatch = str && str.match(urlRegex);\n if (urlMatch) {\n var url = trim(urlMatch[1]);\n defsUsePending.push([el, method, url]);\n return;\n }\n if (str === 'none') {\n str = null;\n }\n return str;\n}\nfunction applyDefs(defs, defsUsePending) {\n for (var i = 0; i < defsUsePending.length; i++) {\n var item = defsUsePending[i];\n item[0].style[item[1]] = defs[item[2]];\n }\n}\nvar numberReg = /-?([0-9]*\\.)?[0-9]+([eE]-?[0-9]+)?/g;\nfunction splitNumberSequence(rawStr) {\n return rawStr.match(numberReg) || [];\n}\nvar transformRegex = /(translate|scale|rotate|skewX|skewY|matrix)\\(([\\-\\s0-9\\.eE,]*)\\)/g;\nvar DEGREE_TO_ANGLE = Math.PI / 180;\nfunction parseTransformAttribute(xmlNode, node) {\n var transform = xmlNode.getAttribute('transform');\n if (transform) {\n transform = transform.replace(/,/g, ' ');\n var transformOps_1 = [];\n var mt = null;\n transform.replace(transformRegex, function (str, type, value) {\n transformOps_1.push(type, value);\n return '';\n });\n for (var i = transformOps_1.length - 1; i > 0; i -= 2) {\n var value = transformOps_1[i];\n var type = transformOps_1[i - 1];\n var valueArr = splitNumberSequence(value);\n mt = mt || matrix.create();\n switch (type) {\n case 'translate':\n matrix.translate(mt, mt, [parseFloat(valueArr[0]), parseFloat(valueArr[1] || '0')]);\n break;\n case 'scale':\n matrix.scale(mt, mt, [parseFloat(valueArr[0]), parseFloat(valueArr[1] || valueArr[0])]);\n break;\n case 'rotate':\n matrix.rotate(mt, mt, -parseFloat(valueArr[0]) * DEGREE_TO_ANGLE, [\n parseFloat(valueArr[1] || '0'),\n parseFloat(valueArr[2] || '0')\n ]);\n break;\n case 'skewX':\n var sx = Math.tan(parseFloat(valueArr[0]) * DEGREE_TO_ANGLE);\n matrix.mul(mt, [1, 0, sx, 1, 0, 0], mt);\n break;\n case 'skewY':\n var sy = Math.tan(parseFloat(valueArr[0]) * DEGREE_TO_ANGLE);\n matrix.mul(mt, [1, sy, 0, 1, 0, 0], mt);\n break;\n case 'matrix':\n mt[0] = parseFloat(valueArr[0]);\n mt[1] = parseFloat(valueArr[1]);\n mt[2] = parseFloat(valueArr[2]);\n mt[3] = parseFloat(valueArr[3]);\n mt[4] = parseFloat(valueArr[4]);\n mt[5] = parseFloat(valueArr[5]);\n break;\n }\n }\n node.setLocalTransform(mt);\n }\n}\nvar styleRegex = /([^\\s:;]+)\\s*:\\s*([^:;]+)/g;\nfunction parseInlineStyle(xmlNode, inheritableStyleResult, selfStyleResult) {\n var style = xmlNode.getAttribute('style');\n if (!style) {\n return;\n }\n styleRegex.lastIndex = 0;\n var styleRegResult;\n while ((styleRegResult = styleRegex.exec(style)) != null) {\n var svgStlAttr = styleRegResult[1];\n var zrInheritableStlAttr = hasOwn(INHERITABLE_STYLE_ATTRIBUTES_MAP, svgStlAttr)\n ? INHERITABLE_STYLE_ATTRIBUTES_MAP[svgStlAttr]\n : null;\n if (zrInheritableStlAttr) {\n inheritableStyleResult[zrInheritableStlAttr] = styleRegResult[2];\n }\n var zrSelfStlAttr = hasOwn(SELF_STYLE_ATTRIBUTES_MAP, svgStlAttr)\n ? SELF_STYLE_ATTRIBUTES_MAP[svgStlAttr]\n : null;\n if (zrSelfStlAttr) {\n selfStyleResult[zrSelfStlAttr] = styleRegResult[2];\n }\n }\n}\nfunction parseAttributeStyle(xmlNode, inheritableStyleResult, selfStyleResult) {\n for (var i = 0; i < INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS.length; i++) {\n var svgAttrName = INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS[i];\n var attrValue = xmlNode.getAttribute(svgAttrName);\n if (attrValue != null) {\n inheritableStyleResult[INHERITABLE_STYLE_ATTRIBUTES_MAP[svgAttrName]] = attrValue;\n }\n }\n for (var i = 0; i < SELF_STYLE_ATTRIBUTES_MAP_KEYS.length; i++) {\n var svgAttrName = SELF_STYLE_ATTRIBUTES_MAP_KEYS[i];\n var attrValue = xmlNode.getAttribute(svgAttrName);\n if (attrValue != null) {\n selfStyleResult[SELF_STYLE_ATTRIBUTES_MAP[svgAttrName]] = attrValue;\n }\n }\n}\nexport function makeViewBoxTransform(viewBoxRect, boundingRect) {\n var scaleX = boundingRect.width / viewBoxRect.width;\n var scaleY = boundingRect.height / viewBoxRect.height;\n var scale = Math.min(scaleX, scaleY);\n return {\n scale: scale,\n x: -(viewBoxRect.x + viewBoxRect.width / 2) * scale + (boundingRect.x + boundingRect.width / 2),\n y: -(viewBoxRect.y + viewBoxRect.height / 2) * scale + (boundingRect.y + boundingRect.height / 2)\n };\n}\nexport function parseSVG(xml, opt) {\n var parser = new SVGParser();\n return parser.parse(xml, opt);\n}\nexport { parseXML };\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { parseSVG, makeViewBoxTransform } from 'zrender/lib/tool/parseSVG.js';\nimport Group from 'zrender/lib/graphic/Group.js';\nimport Rect from 'zrender/lib/graphic/shape/Rect.js';\nimport { assert, createHashMap, each } from 'zrender/lib/core/util.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport { parseXML } from 'zrender/lib/tool/parseXML.js';\nimport { GeoSVGRegion } from './Region.js';\n/**\n * \"region available\" means that: enable users to set attribute `name=\"xxx\"` on those tags\n * to make it be a region.\n * 1. region styles and its label styles can be defined in echarts opton:\n * ```js\n * geo: {\n * regions: [{\n * name: 'xxx',\n * itemStyle: { ... },\n * label: { ... }\n * }, {\n * ...\n * },\n * ...]\n * };\n * ```\n * 2. name can be duplicated in different SVG tag. All of the tags with the same name share\n * a region option. For exampel if there are two <path> representing two lung lobes. They have\n * no common parents but both of them need to display label \"lung\" inside.\n */\nvar REGION_AVAILABLE_SVG_TAG_MAP = createHashMap(['rect', 'circle', 'line', 'ellipse', 'polygon', 'polyline', 'path',\n// <text> <tspan> are also enabled because some SVG might paint text itself,\n// but still need to trigger events or tooltip.\n'text', 'tspan',\n// <g> is also enabled because this case: if multiple tags share one name\n// and need label displayed, every tags will display the name, which is not\n// expected. So we can put them into a <g name=\"xxx\">. Thereby only one label\n// displayed and located based on the bounding rect of the <g>.\n'g']);\nvar GeoSVGResource = /** @class */function () {\n function GeoSVGResource(mapName, svg) {\n this.type = 'geoSVG';\n // All used graphics. key: hostKey, value: root\n this._usedGraphicMap = createHashMap();\n // All unused graphics.\n this._freedGraphics = [];\n this._mapName = mapName;\n // Only perform parse to XML object here, which might be time\n // consiming for large SVG.\n // Although convert XML to zrender element is also time consiming,\n // if we do it here, the clone of zrender elements has to be\n // required. So we do it once for each geo instance, util real\n // performance issues call for optimizing it.\n this._parsedXML = parseXML(svg);\n }\n GeoSVGResource.prototype.load = function /* nameMap: NameMap */\n () {\n // In the \"load\" stage, graphic need to be built to\n // get boundingRect for geo coordinate system.\n var firstGraphic = this._firstGraphic;\n // Create the return data structure only when first graphic created.\n // Because they will be used in geo coordinate system update stage,\n // and `regions` will be mounted at `geo` coordinate system,\n // in which there is no \"view\" info, so that it should better not to\n // make references to graphic elements.\n if (!firstGraphic) {\n firstGraphic = this._firstGraphic = this._buildGraphic(this._parsedXML);\n this._freedGraphics.push(firstGraphic);\n this._boundingRect = this._firstGraphic.boundingRect.clone();\n // PENDING: `nameMap` will not be supported until some real requirement come.\n // if (nameMap) {\n // named = applyNameMap(named, nameMap);\n // }\n var _a = createRegions(firstGraphic.named),\n regions = _a.regions,\n regionsMap = _a.regionsMap;\n this._regions = regions;\n this._regionsMap = regionsMap;\n }\n return {\n boundingRect: this._boundingRect,\n regions: this._regions,\n regionsMap: this._regionsMap\n };\n };\n GeoSVGResource.prototype._buildGraphic = function (svgXML) {\n var result;\n var rootFromParse;\n try {\n result = svgXML && parseSVG(svgXML, {\n ignoreViewBox: true,\n ignoreRootClip: true\n }) || {};\n rootFromParse = result.root;\n assert(rootFromParse != null);\n } catch (e) {\n throw new Error('Invalid svg format\\n' + e.message);\n }\n // Note: we keep the covenant that the root has no transform. So always add an extra root.\n var root = new Group();\n root.add(rootFromParse);\n root.isGeoSVGGraphicRoot = true;\n // [THE_RULE_OF_VIEWPORT_AND_VIEWBOX]\n //\n // Consider: `<svg width=\"...\" height=\"...\" viewBox=\"...\">`\n // - the `width/height` we call it `svgWidth/svgHeight` for short.\n // - `(0, 0, svgWidth, svgHeight)` defines the viewport of the SVG, or say,\n // \"viewport boundingRect\", or `boundingRect` for short.\n // - `viewBox` defines the transform from the real content ot the viewport.\n // `viewBox` has the same unit as the content of SVG.\n // If `viewBox` exists, a transform is defined, so the unit of `svgWidth/svgHeight` become\n // different from the content of SVG. Otherwise, they are the same.\n //\n // If both `svgWidth/svgHeight/viewBox` are specified in a SVG file, the transform rule will be:\n // 0. `boundingRect` is `(0, 0, svgWidth, svgHeight)`. Set it to Geo['_rect'] (View['_rect']).\n // 1. Make a transform from `viewBox` to `boundingRect`.\n // Note: only support `preserveAspectRatio 'xMidYMid'` here. That is, this transform will preserve\n // the aspect ratio.\n // 2. Make a transform from boundingRect to Geo['_viewRect'] (View['_viewRect'])\n // (`Geo`/`View` will do this job).\n // Note: this transform might not preserve aspect radio, which depending on how users specify\n // viewRect in echarts option (e.g., `geo.left/top/width/height` will not preserve aspect ratio,\n // but `geo.layoutCenter/layoutSize` will preserve aspect ratio).\n //\n // If `svgWidth/svgHeight` not specified, we use `viewBox` as the `boundingRect` to make the SVG\n // layout look good.\n //\n // If neither `svgWidth/svgHeight` nor `viewBox` are not specified, we calculate the boundingRect\n // of the SVG content and use them to make SVG layout look good.\n var svgWidth = result.width;\n var svgHeight = result.height;\n var viewBoxRect = result.viewBoxRect;\n var boundingRect = this._boundingRect;\n if (!boundingRect) {\n var bRectX = void 0;\n var bRectY = void 0;\n var bRectWidth = void 0;\n var bRectHeight = void 0;\n if (svgWidth != null) {\n bRectX = 0;\n bRectWidth = svgWidth;\n } else if (viewBoxRect) {\n bRectX = viewBoxRect.x;\n bRectWidth = viewBoxRect.width;\n }\n if (svgHeight != null) {\n bRectY = 0;\n bRectHeight = svgHeight;\n } else if (viewBoxRect) {\n bRectY = viewBoxRect.y;\n bRectHeight = viewBoxRect.height;\n }\n // If both viewBox and svgWidth/svgHeight not specified,\n // we have to determine how to layout those element to make them look good.\n if (bRectX == null || bRectY == null) {\n var calculatedBoundingRect = rootFromParse.getBoundingRect();\n if (bRectX == null) {\n bRectX = calculatedBoundingRect.x;\n bRectWidth = calculatedBoundingRect.width;\n }\n if (bRectY == null) {\n bRectY = calculatedBoundingRect.y;\n bRectHeight = calculatedBoundingRect.height;\n }\n }\n boundingRect = this._boundingRect = new BoundingRect(bRectX, bRectY, bRectWidth, bRectHeight);\n }\n if (viewBoxRect) {\n var viewBoxTransform = makeViewBoxTransform(viewBoxRect, boundingRect);\n // Only support `preserveAspectRatio 'xMidYMid'`\n rootFromParse.scaleX = rootFromParse.scaleY = viewBoxTransform.scale;\n rootFromParse.x = viewBoxTransform.x;\n rootFromParse.y = viewBoxTransform.y;\n }\n // SVG needs to clip based on `viewBox`. And some SVG files really rely on this feature.\n // They do not strictly confine all of the content inside a display rect, but deliberately\n // use a `viewBox` to define a displayable rect.\n // PENDING:\n // The drawback of the `setClipPath` here is: the region label (genereted by echarts) near the\n // edge might also be clipped, because region labels are put as `textContent` of the SVG path.\n root.setClipPath(new Rect({\n shape: boundingRect.plain()\n }));\n var named = [];\n each(result.named, function (namedItem) {\n if (REGION_AVAILABLE_SVG_TAG_MAP.get(namedItem.svgNodeTagLower) != null) {\n named.push(namedItem);\n setSilent(namedItem.el);\n }\n });\n return {\n root: root,\n boundingRect: boundingRect,\n named: named\n };\n };\n /**\n * Consider:\n * (1) One graphic element can not be shared by different `geoView` running simultaneously.\n * Notice, also need to consider multiple echarts instances share a `mapRecord`.\n * (2) Converting SVG to graphic elements is time consuming.\n * (3) In the current architecture, `load` should be called frequently to get boundingRect,\n * and it is called without view info.\n * So we maintain graphic elements in this module, and enables `view` to use/return these\n * graphics from/to the pool with it's uid.\n */\n GeoSVGResource.prototype.useGraphic = function (hostKey /* , nameMap: NameMap */) {\n var usedRootMap = this._usedGraphicMap;\n var svgGraphic = usedRootMap.get(hostKey);\n if (svgGraphic) {\n return svgGraphic;\n }\n svgGraphic = this._freedGraphics.pop()\n // use the first boundingRect to avoid duplicated boundingRect calculation.\n || this._buildGraphic(this._parsedXML);\n usedRootMap.set(hostKey, svgGraphic);\n // PENDING: `nameMap` will not be supported until some real requirement come.\n // `nameMap` can only be obtained from echarts option.\n // The original `named` must not be modified.\n // if (nameMap) {\n // svgGraphic = extend({}, svgGraphic);\n // svgGraphic.named = applyNameMap(svgGraphic.named, nameMap);\n // }\n return svgGraphic;\n };\n GeoSVGResource.prototype.freeGraphic = function (hostKey) {\n var usedRootMap = this._usedGraphicMap;\n var svgGraphic = usedRootMap.get(hostKey);\n if (svgGraphic) {\n usedRootMap.removeKey(hostKey);\n this._freedGraphics.push(svgGraphic);\n }\n };\n return GeoSVGResource;\n}();\nexport { GeoSVGResource };\nfunction setSilent(el) {\n // Only named element has silent: false, other elements should\n // act as background and has no user interaction.\n el.silent = false;\n // text|tspan will be converted to group.\n if (el.isGroup) {\n el.traverse(function (child) {\n child.silent = false;\n });\n }\n}\nfunction createRegions(named) {\n var regions = [];\n var regionsMap = createHashMap();\n // Create resions only for the first graphic.\n each(named, function (namedItem) {\n // Region has feature to calculate center for tooltip or other features.\n // If there is a <g name=\"xxx\">, the center should be the center of the\n // bounding rect of the g.\n if (namedItem.namedFrom != null) {\n return;\n }\n var region = new GeoSVGRegion(namedItem.name, namedItem.el);\n // PENDING: if `nameMap` supported, this region can not be mounted on\n // `this`, but can only be created each time `load()` called.\n regions.push(region);\n // PENDING: if multiple tag named with the same name, only one will be\n // found by `_regionsMap`. `_regionsMap` is used to find a coordinate\n // by name. We use `region.getCenter()` as the coordinate.\n regionsMap.set(namedItem.name, region);\n });\n return {\n regions: regions,\n regionsMap: regionsMap\n };\n}\n// PENDING: `nameMap` will not be supported until some real requirement come.\n// /**\n// * Use the alias in geoNameMap.\n// * The input `named` must not be modified.\n// */\n// function applyNameMap(\n// named: GeoSVGGraphicRecord['named'],\n// nameMap: NameMap\n// ): GeoSVGGraphicRecord['named'] {\n// const result = [] as GeoSVGGraphicRecord['named'];\n// for (let i = 0; i < named.length; i++) {\n// let regionGraphic = named[i];\n// const name = regionGraphic.name;\n// if (nameMap && nameMap.hasOwnProperty(name)) {\n// regionGraphic = extend({}, regionGraphic);\n// regionGraphic.name = name;\n// }\n// result.push(regionGraphic);\n// }\n// return result;\n// }","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Fix for 南海诸岛\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { GeoJSONRegion } from '../Region.js';\nvar geoCoord = [126, 25];\nvar nanhaiName = '南海诸岛';\nvar points = [[[0, 3.5], [7, 11.2], [15, 11.9], [30, 7], [42, 0.7], [52, 0.7], [56, 7.7], [59, 0.7], [64, 0.7], [64, 0], [5, 0], [0, 3.5]], [[13, 16.1], [19, 14.7], [16, 21.7], [11, 23.1], [13, 16.1]], [[12, 32.2], [14, 38.5], [15, 38.5], [13, 32.2], [12, 32.2]], [[16, 47.6], [12, 53.2], [13, 53.2], [18, 47.6], [16, 47.6]], [[6, 64.4], [8, 70], [9, 70], [8, 64.4], [6, 64.4]], [[23, 82.6], [29, 79.8], [30, 79.8], [25, 82.6], [23, 82.6]], [[37, 70.7], [43, 62.3], [44, 62.3], [39, 70.7], [37, 70.7]], [[48, 51.1], [51, 45.5], [53, 45.5], [50, 51.1], [48, 51.1]], [[51, 35], [51, 28.7], [53, 28.7], [53, 35], [51, 35]], [[52, 22.4], [55, 17.5], [56, 17.5], [53, 22.4], [52, 22.4]], [[58, 12.6], [62, 7], [63, 7], [60, 12.6], [58, 12.6]], [[0, 3.5], [0, 93.1], [64, 93.1], [64, 0], [63, 0], [63, 92.4], [1, 92.4], [1, 3.5], [0, 3.5]]];\nfor (var i = 0; i < points.length; i++) {\n for (var k = 0; k < points[i].length; k++) {\n points[i][k][0] /= 10.5;\n points[i][k][1] /= -10.5 / 0.75;\n points[i][k][0] += geoCoord[0];\n points[i][k][1] += geoCoord[1];\n }\n}\nexport default function fixNanhai(mapType, regions) {\n if (mapType === 'china') {\n for (var i = 0; i < regions.length; i++) {\n // Already exists.\n if (regions[i].name === nanhaiName) {\n return;\n }\n }\n regions.push(new GeoJSONRegion(nanhaiName, zrUtil.map(points, function (exterior) {\n return {\n type: 'polygon',\n exterior: exterior\n };\n }), geoCoord));\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar coordsOffsetMap = {\n '南海诸岛': [32, 80],\n // 全国\n '广东': [0, -10],\n '香港': [10, 5],\n '澳门': [-10, 10],\n // '北京': [-10, 0],\n '天津': [5, 5]\n};\nexport default function fixTextCoords(mapType, region) {\n if (mapType === 'china') {\n var coordFix = coordsOffsetMap[region.name];\n if (coordFix) {\n var cp = region.getCenter();\n cp[0] += coordFix[0] / 10.5;\n cp[1] += -coordFix[1] / (10.5 / 0.75);\n region.setCenter(cp);\n }\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Fix for 钓鱼岛\n// let Region = require('../Region');\n// let zrUtil = require('zrender/lib/core/util');\n// let geoCoord = [126, 25];\nvar points = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]];\nexport default function fixDiaoyuIsland(mapType, region) {\n if (mapType === 'china' && region.name === '台湾') {\n region.geometries.push({\n type: 'polygon',\n exterior: points[0]\n });\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, isString, createHashMap, hasOwn } from 'zrender/lib/core/util.js';\nimport parseGeoJson from './parseGeoJson.js';\n// Built-in GEO fixer.\nimport fixNanhai from './fix/nanhai.js';\nimport fixTextCoord from './fix/textCoord.js';\nimport fixDiaoyuIsland from './fix/diaoyuIsland.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nvar DEFAULT_NAME_PROPERTY = 'name';\nvar GeoJSONResource = /** @class */function () {\n function GeoJSONResource(mapName, geoJSON, specialAreas) {\n this.type = 'geoJSON';\n this._parsedMap = createHashMap();\n this._mapName = mapName;\n this._specialAreas = specialAreas;\n // PENDING: delay the parse to the first usage to rapid up the FMP?\n this._geoJSON = parseInput(geoJSON);\n }\n /**\n * @param nameMap can be null/undefined\n * @param nameProperty can be null/undefined\n */\n GeoJSONResource.prototype.load = function (nameMap, nameProperty) {\n nameProperty = nameProperty || DEFAULT_NAME_PROPERTY;\n var parsed = this._parsedMap.get(nameProperty);\n if (!parsed) {\n var rawRegions = this._parseToRegions(nameProperty);\n parsed = this._parsedMap.set(nameProperty, {\n regions: rawRegions,\n boundingRect: calculateBoundingRect(rawRegions)\n });\n }\n var regionsMap = createHashMap();\n var finalRegions = [];\n each(parsed.regions, function (region) {\n var regionName = region.name;\n // Try use the alias in geoNameMap\n if (nameMap && hasOwn(nameMap, regionName)) {\n region = region.cloneShallow(regionName = nameMap[regionName]);\n }\n finalRegions.push(region);\n regionsMap.set(regionName, region);\n });\n return {\n regions: finalRegions,\n boundingRect: parsed.boundingRect || new BoundingRect(0, 0, 0, 0),\n regionsMap: regionsMap\n };\n };\n GeoJSONResource.prototype._parseToRegions = function (nameProperty) {\n var mapName = this._mapName;\n var geoJSON = this._geoJSON;\n var rawRegions;\n // https://jsperf.com/try-catch-performance-overhead\n try {\n rawRegions = geoJSON ? parseGeoJson(geoJSON, nameProperty) : [];\n } catch (e) {\n throw new Error('Invalid geoJson format\\n' + e.message);\n }\n fixNanhai(mapName, rawRegions);\n each(rawRegions, function (region) {\n var regionName = region.name;\n fixTextCoord(mapName, region);\n fixDiaoyuIsland(mapName, region);\n // Some area like Alaska in USA map needs to be tansformed\n // to look better\n var specialArea = this._specialAreas && this._specialAreas[regionName];\n if (specialArea) {\n region.transformTo(specialArea.left, specialArea.top, specialArea.width, specialArea.height);\n }\n }, this);\n return rawRegions;\n };\n /**\n * Only for exporting to users.\n * **MUST NOT** used internally.\n */\n GeoJSONResource.prototype.getMapForUser = function () {\n return {\n // For backward compatibility, use geoJson\n // PENDING: it has been returning them without clone.\n // do we need to avoid outsite modification?\n geoJson: this._geoJSON,\n geoJSON: this._geoJSON,\n specialAreas: this._specialAreas\n };\n };\n return GeoJSONResource;\n}();\nexport { GeoJSONResource };\nfunction calculateBoundingRect(regions) {\n var rect;\n for (var i = 0; i < regions.length; i++) {\n var regionRect = regions[i].getBoundingRect();\n rect = rect || regionRect.clone();\n rect.union(regionRect);\n }\n return rect;\n}\nfunction parseInput(source) {\n return !isString(source) ? source : typeof JSON !== 'undefined' && JSON.parse ? JSON.parse(source) : new Function('return (' + source + ');')();\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { createHashMap } from 'zrender/lib/core/util.js';\nimport { GeoSVGResource } from './GeoSVGResource.js';\nimport { GeoJSONResource } from './GeoJSONResource.js';\nvar storage = createHashMap();\nexport default {\n /**\n * Compatible with previous `echarts.registerMap`.\n *\n * @usage\n * ```js\n *\n * echarts.registerMap('USA', geoJson, specialAreas);\n *\n * echarts.registerMap('USA', {\n * geoJson: geoJson,\n * specialAreas: {...}\n * });\n * echarts.registerMap('USA', {\n * geoJSON: geoJson,\n * specialAreas: {...}\n * });\n *\n * echarts.registerMap('airport', {\n * svg: svg\n * }\n * ```\n *\n * Note:\n * Do not support that register multiple geoJSON or SVG\n * one map name. Because different geoJSON and SVG have\n * different unit. It's not easy to make sure how those\n * units are mapping/normalize.\n * If intending to use multiple geoJSON or SVG, we can\n * use multiple geo coordinate system.\n */\n registerMap: function (mapName, rawDef, rawSpecialAreas) {\n if (rawDef.svg) {\n var resource = new GeoSVGResource(mapName, rawDef.svg);\n storage.set(mapName, resource);\n } else {\n // Recommend:\n // echarts.registerMap('eu', { geoJSON: xxx, specialAreas: xxx });\n // Backward compatibility:\n // echarts.registerMap('eu', geoJSON, specialAreas);\n // echarts.registerMap('eu', { geoJson: xxx, specialAreas: xxx });\n var geoJSON = rawDef.geoJson || rawDef.geoJSON;\n if (geoJSON && !rawDef.features) {\n rawSpecialAreas = rawDef.specialAreas;\n } else {\n geoJSON = rawDef;\n }\n var resource = new GeoJSONResource(mapName, geoJSON, rawSpecialAreas);\n storage.set(mapName, resource);\n }\n },\n getGeoResource: function (mapName) {\n return storage.get(mapName);\n },\n /**\n * Only for exporting to users.\n * **MUST NOT** used internally.\n */\n getMapForUser: function (mapName) {\n var resource = storage.get(mapName);\n // Do not support return SVG until some real requirement come.\n return resource && resource.type === 'geoJSON' && resource.getMapForUser();\n },\n load: function (mapName, nameMap, nameProperty) {\n var resource = storage.get(mapName);\n if (!resource) {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Map ' + mapName + ' not exists. The GeoJSON of the map must be provided.');\n }\n return;\n }\n return resource.load(nameMap, nameProperty);\n }\n};","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport RoamController from './RoamController.js';\nimport * as roamHelper from '../../component/helper/roamHelper.js';\nimport * as graphic from '../../util/graphic.js';\nimport { toggleHoverEmphasis, enableComponentHighDownFeatures, setDefaultStateProxy } from '../../util/states.js';\nimport geoSourceManager from '../../coord/geo/geoSourceManager.js';\nimport { getUID } from '../../util/component.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createOrUpdatePatternFromDecal } from '../../util/decal.js';\nimport Displayable from 'zrender/lib/graphic/Displayable.js';\nimport { makeInner } from '../../util/model.js';\n/**\n * Only these tags enable use `itemStyle` if they are named in SVG.\n * Other tags like <text> <tspan> <image> might not suitable for `itemStyle`.\n * They will not be considered to be styled until some requirements come.\n */\nvar OPTION_STYLE_ENABLED_TAGS = ['rect', 'circle', 'line', 'ellipse', 'polygon', 'polyline', 'path'];\nvar OPTION_STYLE_ENABLED_TAG_MAP = zrUtil.createHashMap(OPTION_STYLE_ENABLED_TAGS);\nvar STATE_TRIGGER_TAG_MAP = zrUtil.createHashMap(OPTION_STYLE_ENABLED_TAGS.concat(['g']));\nvar LABEL_HOST_MAP = zrUtil.createHashMap(OPTION_STYLE_ENABLED_TAGS.concat(['g']));\nvar mapLabelRaw = makeInner();\nfunction getFixedItemStyle(model) {\n var itemStyle = model.getItemStyle();\n var areaColor = model.get('areaColor');\n // If user want the color not to be changed when hover,\n // they should both set areaColor and color to be null.\n if (areaColor != null) {\n itemStyle.fill = areaColor;\n }\n return itemStyle;\n}\n// Only stroke can be used for line.\n// Using fill in style if stroke not exits.\n// TODO Not sure yet. Perhaps a separate `lineStyle`?\nfunction fixLineStyle(styleHost) {\n var style = styleHost.style;\n if (style) {\n style.stroke = style.stroke || style.fill;\n style.fill = null;\n }\n}\nvar MapDraw = /** @class */function () {\n function MapDraw(api) {\n var group = this.group = new graphic.Group();\n var transformGroup = this._transformGroup = new graphic.Group();\n group.add(transformGroup);\n this.uid = getUID('ec_map_draw');\n this._controller = new RoamController(api.getZr());\n this._controllerHost = {\n target: transformGroup\n };\n transformGroup.add(this._regionsGroup = new graphic.Group());\n transformGroup.add(this._svgGroup = new graphic.Group());\n }\n MapDraw.prototype.draw = function (mapOrGeoModel, ecModel, api, fromView, payload) {\n var isGeo = mapOrGeoModel.mainType === 'geo';\n // Map series has data. GEO model that controlled by map series\n // will be assigned with map data. Other GEO model has no data.\n var data = mapOrGeoModel.getData && mapOrGeoModel.getData();\n isGeo && ecModel.eachComponent({\n mainType: 'series',\n subType: 'map'\n }, function (mapSeries) {\n if (!data && mapSeries.getHostGeoModel() === mapOrGeoModel) {\n data = mapSeries.getData();\n }\n });\n var geo = mapOrGeoModel.coordinateSystem;\n var regionsGroup = this._regionsGroup;\n var transformGroup = this._transformGroup;\n var transformInfo = geo.getTransformInfo();\n var transformInfoRaw = transformInfo.raw;\n var transformInfoRoam = transformInfo.roam;\n // No animation when first draw or in action\n var isFirstDraw = !regionsGroup.childAt(0) || payload;\n var clip = mapOrGeoModel.getShallow('clip', true);\n var clipRect;\n if (clip) {\n clipRect = geo.getViewRect().clone();\n this.group.setClipPath(new graphic.Rect({\n shape: clipRect.clone()\n }));\n } else {\n this.group.removeClipPath();\n }\n if (isFirstDraw) {\n transformGroup.x = transformInfoRoam.x;\n transformGroup.y = transformInfoRoam.y;\n transformGroup.scaleX = transformInfoRoam.scaleX;\n transformGroup.scaleY = transformInfoRoam.scaleY;\n transformGroup.dirty();\n } else {\n graphic.updateProps(transformGroup, transformInfoRoam, mapOrGeoModel);\n }\n var isVisualEncodedByVisualMap = data && data.getVisual('visualMeta') && data.getVisual('visualMeta').length > 0;\n var viewBuildCtx = {\n api: api,\n geo: geo,\n mapOrGeoModel: mapOrGeoModel,\n data: data,\n isVisualEncodedByVisualMap: isVisualEncodedByVisualMap,\n isGeo: isGeo,\n transformInfoRaw: transformInfoRaw\n };\n if (geo.resourceType === 'geoJSON') {\n this._buildGeoJSON(viewBuildCtx);\n } else if (geo.resourceType === 'geoSVG') {\n this._buildSVG(viewBuildCtx);\n }\n this._updateController(mapOrGeoModel, clipRect, ecModel, api);\n this._updateMapSelectHandler(mapOrGeoModel, regionsGroup, api, fromView);\n };\n MapDraw.prototype._buildGeoJSON = function (viewBuildCtx) {\n var regionsGroupByName = this._regionsGroupByName = zrUtil.createHashMap();\n var regionsInfoByName = zrUtil.createHashMap();\n var regionsGroup = this._regionsGroup;\n var transformInfoRaw = viewBuildCtx.transformInfoRaw;\n var mapOrGeoModel = viewBuildCtx.mapOrGeoModel;\n var data = viewBuildCtx.data;\n var projection = viewBuildCtx.geo.projection;\n var projectionStream = projection && projection.stream;\n function transformPoint(point, project) {\n if (project) {\n // projection may return null point.\n point = project(point);\n }\n return point && [point[0] * transformInfoRaw.scaleX + transformInfoRaw.x, point[1] * transformInfoRaw.scaleY + transformInfoRaw.y];\n }\n ;\n function transformPolygonPoints(inPoints) {\n var outPoints = [];\n // If projectionStream is provided. Use it instead of single point project.\n var project = !projectionStream && projection && projection.project;\n for (var i = 0; i < inPoints.length; ++i) {\n var newPt = transformPoint(inPoints[i], project);\n newPt && outPoints.push(newPt);\n }\n return outPoints;\n }\n function getPolyShape(points) {\n return {\n shape: {\n points: transformPolygonPoints(points)\n }\n };\n }\n regionsGroup.removeAll();\n // Only when the resource is GeoJSON, there is `geo.regions`.\n zrUtil.each(viewBuildCtx.geo.regions, function (region) {\n var regionName = region.name;\n // Consider in GeoJson properties.name may be duplicated, for example,\n // there is multiple region named \"United Kindom\" or \"France\" (so many\n // colonies). And it is not appropriate to merge them in geo, which\n // will make them share the same label and bring trouble in label\n // location calculation.\n var regionGroup = regionsGroupByName.get(regionName);\n var _a = regionsInfoByName.get(regionName) || {},\n dataIdx = _a.dataIdx,\n regionModel = _a.regionModel;\n if (!regionGroup) {\n regionGroup = regionsGroupByName.set(regionName, new graphic.Group());\n regionsGroup.add(regionGroup);\n dataIdx = data ? data.indexOfName(regionName) : null;\n regionModel = viewBuildCtx.isGeo ? mapOrGeoModel.getRegionModel(regionName) : data ? data.getItemModel(dataIdx) : null;\n var silent = regionModel.get('silent', true);\n silent != null && (regionGroup.silent = silent);\n regionsInfoByName.set(regionName, {\n dataIdx: dataIdx,\n regionModel: regionModel\n });\n }\n var polygonSubpaths = [];\n var polylineSubpaths = [];\n zrUtil.each(region.geometries, function (geometry) {\n // Polygon and MultiPolygon\n if (geometry.type === 'polygon') {\n var polys = [geometry.exterior].concat(geometry.interiors || []);\n if (projectionStream) {\n polys = projectPolys(polys, projectionStream);\n }\n zrUtil.each(polys, function (poly) {\n polygonSubpaths.push(new graphic.Polygon(getPolyShape(poly)));\n });\n }\n // LineString and MultiLineString\n else {\n var points = geometry.points;\n if (projectionStream) {\n points = projectPolys(points, projectionStream, true);\n }\n zrUtil.each(points, function (points) {\n polylineSubpaths.push(new graphic.Polyline(getPolyShape(points)));\n });\n }\n });\n var centerPt = transformPoint(region.getCenter(), projection && projection.project);\n function createCompoundPath(subpaths, isLine) {\n if (!subpaths.length) {\n return;\n }\n var compoundPath = new graphic.CompoundPath({\n culling: true,\n segmentIgnoreThreshold: 1,\n shape: {\n paths: subpaths\n }\n });\n regionGroup.add(compoundPath);\n applyOptionStyleForRegion(viewBuildCtx, compoundPath, dataIdx, regionModel);\n resetLabelForRegion(viewBuildCtx, compoundPath, regionName, regionModel, mapOrGeoModel, dataIdx, centerPt);\n if (isLine) {\n fixLineStyle(compoundPath);\n zrUtil.each(compoundPath.states, fixLineStyle);\n }\n }\n createCompoundPath(polygonSubpaths);\n createCompoundPath(polylineSubpaths, true);\n });\n // Ensure children have been added to `regionGroup` before calling them.\n regionsGroupByName.each(function (regionGroup, regionName) {\n var _a = regionsInfoByName.get(regionName),\n dataIdx = _a.dataIdx,\n regionModel = _a.regionModel;\n resetEventTriggerForRegion(viewBuildCtx, regionGroup, regionName, regionModel, mapOrGeoModel, dataIdx);\n resetTooltipForRegion(viewBuildCtx, regionGroup, regionName, regionModel, mapOrGeoModel);\n resetStateTriggerForRegion(viewBuildCtx, regionGroup, regionName, regionModel, mapOrGeoModel);\n }, this);\n };\n MapDraw.prototype._buildSVG = function (viewBuildCtx) {\n var mapName = viewBuildCtx.geo.map;\n var transformInfoRaw = viewBuildCtx.transformInfoRaw;\n this._svgGroup.x = transformInfoRaw.x;\n this._svgGroup.y = transformInfoRaw.y;\n this._svgGroup.scaleX = transformInfoRaw.scaleX;\n this._svgGroup.scaleY = transformInfoRaw.scaleY;\n if (this._svgResourceChanged(mapName)) {\n this._freeSVG();\n this._useSVG(mapName);\n }\n var svgDispatcherMap = this._svgDispatcherMap = zrUtil.createHashMap();\n var focusSelf = false;\n zrUtil.each(this._svgGraphicRecord.named, function (namedItem) {\n // Note that we also allow different elements have the same name.\n // For example, a glyph of a city and the label of the city have\n // the same name and their tooltip info can be defined in a single\n // region option.\n var regionName = namedItem.name;\n var mapOrGeoModel = viewBuildCtx.mapOrGeoModel;\n var data = viewBuildCtx.data;\n var svgNodeTagLower = namedItem.svgNodeTagLower;\n var el = namedItem.el;\n var dataIdx = data ? data.indexOfName(regionName) : null;\n var regionModel = mapOrGeoModel.getRegionModel(regionName);\n if (OPTION_STYLE_ENABLED_TAG_MAP.get(svgNodeTagLower) != null && el instanceof Displayable) {\n applyOptionStyleForRegion(viewBuildCtx, el, dataIdx, regionModel);\n }\n if (el instanceof Displayable) {\n el.culling = true;\n }\n var silent = regionModel.get('silent', true);\n silent != null && (el.silent = silent);\n // We do not know how the SVG like so we'd better not to change z2.\n // Otherwise it might bring some unexpected result. For example,\n // an area hovered that make some inner city can not be clicked.\n el.z2EmphasisLift = 0;\n // If self named:\n if (!namedItem.namedFrom) {\n // label should batter to be displayed based on the center of <g>\n // if it is named rather than displayed on each child.\n if (LABEL_HOST_MAP.get(svgNodeTagLower) != null) {\n resetLabelForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel, dataIdx, null);\n }\n resetEventTriggerForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel, dataIdx);\n resetTooltipForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel);\n if (STATE_TRIGGER_TAG_MAP.get(svgNodeTagLower) != null) {\n var focus_1 = resetStateTriggerForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel);\n if (focus_1 === 'self') {\n focusSelf = true;\n }\n var els = svgDispatcherMap.get(regionName) || svgDispatcherMap.set(regionName, []);\n els.push(el);\n }\n }\n }, this);\n this._enableBlurEntireSVG(focusSelf, viewBuildCtx);\n };\n MapDraw.prototype._enableBlurEntireSVG = function (focusSelf, viewBuildCtx) {\n // It's a little complicated to support blurring the entire geoSVG in series-map.\n // So do not support it until some requirements come.\n // At present, in series-map, only regions can be blurred.\n if (focusSelf && viewBuildCtx.isGeo) {\n var blurStyle = viewBuildCtx.mapOrGeoModel.getModel(['blur', 'itemStyle']).getItemStyle();\n // Only support `opacity` here. Because not sure that other props are suitable for\n // all of the elements generated by SVG (especially for Text/TSpan/Image/... ).\n var opacity_1 = blurStyle.opacity;\n this._svgGraphicRecord.root.traverse(function (el) {\n if (!el.isGroup) {\n // PENDING: clear those settings to SVG elements when `_freeSVG`.\n // (Currently it happen not to be needed.)\n setDefaultStateProxy(el);\n var style = el.ensureState('blur').style || {};\n // Do not overwrite the region style that already set from region option.\n if (style.opacity == null && opacity_1 != null) {\n style.opacity = opacity_1;\n }\n // If `ensureState('blur').style = {}`, there will be default opacity.\n // Enable `stateTransition` (animation).\n el.ensureState('emphasis');\n }\n });\n }\n };\n MapDraw.prototype.remove = function () {\n this._regionsGroup.removeAll();\n this._regionsGroupByName = null;\n this._svgGroup.removeAll();\n this._freeSVG();\n this._controller.dispose();\n this._controllerHost = null;\n };\n MapDraw.prototype.findHighDownDispatchers = function (name, geoModel) {\n if (name == null) {\n return [];\n }\n var geo = geoModel.coordinateSystem;\n if (geo.resourceType === 'geoJSON') {\n var regionsGroupByName = this._regionsGroupByName;\n if (regionsGroupByName) {\n var regionGroup = regionsGroupByName.get(name);\n return regionGroup ? [regionGroup] : [];\n }\n } else if (geo.resourceType === 'geoSVG') {\n return this._svgDispatcherMap && this._svgDispatcherMap.get(name) || [];\n }\n };\n MapDraw.prototype._svgResourceChanged = function (mapName) {\n return this._svgMapName !== mapName;\n };\n MapDraw.prototype._useSVG = function (mapName) {\n var resource = geoSourceManager.getGeoResource(mapName);\n if (resource && resource.type === 'geoSVG') {\n var svgGraphic = resource.useGraphic(this.uid);\n this._svgGroup.add(svgGraphic.root);\n this._svgGraphicRecord = svgGraphic;\n this._svgMapName = mapName;\n }\n };\n MapDraw.prototype._freeSVG = function () {\n var mapName = this._svgMapName;\n if (mapName == null) {\n return;\n }\n var resource = geoSourceManager.getGeoResource(mapName);\n if (resource && resource.type === 'geoSVG') {\n resource.freeGraphic(this.uid);\n }\n this._svgGraphicRecord = null;\n this._svgDispatcherMap = null;\n this._svgGroup.removeAll();\n this._svgMapName = null;\n };\n MapDraw.prototype._updateController = function (mapOrGeoModel, clipRect, ecModel, api) {\n var geo = mapOrGeoModel.coordinateSystem;\n var controller = this._controller;\n var controllerHost = this._controllerHost;\n controllerHost.zoomLimit = mapOrGeoModel.get('scaleLimit');\n controllerHost.zoom = geo.getZoom();\n // roamType is will be set default true if it is null\n controller.enable(mapOrGeoModel.get('roam') || false, {\n api: api,\n zInfo: {\n component: mapOrGeoModel\n },\n triggerInfo: {\n roamTrigger: mapOrGeoModel.get('roamTrigger'),\n isInSelf: function (e, x, y) {\n return geo.containPoint([x, y]);\n },\n isInClip: function (e, x, y) {\n return !clipRect || clipRect.contain(x, y);\n }\n }\n });\n var mainType = mapOrGeoModel.mainType;\n function makeActionBase() {\n var action = {\n type: 'geoRoam',\n componentType: mainType\n };\n action[mainType + 'Id'] = mapOrGeoModel.id;\n return action;\n }\n controller.off('pan').on('pan', function (e) {\n this._mouseDownFlag = false;\n roamHelper.updateViewOnPan(controllerHost, e.dx, e.dy);\n api.dispatchAction(zrUtil.extend(makeActionBase(), {\n dx: e.dx,\n dy: e.dy,\n animation: {\n duration: 0\n }\n }));\n }, this);\n controller.off('zoom').on('zoom', function (e) {\n this._mouseDownFlag = false;\n roamHelper.updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY);\n api.dispatchAction(zrUtil.extend(makeActionBase(), {\n totalZoom: controllerHost.zoom,\n zoom: e.scale,\n originX: e.originX,\n originY: e.originY,\n animation: {\n duration: 0\n }\n }));\n }, this);\n };\n /**\n * FIXME: this is a temporarily workaround.\n * When `geoRoam` the elements need to be reset in `MapView['render']`, because the props like\n * `ignore` might have been modified by `LabelManager`, and `LabelManager#addLabelsOfSeries`\n * will subsequently cache `defaultAttr` like `ignore`. If do not do this reset, the modified\n * props will have no chance to be restored.\n * Note: This reset should be after `clearStates` in `renderSeries` because `useStates` in\n * `renderSeries` will cache the modified `ignore` to `el._normalState`.\n * TODO:\n * Use clone/immutable in `LabelManager`?\n */\n MapDraw.prototype.resetForLabelLayout = function () {\n this.group.traverse(function (el) {\n var label = el.getTextContent();\n if (label) {\n label.ignore = mapLabelRaw(label).ignore;\n }\n });\n };\n MapDraw.prototype._updateMapSelectHandler = function (mapOrGeoModel, regionsGroup, api, fromView) {\n var mapDraw = this;\n regionsGroup.off('mousedown');\n regionsGroup.off('click');\n // @ts-ignore FIXME:TS resolve type conflict\n if (mapOrGeoModel.get('selectedMode')) {\n regionsGroup.on('mousedown', function () {\n mapDraw._mouseDownFlag = true;\n });\n regionsGroup.on('click', function (e) {\n if (!mapDraw._mouseDownFlag) {\n return;\n }\n mapDraw._mouseDownFlag = false;\n });\n }\n };\n return MapDraw;\n}();\n;\nfunction applyOptionStyleForRegion(viewBuildCtx, el, dataIndex, regionModel) {\n // All of the path are using `itemStyle`, because\n // (1) Some SVG also use fill on polyline (The different between\n // polyline and polygon is \"open\" or \"close\" but not fill or not).\n // (2) For the common props like opacity, if some use itemStyle\n // and some use `lineStyle`, it might confuse users.\n // (3) Most SVG use <path>, where can not detect whether to draw a \"line\"\n // or a filled shape, so use `itemStyle` for <path>.\n var normalStyleModel = regionModel.getModel('itemStyle');\n var emphasisStyleModel = regionModel.getModel(['emphasis', 'itemStyle']);\n var blurStyleModel = regionModel.getModel(['blur', 'itemStyle']);\n var selectStyleModel = regionModel.getModel(['select', 'itemStyle']);\n // NOTE: DON'T use 'style' in visual when drawing map.\n // This component is used for drawing underlying map for both geo component and map series.\n var normalStyle = getFixedItemStyle(normalStyleModel);\n var emphasisStyle = getFixedItemStyle(emphasisStyleModel);\n var selectStyle = getFixedItemStyle(selectStyleModel);\n var blurStyle = getFixedItemStyle(blurStyleModel);\n // Update the itemStyle if has data visual\n var data = viewBuildCtx.data;\n if (data) {\n // Only visual color of each item will be used. It can be encoded by visualMap\n // But visual color of series is used in symbol drawing\n // Visual color for each series is for the symbol draw\n var style = data.getItemVisual(dataIndex, 'style');\n var decal = data.getItemVisual(dataIndex, 'decal');\n if (viewBuildCtx.isVisualEncodedByVisualMap && style.fill) {\n normalStyle.fill = style.fill;\n }\n if (decal) {\n normalStyle.decal = createOrUpdatePatternFromDecal(decal, viewBuildCtx.api);\n }\n }\n // SVG text, tspan and image can be named but not supporeted\n // to be styled by region option yet.\n el.setStyle(normalStyle);\n el.style.strokeNoScale = true;\n el.ensureState('emphasis').style = emphasisStyle;\n el.ensureState('select').style = selectStyle;\n el.ensureState('blur').style = blurStyle;\n // Enable blur\n setDefaultStateProxy(el);\n}\nfunction resetLabelForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel,\n// Exist only if `viewBuildCtx.data` exists.\ndataIdx,\n// If labelXY not provided, use `textConfig.position: 'inside'`\nlabelXY) {\n var data = viewBuildCtx.data;\n var isGeo = viewBuildCtx.isGeo;\n var isDataNaN = data && isNaN(data.get(data.mapDimension('value'), dataIdx));\n var itemLayout = data && data.getItemLayout(dataIdx);\n // In the following cases label will be drawn\n // 1. In map series and data value is NaN\n // 2. In geo component\n // 3. Region has no series legendIcon, which will be add a showLabel flag in mapSymbolLayout\n if (isGeo || isDataNaN || itemLayout && itemLayout.showLabel) {\n var query = !isGeo ? dataIdx : regionName;\n var labelFetcher = void 0;\n // Consider dataIdx not found.\n if (!data || dataIdx >= 0) {\n labelFetcher = mapOrGeoModel;\n }\n var specifiedTextOpt = labelXY ? {\n normal: {\n align: 'center',\n verticalAlign: 'middle'\n }\n } : null;\n // Caveat: must be called after `setDefaultStateProxy(el);` called.\n // because textContent will be assign with `el.stateProxy` inside.\n setLabelStyle(el, getLabelStatesModels(regionModel), {\n labelFetcher: labelFetcher,\n labelDataIndex: query,\n defaultText: regionName\n }, specifiedTextOpt);\n var textEl = el.getTextContent();\n if (textEl) {\n mapLabelRaw(textEl).ignore = textEl.ignore;\n if (el.textConfig && labelXY) {\n // Compute a relative offset based on the el bounding rect.\n var rect = el.getBoundingRect().clone();\n // Need to make sure the percent position base on the same rect in normal and\n // emphasis state. Otherwise if using boundingRect of el, but the emphasis state\n // has borderWidth (even 0.5px), the text position will be changed obviously\n // if the position is very big like ['1234%', '1345%'].\n el.textConfig.layoutRect = rect;\n el.textConfig.position = [(labelXY[0] - rect.x) / rect.width * 100 + '%', (labelXY[1] - rect.y) / rect.height * 100 + '%'];\n }\n }\n // PENDING:\n // If labelLayout is enabled (test/label-layout.html), el.dataIndex should be specified.\n // But el.dataIndex is also used to determine whether user event should be triggered,\n // where el.seriesIndex or el.dataModel must be specified. At present for a single el\n // there is not case that \"only label layout enabled but user event disabled\", so here\n // we depends `resetEventTriggerForRegion` to do the job of setting `el.dataIndex`.\n el.disableLabelAnimation = true;\n } else {\n el.removeTextContent();\n el.removeTextConfig();\n el.disableLabelAnimation = null;\n }\n}\nfunction resetEventTriggerForRegion(viewBuildCtx, eventTrigger, regionName, regionModel, mapOrGeoModel,\n// Exist only if `viewBuildCtx.data` exists.\ndataIdx) {\n // setItemGraphicEl, setHoverStyle after all polygons and labels\n // are added to the regionGroup\n if (viewBuildCtx.data) {\n // FIXME: when series-map use a SVG map, and there are duplicated name specified\n // on different SVG elements, after `data.setItemGraphicEl(...)`:\n // (1) all of them will be mounted with `dataIndex`, `seriesIndex`, so that tooltip\n // can be triggered only mouse hover. That's correct.\n // (2) only the last element will be kept in `data`, so that if trigger tooltip\n // by `dispatchAction`, only the last one can be found and triggered. That might be\n // not correct. We will fix it in future if anyone demanding that.\n viewBuildCtx.data.setItemGraphicEl(dataIdx, eventTrigger);\n }\n // series-map will not trigger \"geoselectchange\" no matter it is\n // based on a declared geo component. Because series-map will\n // trigger \"selectchange\". If it trigger both the two events,\n // If users call `chart.dispatchAction({type: 'toggleSelect'})`,\n // it not easy to also fire event \"geoselectchanged\".\n else {\n // Package custom mouse event for geo component\n getECData(eventTrigger).eventData = {\n componentType: 'geo',\n componentIndex: mapOrGeoModel.componentIndex,\n geoIndex: mapOrGeoModel.componentIndex,\n name: regionName,\n region: regionModel && regionModel.option || {}\n };\n }\n}\nfunction resetTooltipForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel) {\n if (!viewBuildCtx.data) {\n graphic.setTooltipConfig({\n el: el,\n componentModel: mapOrGeoModel,\n itemName: regionName,\n // @ts-ignore FIXME:TS fix the \"compatible with each other\"?\n itemTooltipOption: regionModel.get('tooltip')\n });\n }\n}\nfunction resetStateTriggerForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel) {\n // @ts-ignore FIXME:TS fix the \"compatible with each other\"?\n el.highDownSilentOnTouch = !!mapOrGeoModel.get('selectedMode');\n // @ts-ignore FIXME:TS fix the \"compatible with each other\"?\n var emphasisModel = regionModel.getModel('emphasis');\n var focus = emphasisModel.get('focus');\n toggleHoverEmphasis(el, focus, emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n if (viewBuildCtx.isGeo) {\n enableComponentHighDownFeatures(el, mapOrGeoModel, regionName);\n }\n return focus;\n}\nfunction projectPolys(rings,\n// Polygons include exterior and interiors. Or polylines.\ncreateStream, isLine) {\n var polygons = [];\n var curPoly;\n function startPolygon() {\n curPoly = [];\n }\n function endPolygon() {\n if (curPoly.length) {\n polygons.push(curPoly);\n curPoly = [];\n }\n }\n var stream = createStream({\n polygonStart: startPolygon,\n polygonEnd: endPolygon,\n lineStart: startPolygon,\n lineEnd: endPolygon,\n point: function (x, y) {\n // May have NaN values from stream.\n if (isFinite(x) && isFinite(y)) {\n curPoly.push([x, y]);\n }\n },\n sphere: function () {}\n });\n !isLine && stream.polygonStart();\n zrUtil.each(rings, function (ring) {\n stream.lineStart();\n for (var i = 0; i < ring.length; i++) {\n stream.point(ring[i][0], ring[i][1]);\n }\n stream.lineEnd();\n });\n !isLine && stream.polygonEnd();\n return polygons;\n}\nexport default MapDraw;\n// @ts-ignore FIXME:TS fix the \"compatible with each other\"?","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/**\n * Simple view coordinate system\n * Mapping given x, y to transformd view x, y\n */\nimport * as vector from 'zrender/lib/core/vector.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport Transformable from 'zrender/lib/core/Transformable.js';\nimport { parsePercent } from '../util/number.js';\nimport { clone } from 'zrender/lib/core/util.js';\nimport { clampByZoomLimit } from '../component/helper/roamHelper.js';\nvar v2ApplyTransform = vector.applyTransform;\nvar View = /** @class */function (_super) {\n __extends(View, _super);\n function View(name, opt) {\n var _this = _super.call(this) || this;\n _this.type = 'view';\n _this.dimensions = ['x', 'y'];\n /**\n * Represents the transform brought by roam/zoom.\n * If `View['_viewRect']` applies roam transform,\n * we can get the final displayed rect.\n */\n _this._roamTransformable = new Transformable();\n /**\n * Represents the transform from `View['_rect']` to `View['_viewRect']`.\n */\n _this._rawTransformable = new Transformable();\n _this.name = name;\n _this._opt = opt;\n return _this;\n }\n View.prototype.setBoundingRect = function (x, y, width, height) {\n this._rect = new BoundingRect(x, y, width, height);\n this._updateCenterAndZoom();\n return this._rect;\n };\n View.prototype.getBoundingRect = function () {\n return this._rect;\n };\n /**\n * If no need to transform `View['_rect']` to `View['_viewRect']`, the calling of\n * `setViewRect` can be omitted.\n */\n View.prototype.setViewRect = function (x, y, width, height) {\n this._transformTo(x, y, width, height);\n this._viewRect = new BoundingRect(x, y, width, height);\n };\n /**\n * Transformed to particular position and size\n */\n View.prototype._transformTo = function (x, y, width, height) {\n var rect = this.getBoundingRect();\n var rawTransform = this._rawTransformable;\n rawTransform.transform = rect.calculateTransform(new BoundingRect(x, y, width, height));\n var rawParent = rawTransform.parent;\n rawTransform.parent = null;\n rawTransform.decomposeTransform();\n rawTransform.parent = rawParent;\n this._updateTransform();\n };\n /**\n * [NOTICE]\n * The definition of this center has always been irrelevant to some other series center like\n * 'series-pie.center' - this center is a point on the same coord sys as `View['_rect'].x/y`,\n * rather than canvas viewport, and the unit is not necessarily pixel (e.g., in geo case).\n * @see {View['_center']} for details.\n */\n View.prototype.setCenter = function (centerCoord) {\n // #16904 introcuded percentage string here, such as '33%'. But it was based on canvas\n // width/height, which is not reasonable - the unit may incorrect, and it is unpredictable if\n // the `View['_rect']` is not calculated based on the current canvas rect. Therefore the percentage\n // value is changed to based on `View['_rect'].width/height` since v6. Under this definition, users\n // can use '0%' to map the top-left of `View['_rect']` to the center of `View['_viewRect']`.\n var opt = this._opt;\n if (opt && opt.api && opt.ecModel && opt.ecModel.getShallow('legacyViewCoordSysCenterBase') && centerCoord) {\n centerCoord = [parsePercent(centerCoord[0], opt.api.getWidth()), parsePercent(centerCoord[1], opt.api.getWidth())];\n }\n this._centerOption = clone(centerCoord);\n this._updateCenterAndZoom();\n };\n View.prototype.setZoom = function (zoom) {\n this._zoom = clampByZoomLimit(zoom || 1, this.zoomLimit);\n this._updateCenterAndZoom();\n };\n /**\n * Get default center without roam\n */\n View.prototype.getDefaultCenter = function () {\n // Rect before any transform\n var rawRect = this.getBoundingRect();\n var cx = rawRect.x + rawRect.width / 2;\n var cy = rawRect.y + rawRect.height / 2;\n return [cx, cy];\n };\n View.prototype.getCenter = function () {\n return this._center || this.getDefaultCenter();\n };\n View.prototype.getZoom = function () {\n return this._zoom || 1;\n };\n View.prototype.getRoamTransform = function () {\n return this._roamTransformable.getLocalTransform();\n };\n /**\n * Ensure this method is idempotent, since it should be called when\n * every relevant prop (e.g. _centerOption/_zoom/_rect/_viewRect) changed.\n */\n View.prototype._updateCenterAndZoom = function () {\n var centerOption = this._centerOption;\n var rect = this._rect;\n if (centerOption && rect) {\n this._center = [parsePercent(centerOption[0], rect.width, rect.x), parsePercent(centerOption[1], rect.height, rect.y)];\n }\n // Must update after view transform updated\n var rawTransformMatrix = this._rawTransformable.getLocalTransform();\n var roamTransform = this._roamTransformable;\n var defaultCenter = this.getDefaultCenter();\n var center = this.getCenter();\n var zoom = this.getZoom();\n center = vector.applyTransform([], center, rawTransformMatrix);\n defaultCenter = vector.applyTransform([], defaultCenter, rawTransformMatrix);\n roamTransform.originX = center[0];\n roamTransform.originY = center[1];\n roamTransform.x = defaultCenter[0] - center[0];\n roamTransform.y = defaultCenter[1] - center[1];\n roamTransform.scaleX = roamTransform.scaleY = zoom;\n this._updateTransform();\n };\n /**\n * Update transform props on `this` based on the current\n * `this._roamTransformable` and `this._rawTransformable`.\n */\n View.prototype._updateTransform = function () {\n var roamTransformable = this._roamTransformable;\n var rawTransformable = this._rawTransformable;\n rawTransformable.parent = roamTransformable;\n roamTransformable.updateTransform();\n rawTransformable.updateTransform();\n matrix.copy(this.transform || (this.transform = []), rawTransformable.transform || matrix.create());\n this._rawTransform = rawTransformable.getLocalTransform();\n this.invTransform = this.invTransform || [];\n matrix.invert(this.invTransform, this.transform);\n this.decomposeTransform();\n };\n View.prototype.getTransformInfo = function () {\n var rawTransformable = this._rawTransformable;\n var roamTransformable = this._roamTransformable;\n // Because roamTransformabel has `originX/originY` modified,\n // but the caller of `getTransformInfo` can not handle `originX/originY`,\n // so need to recalculate them.\n var dummyTransformable = new Transformable();\n dummyTransformable.transform = roamTransformable.transform;\n dummyTransformable.decomposeTransform();\n return {\n roam: {\n x: dummyTransformable.x,\n y: dummyTransformable.y,\n scaleX: dummyTransformable.scaleX,\n scaleY: dummyTransformable.scaleY\n },\n raw: {\n x: rawTransformable.x,\n y: rawTransformable.y,\n scaleX: rawTransformable.scaleX,\n scaleY: rawTransformable.scaleY\n }\n };\n };\n View.prototype.getViewRect = function () {\n return this._viewRect;\n };\n /**\n * Get view rect after roam transform\n */\n View.prototype.getViewRectAfterRoam = function () {\n var rect = this.getBoundingRect().clone();\n rect.applyTransform(this.transform);\n return rect;\n };\n /**\n * Convert a single (lon, lat) data item to (x, y) point.\n */\n View.prototype.dataToPoint = function (data, noRoam, out) {\n var transform = noRoam ? this._rawTransform : this.transform;\n out = out || [];\n return transform ? v2ApplyTransform(out, data, transform) : vector.copy(out, data);\n };\n /**\n * Convert a (x, y) point to (lon, lat) data\n */\n View.prototype.pointToData = function (point, reserved, out) {\n out = out || [];\n var invTransform = this.invTransform;\n return invTransform ? v2ApplyTransform(out, point, invTransform) : (out[0] = point[0], out[1] = point[1], out);\n };\n View.prototype.convertToPixel = function (ecModel, finder, value) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.dataToPoint(value) : null;\n };\n View.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.pointToData(pixel) : null;\n };\n /**\n * @implements\n */\n View.prototype.containPoint = function (point) {\n return this.getViewRectAfterRoam().contain(point[0], point[1]);\n };\n View.dimensions = ['x', 'y'];\n return View;\n}(Transformable);\nfunction getCoordSys(finder) {\n var seriesModel = finder.seriesModel;\n return seriesModel ? seriesModel.coordinateSystem : null; // e.g., graph.\n}\nexport default View;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport View from '../View.js';\nimport geoSourceManager from './geoSourceManager.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nimport { warn } from '../../util/log.js';\nvar GEO_DEFAULT_PARAMS = {\n 'geoJSON': {\n aspectScale: 0.75,\n invertLongitute: true\n },\n 'geoSVG': {\n aspectScale: 1,\n invertLongitute: false\n }\n};\nexport var geo2DDimensions = ['lng', 'lat'];\nvar Geo = /** @class */function (_super) {\n __extends(Geo, _super);\n function Geo(name, map, opt) {\n var _this = _super.call(this, name, {\n api: opt.api,\n ecModel: opt.ecModel\n }) || this;\n _this.dimensions = geo2DDimensions;\n _this.type = 'geo';\n // Only store specified name coord via `addGeoCoord`.\n _this._nameCoordMap = zrUtil.createHashMap();\n _this.map = map;\n var projection = opt.projection;\n var source = geoSourceManager.load(map, opt.nameMap, opt.nameProperty);\n var resource = geoSourceManager.getGeoResource(map);\n var resourceType = _this.resourceType = resource ? resource.type : null;\n var regions = _this.regions = source.regions;\n var defaultParams = GEO_DEFAULT_PARAMS[resource.type];\n _this._regionsMap = source.regionsMap;\n _this.regions = source.regions;\n if (process.env.NODE_ENV !== 'production' && projection) {\n // Do some check\n if (resourceType === 'geoSVG') {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Map \" + map + \" with SVG source can't use projection. Only GeoJSON source supports projection.\");\n }\n projection = null;\n }\n if (!(projection.project && projection.unproject)) {\n if (process.env.NODE_ENV !== 'production') {\n warn('project and unproject must be both provided in the projeciton.');\n }\n projection = null;\n }\n }\n _this.projection = projection;\n var boundingRect;\n if (projection) {\n // Can't reuse the raw bounding rect\n for (var i = 0; i < regions.length; i++) {\n var regionRect = regions[i].getBoundingRect(projection);\n boundingRect = boundingRect || regionRect.clone();\n boundingRect.union(regionRect);\n }\n } else {\n boundingRect = source.boundingRect;\n }\n _this.setBoundingRect(boundingRect.x, boundingRect.y, boundingRect.width, boundingRect.height);\n // aspectScale and invertLongitute actually is the parameters default raw projection.\n // So we ignore them if projection is given.\n // Ignore default aspect scale if projection exits.\n _this.aspectScale = projection ? 1 : zrUtil.retrieve2(opt.aspectScale, defaultParams.aspectScale);\n // Not invert longitude if projection exits.\n _this._invertLongitute = projection ? false : defaultParams.invertLongitute;\n return _this;\n }\n Geo.prototype._transformTo = function (x, y, width, height) {\n var rect = this.getBoundingRect();\n var invertLongitute = this._invertLongitute;\n rect = rect.clone();\n if (invertLongitute) {\n // Longitude is inverted.\n rect.y = -rect.y - rect.height;\n }\n var rawTransformable = this._rawTransformable;\n rawTransformable.transform = rect.calculateTransform(new BoundingRect(x, y, width, height));\n var rawParent = rawTransformable.parent;\n rawTransformable.parent = null;\n rawTransformable.decomposeTransform();\n rawTransformable.parent = rawParent;\n if (invertLongitute) {\n rawTransformable.scaleY = -rawTransformable.scaleY;\n }\n this._updateTransform();\n };\n Geo.prototype.getRegion = function (name) {\n return this._regionsMap.get(name);\n };\n Geo.prototype.getRegionByCoord = function (coord) {\n var regions = this.regions;\n for (var i = 0; i < regions.length; i++) {\n var region = regions[i];\n if (region.type === 'geoJSON' && region.contain(coord)) {\n return regions[i];\n }\n }\n };\n /**\n * Add geoCoord for indexing by name\n */\n Geo.prototype.addGeoCoord = function (name, geoCoord) {\n this._nameCoordMap.set(name, geoCoord);\n };\n /**\n * Get geoCoord by name\n */\n Geo.prototype.getGeoCoord = function (name) {\n var region = this._regionsMap.get(name);\n // Calculate center only on demand.\n return this._nameCoordMap.get(name) || region && region.getCenter();\n };\n Geo.prototype.dataToPoint = function (data, noRoam, out) {\n if (zrUtil.isString(data)) {\n // Map area name to geoCoord\n data = this.getGeoCoord(data);\n }\n if (data) {\n var projection = this.projection;\n if (projection) {\n // projection may return null point.\n data = projection.project(data);\n }\n return data && this.projectedToPoint(data, noRoam, out);\n }\n };\n Geo.prototype.pointToData = function (point, reserved, out) {\n var projection = this.projection;\n if (projection) {\n // projection may return null point.\n point = projection.unproject(point);\n }\n // FIXME: if no `point`, should return [NaN, NaN], rather than undefined.\n // null/undefined has special meaning in `convertFromPixel`.\n return point && this.pointToProjected(point, out);\n };\n /**\n * Point to projected data. Same with pointToData when projection is used.\n */\n Geo.prototype.pointToProjected = function (point, out) {\n return _super.prototype.pointToData.call(this, point, 0, out);\n };\n Geo.prototype.projectedToPoint = function (projected, noRoam, out) {\n return _super.prototype.dataToPoint.call(this, projected, noRoam, out);\n };\n Geo.prototype.convertToPixel = function (ecModel, finder, value) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.dataToPoint(value) : null;\n };\n Geo.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.pointToData(pixel) : null;\n };\n return Geo;\n}(View);\n;\nzrUtil.mixin(Geo, View);\nfunction getCoordSys(finder) {\n var geoModel = finder.geoModel;\n var seriesModel = finder.seriesModel;\n return geoModel ? geoModel.coordinateSystem : seriesModel ? seriesModel.coordinateSystem // For map series.\n || (seriesModel.getReferringComponents('geo', SINGLE_REFERRING).models[0] || {}).coordinateSystem : null;\n}\nexport default Geo;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Geo, { geo2DDimensions } from './Geo.js';\nimport * as layout from '../../util/layout.js';\nimport * as numberUtil from '../../util/number.js';\nimport geoSourceManager from './geoSourceManager.js';\nimport * as vector from 'zrender/lib/core/vector.js';\nimport { injectCoordSysByOption } from '../../core/CoordinateSystem.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\n/**\n * Resize method bound to the geo\n */\nfunction resizeGeo(geoModel, api) {\n var boundingCoords = geoModel.get('boundingCoords');\n if (boundingCoords != null) {\n var leftTop_1 = boundingCoords[0];\n var rightBottom_1 = boundingCoords[1];\n if (!(isFinite(leftTop_1[0]) && isFinite(leftTop_1[1]) && isFinite(rightBottom_1[0]) && isFinite(rightBottom_1[1]))) {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Invalid boundingCoords');\n }\n } else {\n // Sample around the lng/lat rect and use projection to calculate actual bounding rect.\n var projection_1 = this.projection;\n if (projection_1) {\n var xMin = leftTop_1[0];\n var yMin = leftTop_1[1];\n var xMax = rightBottom_1[0];\n var yMax = rightBottom_1[1];\n leftTop_1 = [Infinity, Infinity];\n rightBottom_1 = [-Infinity, -Infinity];\n // TODO better way?\n var sampleLine = function (x0, y0, x1, y1) {\n var dx = x1 - x0;\n var dy = y1 - y0;\n for (var i = 0; i <= 100; i++) {\n var p = i / 100;\n var pt = projection_1.project([x0 + dx * p, y0 + dy * p]);\n vector.min(leftTop_1, leftTop_1, pt);\n vector.max(rightBottom_1, rightBottom_1, pt);\n }\n };\n // Top\n sampleLine(xMin, yMin, xMax, yMin);\n // Right\n sampleLine(xMax, yMin, xMax, yMax);\n // Bottom\n sampleLine(xMax, yMax, xMin, yMax);\n // Left\n sampleLine(xMin, yMax, xMax, yMin);\n }\n this.setBoundingRect(leftTop_1[0], leftTop_1[1], rightBottom_1[0] - leftTop_1[0], rightBottom_1[1] - leftTop_1[1]);\n }\n }\n var rect = this.getBoundingRect();\n var centerOption = geoModel.get('layoutCenter');\n var sizeOption = geoModel.get('layoutSize');\n // Laying out geo on `dataCoordSys`, such as cartesian, works theoretically but not supported yet.\n // Therefore here we only handle cases that laying out on `boxCoordSys`, such as matrix/calendar.\n var refContainer = layout.createBoxLayoutReference(geoModel, api).refContainer;\n var aspect = rect.width / rect.height * this.aspectScale;\n var useCenterAndSize = false;\n var center;\n var size;\n if (centerOption && sizeOption) {\n center = [numberUtil.parsePercent(centerOption[0], refContainer.width) + refContainer.x, numberUtil.parsePercent(centerOption[1], refContainer.height) + refContainer.y];\n size = numberUtil.parsePercent(sizeOption, Math.min(refContainer.width, refContainer.height));\n if (!isNaN(center[0]) && !isNaN(center[1]) && !isNaN(size)) {\n useCenterAndSize = true;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n console.warn('Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead.');\n }\n }\n }\n var viewRect;\n if (useCenterAndSize) {\n viewRect = {};\n if (aspect > 1) {\n // Width is same with size\n viewRect.width = size;\n viewRect.height = size / aspect;\n } else {\n viewRect.height = size;\n viewRect.width = size * aspect;\n }\n viewRect.y = center[1] - viewRect.height / 2;\n viewRect.x = center[0] - viewRect.width / 2;\n } else {\n // Use left/top/width/height\n var boxLayoutOption = geoModel.getBoxLayoutParams();\n boxLayoutOption.aspect = aspect;\n viewRect = layout.getLayoutRect(boxLayoutOption, refContainer);\n viewRect = layout.applyPreserveAspect(geoModel, viewRect, aspect);\n }\n this.setViewRect(viewRect.x, viewRect.y, viewRect.width, viewRect.height);\n this.setCenter(geoModel.get('center'));\n this.setZoom(geoModel.get('zoom'));\n}\n// Back compat for ECharts2, where the coord map is set on map series:\n// {type: 'map', geoCoord: {'cityA': [116.46,39.92], 'cityA': [119.12,24.61]}},\nfunction setGeoCoords(geo, model) {\n zrUtil.each(model.get('geoCoord'), function (geoCoord, name) {\n geo.addGeoCoord(name, geoCoord);\n });\n}\nvar GeoCreator = /** @class */function () {\n function GeoCreator() {\n // For deciding which dimensions to use when creating list data\n this.dimensions = geo2DDimensions;\n }\n GeoCreator.prototype.create = function (ecModel, api) {\n var geoList = [];\n function getCommonGeoProperties(model) {\n return {\n nameProperty: model.get('nameProperty'),\n aspectScale: model.get('aspectScale'),\n projection: model.get('projection')\n };\n }\n // FIXME Create each time may be slow\n ecModel.eachComponent('geo', function (geoModel, idx) {\n var mapName = geoModel.get('map');\n var geo = new Geo(mapName + idx, mapName, zrUtil.extend({\n nameMap: geoModel.get('nameMap'),\n api: api,\n ecModel: ecModel\n }, getCommonGeoProperties(geoModel)));\n geo.zoomLimit = geoModel.get('scaleLimit');\n geoList.push(geo);\n // setGeoCoords(geo, geoModel);\n geoModel.coordinateSystem = geo;\n geo.model = geoModel;\n // Inject resize method\n geo.resize = resizeGeo;\n geo.resize(geoModel, api);\n });\n ecModel.eachSeries(function (seriesModel) {\n injectCoordSysByOption({\n targetModel: seriesModel,\n coordSysType: 'geo',\n coordSysProvider: function () {\n var geoModel = seriesModel.subType === 'map' ? seriesModel.getHostGeoModel() : seriesModel.getReferringComponents('geo', SINGLE_REFERRING).models[0];\n return geoModel && geoModel.coordinateSystem;\n },\n allowNotFound: true\n });\n });\n // If has map series\n var mapModelGroupBySeries = {};\n ecModel.eachSeriesByType('map', function (seriesModel) {\n if (!seriesModel.getHostGeoModel()) {\n var mapType = seriesModel.getMapType();\n mapModelGroupBySeries[mapType] = mapModelGroupBySeries[mapType] || [];\n mapModelGroupBySeries[mapType].push(seriesModel);\n }\n });\n zrUtil.each(mapModelGroupBySeries, function (mapSeries, mapType) {\n var nameMapList = zrUtil.map(mapSeries, function (singleMapSeries) {\n return singleMapSeries.get('nameMap');\n });\n var geo = new Geo(mapType, mapType, zrUtil.extend({\n nameMap: zrUtil.mergeAll(nameMapList),\n api: api,\n ecModel: ecModel\n }, getCommonGeoProperties(mapSeries[0])));\n geo.zoomLimit = zrUtil.retrieve.apply(null, zrUtil.map(mapSeries, function (singleMapSeries) {\n return singleMapSeries.get('scaleLimit');\n }));\n geoList.push(geo);\n // Inject resize method\n geo.resize = resizeGeo;\n geo.resize(mapSeries[0], api);\n zrUtil.each(mapSeries, function (singleMapSeries) {\n singleMapSeries.coordinateSystem = geo;\n setGeoCoords(geo, singleMapSeries);\n });\n });\n return geoList;\n };\n /**\n * Fill given regions array\n */\n GeoCreator.prototype.getFilledRegions = function (originRegionArr, mapName, nameMap, nameProperty) {\n // Not use the original\n var regionsArr = (originRegionArr || []).slice();\n var dataNameMap = zrUtil.createHashMap();\n for (var i = 0; i < regionsArr.length; i++) {\n dataNameMap.set(regionsArr[i].name, regionsArr[i]);\n }\n var source = geoSourceManager.load(mapName, nameMap, nameProperty);\n zrUtil.each(source.regions, function (region) {\n var name = region.name;\n var regionOption = dataNameMap.get(name);\n // apply specified echarts style in GeoJSON data\n var specifiedGeoJSONRegionStyle = region.properties && region.properties.echartsStyle;\n if (!regionOption) {\n regionOption = {\n name: name\n };\n regionsArr.push(regionOption);\n }\n specifiedGeoJSONRegionStyle && zrUtil.merge(regionOption, specifiedGeoJSONRegionStyle);\n });\n return regionsArr;\n };\n return GeoCreator;\n}();\nvar geoCreator = new GeoCreator();\nexport default geoCreator;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../../util/model.js';\nimport ComponentModel from '../../model/Component.js';\nimport Model from '../../model/Model.js';\nimport geoCreator from './geoCreator.js';\nimport geoSourceManager from './geoSourceManager.js';\nimport tokens from '../../visual/tokens.js';\n;\nvar GeoModel = /** @class */function (_super) {\n __extends(GeoModel, _super);\n function GeoModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GeoModel.type;\n return _this;\n }\n GeoModel.prototype.init = function (option, parentModel, ecModel) {\n this.mergeDefaultAndTheme(option, ecModel);\n var source = geoSourceManager.getGeoResource(option.map);\n if (source && source.type === 'geoJSON') {\n var itemStyle = option.itemStyle = option.itemStyle || {};\n if (!('color' in itemStyle)) {\n itemStyle.color = option.defaultItemStyleColor || tokens.color.backgroundTint;\n }\n }\n // Default label emphasis `show`\n modelUtil.defaultEmphasis(option, 'label', ['show']);\n };\n GeoModel.prototype.optionUpdated = function () {\n var _this = this;\n var option = this.option;\n option.regions = geoCreator.getFilledRegions(option.regions, option.map, option.nameMap, option.nameProperty);\n var selectedMap = {};\n this._optionModelMap = zrUtil.reduce(option.regions || [], function (optionModelMap, regionOpt) {\n var regionName = regionOpt.name;\n if (regionName) {\n optionModelMap.set(regionName, new Model(regionOpt, _this, _this.ecModel));\n if (regionOpt.selected) {\n selectedMap[regionName] = true;\n }\n }\n return optionModelMap;\n }, zrUtil.createHashMap());\n if (!option.selectedMap) {\n option.selectedMap = selectedMap;\n }\n };\n /**\n * Get model of region.\n */\n GeoModel.prototype.getRegionModel = function (name) {\n return this._optionModelMap.get(name) || new Model(null, this, this.ecModel);\n };\n /**\n * Format label\n * @param name Region name\n */\n GeoModel.prototype.getFormattedLabel = function (name, status) {\n var regionModel = this.getRegionModel(name);\n var formatter = status === 'normal' ? regionModel.get(['label', 'formatter']) : regionModel.get(['emphasis', 'label', 'formatter']);\n var params = {\n name: name\n };\n if (zrUtil.isFunction(formatter)) {\n params.status = status;\n return formatter(params);\n } else if (zrUtil.isString(formatter)) {\n return formatter.replace('{a}', name != null ? name : '');\n }\n };\n GeoModel.prototype.setZoom = function (zoom) {\n this.option.zoom = zoom;\n };\n GeoModel.prototype.setCenter = function (center) {\n this.option.center = center;\n };\n // PENGING If selectedMode is null ?\n GeoModel.prototype.select = function (name) {\n var option = this.option;\n var selectedMode = option.selectedMode;\n if (!selectedMode) {\n return;\n }\n if (selectedMode !== 'multiple') {\n option.selectedMap = null;\n }\n var selectedMap = option.selectedMap || (option.selectedMap = {});\n selectedMap[name] = true;\n };\n GeoModel.prototype.unSelect = function (name) {\n var selectedMap = this.option.selectedMap;\n if (selectedMap) {\n selectedMap[name] = false;\n }\n };\n GeoModel.prototype.toggleSelected = function (name) {\n this[this.isSelected(name) ? 'unSelect' : 'select'](name);\n };\n GeoModel.prototype.isSelected = function (name) {\n var selectedMap = this.option.selectedMap;\n return !!(selectedMap && selectedMap[name]);\n };\n GeoModel.type = 'geo';\n GeoModel.layoutMode = 'box';\n GeoModel.defaultOption = {\n // zlevel: 0,\n z: 0,\n show: true,\n left: 'center',\n top: 'center',\n // Default value:\n // for geoSVG source: 1,\n // for geoJSON source: 0.75.\n aspectScale: null,\n // /// Layout with center and size\n // If you want to put map in a fixed size box with right aspect ratio\n // This two properties may be more convenient\n // layoutCenter: [50%, 50%]\n // layoutSize: 100\n silent: false,\n // Map type\n map: '',\n // Define left-top, right-bottom coords to control view\n // For example, [ [180, 90], [-180, -90] ]\n boundingCoords: null,\n // Default on center of map\n center: null,\n zoom: 1,\n scaleLimit: null,\n // selectedMode: false\n label: {\n show: false,\n color: tokens.color.tertiary\n },\n itemStyle: {\n borderWidth: 0.5,\n borderColor: tokens.color.border\n },\n emphasis: {\n label: {\n show: true,\n color: tokens.color.primary\n },\n itemStyle: {\n color: tokens.color.highlight\n }\n },\n select: {\n label: {\n show: true,\n color: tokens.color.primary\n },\n itemStyle: {\n color: tokens.color.highlight\n }\n },\n regions: []\n // tooltip: {\n // show: false\n // }\n };\n return GeoModel;\n}(ComponentModel);\nexport default GeoModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport MapDraw from '../helper/MapDraw.js';\nimport ComponentView from '../../view/Component.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { findEventDispatcher } from '../../util/event.js';\nvar GeoView = /** @class */function (_super) {\n __extends(GeoView, _super);\n function GeoView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GeoView.type;\n _this.focusBlurEnabled = true;\n return _this;\n }\n GeoView.prototype.init = function (ecModel, api) {\n this._api = api;\n };\n GeoView.prototype.render = function (geoModel, ecModel, api, payload) {\n this._model = geoModel;\n if (!geoModel.get('show')) {\n this._mapDraw && this._mapDraw.remove();\n this._mapDraw = null;\n return;\n }\n if (!this._mapDraw) {\n this._mapDraw = new MapDraw(api);\n }\n var mapDraw = this._mapDraw;\n mapDraw.draw(geoModel, ecModel, api, this, payload);\n mapDraw.group.on('click', this._handleRegionClick, this);\n mapDraw.group.silent = geoModel.get('silent');\n this.group.add(mapDraw.group);\n this.updateSelectStatus(geoModel, ecModel, api);\n };\n GeoView.prototype._handleRegionClick = function (e) {\n var eventData;\n findEventDispatcher(e.target, function (current) {\n return (eventData = getECData(current).eventData) != null;\n }, true);\n if (eventData) {\n this._api.dispatchAction({\n type: 'geoToggleSelect',\n geoId: this._model.id,\n name: eventData.name\n });\n }\n };\n GeoView.prototype.updateSelectStatus = function (model, ecModel, api) {\n var _this = this;\n this._mapDraw.group.traverse(function (node) {\n var eventData = getECData(node).eventData;\n if (eventData) {\n _this._model.isSelected(eventData.name) ? api.enterSelect(node) : api.leaveSelect(node);\n // No need to traverse children.\n return true;\n }\n });\n };\n GeoView.prototype.findHighDownDispatchers = function (name) {\n return this._mapDraw && this._mapDraw.findHighDownDispatchers(name, this._model);\n };\n GeoView.prototype.dispose = function () {\n this._mapDraw && this._mapDraw.remove();\n };\n GeoView.type = 'geo';\n return GeoView;\n}(ComponentView);\nexport default GeoView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport GeoModel from '../../coord/geo/GeoModel.js';\nimport geoCreator from '../../coord/geo/geoCreator.js';\nimport { each } from 'zrender/lib/core/util.js';\nimport { updateCenterAndZoomInAction } from '../../component/helper/roamHelper.js';\nimport GeoView from './GeoView.js';\nimport geoSourceManager from '../../coord/geo/geoSourceManager.js';\nfunction registerMap(mapName, geoJson, specialAreas) {\n geoSourceManager.registerMap(mapName, geoJson, specialAreas);\n}\nexport function install(registers) {\n registers.registerCoordinateSystem('geo', geoCreator);\n registers.registerComponentModel(GeoModel);\n registers.registerComponentView(GeoView);\n registers.registerImpl('registerMap', registerMap);\n registers.registerImpl('getMap', function (mapName) {\n return geoSourceManager.getMapForUser(mapName);\n });\n function makeAction(method, actionInfo) {\n actionInfo.update = 'geo:updateSelectStatus';\n registers.registerAction(actionInfo, function (payload, ecModel) {\n var selected = {};\n var allSelected = [];\n ecModel.eachComponent({\n mainType: 'geo',\n query: payload\n }, function (geoModel) {\n geoModel[method](payload.name);\n var geo = geoModel.coordinateSystem;\n each(geo.regions, function (region) {\n selected[region.name] = geoModel.isSelected(region.name) || false;\n });\n // Notice: there might be duplicated name in different regions.\n var names = [];\n each(selected, function (v, name) {\n selected[name] && names.push(name);\n });\n allSelected.push({\n geoIndex: geoModel.componentIndex,\n // Use singular, the same naming convention as the event `selectchanged`.\n name: names\n });\n });\n return {\n selected: selected,\n allSelected: allSelected,\n name: payload.name\n };\n });\n }\n makeAction('toggleSelected', {\n type: 'geoToggleSelect',\n event: 'geoselectchanged'\n });\n makeAction('select', {\n type: 'geoSelect',\n event: 'geoselected'\n });\n makeAction('unSelect', {\n type: 'geoUnSelect',\n event: 'geounselected'\n });\n /**\n * @payload\n * @property {string} [componentType=series]\n * @property {number} [dx]\n * @property {number} [dy]\n * @property {number} [zoom]\n * @property {number} [originX]\n * @property {number} [originY]\n */\n registers.registerAction({\n type: 'geoRoam',\n event: 'geoRoam',\n update: 'updateTransform'\n }, function (payload, ecModel, api) {\n var componentType = payload.componentType;\n if (!componentType) {\n // backward compat, but `payload.componentType` is deprecated.\n if (payload.geoId != null) {\n componentType = 'geo';\n } else if (payload.seriesId != null) {\n componentType = 'series';\n }\n }\n if (!componentType) {\n componentType = 'series';\n }\n // FIXME: payload.geoId/payload.seriesId should be required, but historically\n // it is not mandatory, causing that all of the geo or series can be queried below,\n // which is not reasonable.\n ecModel.eachComponent({\n mainType: componentType,\n query: payload\n }, function (componentModel) {\n var geo = componentModel.coordinateSystem;\n if (geo.type !== 'geo') {\n return;\n }\n var res = updateCenterAndZoomInAction(geo, payload, componentModel.get('scaleLimit'));\n componentModel.setCenter && componentModel.setCenter(res.center);\n componentModel.setZoom && componentModel.setZoom(res.zoom);\n // All map series with same `map` use the same geo coordinate system\n // So the center and zoom must be in sync. Include the series not selected by legend\n if (componentType === 'series') {\n each(componentModel.seriesGroup, function (seriesModel) {\n seriesModel.setCenter(res.center);\n seriesModel.setZoom(res.zoom);\n });\n }\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as zrColor from 'zrender/lib/tool/color.js';\nimport { linearMap } from '../util/number.js';\nimport { warn } from '../util/log.js';\nvar each = zrUtil.each;\nvar isObject = zrUtil.isObject;\nvar CATEGORY_DEFAULT_VISUAL_INDEX = -1;\nvar VisualMapping = /** @class */function () {\n function VisualMapping(option) {\n var mappingMethod = option.mappingMethod;\n var visualType = option.type;\n var thisOption = this.option = zrUtil.clone(option);\n this.type = visualType;\n this.mappingMethod = mappingMethod;\n this._normalizeData = normalizers[mappingMethod];\n var visualHandler = VisualMapping.visualHandlers[visualType];\n this.applyVisual = visualHandler.applyVisual;\n this.getColorMapper = visualHandler.getColorMapper;\n this._normalizedToVisual = visualHandler._normalizedToVisual[mappingMethod];\n if (mappingMethod === 'piecewise') {\n normalizeVisualRange(thisOption);\n preprocessForPiecewise(thisOption);\n } else if (mappingMethod === 'category') {\n thisOption.categories ? preprocessForSpecifiedCategory(thisOption)\n // categories is ordinal when thisOption.categories not specified,\n // which need no more preprocess except normalize visual.\n : normalizeVisualRange(thisOption, true);\n } else {\n // mappingMethod === 'linear' or 'fixed'\n zrUtil.assert(mappingMethod !== 'linear' || thisOption.dataExtent);\n normalizeVisualRange(thisOption);\n }\n }\n VisualMapping.prototype.mapValueToVisual = function (value) {\n var normalized = this._normalizeData(value);\n return this._normalizedToVisual(normalized, value);\n };\n VisualMapping.prototype.getNormalizer = function () {\n return zrUtil.bind(this._normalizeData, this);\n };\n /**\n * List available visual types.\n *\n * @public\n * @return {Array.<string>}\n */\n VisualMapping.listVisualTypes = function () {\n return zrUtil.keys(VisualMapping.visualHandlers);\n };\n // /**\n // * @public\n // */\n // static addVisualHandler(name, handler) {\n // visualHandlers[name] = handler;\n // }\n /**\n * @public\n */\n VisualMapping.isValidType = function (visualType) {\n return VisualMapping.visualHandlers.hasOwnProperty(visualType);\n };\n /**\n * Convenient method.\n * Visual can be Object or Array or primary type.\n */\n VisualMapping.eachVisual = function (visual, callback, context) {\n if (zrUtil.isObject(visual)) {\n zrUtil.each(visual, callback, context);\n } else {\n callback.call(context, visual);\n }\n };\n VisualMapping.mapVisual = function (visual, callback, context) {\n var isPrimary;\n var newVisual = zrUtil.isArray(visual) ? [] : zrUtil.isObject(visual) ? {} : (isPrimary = true, null);\n VisualMapping.eachVisual(visual, function (v, key) {\n var newVal = callback.call(context, v, key);\n isPrimary ? newVisual = newVal : newVisual[key] = newVal;\n });\n return newVisual;\n };\n /**\n * Retrieve visual properties from given object.\n */\n VisualMapping.retrieveVisuals = function (obj) {\n var ret = {};\n var hasVisual;\n obj && each(VisualMapping.visualHandlers, function (h, visualType) {\n if (obj.hasOwnProperty(visualType)) {\n ret[visualType] = obj[visualType];\n hasVisual = true;\n }\n });\n return hasVisual ? ret : null;\n };\n /**\n * Give order to visual types, considering colorSaturation, colorAlpha depends on color.\n *\n * @public\n * @param {(Object|Array)} visualTypes If Object, like: {color: ..., colorSaturation: ...}\n * IF Array, like: ['color', 'symbol', 'colorSaturation']\n * @return {Array.<string>} Sorted visual types.\n */\n VisualMapping.prepareVisualTypes = function (visualTypes) {\n if (zrUtil.isArray(visualTypes)) {\n visualTypes = visualTypes.slice();\n } else if (isObject(visualTypes)) {\n var types_1 = [];\n each(visualTypes, function (item, type) {\n types_1.push(type);\n });\n visualTypes = types_1;\n } else {\n return [];\n }\n visualTypes.sort(function (type1, type2) {\n // color should be front of colorSaturation, colorAlpha, ...\n // symbol and symbolSize do not matter.\n return type2 === 'color' && type1 !== 'color' && type1.indexOf('color') === 0 ? 1 : -1;\n });\n return visualTypes;\n };\n /**\n * 'color', 'colorSaturation', 'colorAlpha', ... are depends on 'color'.\n * Other visuals are only depends on themself.\n */\n VisualMapping.dependsOn = function (visualType1, visualType2) {\n return visualType2 === 'color' ? !!(visualType1 && visualType1.indexOf(visualType2) === 0) : visualType1 === visualType2;\n };\n /**\n * @param value\n * @param pieceList [{value: ..., interval: [min, max]}, ...]\n * Always from small to big.\n * @param findClosestWhenOutside Default to be false\n * @return index\n */\n VisualMapping.findPieceIndex = function (value, pieceList, findClosestWhenOutside) {\n var possibleI;\n var abs = Infinity;\n // value has the higher priority.\n for (var i = 0, len = pieceList.length; i < len; i++) {\n var pieceValue = pieceList[i].value;\n if (pieceValue != null) {\n if (pieceValue === value\n // FIXME\n // It is supposed to compare value according to value type of dimension,\n // but currently value type can exactly be string or number.\n // Compromise for numeric-like string (like '12'), especially\n // in the case that visualMap.categories is ['22', '33'].\n || zrUtil.isString(pieceValue) && pieceValue === value + '') {\n return i;\n }\n findClosestWhenOutside && updatePossible(pieceValue, i);\n }\n }\n for (var i = 0, len = pieceList.length; i < len; i++) {\n var piece = pieceList[i];\n var interval = piece.interval;\n var close_1 = piece.close;\n if (interval) {\n if (interval[0] === -Infinity) {\n if (littleThan(close_1[1], value, interval[1])) {\n return i;\n }\n } else if (interval[1] === Infinity) {\n if (littleThan(close_1[0], interval[0], value)) {\n return i;\n }\n } else if (littleThan(close_1[0], interval[0], value) && littleThan(close_1[1], value, interval[1])) {\n return i;\n }\n findClosestWhenOutside && updatePossible(interval[0], i);\n findClosestWhenOutside && updatePossible(interval[1], i);\n }\n }\n if (findClosestWhenOutside) {\n return value === Infinity ? pieceList.length - 1 : value === -Infinity ? 0 : possibleI;\n }\n function updatePossible(val, index) {\n var newAbs = Math.abs(val - value);\n if (newAbs < abs) {\n abs = newAbs;\n possibleI = index;\n }\n }\n };\n VisualMapping.visualHandlers = {\n color: {\n applyVisual: makeApplyVisual('color'),\n getColorMapper: function () {\n var thisOption = this.option;\n return zrUtil.bind(thisOption.mappingMethod === 'category' ? function (value, isNormalized) {\n !isNormalized && (value = this._normalizeData(value));\n return doMapCategory.call(this, value);\n } : function (value, isNormalized, out) {\n // If output rgb array\n // which will be much faster and useful in pixel manipulation\n var returnRGBArray = !!out;\n !isNormalized && (value = this._normalizeData(value));\n out = zrColor.fastLerp(value, thisOption.parsedVisual, out);\n return returnRGBArray ? out : zrColor.stringify(out, 'rgba');\n }, this);\n },\n _normalizedToVisual: {\n linear: function (normalized) {\n return zrColor.stringify(zrColor.fastLerp(normalized, this.option.parsedVisual), 'rgba');\n },\n category: doMapCategory,\n piecewise: function (normalized, value) {\n var result = getSpecifiedVisual.call(this, value);\n if (result == null) {\n result = zrColor.stringify(zrColor.fastLerp(normalized, this.option.parsedVisual), 'rgba');\n }\n return result;\n },\n fixed: doMapFixed\n }\n },\n colorHue: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyHSL(color, value);\n }),\n colorSaturation: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyHSL(color, null, value);\n }),\n colorLightness: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyHSL(color, null, null, value);\n }),\n colorAlpha: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyAlpha(color, value);\n }),\n decal: {\n applyVisual: makeApplyVisual('decal'),\n _normalizedToVisual: {\n linear: null,\n category: doMapCategory,\n piecewise: null,\n fixed: null\n }\n },\n opacity: {\n applyVisual: makeApplyVisual('opacity'),\n _normalizedToVisual: createNormalizedToNumericVisual([0, 1])\n },\n liftZ: {\n applyVisual: makeApplyVisual('liftZ'),\n _normalizedToVisual: {\n linear: doMapFixed,\n category: doMapFixed,\n piecewise: doMapFixed,\n fixed: doMapFixed\n }\n },\n symbol: {\n applyVisual: function (value, getter, setter) {\n var symbolCfg = this.mapValueToVisual(value);\n setter('symbol', symbolCfg);\n },\n _normalizedToVisual: {\n linear: doMapToArray,\n category: doMapCategory,\n piecewise: function (normalized, value) {\n var result = getSpecifiedVisual.call(this, value);\n if (result == null) {\n result = doMapToArray.call(this, normalized);\n }\n return result;\n },\n fixed: doMapFixed\n }\n },\n symbolSize: {\n applyVisual: makeApplyVisual('symbolSize'),\n _normalizedToVisual: createNormalizedToNumericVisual([0, 1])\n }\n };\n return VisualMapping;\n}();\nfunction preprocessForPiecewise(thisOption) {\n var pieceList = thisOption.pieceList;\n thisOption.hasSpecialVisual = false;\n zrUtil.each(pieceList, function (piece, index) {\n piece.originIndex = index;\n // piece.visual is \"result visual value\" but not\n // a visual range, so it does not need to be normalized.\n if (piece.visual != null) {\n thisOption.hasSpecialVisual = true;\n }\n });\n}\nfunction preprocessForSpecifiedCategory(thisOption) {\n // Hash categories.\n var categories = thisOption.categories;\n var categoryMap = thisOption.categoryMap = {};\n var visual = thisOption.visual;\n each(categories, function (cate, index) {\n categoryMap[cate] = index;\n });\n // Process visual map input.\n if (!zrUtil.isArray(visual)) {\n var visualArr_1 = [];\n if (zrUtil.isObject(visual)) {\n each(visual, function (v, cate) {\n var index = categoryMap[cate];\n visualArr_1[index != null ? index : CATEGORY_DEFAULT_VISUAL_INDEX] = v;\n });\n } else {\n // Is primary type, represents default visual.\n visualArr_1[CATEGORY_DEFAULT_VISUAL_INDEX] = visual;\n }\n visual = setVisualToOption(thisOption, visualArr_1);\n }\n // Remove categories that has no visual,\n // then we can mapping them to CATEGORY_DEFAULT_VISUAL_INDEX.\n for (var i = categories.length - 1; i >= 0; i--) {\n if (visual[i] == null) {\n delete categoryMap[categories[i]];\n categories.pop();\n }\n }\n}\nfunction normalizeVisualRange(thisOption, isCategory) {\n var visual = thisOption.visual;\n var visualArr = [];\n if (zrUtil.isObject(visual)) {\n each(visual, function (v) {\n visualArr.push(v);\n });\n } else if (visual != null) {\n visualArr.push(visual);\n }\n var doNotNeedPair = {\n color: 1,\n symbol: 1\n };\n if (!isCategory && visualArr.length === 1 && !doNotNeedPair.hasOwnProperty(thisOption.type)) {\n // Do not care visualArr.length === 0, which is illegal.\n visualArr[1] = visualArr[0];\n }\n setVisualToOption(thisOption, visualArr);\n}\nfunction makePartialColorVisualHandler(applyValue) {\n return {\n applyVisual: function (value, getter, setter) {\n // Only used in HSL\n var colorChannel = this.mapValueToVisual(value);\n // Must not be array value\n setter('color', applyValue(getter('color'), colorChannel));\n },\n _normalizedToVisual: createNormalizedToNumericVisual([0, 1])\n };\n}\nfunction doMapToArray(normalized) {\n var visual = this.option.visual;\n return visual[Math.round(linearMap(normalized, [0, 1], [0, visual.length - 1], true))] || {}; // TODO {}?\n}\nfunction makeApplyVisual(visualType) {\n return function (value, getter, setter) {\n setter(visualType, this.mapValueToVisual(value));\n };\n}\nfunction doMapCategory(normalized) {\n var visual = this.option.visual;\n return visual[this.option.loop && normalized !== CATEGORY_DEFAULT_VISUAL_INDEX ? normalized % visual.length : normalized];\n}\nfunction doMapFixed() {\n // visual will be convert to array.\n return this.option.visual[0];\n}\n/**\n * Create mapped to numeric visual\n */\nfunction createNormalizedToNumericVisual(sourceExtent) {\n return {\n linear: function (normalized) {\n return linearMap(normalized, sourceExtent, this.option.visual, true);\n },\n category: doMapCategory,\n piecewise: function (normalized, value) {\n var result = getSpecifiedVisual.call(this, value);\n if (result == null) {\n result = linearMap(normalized, sourceExtent, this.option.visual, true);\n }\n return result;\n },\n fixed: doMapFixed\n };\n}\nfunction getSpecifiedVisual(value) {\n var thisOption = this.option;\n var pieceList = thisOption.pieceList;\n if (thisOption.hasSpecialVisual) {\n var pieceIndex = VisualMapping.findPieceIndex(value, pieceList);\n var piece = pieceList[pieceIndex];\n if (piece && piece.visual) {\n return piece.visual[this.type];\n }\n }\n}\nfunction setVisualToOption(thisOption, visualArr) {\n thisOption.visual = visualArr;\n if (thisOption.type === 'color') {\n thisOption.parsedVisual = zrUtil.map(visualArr, function (item) {\n var color = zrColor.parse(item);\n if (!color && process.env.NODE_ENV !== 'production') {\n warn(\"'\" + item + \"' is an illegal color, fallback to '#000000'\", true);\n }\n return color || [0, 0, 0, 1];\n });\n }\n return visualArr;\n}\n/**\n * Normalizers by mapping methods.\n */\nvar normalizers = {\n linear: function (value) {\n return linearMap(value, this.option.dataExtent, [0, 1], true);\n },\n piecewise: function (value) {\n var pieceList = this.option.pieceList;\n var pieceIndex = VisualMapping.findPieceIndex(value, pieceList, true);\n if (pieceIndex != null) {\n return linearMap(pieceIndex, [0, pieceList.length - 1], [0, 1], true);\n }\n },\n category: function (value) {\n var index = this.option.categories ? this.option.categoryMap[value] : value; // ordinal value\n return index == null ? CATEGORY_DEFAULT_VISUAL_INDEX : index;\n },\n fixed: zrUtil.noop\n};\nfunction littleThan(close, a, b) {\n return close ? a <= b : a < b;\n}\nexport default VisualMapping;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/**\n * Line path for bezier and straight line draw\n */\nimport * as graphic from '../../util/graphic.js';\nimport * as vec2 from 'zrender/lib/core/vector.js';\nimport tokens from '../../visual/tokens.js';\nvar straightLineProto = graphic.Line.prototype;\nvar bezierCurveProto = graphic.BezierCurve.prototype;\nvar StraightLineShape = /** @class */function () {\n function StraightLineShape() {\n // Start point\n this.x1 = 0;\n this.y1 = 0;\n // End point\n this.x2 = 0;\n this.y2 = 0;\n this.percent = 1;\n }\n return StraightLineShape;\n}();\nvar CurveShape = /** @class */function (_super) {\n __extends(CurveShape, _super);\n function CurveShape() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return CurveShape;\n}(StraightLineShape);\nfunction isStraightLine(shape) {\n return isNaN(+shape.cpx1) || isNaN(+shape.cpy1);\n}\nvar ECLinePath = /** @class */function (_super) {\n __extends(ECLinePath, _super);\n function ECLinePath(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'ec-line';\n return _this;\n }\n ECLinePath.prototype.getDefaultStyle = function () {\n return {\n stroke: tokens.color.neutral99,\n fill: null\n };\n };\n ECLinePath.prototype.getDefaultShape = function () {\n return new StraightLineShape();\n };\n ECLinePath.prototype.buildPath = function (ctx, shape) {\n if (isStraightLine(shape)) {\n straightLineProto.buildPath.call(this, ctx, shape);\n } else {\n bezierCurveProto.buildPath.call(this, ctx, shape);\n }\n };\n ECLinePath.prototype.pointAt = function (t) {\n if (isStraightLine(this.shape)) {\n return straightLineProto.pointAt.call(this, t);\n } else {\n return bezierCurveProto.pointAt.call(this, t);\n }\n };\n ECLinePath.prototype.tangentAt = function (t) {\n var shape = this.shape;\n var p = isStraightLine(shape) ? [shape.x2 - shape.x1, shape.y2 - shape.y1] : bezierCurveProto.tangentAt.call(this, t);\n return vec2.normalize(p, p);\n };\n return ECLinePath;\n}(graphic.Path);\nexport default ECLinePath;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { isArray, each, retrieve2 } from 'zrender/lib/core/util.js';\nimport * as vector from 'zrender/lib/core/vector.js';\nimport * as symbolUtil from '../../util/symbol.js';\nimport ECLinePath from './LinePath.js';\nimport * as graphic from '../../util/graphic.js';\nimport { toggleHoverEmphasis, enterEmphasis, leaveEmphasis, SPECIAL_STATES } from '../../util/states.js';\nimport { getLabelStatesModels, setLabelStyle } from '../../label/labelStyle.js';\nimport { round } from '../../util/number.js';\nimport tokens from '../../visual/tokens.js';\nvar SYMBOL_CATEGORIES = ['fromSymbol', 'toSymbol'];\nfunction makeSymbolTypeKey(symbolCategory) {\n return '_' + symbolCategory + 'Type';\n}\nfunction makeSymbolTypeValue(name, lineData, idx) {\n var symbolType = lineData.getItemVisual(idx, name);\n if (!symbolType || symbolType === 'none') {\n return symbolType;\n }\n var symbolSize = lineData.getItemVisual(idx, name + 'Size');\n var symbolRotate = lineData.getItemVisual(idx, name + 'Rotate');\n var symbolOffset = lineData.getItemVisual(idx, name + 'Offset');\n var symbolKeepAspect = lineData.getItemVisual(idx, name + 'KeepAspect');\n var symbolSizeArr = symbolUtil.normalizeSymbolSize(symbolSize);\n var symbolOffsetArr = symbolUtil.normalizeSymbolOffset(symbolOffset || 0, symbolSizeArr);\n return symbolType + symbolSizeArr + symbolOffsetArr + (symbolRotate || '') + (symbolKeepAspect || '');\n}\n/**\n * @inner\n */\nfunction createSymbol(name, lineData, idx) {\n var symbolType = lineData.getItemVisual(idx, name);\n if (!symbolType || symbolType === 'none') {\n return;\n }\n var symbolSize = lineData.getItemVisual(idx, name + 'Size');\n var symbolRotate = lineData.getItemVisual(idx, name + 'Rotate');\n var symbolOffset = lineData.getItemVisual(idx, name + 'Offset');\n var symbolKeepAspect = lineData.getItemVisual(idx, name + 'KeepAspect');\n var symbolSizeArr = symbolUtil.normalizeSymbolSize(symbolSize);\n var symbolOffsetArr = symbolUtil.normalizeSymbolOffset(symbolOffset || 0, symbolSizeArr);\n var symbolPath = symbolUtil.createSymbol(symbolType, -symbolSizeArr[0] / 2 + symbolOffsetArr[0], -symbolSizeArr[1] / 2 + symbolOffsetArr[1], symbolSizeArr[0], symbolSizeArr[1], null, symbolKeepAspect);\n symbolPath.__specifiedRotation = symbolRotate == null || isNaN(symbolRotate) ? void 0 : +symbolRotate * Math.PI / 180 || 0;\n symbolPath.name = name;\n return symbolPath;\n}\nfunction createLine(points) {\n var line = new ECLinePath({\n name: 'line',\n subPixelOptimize: true\n });\n setLinePoints(line.shape, points);\n return line;\n}\nfunction setLinePoints(targetShape, points) {\n targetShape.x1 = points[0][0];\n targetShape.y1 = points[0][1];\n targetShape.x2 = points[1][0];\n targetShape.y2 = points[1][1];\n targetShape.percent = 1;\n var cp1 = points[2];\n if (cp1) {\n targetShape.cpx1 = cp1[0];\n targetShape.cpy1 = cp1[1];\n } else {\n targetShape.cpx1 = NaN;\n targetShape.cpy1 = NaN;\n }\n}\nvar Line = /** @class */function (_super) {\n __extends(Line, _super);\n function Line(lineData, idx, seriesScope) {\n var _this = _super.call(this) || this;\n _this._createLine(lineData, idx, seriesScope);\n return _this;\n }\n Line.prototype._createLine = function (lineData, idx, seriesScope) {\n var seriesModel = lineData.hostModel;\n var linePoints = lineData.getItemLayout(idx);\n var z2 = lineData.getItemVisual(idx, 'z2');\n var line = createLine(linePoints);\n line.shape.percent = 0;\n graphic.initProps(line, {\n z2: retrieve2(z2, 0),\n shape: {\n percent: 1\n }\n }, seriesModel, idx);\n this.add(line);\n each(SYMBOL_CATEGORIES, function (symbolCategory) {\n var symbol = createSymbol(symbolCategory, lineData, idx);\n // symbols must added after line to make sure\n // it will be updated after line#update.\n // Or symbol position and rotation update in line#beforeUpdate will be one frame slow\n this.add(symbol);\n this[makeSymbolTypeKey(symbolCategory)] = makeSymbolTypeValue(symbolCategory, lineData, idx);\n }, this);\n this._updateCommonStl(lineData, idx, seriesScope);\n };\n // TODO More strict on the List type in parameters?\n Line.prototype.updateData = function (lineData, idx, seriesScope) {\n var seriesModel = lineData.hostModel;\n var line = this.childOfName('line');\n var linePoints = lineData.getItemLayout(idx);\n var target = {\n shape: {}\n };\n setLinePoints(target.shape, linePoints);\n graphic.updateProps(line, target, seriesModel, idx);\n each(SYMBOL_CATEGORIES, function (symbolCategory) {\n var symbolType = makeSymbolTypeValue(symbolCategory, lineData, idx);\n var key = makeSymbolTypeKey(symbolCategory);\n // Symbol changed\n if (this[key] !== symbolType) {\n this.remove(this.childOfName(symbolCategory));\n var symbol = createSymbol(symbolCategory, lineData, idx);\n this.add(symbol);\n }\n this[key] = symbolType;\n }, this);\n this._updateCommonStl(lineData, idx, seriesScope);\n };\n ;\n Line.prototype.getLinePath = function () {\n return this.childAt(0);\n };\n Line.prototype._updateCommonStl = function (lineData, idx, seriesScope) {\n var seriesModel = lineData.hostModel;\n var line = this.childOfName('line');\n var emphasisLineStyle = seriesScope && seriesScope.emphasisLineStyle;\n var blurLineStyle = seriesScope && seriesScope.blurLineStyle;\n var selectLineStyle = seriesScope && seriesScope.selectLineStyle;\n var labelStatesModels = seriesScope && seriesScope.labelStatesModels;\n var emphasisDisabled = seriesScope && seriesScope.emphasisDisabled;\n var focus = seriesScope && seriesScope.focus;\n var blurScope = seriesScope && seriesScope.blurScope;\n // Optimization for large dataset\n if (!seriesScope || lineData.hasItemOption) {\n var itemModel = lineData.getItemModel(idx);\n var emphasisModel = itemModel.getModel('emphasis');\n emphasisLineStyle = emphasisModel.getModel('lineStyle').getLineStyle();\n blurLineStyle = itemModel.getModel(['blur', 'lineStyle']).getLineStyle();\n selectLineStyle = itemModel.getModel(['select', 'lineStyle']).getLineStyle();\n emphasisDisabled = emphasisModel.get('disabled');\n focus = emphasisModel.get('focus');\n blurScope = emphasisModel.get('blurScope');\n labelStatesModels = getLabelStatesModels(itemModel);\n }\n var lineStyle = lineData.getItemVisual(idx, 'style');\n var visualColor = lineStyle.stroke;\n line.useStyle(lineStyle);\n line.style.fill = null;\n line.style.strokeNoScale = true;\n line.ensureState('emphasis').style = emphasisLineStyle;\n line.ensureState('blur').style = blurLineStyle;\n line.ensureState('select').style = selectLineStyle;\n // Update symbol\n each(SYMBOL_CATEGORIES, function (symbolCategory) {\n var symbol = this.childOfName(symbolCategory);\n if (symbol) {\n // Share opacity and color with line.\n symbol.setColor(visualColor);\n symbol.style.opacity = lineStyle.opacity;\n for (var i = 0; i < SPECIAL_STATES.length; i++) {\n var stateName = SPECIAL_STATES[i];\n var lineState = line.getState(stateName);\n if (lineState) {\n var lineStateStyle = lineState.style || {};\n var state = symbol.ensureState(stateName);\n var stateStyle = state.style || (state.style = {});\n if (lineStateStyle.stroke != null) {\n stateStyle[symbol.__isEmptyBrush ? 'stroke' : 'fill'] = lineStateStyle.stroke;\n }\n if (lineStateStyle.opacity != null) {\n stateStyle.opacity = lineStateStyle.opacity;\n }\n }\n }\n symbol.markRedraw();\n }\n }, this);\n var rawVal = seriesModel.getRawValue(idx);\n setLabelStyle(this, labelStatesModels, {\n labelDataIndex: idx,\n labelFetcher: {\n getFormattedLabel: function (dataIndex, stateName) {\n return seriesModel.getFormattedLabel(dataIndex, stateName, lineData.dataType);\n }\n },\n inheritColor: visualColor || tokens.color.neutral99,\n defaultOpacity: lineStyle.opacity,\n defaultText: (rawVal == null ? lineData.getName(idx) : isFinite(rawVal) ? round(rawVal) : rawVal) + ''\n });\n var label = this.getTextContent();\n // Always set `textStyle` even if `normalStyle.text` is null, because default\n // values have to be set on `normalStyle`.\n if (label) {\n var labelNormalModel = labelStatesModels.normal;\n label.__align = label.style.align;\n label.__verticalAlign = label.style.verticalAlign;\n // 'start', 'middle', 'end'\n label.__position = labelNormalModel.get('position') || 'middle';\n var distance = labelNormalModel.get('distance');\n if (!isArray(distance)) {\n distance = [distance, distance];\n }\n label.__labelDistance = distance;\n }\n this.setTextConfig({\n position: null,\n local: true,\n inside: false // Can't be inside for stroke element.\n });\n toggleHoverEmphasis(this, focus, blurScope, emphasisDisabled);\n };\n Line.prototype.highlight = function () {\n enterEmphasis(this);\n };\n Line.prototype.downplay = function () {\n leaveEmphasis(this);\n };\n Line.prototype.updateLayout = function (lineData, idx) {\n this.setLinePoints(lineData.getItemLayout(idx));\n };\n Line.prototype.setLinePoints = function (points) {\n var linePath = this.childOfName('line');\n setLinePoints(linePath.shape, points);\n linePath.dirty();\n };\n Line.prototype.beforeUpdate = function () {\n var lineGroup = this;\n var symbolFrom = lineGroup.childOfName('fromSymbol');\n var symbolTo = lineGroup.childOfName('toSymbol');\n var label = lineGroup.getTextContent();\n // Quick reject\n if (!symbolFrom && !symbolTo && (!label || label.ignore)) {\n return;\n }\n var invScale = 1;\n var parentNode = this.parent;\n while (parentNode) {\n if (parentNode.scaleX) {\n invScale /= parentNode.scaleX;\n }\n parentNode = parentNode.parent;\n }\n var line = lineGroup.childOfName('line');\n // If line not changed\n // FIXME Parent scale changed\n if (!this.__dirty && !line.__dirty) {\n return;\n }\n var percent = line.shape.percent;\n var fromPos = line.pointAt(0);\n var toPos = line.pointAt(percent);\n var d = vector.sub([], toPos, fromPos);\n vector.normalize(d, d);\n function setSymbolRotation(symbol, percent) {\n // Fix #12388\n // when symbol is set to be 'arrow' in markLine,\n // symbolRotate value will be ignored, and compulsively use tangent angle.\n // rotate by default if symbol rotation is not specified\n var specifiedRotation = symbol.__specifiedRotation;\n if (specifiedRotation == null) {\n var tangent = line.tangentAt(percent);\n symbol.attr('rotation', (percent === 1 ? -1 : 1) * Math.PI / 2 - Math.atan2(tangent[1], tangent[0]));\n } else {\n symbol.attr('rotation', specifiedRotation);\n }\n }\n if (symbolFrom) {\n symbolFrom.setPosition(fromPos);\n setSymbolRotation(symbolFrom, 0);\n symbolFrom.scaleX = symbolFrom.scaleY = invScale * percent;\n symbolFrom.markRedraw();\n }\n if (symbolTo) {\n symbolTo.setPosition(toPos);\n setSymbolRotation(symbolTo, 1);\n symbolTo.scaleX = symbolTo.scaleY = invScale * percent;\n symbolTo.markRedraw();\n }\n if (label && !label.ignore) {\n label.x = label.y = 0;\n label.originX = label.originY = 0;\n var textAlign = void 0;\n var textVerticalAlign = void 0;\n var distance = label.__labelDistance;\n var distanceX = distance[0] * invScale;\n var distanceY = distance[1] * invScale;\n var halfPercent = percent / 2;\n var tangent = line.tangentAt(halfPercent);\n var n = [tangent[1], -tangent[0]];\n var cp = line.pointAt(halfPercent);\n if (n[1] > 0) {\n n[0] = -n[0];\n n[1] = -n[1];\n }\n var dir = tangent[0] < 0 ? -1 : 1;\n if (label.__position !== 'start' && label.__position !== 'end') {\n var rotation = -Math.atan2(tangent[1], tangent[0]);\n if (toPos[0] < fromPos[0]) {\n rotation = Math.PI + rotation;\n }\n label.rotation = rotation;\n }\n var dy = void 0;\n switch (label.__position) {\n case 'insideStartTop':\n case 'insideMiddleTop':\n case 'insideEndTop':\n case 'middle':\n dy = -distanceY;\n textVerticalAlign = 'bottom';\n break;\n case 'insideStartBottom':\n case 'insideMiddleBottom':\n case 'insideEndBottom':\n dy = distanceY;\n textVerticalAlign = 'top';\n break;\n default:\n dy = 0;\n textVerticalAlign = 'middle';\n }\n switch (label.__position) {\n case 'end':\n label.x = d[0] * distanceX + toPos[0];\n label.y = d[1] * distanceY + toPos[1];\n textAlign = d[0] > 0.8 ? 'left' : d[0] < -0.8 ? 'right' : 'center';\n textVerticalAlign = d[1] > 0.8 ? 'top' : d[1] < -0.8 ? 'bottom' : 'middle';\n break;\n case 'start':\n label.x = -d[0] * distanceX + fromPos[0];\n label.y = -d[1] * distanceY + fromPos[1];\n textAlign = d[0] > 0.8 ? 'right' : d[0] < -0.8 ? 'left' : 'center';\n textVerticalAlign = d[1] > 0.8 ? 'bottom' : d[1] < -0.8 ? 'top' : 'middle';\n break;\n case 'insideStartTop':\n case 'insideStart':\n case 'insideStartBottom':\n label.x = distanceX * dir + fromPos[0];\n label.y = fromPos[1] + dy;\n textAlign = tangent[0] < 0 ? 'right' : 'left';\n label.originX = -distanceX * dir;\n label.originY = -dy;\n break;\n case 'insideMiddleTop':\n case 'insideMiddle':\n case 'insideMiddleBottom':\n case 'middle':\n label.x = cp[0];\n label.y = cp[1] + dy;\n textAlign = 'center';\n label.originY = -dy;\n break;\n case 'insideEndTop':\n case 'insideEnd':\n case 'insideEndBottom':\n label.x = -distanceX * dir + toPos[0];\n label.y = toPos[1] + dy;\n textAlign = tangent[0] >= 0 ? 'right' : 'left';\n label.originX = distanceX * dir;\n label.originY = -dy;\n break;\n }\n label.scaleX = label.scaleY = invScale;\n label.setStyle({\n // Use the user specified text align and baseline first\n verticalAlign: label.__verticalAlign || textVerticalAlign,\n align: label.__align || textAlign\n });\n }\n };\n return Line;\n}(graphic.Group);\nexport default Line;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as graphic from '../../util/graphic.js';\nimport LineGroup from './Line.js';\nimport { getLabelStatesModels } from '../../label/labelStyle.js';\nvar LineDraw = /** @class */function () {\n function LineDraw(LineCtor) {\n this.group = new graphic.Group();\n this._LineCtor = LineCtor || LineGroup;\n }\n LineDraw.prototype.updateData = function (lineData) {\n var _this = this;\n // Remove progressive els.\n this._progressiveEls = null;\n var lineDraw = this;\n var group = lineDraw.group;\n var oldLineData = lineDraw._lineData;\n lineDraw._lineData = lineData;\n // There is no oldLineData only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n if (!oldLineData) {\n group.removeAll();\n }\n var seriesScope = makeSeriesScope(lineData);\n lineData.diff(oldLineData).add(function (idx) {\n _this._doAdd(lineData, idx, seriesScope);\n }).update(function (newIdx, oldIdx) {\n _this._doUpdate(oldLineData, lineData, oldIdx, newIdx, seriesScope);\n }).remove(function (idx) {\n group.remove(oldLineData.getItemGraphicEl(idx));\n }).execute();\n };\n ;\n LineDraw.prototype.updateLayout = function () {\n var lineData = this._lineData;\n // Do not support update layout in incremental mode.\n if (!lineData) {\n return;\n }\n lineData.eachItemGraphicEl(function (el, idx) {\n el.updateLayout(lineData, idx);\n }, this);\n };\n ;\n LineDraw.prototype.incrementalPrepareUpdate = function (lineData) {\n this._seriesScope = makeSeriesScope(lineData);\n this._lineData = null;\n this.group.removeAll();\n };\n ;\n LineDraw.prototype.incrementalUpdate = function (taskParams, lineData) {\n this._progressiveEls = [];\n function updateIncrementalAndHover(el) {\n if (!el.isGroup && !isEffectObject(el)) {\n el.incremental = true;\n el.ensureState('emphasis').hoverLayer = true;\n }\n }\n for (var idx = taskParams.start; idx < taskParams.end; idx++) {\n var itemLayout = lineData.getItemLayout(idx);\n if (lineNeedsDraw(itemLayout)) {\n var el = new this._LineCtor(lineData, idx, this._seriesScope);\n el.traverse(updateIncrementalAndHover);\n this.group.add(el);\n lineData.setItemGraphicEl(idx, el);\n this._progressiveEls.push(el);\n }\n }\n };\n ;\n LineDraw.prototype.remove = function () {\n this.group.removeAll();\n };\n ;\n LineDraw.prototype.eachRendered = function (cb) {\n graphic.traverseElements(this._progressiveEls || this.group, cb);\n };\n LineDraw.prototype._doAdd = function (lineData, idx, seriesScope) {\n var itemLayout = lineData.getItemLayout(idx);\n if (!lineNeedsDraw(itemLayout)) {\n return;\n }\n var el = new this._LineCtor(lineData, idx, seriesScope);\n lineData.setItemGraphicEl(idx, el);\n this.group.add(el);\n };\n LineDraw.prototype._doUpdate = function (oldLineData, newLineData, oldIdx, newIdx, seriesScope) {\n var itemEl = oldLineData.getItemGraphicEl(oldIdx);\n if (!lineNeedsDraw(newLineData.getItemLayout(newIdx))) {\n this.group.remove(itemEl);\n return;\n }\n if (!itemEl) {\n itemEl = new this._LineCtor(newLineData, newIdx, seriesScope);\n } else {\n itemEl.updateData(newLineData, newIdx, seriesScope);\n }\n newLineData.setItemGraphicEl(newIdx, itemEl);\n this.group.add(itemEl);\n };\n return LineDraw;\n}();\nfunction isEffectObject(el) {\n return el.animators && el.animators.length > 0;\n}\nfunction makeSeriesScope(lineData) {\n var hostModel = lineData.hostModel;\n var emphasisModel = hostModel.getModel('emphasis');\n return {\n lineStyle: hostModel.getModel('lineStyle').getLineStyle(),\n emphasisLineStyle: emphasisModel.getModel(['lineStyle']).getLineStyle(),\n blurLineStyle: hostModel.getModel(['blur', 'lineStyle']).getLineStyle(),\n selectLineStyle: hostModel.getModel(['select', 'lineStyle']).getLineStyle(),\n emphasisDisabled: emphasisModel.get('disabled'),\n blurScope: emphasisModel.get('blurScope'),\n focus: emphasisModel.get('focus'),\n labelStatesModels: getLabelStatesModels(hostModel)\n };\n}\nfunction isPointNaN(pt) {\n return isNaN(pt[0]) || isNaN(pt[1]);\n}\nfunction lineNeedsDraw(pts) {\n return pts && !isPointNaN(pts[0]) && !isPointNaN(pts[1]);\n}\nexport default LineDraw;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Calculate slider move result.\n * Usage:\n * (1) If both handle0 and handle1 are needed to be moved, set minSpan the same as\n * maxSpan and the same as `Math.abs(handleEnd[1] - handleEnds[0])`.\n * (2) If handle0 is forbidden to cross handle1, set minSpan as `0`.\n *\n * @param delta Move length.\n * @param handleEnds handleEnds[0] can be bigger then handleEnds[1].\n * handleEnds will be modified in this method.\n * @param extent handleEnds is restricted by extent.\n * extent[0] should less or equals than extent[1].\n * @param handleIndex Can be 'all', means that both move the two handleEnds.\n * @param minSpan The range of dataZoom can not be smaller than that.\n * If not set, handle0 and cross handle1. If set as a non-negative\n * number (including `0`), handles will push each other when reaching\n * the minSpan.\n * @param maxSpan The range of dataZoom can not be larger than that.\n * @return The input handleEnds.\n */\nexport default function sliderMove(delta, handleEnds, extent, handleIndex, minSpan, maxSpan) {\n delta = delta || 0;\n var extentSpan = extent[1] - extent[0];\n // Notice maxSpan and minSpan can be null/undefined.\n if (minSpan != null) {\n minSpan = restrict(minSpan, [0, extentSpan]);\n }\n if (maxSpan != null) {\n maxSpan = Math.max(maxSpan, minSpan != null ? minSpan : 0);\n }\n if (handleIndex === 'all') {\n var handleSpan = Math.abs(handleEnds[1] - handleEnds[0]);\n handleSpan = restrict(handleSpan, [0, extentSpan]);\n minSpan = maxSpan = restrict(handleSpan, [minSpan, maxSpan]);\n handleIndex = 0;\n }\n handleEnds[0] = restrict(handleEnds[0], extent);\n handleEnds[1] = restrict(handleEnds[1], extent);\n var originalDistSign = getSpanSign(handleEnds, handleIndex);\n handleEnds[handleIndex] += delta;\n // Restrict in extent.\n var extentMinSpan = minSpan || 0;\n var realExtent = extent.slice();\n originalDistSign.sign < 0 ? realExtent[0] += extentMinSpan : realExtent[1] -= extentMinSpan;\n handleEnds[handleIndex] = restrict(handleEnds[handleIndex], realExtent);\n // Expand span.\n var currDistSign;\n currDistSign = getSpanSign(handleEnds, handleIndex);\n if (minSpan != null && (currDistSign.sign !== originalDistSign.sign || currDistSign.span < minSpan)) {\n // If minSpan exists, 'cross' is forbidden.\n handleEnds[1 - handleIndex] = handleEnds[handleIndex] + originalDistSign.sign * minSpan;\n }\n // Shrink span.\n currDistSign = getSpanSign(handleEnds, handleIndex);\n if (maxSpan != null && currDistSign.span > maxSpan) {\n handleEnds[1 - handleIndex] = handleEnds[handleIndex] + currDistSign.sign * maxSpan;\n }\n return handleEnds;\n}\nfunction getSpanSign(handleEnds, handleIndex) {\n var dist = handleEnds[handleIndex] - handleEnds[1 - handleIndex];\n // If `handleEnds[0] === handleEnds[1]`, always believe that handleEnd[0]\n // is at left of handleEnds[1] for non-cross case.\n return {\n span: Math.abs(dist),\n sign: dist > 0 ? -1 : dist < 0 ? 1 : handleIndex ? -1 : 1\n };\n}\nfunction restrict(value, extend) {\n return Math.min(extend[1] != null ? extend[1] : Infinity, Math.max(extend[0] != null ? extend[0] : -Infinity, value));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { curry, each, map, bind, merge, clone, defaults, assert } from 'zrender/lib/core/util.js';\nimport Eventful from 'zrender/lib/core/Eventful.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as interactionMutex from './interactionMutex.js';\nimport DataDiffer from '../../data/DataDiffer.js';\nimport tokens from '../../visual/tokens.js';\nvar BRUSH_PANEL_GLOBAL = true;\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nvar mathPow = Math.pow;\nvar COVER_Z = 10000;\nvar UNSELECT_THRESHOLD = 6;\nvar MIN_RESIZE_LINE_WIDTH = 6;\nvar MUTEX_RESOURCE_KEY = 'globalPan';\nvar DIRECTION_MAP = {\n w: [0, 0],\n e: [0, 1],\n n: [1, 0],\n s: [1, 1]\n};\nvar CURSOR_MAP = {\n w: 'ew',\n e: 'ew',\n n: 'ns',\n s: 'ns',\n ne: 'nesw',\n sw: 'nesw',\n nw: 'nwse',\n se: 'nwse'\n};\nvar DEFAULT_BRUSH_OPT = {\n brushStyle: {\n lineWidth: 2,\n stroke: tokens.color.backgroundTint,\n fill: tokens.color.borderTint\n },\n transformable: true,\n brushMode: 'single',\n removeOnClick: false\n};\nvar baseUID = 0;\n/**\n * params:\n * areas: Array.<Array>, coord relates to container group,\n * If no container specified, to global.\n * opt {\n * isEnd: boolean,\n * removeOnClick: boolean\n * }\n */\nvar BrushController = /** @class */function (_super) {\n __extends(BrushController, _super);\n function BrushController(zr) {\n var _this = _super.call(this) || this;\n /**\n * @internal\n */\n _this._track = [];\n /**\n * @internal\n */\n _this._covers = [];\n _this._handlers = {};\n if (process.env.NODE_ENV !== 'production') {\n assert(zr);\n }\n _this._zr = zr;\n _this.group = new graphic.Group();\n _this._uid = 'brushController_' + baseUID++;\n each(pointerHandlers, function (handler, eventName) {\n this._handlers[eventName] = bind(handler, this);\n }, _this);\n return _this;\n }\n /**\n * If set to `false`, select disabled.\n */\n BrushController.prototype.enableBrush = function (brushOption) {\n if (process.env.NODE_ENV !== 'production') {\n assert(this._mounted);\n }\n this._brushType && this._doDisableBrush();\n brushOption.brushType && this._doEnableBrush(brushOption);\n return this;\n };\n BrushController.prototype._doEnableBrush = function (brushOption) {\n var zr = this._zr;\n // Consider roam, which takes globalPan too.\n if (!this._enableGlobalPan) {\n interactionMutex.take(zr, MUTEX_RESOURCE_KEY, this._uid);\n }\n each(this._handlers, function (handler, eventName) {\n zr.on(eventName, handler);\n });\n this._brushType = brushOption.brushType;\n this._brushOption = merge(clone(DEFAULT_BRUSH_OPT), brushOption, true);\n };\n BrushController.prototype._doDisableBrush = function () {\n var zr = this._zr;\n interactionMutex.release(zr, MUTEX_RESOURCE_KEY, this._uid);\n each(this._handlers, function (handler, eventName) {\n zr.off(eventName, handler);\n });\n this._brushType = this._brushOption = null;\n };\n /**\n * @param panelOpts If not pass, it is global brush.\n */\n BrushController.prototype.setPanels = function (panelOpts) {\n if (panelOpts && panelOpts.length) {\n var panels_1 = this._panels = {};\n each(panelOpts, function (panelOpts) {\n panels_1[panelOpts.panelId] = clone(panelOpts);\n });\n } else {\n this._panels = null;\n }\n return this;\n };\n BrushController.prototype.mount = function (opt) {\n opt = opt || {};\n if (process.env.NODE_ENV !== 'production') {\n this._mounted = true; // should be at first.\n }\n this._enableGlobalPan = opt.enableGlobalPan;\n var thisGroup = this.group;\n this._zr.add(thisGroup);\n thisGroup.attr({\n x: opt.x || 0,\n y: opt.y || 0,\n rotation: opt.rotation || 0,\n scaleX: opt.scaleX || 1,\n scaleY: opt.scaleY || 1\n });\n this._transform = thisGroup.getLocalTransform();\n return this;\n };\n // eachCover(cb, context): void {\n // each(this._covers, cb, context);\n // }\n /**\n * Update covers.\n * @param coverConfigList\n * If coverConfigList is null/undefined, all covers removed.\n */\n BrushController.prototype.updateCovers = function (coverConfigList) {\n if (process.env.NODE_ENV !== 'production') {\n assert(this._mounted);\n }\n coverConfigList = map(coverConfigList, function (coverConfig) {\n return merge(clone(DEFAULT_BRUSH_OPT), coverConfig, true);\n });\n var tmpIdPrefix = '\\0-brush-index-';\n var oldCovers = this._covers;\n var newCovers = this._covers = [];\n var controller = this;\n var creatingCover = this._creatingCover;\n new DataDiffer(oldCovers, coverConfigList, oldGetKey, getKey).add(addOrUpdate).update(addOrUpdate).remove(remove).execute();\n return this;\n function getKey(brushOption, index) {\n return (brushOption.id != null ? brushOption.id : tmpIdPrefix + index) + '-' + brushOption.brushType;\n }\n function oldGetKey(cover, index) {\n return getKey(cover.__brushOption, index);\n }\n function addOrUpdate(newIndex, oldIndex) {\n var newBrushInternal = coverConfigList[newIndex];\n // Consider setOption in event listener of brushSelect,\n // where updating cover when creating should be forbidden.\n if (oldIndex != null && oldCovers[oldIndex] === creatingCover) {\n newCovers[newIndex] = oldCovers[oldIndex];\n } else {\n var cover = newCovers[newIndex] = oldIndex != null ? (oldCovers[oldIndex].__brushOption = newBrushInternal, oldCovers[oldIndex]) : endCreating(controller, createCover(controller, newBrushInternal));\n updateCoverAfterCreation(controller, cover);\n }\n }\n function remove(oldIndex) {\n if (oldCovers[oldIndex] !== creatingCover) {\n controller.group.remove(oldCovers[oldIndex]);\n }\n }\n };\n BrushController.prototype.unmount = function () {\n if (process.env.NODE_ENV !== 'production') {\n if (!this._mounted) {\n return;\n }\n }\n this.enableBrush(false);\n // container may 'removeAll' outside.\n clearCovers(this);\n this._zr.remove(this.group);\n if (process.env.NODE_ENV !== 'production') {\n this._mounted = false; // should be at last.\n }\n return this;\n };\n BrushController.prototype.dispose = function () {\n this.unmount();\n this.off();\n };\n return BrushController;\n}(Eventful);\nfunction createCover(controller, brushOption) {\n var cover = coverRenderers[brushOption.brushType].createCover(controller, brushOption);\n cover.__brushOption = brushOption;\n updateZ(cover, brushOption);\n controller.group.add(cover);\n return cover;\n}\nfunction endCreating(controller, creatingCover) {\n var coverRenderer = getCoverRenderer(creatingCover);\n if (coverRenderer.endCreating) {\n coverRenderer.endCreating(controller, creatingCover);\n updateZ(creatingCover, creatingCover.__brushOption);\n }\n return creatingCover;\n}\nfunction updateCoverShape(controller, cover) {\n var brushOption = cover.__brushOption;\n getCoverRenderer(cover).updateCoverShape(controller, cover, brushOption.range, brushOption);\n}\nfunction updateZ(cover, brushOption) {\n var z = brushOption.z;\n z == null && (z = COVER_Z);\n cover.traverse(function (el) {\n el.z = z;\n el.z2 = z; // Consider in given container.\n });\n}\nfunction updateCoverAfterCreation(controller, cover) {\n getCoverRenderer(cover).updateCommon(controller, cover);\n updateCoverShape(controller, cover);\n}\nfunction getCoverRenderer(cover) {\n return coverRenderers[cover.__brushOption.brushType];\n}\n// return target panel or `true` (means global panel)\nfunction getPanelByPoint(controller, e, localCursorPoint) {\n var panels = controller._panels;\n if (!panels) {\n return BRUSH_PANEL_GLOBAL; // Global panel\n }\n var panel;\n var transform = controller._transform;\n each(panels, function (pn) {\n pn.isTargetByCursor(e, localCursorPoint, transform) && (panel = pn);\n });\n return panel;\n}\n// Return a panel or true\nfunction getPanelByCover(controller, cover) {\n var panels = controller._panels;\n if (!panels) {\n return BRUSH_PANEL_GLOBAL; // Global panel\n }\n var panelId = cover.__brushOption.panelId;\n // User may give cover without coord sys info,\n // which is then treated as global panel.\n return panelId != null ? panels[panelId] : BRUSH_PANEL_GLOBAL;\n}\nfunction clearCovers(controller) {\n var covers = controller._covers;\n var originalLength = covers.length;\n each(covers, function (cover) {\n controller.group.remove(cover);\n }, controller);\n covers.length = 0;\n return !!originalLength;\n}\nfunction trigger(controller, opt) {\n var areas = map(controller._covers, function (cover) {\n var brushOption = cover.__brushOption;\n var range = clone(brushOption.range);\n return {\n brushType: brushOption.brushType,\n panelId: brushOption.panelId,\n range: range\n };\n });\n controller.trigger('brush', {\n areas: areas,\n isEnd: !!opt.isEnd,\n removeOnClick: !!opt.removeOnClick\n });\n}\nfunction shouldShowCover(controller) {\n var track = controller._track;\n if (!track.length) {\n return false;\n }\n var p2 = track[track.length - 1];\n var p1 = track[0];\n var dx = p2[0] - p1[0];\n var dy = p2[1] - p1[1];\n var dist = mathPow(dx * dx + dy * dy, 0.5);\n return dist > UNSELECT_THRESHOLD;\n}\nfunction getTrackEnds(track) {\n var tail = track.length - 1;\n tail < 0 && (tail = 0);\n return [track[0], track[tail]];\n}\n;\nfunction createBaseRectCover(rectRangeConverter, controller, brushOption, edgeNameSequences) {\n var cover = new graphic.Group();\n cover.add(new graphic.Rect({\n name: 'main',\n style: makeStyle(brushOption),\n silent: true,\n draggable: true,\n cursor: 'move',\n drift: curry(driftRect, rectRangeConverter, controller, cover, ['n', 's', 'w', 'e']),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n each(edgeNameSequences, function (nameSequence) {\n cover.add(new graphic.Rect({\n name: nameSequence.join(''),\n style: {\n opacity: 0\n },\n draggable: true,\n silent: true,\n invisible: true,\n drift: curry(driftRect, rectRangeConverter, controller, cover, nameSequence),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n });\n return cover;\n}\nfunction updateBaseRect(controller, cover, localRange, brushOption) {\n var lineWidth = brushOption.brushStyle.lineWidth || 0;\n var handleSize = mathMax(lineWidth, MIN_RESIZE_LINE_WIDTH);\n var x = localRange[0][0];\n var y = localRange[1][0];\n var xa = x - lineWidth / 2;\n var ya = y - lineWidth / 2;\n var x2 = localRange[0][1];\n var y2 = localRange[1][1];\n var x2a = x2 - handleSize + lineWidth / 2;\n var y2a = y2 - handleSize + lineWidth / 2;\n var width = x2 - x;\n var height = y2 - y;\n var widtha = width + lineWidth;\n var heighta = height + lineWidth;\n updateRectShape(controller, cover, 'main', x, y, width, height);\n if (brushOption.transformable) {\n updateRectShape(controller, cover, 'w', xa, ya, handleSize, heighta);\n updateRectShape(controller, cover, 'e', x2a, ya, handleSize, heighta);\n updateRectShape(controller, cover, 'n', xa, ya, widtha, handleSize);\n updateRectShape(controller, cover, 's', xa, y2a, widtha, handleSize);\n updateRectShape(controller, cover, 'nw', xa, ya, handleSize, handleSize);\n updateRectShape(controller, cover, 'ne', x2a, ya, handleSize, handleSize);\n updateRectShape(controller, cover, 'sw', xa, y2a, handleSize, handleSize);\n updateRectShape(controller, cover, 'se', x2a, y2a, handleSize, handleSize);\n }\n}\nfunction updateCommon(controller, cover) {\n var brushOption = cover.__brushOption;\n var transformable = brushOption.transformable;\n var mainEl = cover.childAt(0);\n mainEl.useStyle(makeStyle(brushOption));\n mainEl.attr({\n silent: !transformable,\n cursor: transformable ? 'move' : 'default'\n });\n each([['w'], ['e'], ['n'], ['s'], ['s', 'e'], ['s', 'w'], ['n', 'e'], ['n', 'w']], function (nameSequence) {\n var el = cover.childOfName(nameSequence.join(''));\n var globalDir = nameSequence.length === 1 ? getGlobalDirection1(controller, nameSequence[0]) : getGlobalDirection2(controller, nameSequence);\n el && el.attr({\n silent: !transformable,\n invisible: !transformable,\n cursor: transformable ? CURSOR_MAP[globalDir] + '-resize' : null\n });\n });\n}\nfunction updateRectShape(controller, cover, name, x, y, w, h) {\n var el = cover.childOfName(name);\n el && el.setShape(pointsToRect(clipByPanel(controller, cover, [[x, y], [x + w, y + h]])));\n}\nfunction makeStyle(brushOption) {\n return defaults({\n strokeNoScale: true\n }, brushOption.brushStyle);\n}\nfunction formatRectRange(x, y, x2, y2) {\n var min = [mathMin(x, x2), mathMin(y, y2)];\n var max = [mathMax(x, x2), mathMax(y, y2)];\n return [[min[0], max[0]], [min[1], max[1]] // y range\n ];\n}\nfunction getTransform(controller) {\n return graphic.getTransform(controller.group);\n}\nfunction getGlobalDirection1(controller, localDirName) {\n var map = {\n w: 'left',\n e: 'right',\n n: 'top',\n s: 'bottom'\n };\n var inverseMap = {\n left: 'w',\n right: 'e',\n top: 'n',\n bottom: 's'\n };\n var dir = graphic.transformDirection(map[localDirName], getTransform(controller));\n return inverseMap[dir];\n}\nfunction getGlobalDirection2(controller, localDirNameSeq) {\n var globalDir = [getGlobalDirection1(controller, localDirNameSeq[0]), getGlobalDirection1(controller, localDirNameSeq[1])];\n (globalDir[0] === 'e' || globalDir[0] === 'w') && globalDir.reverse();\n return globalDir.join('');\n}\nfunction driftRect(rectRangeConverter, controller, cover, dirNameSequence, dx, dy) {\n var brushOption = cover.__brushOption;\n var rectRange = rectRangeConverter.toRectRange(brushOption.range);\n var localDelta = toLocalDelta(controller, dx, dy);\n each(dirNameSequence, function (dirName) {\n var ind = DIRECTION_MAP[dirName];\n rectRange[ind[0]][ind[1]] += localDelta[ind[0]];\n });\n brushOption.range = rectRangeConverter.fromRectRange(formatRectRange(rectRange[0][0], rectRange[1][0], rectRange[0][1], rectRange[1][1]));\n updateCoverAfterCreation(controller, cover);\n trigger(controller, {\n isEnd: false\n });\n}\nfunction driftPolygon(controller, cover, dx, dy) {\n var range = cover.__brushOption.range;\n var localDelta = toLocalDelta(controller, dx, dy);\n each(range, function (point) {\n point[0] += localDelta[0];\n point[1] += localDelta[1];\n });\n updateCoverAfterCreation(controller, cover);\n trigger(controller, {\n isEnd: false\n });\n}\nfunction toLocalDelta(controller, dx, dy) {\n var thisGroup = controller.group;\n var localD = thisGroup.transformCoordToLocal(dx, dy);\n var localZero = thisGroup.transformCoordToLocal(0, 0);\n return [localD[0] - localZero[0], localD[1] - localZero[1]];\n}\nfunction clipByPanel(controller, cover, data) {\n var panel = getPanelByCover(controller, cover);\n return panel && panel !== BRUSH_PANEL_GLOBAL ? panel.clipPath(data, controller._transform) : clone(data);\n}\nfunction pointsToRect(points) {\n var xmin = mathMin(points[0][0], points[1][0]);\n var ymin = mathMin(points[0][1], points[1][1]);\n var xmax = mathMax(points[0][0], points[1][0]);\n var ymax = mathMax(points[0][1], points[1][1]);\n return {\n x: xmin,\n y: ymin,\n width: xmax - xmin,\n height: ymax - ymin\n };\n}\nfunction resetCursor(controller, e, localCursorPoint) {\n if (\n // Check active\n !controller._brushType\n // resetCursor should be always called when mouse is in zr area,\n // but not called when mouse is out of zr area to avoid bad influence\n // if `mousemove`, `mouseup` are triggered from `document` event.\n || isOutsideZrArea(controller, e.offsetX, e.offsetY)) {\n return;\n }\n var zr = controller._zr;\n var covers = controller._covers;\n var currPanel = getPanelByPoint(controller, e, localCursorPoint);\n // Check whether in covers.\n if (!controller._dragging) {\n for (var i = 0; i < covers.length; i++) {\n var brushOption = covers[i].__brushOption;\n if (currPanel && (currPanel === BRUSH_PANEL_GLOBAL || brushOption.panelId === currPanel.panelId) && coverRenderers[brushOption.brushType].contain(covers[i], localCursorPoint[0], localCursorPoint[1])) {\n // Use cursor style set on cover.\n return;\n }\n }\n }\n currPanel && zr.setCursorStyle('crosshair');\n}\nfunction preventDefault(e) {\n var rawE = e.event;\n rawE.preventDefault && rawE.preventDefault();\n}\nfunction mainShapeContain(cover, x, y) {\n return cover.childOfName('main').contain(x, y);\n}\nfunction updateCoverByMouse(controller, e, localCursorPoint, isEnd) {\n var creatingCover = controller._creatingCover;\n var panel = controller._creatingPanel;\n var thisBrushOption = controller._brushOption;\n var eventParams;\n controller._track.push(localCursorPoint.slice());\n if (shouldShowCover(controller) || creatingCover) {\n if (panel && !creatingCover) {\n thisBrushOption.brushMode === 'single' && clearCovers(controller);\n var brushOption = clone(thisBrushOption);\n brushOption.brushType = determineBrushType(brushOption.brushType, panel);\n brushOption.panelId = panel === BRUSH_PANEL_GLOBAL ? null : panel.panelId;\n creatingCover = controller._creatingCover = createCover(controller, brushOption);\n controller._covers.push(creatingCover);\n }\n if (creatingCover) {\n var coverRenderer = coverRenderers[determineBrushType(controller._brushType, panel)];\n var coverBrushOption = creatingCover.__brushOption;\n coverBrushOption.range = coverRenderer.getCreatingRange(clipByPanel(controller, creatingCover, controller._track));\n if (isEnd) {\n endCreating(controller, creatingCover);\n coverRenderer.updateCommon(controller, creatingCover);\n }\n updateCoverShape(controller, creatingCover);\n eventParams = {\n isEnd: isEnd\n };\n }\n } else if (isEnd && thisBrushOption.brushMode === 'single' && thisBrushOption.removeOnClick) {\n // Help user to remove covers easily, only by a tiny drag, in 'single' mode.\n // But a single click do not clear covers, because user may have casual\n // clicks (for example, click on other component and do not expect covers\n // disappear).\n // Only some cover removed, trigger action, but not every click trigger action.\n if (getPanelByPoint(controller, e, localCursorPoint) && clearCovers(controller)) {\n eventParams = {\n isEnd: isEnd,\n removeOnClick: true\n };\n }\n }\n return eventParams;\n}\nfunction determineBrushType(brushType, panel) {\n if (brushType === 'auto') {\n if (process.env.NODE_ENV !== 'production') {\n assert(panel && panel.defaultBrushType, 'MUST have defaultBrushType when brushType is \"atuo\"');\n }\n return panel.defaultBrushType;\n }\n return brushType;\n}\nvar pointerHandlers = {\n mousedown: function (e) {\n if (this._dragging) {\n // In case some browser do not support globalOut,\n // and release mouse out side the browser.\n handleDragEnd(this, e);\n } else if (!e.target || !e.target.draggable) {\n preventDefault(e);\n var localCursorPoint = this.group.transformCoordToLocal(e.offsetX, e.offsetY);\n this._creatingCover = null;\n var panel = this._creatingPanel = getPanelByPoint(this, e, localCursorPoint);\n if (panel) {\n this._dragging = true;\n this._track = [localCursorPoint.slice()];\n }\n }\n },\n mousemove: function (e) {\n var x = e.offsetX;\n var y = e.offsetY;\n var localCursorPoint = this.group.transformCoordToLocal(x, y);\n resetCursor(this, e, localCursorPoint);\n if (this._dragging) {\n preventDefault(e);\n var eventParams = updateCoverByMouse(this, e, localCursorPoint, false);\n eventParams && trigger(this, eventParams);\n }\n },\n mouseup: function (e) {\n handleDragEnd(this, e);\n }\n};\nfunction handleDragEnd(controller, e) {\n if (controller._dragging) {\n preventDefault(e);\n var x = e.offsetX;\n var y = e.offsetY;\n var localCursorPoint = controller.group.transformCoordToLocal(x, y);\n var eventParams = updateCoverByMouse(controller, e, localCursorPoint, true);\n controller._dragging = false;\n controller._track = [];\n controller._creatingCover = null;\n // trigger event should be at final, after procedure will be nested.\n eventParams && trigger(controller, eventParams);\n }\n}\nfunction isOutsideZrArea(controller, x, y) {\n var zr = controller._zr;\n return x < 0 || x > zr.getWidth() || y < 0 || y > zr.getHeight();\n}\n/**\n * key: brushType\n */\nvar coverRenderers = {\n lineX: getLineRenderer(0),\n lineY: getLineRenderer(1),\n rect: {\n createCover: function (controller, brushOption) {\n function returnInput(range) {\n return range;\n }\n return createBaseRectCover({\n toRectRange: returnInput,\n fromRectRange: returnInput\n }, controller, brushOption, [['w'], ['e'], ['n'], ['s'], ['s', 'e'], ['s', 'w'], ['n', 'e'], ['n', 'w']]);\n },\n getCreatingRange: function (localTrack) {\n var ends = getTrackEnds(localTrack);\n return formatRectRange(ends[1][0], ends[1][1], ends[0][0], ends[0][1]);\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n updateBaseRect(controller, cover, localRange, brushOption);\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n },\n polygon: {\n createCover: function (controller, brushOption) {\n var cover = new graphic.Group();\n // Do not use graphic.Polygon because graphic.Polyline do not close the\n // border of the shape when drawing, which is a better experience for user.\n cover.add(new graphic.Polyline({\n name: 'main',\n style: makeStyle(brushOption),\n silent: true\n }));\n return cover;\n },\n getCreatingRange: function (localTrack) {\n return localTrack;\n },\n endCreating: function (controller, cover) {\n cover.remove(cover.childAt(0));\n // Use graphic.Polygon close the shape.\n cover.add(new graphic.Polygon({\n name: 'main',\n draggable: true,\n drift: curry(driftPolygon, controller, cover),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n cover.childAt(0).setShape({\n points: clipByPanel(controller, cover, localRange)\n });\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n }\n};\nfunction getLineRenderer(xyIndex) {\n return {\n createCover: function (controller, brushOption) {\n return createBaseRectCover({\n toRectRange: function (range) {\n var rectRange = [range, [0, 100]];\n xyIndex && rectRange.reverse();\n return rectRange;\n },\n fromRectRange: function (rectRange) {\n return rectRange[xyIndex];\n }\n }, controller, brushOption, [[['w'], ['e']], [['n'], ['s']]][xyIndex]);\n },\n getCreatingRange: function (localTrack) {\n var ends = getTrackEnds(localTrack);\n var min = mathMin(ends[0][xyIndex], ends[1][xyIndex]);\n var max = mathMax(ends[0][xyIndex], ends[1][xyIndex]);\n return [min, max];\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n var otherExtent;\n // If brushWidth not specified, fit the panel.\n var panel = getPanelByCover(controller, cover);\n if (panel !== BRUSH_PANEL_GLOBAL && panel.getLinearBrushOtherExtent) {\n otherExtent = panel.getLinearBrushOtherExtent(xyIndex);\n } else {\n var zr = controller._zr;\n otherExtent = [0, [zr.getWidth(), zr.getHeight()][1 - xyIndex]];\n }\n var rectRange = [localRange, otherExtent];\n xyIndex && rectRange.reverse();\n updateBaseRect(controller, cover, rectRange, brushOption);\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n };\n}\nexport default BrushController;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport { onIrrelevantElement } from './cursorHelper.js';\nimport * as graphicUtil from '../../util/graphic.js';\nexport function makeRectPanelClipPath(rect) {\n rect = normalizeRect(rect);\n return function (localPoints) {\n return graphicUtil.clipPointsByRect(localPoints, rect);\n };\n}\nexport function makeLinearBrushOtherExtent(rect, specifiedXYIndex) {\n rect = normalizeRect(rect);\n return function (xyIndex) {\n var idx = specifiedXYIndex != null ? specifiedXYIndex : xyIndex;\n var brushWidth = idx ? rect.width : rect.height;\n var base = idx ? rect.x : rect.y;\n return [base, base + (brushWidth || 0)];\n };\n}\nexport function makeRectIsTargetByCursor(rect, api, targetModel) {\n var boundingRect = normalizeRect(rect);\n return function (e, localCursorPoint) {\n return boundingRect.contain(localCursorPoint[0], localCursorPoint[1]) && !onIrrelevantElement(e, api, targetModel);\n };\n}\n// Consider width/height is negative.\nfunction normalizeRect(rect) {\n return BoundingRect.create(rect);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, hasOwn } from 'zrender/lib/core/util.js';\nimport tokens from '../visual/tokens.js';\nvar deprecatedLogs = {};\n/**\n * Whether need to call `convertEC4CompatibleStyle`.\n */\nexport function isEC4CompatibleStyle(style, elType, hasOwnTextContentOption, hasOwnTextConfig) {\n // Since echarts5, `RectText` is separated from its host element and style.text\n // does not exist any more. The compat work brings some extra burden on performance.\n // So we provide:\n // `legacy: true` force make compat.\n // `legacy: false`, force do not compat.\n // `legacy` not set: auto detect whether legacy.\n // But in this case we do not compat (difficult to detect and rare case):\n // Because custom series and graphic component support \"merge\", users may firstly\n // only set `textStrokeWidth` style or secondly only set `text`.\n return style && (style.legacy || style.legacy !== false && !hasOwnTextContentOption && !hasOwnTextConfig && elType !== 'tspan'\n // Difficult to detect whether legacy for a \"text\" el.\n && (elType === 'text' || hasOwn(style, 'text')));\n}\n/**\n * `EC4CompatibleStyle` is style that might be in echarts4 format or echarts5 format.\n * @param hostStyle The properties might be modified.\n * @return If be text el, `textContentStyle` and `textConfig` will not be returned.\n * Otherwise a `textContentStyle` and `textConfig` will be created, whose props area\n * retried from the `hostStyle`.\n */\nexport function convertFromEC4CompatibleStyle(hostStyle, elType, isNormal) {\n var srcStyle = hostStyle;\n var textConfig;\n var textContent;\n var textContentStyle;\n if (elType === 'text') {\n textContentStyle = srcStyle;\n } else {\n textContentStyle = {};\n hasOwn(srcStyle, 'text') && (textContentStyle.text = srcStyle.text);\n hasOwn(srcStyle, 'rich') && (textContentStyle.rich = srcStyle.rich);\n hasOwn(srcStyle, 'textFill') && (textContentStyle.fill = srcStyle.textFill);\n hasOwn(srcStyle, 'textStroke') && (textContentStyle.stroke = srcStyle.textStroke);\n hasOwn(srcStyle, 'fontFamily') && (textContentStyle.fontFamily = srcStyle.fontFamily);\n hasOwn(srcStyle, 'fontSize') && (textContentStyle.fontSize = srcStyle.fontSize);\n hasOwn(srcStyle, 'fontStyle') && (textContentStyle.fontStyle = srcStyle.fontStyle);\n hasOwn(srcStyle, 'fontWeight') && (textContentStyle.fontWeight = srcStyle.fontWeight);\n textContent = {\n type: 'text',\n style: textContentStyle,\n // ec4 does not support rectText trigger.\n // And when text position is different in normal and emphasis\n // => hover text trigger emphasis;\n // => text position changed, leave mouse pointer immediately;\n // That might cause incorrect state.\n silent: true\n };\n textConfig = {};\n var hasOwnPos = hasOwn(srcStyle, 'textPosition');\n if (isNormal) {\n textConfig.position = hasOwnPos ? srcStyle.textPosition : 'inside';\n } else {\n hasOwnPos && (textConfig.position = srcStyle.textPosition);\n }\n hasOwn(srcStyle, 'textPosition') && (textConfig.position = srcStyle.textPosition);\n hasOwn(srcStyle, 'textOffset') && (textConfig.offset = srcStyle.textOffset);\n hasOwn(srcStyle, 'textRotation') && (textConfig.rotation = srcStyle.textRotation);\n hasOwn(srcStyle, 'textDistance') && (textConfig.distance = srcStyle.textDistance);\n }\n convertEC4CompatibleRichItem(textContentStyle, hostStyle);\n each(textContentStyle.rich, function (richItem) {\n convertEC4CompatibleRichItem(richItem, richItem);\n });\n return {\n textConfig: textConfig,\n textContent: textContent\n };\n}\n/**\n * The result will be set to `out`.\n */\nfunction convertEC4CompatibleRichItem(out, richItem) {\n if (!richItem) {\n return;\n }\n // (1) For simplicity, make textXXX properties (deprecated since ec5) has\n // higher priority. For example, consider in ec4 `borderColor: 5, textBorderColor: 10`\n // on a rect means `borderColor: 4` on the rect and `borderColor: 10` on an attached\n // richText in ec5.\n // (2) `out === richItem` if and only if `out` is text el or rich item.\n // So we can overwrite existing props in `out` since textXXX has higher priority.\n richItem.font = richItem.textFont || richItem.font;\n hasOwn(richItem, 'textStrokeWidth') && (out.lineWidth = richItem.textStrokeWidth);\n hasOwn(richItem, 'textAlign') && (out.align = richItem.textAlign);\n hasOwn(richItem, 'textVerticalAlign') && (out.verticalAlign = richItem.textVerticalAlign);\n hasOwn(richItem, 'textLineHeight') && (out.lineHeight = richItem.textLineHeight);\n hasOwn(richItem, 'textWidth') && (out.width = richItem.textWidth);\n hasOwn(richItem, 'textHeight') && (out.height = richItem.textHeight);\n hasOwn(richItem, 'textBackgroundColor') && (out.backgroundColor = richItem.textBackgroundColor);\n hasOwn(richItem, 'textPadding') && (out.padding = richItem.textPadding);\n hasOwn(richItem, 'textBorderColor') && (out.borderColor = richItem.textBorderColor);\n hasOwn(richItem, 'textBorderWidth') && (out.borderWidth = richItem.textBorderWidth);\n hasOwn(richItem, 'textBorderRadius') && (out.borderRadius = richItem.textBorderRadius);\n hasOwn(richItem, 'textBoxShadowColor') && (out.shadowColor = richItem.textBoxShadowColor);\n hasOwn(richItem, 'textBoxShadowBlur') && (out.shadowBlur = richItem.textBoxShadowBlur);\n hasOwn(richItem, 'textBoxShadowOffsetX') && (out.shadowOffsetX = richItem.textBoxShadowOffsetX);\n hasOwn(richItem, 'textBoxShadowOffsetY') && (out.shadowOffsetY = richItem.textBoxShadowOffsetY);\n}\n/**\n * Convert to pure echarts4 format style.\n * `itemStyle` will be modified, added with ec4 style properties from\n * `textStyle` and `textConfig`.\n *\n * [Caveat]: For simplicity, `insideRollback` in ec4 does not compat, where\n * `styleEmphasis: {textFill: 'red'}` will remove the normal auto added stroke.\n */\nexport function convertToEC4StyleForCustomSerise(itemStl, txStl, txCfg) {\n var out = itemStl;\n // See `custom.ts`, a trick to set extra `textPosition` firstly.\n out.textPosition = out.textPosition || txCfg.position || 'inside';\n txCfg.offset != null && (out.textOffset = txCfg.offset);\n txCfg.rotation != null && (out.textRotation = txCfg.rotation);\n txCfg.distance != null && (out.textDistance = txCfg.distance);\n var isInside = out.textPosition.indexOf('inside') >= 0;\n var hostFill = itemStl.fill || tokens.color.neutral99;\n convertToEC4RichItem(out, txStl);\n var textFillNotSet = out.textFill == null;\n if (isInside) {\n if (textFillNotSet) {\n out.textFill = txCfg.insideFill || tokens.color.neutral00;\n !out.textStroke && txCfg.insideStroke && (out.textStroke = txCfg.insideStroke);\n !out.textStroke && (out.textStroke = hostFill);\n out.textStrokeWidth == null && (out.textStrokeWidth = 2);\n }\n } else {\n if (textFillNotSet) {\n out.textFill = itemStl.fill || txCfg.outsideFill || tokens.color.neutral00;\n }\n !out.textStroke && txCfg.outsideStroke && (out.textStroke = txCfg.outsideStroke);\n }\n out.text = txStl.text;\n out.rich = txStl.rich;\n each(txStl.rich, function (richItem) {\n convertToEC4RichItem(richItem, richItem);\n });\n return out;\n}\nfunction convertToEC4RichItem(out, richItem) {\n if (!richItem) {\n return;\n }\n hasOwn(richItem, 'fill') && (out.textFill = richItem.fill);\n hasOwn(richItem, 'stroke') && (out.textStroke = richItem.fill);\n hasOwn(richItem, 'lineWidth') && (out.textStrokeWidth = richItem.lineWidth);\n hasOwn(richItem, 'font') && (out.font = richItem.font);\n hasOwn(richItem, 'fontStyle') && (out.fontStyle = richItem.fontStyle);\n hasOwn(richItem, 'fontWeight') && (out.fontWeight = richItem.fontWeight);\n hasOwn(richItem, 'fontSize') && (out.fontSize = richItem.fontSize);\n hasOwn(richItem, 'fontFamily') && (out.fontFamily = richItem.fontFamily);\n hasOwn(richItem, 'align') && (out.textAlign = richItem.align);\n hasOwn(richItem, 'verticalAlign') && (out.textVerticalAlign = richItem.verticalAlign);\n hasOwn(richItem, 'lineHeight') && (out.textLineHeight = richItem.lineHeight);\n hasOwn(richItem, 'width') && (out.textWidth = richItem.width);\n hasOwn(richItem, 'height') && (out.textHeight = richItem.height);\n hasOwn(richItem, 'backgroundColor') && (out.textBackgroundColor = richItem.backgroundColor);\n hasOwn(richItem, 'padding') && (out.textPadding = richItem.padding);\n hasOwn(richItem, 'borderColor') && (out.textBorderColor = richItem.borderColor);\n hasOwn(richItem, 'borderWidth') && (out.textBorderWidth = richItem.borderWidth);\n hasOwn(richItem, 'borderRadius') && (out.textBorderRadius = richItem.borderRadius);\n hasOwn(richItem, 'shadowColor') && (out.textBoxShadowColor = richItem.shadowColor);\n hasOwn(richItem, 'shadowBlur') && (out.textBoxShadowBlur = richItem.shadowBlur);\n hasOwn(richItem, 'shadowOffsetX') && (out.textBoxShadowOffsetX = richItem.shadowOffsetX);\n hasOwn(richItem, 'shadowOffsetY') && (out.textBoxShadowOffsetY = richItem.shadowOffsetY);\n hasOwn(richItem, 'textShadowColor') && (out.textShadowColor = richItem.textShadowColor);\n hasOwn(richItem, 'textShadowBlur') && (out.textShadowBlur = richItem.textShadowBlur);\n hasOwn(richItem, 'textShadowOffsetX') && (out.textShadowOffsetX = richItem.textShadowOffsetX);\n hasOwn(richItem, 'textShadowOffsetY') && (out.textShadowOffsetY = richItem.textShadowOffsetY);\n}\nexport function warnDeprecated(deprecated, insteadApproach) {\n if (process.env.NODE_ENV !== 'production') {\n var key = deprecated + '^_^' + insteadApproach;\n if (!deprecatedLogs[key]) {\n console.warn(\"[ECharts] DEPRECATED: \\\"\" + deprecated + \"\\\" has been deprecated. \" + insteadApproach);\n deprecatedLogs[key] = true;\n }\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { makeInner, normalizeToArray } from '../util/model.js';\nimport { assert, bind, each, eqNaN, extend, hasOwn, indexOf, isArrayLike, keys, reduce } from 'zrender/lib/core/util.js';\nimport { cloneValue } from 'zrender/lib/animation/Animator.js';\nimport Displayable from 'zrender/lib/graphic/Displayable.js';\nimport { getAnimationConfig } from './basicTransition.js';\nimport { Path } from '../util/graphic.js';\nimport { warn } from '../util/log.js';\nimport { TRANSFORMABLE_PROPS } from 'zrender/lib/core/Transformable.js';\nvar LEGACY_TRANSFORM_PROPS_MAP = {\n position: ['x', 'y'],\n scale: ['scaleX', 'scaleY'],\n origin: ['originX', 'originY']\n};\nvar LEGACY_TRANSFORM_PROPS = keys(LEGACY_TRANSFORM_PROPS_MAP);\nvar TRANSFORM_PROPS_MAP = reduce(TRANSFORMABLE_PROPS, function (obj, key) {\n obj[key] = 1;\n return obj;\n}, {});\nvar transformPropNamesStr = TRANSFORMABLE_PROPS.join(', ');\n// '' means root\nexport var ELEMENT_ANIMATABLE_PROPS = ['', 'style', 'shape', 'extra'];\n;\nvar transitionInnerStore = makeInner();\n;\nfunction getElementAnimationConfig(animationType, el, elOption, parentModel, dataIndex) {\n var animationProp = animationType + \"Animation\";\n var config = getAnimationConfig(animationType, parentModel, dataIndex) || {};\n var userDuring = transitionInnerStore(el).userDuring;\n // Only set when duration is > 0 and it's need to be animated.\n if (config.duration > 0) {\n // For simplicity, if during not specified, the previous during will not work any more.\n config.during = userDuring ? bind(duringCall, {\n el: el,\n userDuring: userDuring\n }) : null;\n config.setToFinal = true;\n config.scope = animationType;\n }\n extend(config, elOption[animationProp]);\n return config;\n}\nexport function applyUpdateTransition(el, elOption, animatableModel, opts) {\n opts = opts || {};\n var dataIndex = opts.dataIndex,\n isInit = opts.isInit,\n clearStyle = opts.clearStyle;\n var hasAnimation = animatableModel.isAnimationEnabled();\n // Save the meta info for further morphing. Like apply on the sub morphing elements.\n var store = transitionInnerStore(el);\n var styleOpt = elOption.style;\n store.userDuring = elOption.during;\n var transFromProps = {};\n var propsToSet = {};\n prepareTransformAllPropsFinal(el, elOption, propsToSet);\n if (el.type === 'compound') {\n /**\n * We cannot directly clone shape for compoundPath,\n * because it makes the path to be an object instead of a Path instance,\n * and thus missing `buildPath` method.\n */\n var paths = el.shape.paths;\n var optionPaths = elOption.shape.paths;\n for (var i = 0; i < optionPaths.length; i++) {\n var path = optionPaths[i];\n prepareShapeOrExtraAllPropsFinal('shape', path, paths[i]);\n }\n } else {\n prepareShapeOrExtraAllPropsFinal('shape', elOption, propsToSet);\n prepareShapeOrExtraAllPropsFinal('extra', elOption, propsToSet);\n }\n if (!isInit && hasAnimation) {\n prepareTransformTransitionFrom(el, elOption, transFromProps);\n prepareShapeOrExtraTransitionFrom('shape', el, elOption, transFromProps);\n prepareShapeOrExtraTransitionFrom('extra', el, elOption, transFromProps);\n prepareStyleTransitionFrom(el, elOption, styleOpt, transFromProps);\n }\n propsToSet.style = styleOpt;\n applyPropsDirectly(el, propsToSet, clearStyle);\n applyMiscProps(el, elOption);\n if (hasAnimation) {\n if (isInit) {\n var enterFromProps_1 = {};\n each(ELEMENT_ANIMATABLE_PROPS, function (propName) {\n var prop = propName ? elOption[propName] : elOption;\n if (prop && prop.enterFrom) {\n if (propName) {\n enterFromProps_1[propName] = enterFromProps_1[propName] || {};\n }\n extend(propName ? enterFromProps_1[propName] : enterFromProps_1, prop.enterFrom);\n }\n });\n var config = getElementAnimationConfig('enter', el, elOption, animatableModel, dataIndex);\n if (config.duration > 0) {\n el.animateFrom(enterFromProps_1, config);\n }\n } else {\n applyPropsTransition(el, elOption, dataIndex || 0, animatableModel, transFromProps);\n }\n }\n // Store leave to be used in leave transition.\n updateLeaveTo(el, elOption);\n styleOpt ? el.dirty() : el.markRedraw();\n}\nexport function updateLeaveTo(el, elOption) {\n // Try merge to previous set leaveTo\n var leaveToProps = transitionInnerStore(el).leaveToProps;\n for (var i = 0; i < ELEMENT_ANIMATABLE_PROPS.length; i++) {\n var propName = ELEMENT_ANIMATABLE_PROPS[i];\n var prop = propName ? elOption[propName] : elOption;\n if (prop && prop.leaveTo) {\n if (!leaveToProps) {\n leaveToProps = transitionInnerStore(el).leaveToProps = {};\n }\n if (propName) {\n leaveToProps[propName] = leaveToProps[propName] || {};\n }\n extend(propName ? leaveToProps[propName] : leaveToProps, prop.leaveTo);\n }\n }\n}\nexport function applyLeaveTransition(el, elOption, animatableModel, onRemove) {\n if (el) {\n var parent_1 = el.parent;\n var leaveToProps = transitionInnerStore(el).leaveToProps;\n if (leaveToProps) {\n // TODO TODO use leave after leaveAnimation in series is introduced\n // TODO Data index?\n var config = getElementAnimationConfig('update', el, elOption, animatableModel, 0);\n config.done = function () {\n parent_1 && parent_1.remove(el);\n onRemove && onRemove();\n };\n el.animateTo(leaveToProps, config);\n } else {\n parent_1 && parent_1.remove(el);\n onRemove && onRemove();\n }\n }\n}\nexport function isTransitionAll(transition) {\n return transition === 'all';\n}\nfunction applyPropsDirectly(el,\n// Can be null/undefined\nallPropsFinal, clearStyle) {\n var styleOpt = allPropsFinal.style;\n if (!el.isGroup && styleOpt) {\n if (clearStyle) {\n el.useStyle({});\n // When style object changed, how to trade the existing animation?\n // It is probably complicated and not needed to cover all the cases.\n // But still need consider the case:\n // (1) When using init animation on `style.opacity`, and before the animation\n // ended users triggers an update by mousewhel. At that time the init\n // animation should better be continued rather than terminated.\n // So after `useStyle` called, we should change the animation target manually\n // to continue the effect of the init animation.\n // (2) PENDING: If the previous animation targeted at a `val1`, and currently we need\n // to update the value to `val2` and no animation declared, should be terminate\n // the previous animation or just modify the target of the animation?\n // Therotically That will happen not only on `style` but also on `shape` and\n // `transfrom` props. But we haven't handle this case at present yet.\n // (3) PENDING: Is it proper to visit `animators` and `targetName`?\n var animators = el.animators;\n for (var i = 0; i < animators.length; i++) {\n var animator = animators[i];\n // targetName is the \"topKey\".\n if (animator.targetName === 'style') {\n animator.changeTarget(el.style);\n }\n }\n }\n el.setStyle(styleOpt);\n }\n if (allPropsFinal) {\n // Not set style here.\n allPropsFinal.style = null;\n // Set el to the final state firstly.\n allPropsFinal && el.attr(allPropsFinal);\n allPropsFinal.style = styleOpt;\n }\n}\nfunction applyPropsTransition(el, elOption, dataIndex, model,\n// Can be null/undefined\ntransFromProps) {\n if (transFromProps) {\n var config = getElementAnimationConfig('update', el, elOption, model, dataIndex);\n if (config.duration > 0) {\n el.animateFrom(transFromProps, config);\n }\n }\n}\nfunction applyMiscProps(el, elOption) {\n // Merge by default.\n hasOwn(elOption, 'silent') && (el.silent = elOption.silent);\n hasOwn(elOption, 'ignore') && (el.ignore = elOption.ignore);\n if (el instanceof Displayable) {\n hasOwn(elOption, 'invisible') && (el.invisible = elOption.invisible);\n }\n if (el instanceof Path) {\n hasOwn(elOption, 'autoBatch') && (el.autoBatch = elOption.autoBatch);\n }\n}\n// Use it to avoid it be exposed to user.\nvar tmpDuringScope = {};\nvar transitionDuringAPI = {\n // Usually other props do not need to be changed in animation during.\n setTransform: function (key, val) {\n if (process.env.NODE_ENV !== 'production') {\n assert(hasOwn(TRANSFORM_PROPS_MAP, key), 'Only ' + transformPropNamesStr + ' available in `setTransform`.');\n }\n tmpDuringScope.el[key] = val;\n return this;\n },\n getTransform: function (key) {\n if (process.env.NODE_ENV !== 'production') {\n assert(hasOwn(TRANSFORM_PROPS_MAP, key), 'Only ' + transformPropNamesStr + ' available in `getTransform`.');\n }\n return tmpDuringScope.el[key];\n },\n setShape: function (key, val) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var el = tmpDuringScope.el;\n var shape = el.shape || (el.shape = {});\n shape[key] = val;\n el.dirtyShape && el.dirtyShape();\n return this;\n },\n getShape: function (key) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var shape = tmpDuringScope.el.shape;\n if (shape) {\n return shape[key];\n }\n },\n setStyle: function (key, val) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var el = tmpDuringScope.el;\n var style = el.style;\n if (style) {\n if (process.env.NODE_ENV !== 'production') {\n if (eqNaN(val)) {\n warn('style.' + key + ' must not be assigned with NaN.');\n }\n }\n style[key] = val;\n el.dirtyStyle && el.dirtyStyle();\n }\n return this;\n },\n getStyle: function (key) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var style = tmpDuringScope.el.style;\n if (style) {\n return style[key];\n }\n },\n setExtra: function (key, val) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var extra = tmpDuringScope.el.extra || (tmpDuringScope.el.extra = {});\n extra[key] = val;\n return this;\n },\n getExtra: function (key) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var extra = tmpDuringScope.el.extra;\n if (extra) {\n return extra[key];\n }\n }\n};\nfunction assertNotReserved(key) {\n if (process.env.NODE_ENV !== 'production') {\n if (key === 'transition' || key === 'enterFrom' || key === 'leaveTo') {\n throw new Error('key must not be \"' + key + '\"');\n }\n }\n}\nfunction duringCall() {\n // Do not provide \"percent\" until some requirements come.\n // Because consider thies case:\n // enterFrom: {x: 100, y: 30}, transition: 'x'.\n // And enter duration is different from update duration.\n // Thus it might be confused about the meaning of \"percent\" in during callback.\n var scope = this;\n var el = scope.el;\n if (!el) {\n return;\n }\n // If el is remove from zr by reason like legend, during still need to called,\n // because el will be added back to zr and the prop value should not be incorrect.\n var latestUserDuring = transitionInnerStore(el).userDuring;\n var scopeUserDuring = scope.userDuring;\n // Ensured a during is only called once in each animation frame.\n // If a during is called multiple times in one frame, maybe some users' calculation logic\n // might be wrong (not sure whether this usage exists).\n // The case of a during might be called twice can be: by default there is a animator for\n // 'x', 'y' when init. Before the init animation finished, call `setOption` to start\n // another animators for 'style'/'shape'/'extra'.\n if (latestUserDuring !== scopeUserDuring) {\n // release\n scope.el = scope.userDuring = null;\n return;\n }\n tmpDuringScope.el = el;\n // Give no `this` to user in \"during\" calling.\n scopeUserDuring(transitionDuringAPI);\n // FIXME: if in future meet the case that some prop will be both modified in `during` and `state`,\n // consider the issue that the prop might be incorrect when return to \"normal\" state.\n}\nfunction prepareShapeOrExtraTransitionFrom(mainAttr, fromEl, elOption, transFromProps) {\n var attrOpt = elOption[mainAttr];\n if (!attrOpt) {\n return;\n }\n var elPropsInAttr = fromEl[mainAttr];\n var transFromPropsInAttr;\n if (elPropsInAttr) {\n var transition = elOption.transition;\n var attrTransition = attrOpt.transition;\n if (attrTransition) {\n !transFromPropsInAttr && (transFromPropsInAttr = transFromProps[mainAttr] = {});\n if (isTransitionAll(attrTransition)) {\n extend(transFromPropsInAttr, elPropsInAttr);\n } else {\n var transitionKeys = normalizeToArray(attrTransition);\n for (var i = 0; i < transitionKeys.length; i++) {\n var key = transitionKeys[i];\n var elVal = elPropsInAttr[key];\n transFromPropsInAttr[key] = elVal;\n }\n }\n } else if (isTransitionAll(transition) || indexOf(transition, mainAttr) >= 0) {\n !transFromPropsInAttr && (transFromPropsInAttr = transFromProps[mainAttr] = {});\n var elPropsInAttrKeys = keys(elPropsInAttr);\n for (var i = 0; i < elPropsInAttrKeys.length; i++) {\n var key = elPropsInAttrKeys[i];\n var elVal = elPropsInAttr[key];\n if (isNonStyleTransitionEnabled(attrOpt[key], elVal)) {\n transFromPropsInAttr[key] = elVal;\n }\n }\n }\n }\n}\nfunction prepareShapeOrExtraAllPropsFinal(mainAttr, elOption, allProps) {\n var attrOpt = elOption[mainAttr];\n if (!attrOpt) {\n return;\n }\n var allPropsInAttr = allProps[mainAttr] = {};\n var keysInAttr = keys(attrOpt);\n for (var i = 0; i < keysInAttr.length; i++) {\n var key = keysInAttr[i];\n // To avoid share one object with different element, and\n // to avoid user modify the object inexpectedly, have to clone.\n allPropsInAttr[key] = cloneValue(attrOpt[key]);\n }\n}\nfunction prepareTransformTransitionFrom(el, elOption, transFromProps) {\n var transition = elOption.transition;\n var transitionKeys = isTransitionAll(transition) ? TRANSFORMABLE_PROPS : normalizeToArray(transition || []);\n for (var i = 0; i < transitionKeys.length; i++) {\n var key = transitionKeys[i];\n if (key === 'style' || key === 'shape' || key === 'extra') {\n continue;\n }\n var elVal = el[key];\n if (process.env.NODE_ENV !== 'production') {\n checkTransformPropRefer(key, 'el.transition');\n }\n // Do not clone, animator will perform that clone.\n transFromProps[key] = elVal;\n }\n}\nfunction prepareTransformAllPropsFinal(el, elOption, allProps) {\n for (var i = 0; i < LEGACY_TRANSFORM_PROPS.length; i++) {\n var legacyName = LEGACY_TRANSFORM_PROPS[i];\n var xyName = LEGACY_TRANSFORM_PROPS_MAP[legacyName];\n var legacyArr = elOption[legacyName];\n if (legacyArr) {\n allProps[xyName[0]] = legacyArr[0];\n allProps[xyName[1]] = legacyArr[1];\n }\n }\n for (var i = 0; i < TRANSFORMABLE_PROPS.length; i++) {\n var key = TRANSFORMABLE_PROPS[i];\n if (elOption[key] != null) {\n allProps[key] = elOption[key];\n }\n }\n}\nfunction prepareStyleTransitionFrom(fromEl, elOption, styleOpt, transFromProps) {\n if (!styleOpt) {\n return;\n }\n var fromElStyle = fromEl.style;\n var transFromStyleProps;\n if (fromElStyle) {\n var styleTransition = styleOpt.transition;\n var elTransition = elOption.transition;\n if (styleTransition && !isTransitionAll(styleTransition)) {\n var transitionKeys = normalizeToArray(styleTransition);\n !transFromStyleProps && (transFromStyleProps = transFromProps.style = {});\n for (var i = 0; i < transitionKeys.length; i++) {\n var key = transitionKeys[i];\n var elVal = fromElStyle[key];\n // Do not clone, see `checkNonStyleTansitionRefer`.\n transFromStyleProps[key] = elVal;\n }\n } else if (fromEl.getAnimationStyleProps && (isTransitionAll(elTransition) || isTransitionAll(styleTransition) || indexOf(elTransition, 'style') >= 0)) {\n var animationProps = fromEl.getAnimationStyleProps();\n var animationStyleProps = animationProps ? animationProps.style : null;\n if (animationStyleProps) {\n !transFromStyleProps && (transFromStyleProps = transFromProps.style = {});\n var styleKeys = keys(styleOpt);\n for (var i = 0; i < styleKeys.length; i++) {\n var key = styleKeys[i];\n if (animationStyleProps[key]) {\n var elVal = fromElStyle[key];\n transFromStyleProps[key] = elVal;\n }\n }\n }\n }\n }\n}\nfunction isNonStyleTransitionEnabled(optVal, elVal) {\n // The same as `checkNonStyleTansitionRefer`.\n return !isArrayLike(optVal) ? optVal != null && isFinite(optVal) : optVal !== elVal;\n}\nvar checkTransformPropRefer;\nif (process.env.NODE_ENV !== 'production') {\n checkTransformPropRefer = function (key, usedIn) {\n if (!hasOwn(TRANSFORM_PROPS_MAP, key)) {\n warn('Prop `' + key + '` is not a permitted in `' + usedIn + '`. ' + 'Only `' + keys(TRANSFORM_PROPS_MAP).join('`, `') + '` are permitted.');\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { keys, filter, each, isArray, indexOf } from 'zrender/lib/core/util.js';\nimport { ELEMENT_ANIMATABLE_PROPS } from './customGraphicTransition.js';\nimport { getAnimationConfig } from './basicTransition.js';\nimport { warn } from '../util/log.js';\nimport { makeInner } from '../util/model.js';\nvar getStateToRestore = makeInner();\nvar KEYFRAME_EXCLUDE_KEYS = ['percent', 'easing', 'shape', 'style', 'extra'];\n/**\n * Stop previous keyframe animation and restore the attributes.\n * Avoid new keyframe animation starts with wrong internal state when the percent: 0 is not set.\n */\nexport function stopPreviousKeyframeAnimationAndRestore(el) {\n // Stop previous keyframe animation.\n el.stopAnimation('keyframe');\n // Restore\n el.attr(getStateToRestore(el));\n}\nexport function applyKeyframeAnimation(el, animationOpts, animatableModel) {\n if (!animatableModel.isAnimationEnabled() || !animationOpts) {\n return;\n }\n if (isArray(animationOpts)) {\n each(animationOpts, function (singleAnimationOpts) {\n applyKeyframeAnimation(el, singleAnimationOpts, animatableModel);\n });\n return;\n }\n var keyframes = animationOpts.keyframes;\n var duration = animationOpts.duration;\n if (animatableModel && duration == null) {\n // Default to use duration of config.\n // NOTE: animation config from payload will be ignored because they are mainly for transitions.\n var config = getAnimationConfig('enter', animatableModel, 0);\n duration = config && config.duration;\n }\n if (!keyframes || !duration) {\n return;\n }\n var stateToRestore = getStateToRestore(el);\n each(ELEMENT_ANIMATABLE_PROPS, function (targetPropName) {\n if (targetPropName && !el[targetPropName]) {\n return;\n }\n var animator;\n var endFrameIsSet = false;\n // Sort keyframes by percent.\n keyframes.sort(function (a, b) {\n return a.percent - b.percent;\n });\n each(keyframes, function (kf) {\n // Stop current animation.\n var animators = el.animators;\n var kfValues = targetPropName ? kf[targetPropName] : kf;\n if (process.env.NODE_ENV !== 'production') {\n if (kf.percent >= 1) {\n endFrameIsSet = true;\n }\n }\n if (!kfValues) {\n return;\n }\n var propKeys = keys(kfValues);\n if (!targetPropName) {\n // PENDING performance?\n propKeys = filter(propKeys, function (key) {\n return indexOf(KEYFRAME_EXCLUDE_KEYS, key) < 0;\n });\n }\n if (!propKeys.length) {\n return;\n }\n if (!animator) {\n animator = el.animate(targetPropName, animationOpts.loop, true);\n animator.scope = 'keyframe';\n }\n for (var i = 0; i < animators.length; i++) {\n // Stop all other animation that is not keyframe.\n if (animators[i] !== animator && animators[i].targetName === animator.targetName) {\n animators[i].stopTracks(propKeys);\n }\n }\n targetPropName && (stateToRestore[targetPropName] = stateToRestore[targetPropName] || {});\n var savedTarget = targetPropName ? stateToRestore[targetPropName] : stateToRestore;\n each(propKeys, function (key) {\n // Save original value.\n savedTarget[key] = ((targetPropName ? el[targetPropName] : el) || {})[key];\n });\n animator.whenWithKeys(duration * kf.percent, kfValues, propKeys, kf.easing);\n });\n if (!animator) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!endFrameIsSet) {\n warn('End frame with percent: 1 is missing in the keyframeAnimation.', true);\n }\n }\n animator.delay(animationOpts.delay || 0).duration(duration).start(animationOpts.easing);\n });\n}"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57],"mappings":";;;;;;;;;;AAgDA,SAAgB,gBAAgB,MAAM,WAAW;CAC/C,IAAI,YAAY,KAAK,iBAAiB,iBAAiB;CACvD,IAAI,MAAM,UAAU;AAEpB,KAAI,QAAQ,GAAG;EACb,IAAI,SAAS,iBAAiB,MAAM,WAAW,UAAU,GAAG;AAC5D,SAAO,UAAU,OAAO,SAAS,KAAK;YAC7B,KAAK;EACd,IAAI,OAAO,EAAE;AACb,OAAK,IAAI,IAAI,GAAG,IAAI,UAAU,QAAQ,IACpC,MAAK,KAAK,iBAAiB,MAAM,WAAW,UAAU,GAAG,CAAC;AAE5D,SAAO,KAAK,KAAK,IAAI;;;AAGzB,SAAgB,4BAA4B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