From ddde62b71fbab0142422d5f818a152b0045b48b7 Mon Sep 17 00:00:00 2001 From: SmallRuralDog <296404875@qq.com> Date: Mon, 20 Apr 2020 13:28:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=84=E4=BB=B6=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E7=BB=93=E6=9E=84=EF=BC=8C=E6=AD=A4=E6=AC=A1=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=BD=B1=E5=93=8D=E8=BE=83=E5=A4=A7=EF=BC=8C=E8=AF=B7?= =?UTF-8?q?=E5=B0=BD=E5=BF=AB=E6=9B=B4=E6=94=B9=E6=9C=89=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E7=BB=84=E4=BB=B6=E5=BC=95=E5=85=A5=EF=BC=8C=E8=80=81?= =?UTF-8?q?=E7=9A=84=E7=BB=84=E4=BB=B6=E5=B0=86=E4=BC=9A=E5=9C=A8=E5=90=8E?= =?UTF-8?q?=E9=9D=A2=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/0.js | 59692 +-------------------------- public/10.js | 495 +- public/11.js | 4688 +-- public/12.js | 141 +- public/13.js | 141 +- public/4.js | 141 +- public/5.js | 141 +- public/6.js | 141 +- public/7.js | 147 +- public/8.js | 163 +- public/9.js | 160 +- public/app.js | 37718 +---------------- public/manifest.js | 224 +- public/mix-manifest.json | 6 +- public/vendor.js | 80131 +------------------------------------ 15 files changed, 17 insertions(+), 184112 deletions(-) diff --git a/public/0.js b/public/0.js index 253c672..737e0c9 100644 --- a/public/0.js +++ b/public/0.js @@ -1,59691 +1 @@ -(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[0],{ - -/***/ "./node_modules/@antv/color-util/esm/index.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/color-util/esm/index.js ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -var RGB_REG = /rgba?\(([\s.,0-9]+)\)/; -var regexLG = /^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i; -var regexRG = /^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i; -var regexColorStop = /[\d.]+:(#[^\s]+|[^\)]+\))/gi; -var isGradientColor = function (val) { return /^[r,R,L,l]{1}[\s]*\(/.test(val); }; -// 创建辅助 tag 取颜色 -var createTmp = function () { - var i = document.createElement('i'); - i.title = 'Web Colour Picker'; - i.style.display = 'none'; - document.body.appendChild(i); - return i; -}; -// 获取颜色之间的插值 -var getValue = function (start, end, percent, index) { - return start[index] + (end[index] - start[index]) * percent; -}; -// 数组转换成颜色 -function arr2rgb(arr) { - return "#" + toHex(arr[0]) + toHex(arr[1]) + toHex(arr[2]); -} -// rgb 颜色转换成数组 -var rgb2arr = function (str) { - return [ - parseInt(str.substr(1, 2), 16), - parseInt(str.substr(3, 2), 16), - parseInt(str.substr(5, 2), 16), - ]; -}; -// 将数值从 0-255 转换成16进制字符串 -var toHex = function (value) { - var x16Value = Math.round(value).toString(16); - return x16Value.length === 1 ? "0" + x16Value : x16Value; -}; -// 计算颜色 -var calColor = function (points, percent) { - var fixedPercent = isNaN(Number(percent)) || percent < 0 ? 0 : - percent > 1 ? 1 : - Number(percent); - var steps = points.length - 1; - var step = Math.floor(steps * fixedPercent); - var left = steps * fixedPercent - step; - var start = points[step]; - var end = step === steps ? start : points[step + 1]; - return arr2rgb([ - getValue(start, end, left, 0), - getValue(start, end, left, 1), - getValue(start, end, left, 2), - ]); -}; -// 用于给 toRGB 的缓存(使用 memoize 方法替换) -// const colorCache = {}; -var iEl; -/** - * 将颜色转换到 rgb 的格式 - * @param {color} color 颜色 - * @return 将颜色转换到 '#ffffff' 的格式 - */ -var toRGB = function (color) { - // 如果已经是 rgb的格式 - if (color[0] === '#' && color.length === 7) { - return color; - } - if (!iEl) { - // 防止防止在页头报错 - iEl = createTmp(); - } - iEl.style.color = color; - var rst = document.defaultView.getComputedStyle(iEl, '').getPropertyValue('color'); - var matches = RGB_REG.exec(rst); - var cArray = matches[1].split(/\s*,\s*/).map(function (s) { return Number(s); }); - rst = arr2rgb(cArray); - return rst; -}; -/** - * 获取渐变函数 - * @param colors 多个颜色 - * @return 颜色值 - */ -var gradient = function (colors) { - var colorArray = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isString"])(colors) ? colors.split('-') : colors; - var points = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["map"])(colorArray, function (color) { - return rgb2arr(color.indexOf('#') === -1 ? toRGB(color) : color); - }); - // 返回一个函数 - return function (percent) { - return calColor(points, percent); - }; -}; -var toCSSGradient = function (gradientColor) { - if (isGradientColor(gradientColor)) { - var cssColor_1; - var steps = void 0; - if (gradientColor[0] === 'l') { - // 线性渐变 - var arr = regexLG.exec(gradientColor); - var angle = +arr[1] + 90; // css 和 g 的渐变起始角度不同 - steps = arr[2]; - cssColor_1 = "linear-gradient(" + angle + "deg, "; - } - else if (gradientColor[0] === 'r') { - // 径向渐变 - cssColor_1 = 'radial-gradient('; - var arr = regexRG.exec(gradientColor); - steps = arr[4]; - } - var colorStops_1 = steps.match(regexColorStop); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(colorStops_1, function (item, index) { - var itemArr = item.split(':'); - cssColor_1 += itemArr[1] + " " + itemArr[0] * 100 + "%"; - if (index !== (colorStops_1.length - 1)) { - cssColor_1 += ', '; - } - }); - cssColor_1 += ')'; - return cssColor_1; - } - return gradientColor; -}; -/* harmony default export */ __webpack_exports__["default"] = ({ - rgb2arr: rgb2arr, - gradient: gradient, - toRGB: Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["memoize"])(toRGB), - toCSSGradient: toCSSGradient, -}); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/abstract/component.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/component/esm/abstract/component.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_g_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/g-base */ "./node_modules/@antv/g-base/esm/index.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - - - -var LOCATION_FIELD_MAP = { - none: [], - point: ['x', 'y'], - region: ['start', 'end'], - points: ['points'], - circle: ['center', 'radius', 'startAngle', 'endAngle'], -}; -var Component = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Component, _super); - function Component(cfg) { - var _this = _super.call(this, cfg) || this; - _this.initCfg(); - return _this; - } - /** - * @protected - * 默认的配置项 - * @returns {object} 默认的配置项 - */ - Component.prototype.getDefaultCfg = function () { - return { - id: '', - name: '', - type: '', - locationType: 'none', - offsetX: 0, - offsetY: 0, - animate: false, - capture: true, - updateAutoRender: false, - animateOption: { - appear: null, - update: { - duration: 400, - easing: 'easeQuadInOut', - }, - enter: { - duration: 400, - easing: 'easeQuadInOut', - }, - leave: { - duration: 350, - easing: 'easeQuadIn', - }, - }, - events: null, - defaultCfg: {}, - visible: true, - }; - }; - /** - * 清理组件的内容,一般配合 render 使用 - * @example - * axis.clear(); - * axis.render(); - */ - Component.prototype.clear = function () { }; - /** - * 更新组件 - * @param {object} cfg 更新属性 - */ - Component.prototype.update = function (cfg) { - var _this = this; - var defaultCfg = this.get('defaultCfg'); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(cfg, function (value, name) { - var originCfg = _this.get(name); - var newCfg = value; - if (originCfg !== value) { - // 判断两者是否相等,主要是进行 null 的判定 - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isObject"])(value) && defaultCfg[name]) { - // 新设置的属性与默认值进行合并 - newCfg = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["deepMix"])({}, defaultCfg[name], value); - } - _this.set(name, newCfg); - } - }); - // 更新时考虑显示、隐藏 - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["hasKey"])(cfg, 'visible')) { - if (cfg.visible) { - this.show(); - } - else { - this.hide(); - } - } - // 更新时考虑capture - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["hasKey"])(cfg, 'capture')) { - this.setCapture(cfg.capture); - } - }; - Component.prototype.getLayoutBBox = function () { - return this.getBBox(); // 默认返回 getBBox,不同的组件内部单独实现 - }; - Component.prototype.getLocationType = function () { - return this.get('locationType'); - }; - Component.prototype.getOffset = function () { - return { - offsetX: this.get('offsetX'), - offsetY: this.get('offsetY'), - }; - }; - // 默认使用 update - Component.prototype.setOffset = function (offsetX, offsetY) { - this.update({ - offsetX: offsetX, - offsetY: offsetY, - }); - }; - Component.prototype.setLocation = function (cfg) { - var location = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg); - this.update(location); - }; - // 实现 ILocation 接口的 getLocation - Component.prototype.getLocation = function () { - var _this = this; - var location = {}; - var locationType = this.get('locationType'); - var fields = LOCATION_FIELD_MAP[locationType]; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(fields, function (field) { - location[field] = _this.get(field); - }); - return location; - }; - Component.prototype.isList = function () { - return false; - }; - Component.prototype.isSlider = function () { - return false; - }; - /** - * @protected - * 初始化,用于具体的组件继承 - */ - Component.prototype.init = function () { }; - // 将组件默认的配置项设置合并到传入的配置项 - Component.prototype.initCfg = function () { - var _this = this; - var defaultCfg = this.get('defaultCfg'); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(defaultCfg, function (value, name) { - var cfg = _this.get(name); - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isObject"])(cfg)) { - var newCfg = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["deepMix"])({}, value, cfg); - _this.set(name, newCfg); - } - }); - }; - return Component; -}(_antv_g_base__WEBPACK_IMPORTED_MODULE_1__["Base"])); -/* harmony default export */ __webpack_exports__["default"] = (Component); -//# sourceMappingURL=component.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/abstract/group-component.js": -/*!**********************************************************************!*\ - !*** ./node_modules/@antv/component/esm/abstract/group-component.js ***! - \**********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/event */ "./node_modules/@antv/component/esm/util/event.js"); -/* harmony import */ var _util_matrix__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/matrix */ "./node_modules/@antv/component/esm/util/matrix.js"); -/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/util */ "./node_modules/@antv/component/esm/util/util.js"); -/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./component */ "./node_modules/@antv/component/esm/abstract/component.js"); - - - - - - -var STATUS_UPDATE = 'update_status'; -var COPY_PROPERTIES = ['visible', 'tip', 'delegateObject']; // 更新对象时需要复制的属性 -var COPY_PROPERTIES_EXCLUDES = ['container', 'group', 'shapesMap', 'isRegister', 'isUpdating', 'destroyed']; // 更新子组件时排除的属性 -var GroupComponent = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GroupComponent, _super); - function GroupComponent() { - return _super !== null && _super.apply(this, arguments) || this; - } - GroupComponent.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { container: null, - /** - * @private - * 缓存图形的 Map - */ - shapesMap: {}, group: null, capture: true, - /** - * @private 组件或者图形是否允许注册 - * @type {false} - */ - isRegister: false, - /** - * @private 是否正在更新 - * @type {false} - */ - isUpdating: false, - /** - * @private - * 是否初始状态,一旦 render,update 后,这个状态就变成 false, clear 后恢复 - */ - isInit: true }); - }; - GroupComponent.prototype.remove = function () { - this.clear(); - var group = this.get('group'); - group.remove(); - }; - GroupComponent.prototype.clear = function () { - var group = this.get('group'); - group.clear(); - this.set('shapesMap', {}); - this.clearOffScreenCache(); - this.set('isInit', true); - }; - GroupComponent.prototype.getChildComponentById = function (id) { - var group = this.getElementById(id); - var inst = group && group.get('component'); - return inst; - }; - GroupComponent.prototype.getElementById = function (id) { - return this.get('shapesMap')[id]; - }; - GroupComponent.prototype.getElementByLocalId = function (localId) { - var id = this.getElementId(localId); - return this.getElementById(id); - }; - GroupComponent.prototype.getElementsByName = function (name) { - var rst = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(this.get('shapesMap'), function (elem) { - if (elem.get('name') === name) { - rst.push(elem); - } - }); - return rst; - }; - GroupComponent.prototype.getContainer = function () { - return this.get('container'); - }; - GroupComponent.prototype.update = function (cfg) { - // 设置正在更新的标记位 - // this.set('isUpdating', true); - _super.prototype.update.call(this, cfg); - // this.updateInner(); - // this.set('isUpdating', false); - this.offScreenRender(); - if (this.get('updateAutoRender')) { - this.render(); - } - }; - GroupComponent.prototype.render = function () { - var offScreenGroup = this.get('offScreenGroup'); - if (!offScreenGroup) { - offScreenGroup = this.offScreenRender(); - } - var group = this.get('group'); - this.updateElements(offScreenGroup, group); - this.deleteElements(); - this.applyOffset(); - if (!this.get('eventInitted')) { - this.initEvent(); - this.set('eventInitted', true); - } - this.set('isInit', false); - }; - GroupComponent.prototype.show = function () { - var group = this.get('group'); - group.show(); - this.set('visible', true); - }; - GroupComponent.prototype.hide = function () { - var group = this.get('group'); - group.hide(); - this.set('visible', false); - }; - GroupComponent.prototype.setCapture = function (capture) { - var group = this.get('group'); - group.set('capture', capture); - this.set('capture', capture); - }; - GroupComponent.prototype.destroy = function () { - this.removeEvent(); - this.remove(); - _super.prototype.destroy.call(this); - }; - GroupComponent.prototype.getBBox = function () { - return this.get('group').getCanvasBBox(); - }; - GroupComponent.prototype.getLayoutBBox = function () { - var group = this.get('group'); - // 防止被 clear 了,offScreenBBox 不存在 - var bbox = this.getInnerLayoutBBox(); - var matrix = group.getTotalMatrix(); - if (matrix) { - bbox = Object(_util_matrix__WEBPACK_IMPORTED_MODULE_3__["applyMatrix2BBox"])(matrix, bbox); - } - return bbox; // 默认返回 getBBox,不同的组件内部单独实现 - }; - // 复写 on, off, emit 透传到 group - GroupComponent.prototype.on = function (evt, callback, once) { - var group = this.get('group'); - group.on(evt, callback, once); - return this; - }; - GroupComponent.prototype.off = function (evt, callback) { - var group = this.get('group'); - group && group.off(evt, callback); - return this; - }; - GroupComponent.prototype.emit = function (eventName, eventObject) { - var group = this.get('group'); - group.emit(eventName, eventObject); - }; - GroupComponent.prototype.init = function () { - _super.prototype.init.call(this); - if (!this.get('group')) { - this.initGroup(); - } - this.offScreenRender(); // 绘制离屏 group - }; - // 获取组件内部布局占的包围盒 - GroupComponent.prototype.getInnerLayoutBBox = function () { - return this.get('offScreenBBox') || this.get('group').getBBox(); - }; - // 抛出委托对象 - GroupComponent.prototype.delegateEmit = function (eventName, eventObject) { - var group = this.get('group'); - eventObject.target = group; - group.emit(eventName, eventObject); - Object(_util_event__WEBPACK_IMPORTED_MODULE_2__["propagationDelegate"])(group, eventName, eventObject); - }; - // 创建离屏的 group ,不添加在 canvas 中 - GroupComponent.prototype.createOffScreenGroup = function () { - var group = this.get('group'); - var GroupClass = group.getGroupBase(); // 获取分组的构造函数 - var newGroup = new GroupClass({ - delegateObject: this.getDelegateObject(), - }); - return newGroup; - }; - // 应用 offset - GroupComponent.prototype.applyOffset = function () { - var offsetX = this.get('offsetX'); - var offsetY = this.get('offsetY'); - this.moveElementTo(this.get('group'), { - x: offsetX, - y: offsetY, - }); - }; - GroupComponent.prototype.initGroup = function () { - var container = this.get('container'); - this.set('group', container.addGroup({ - id: this.get('id'), - name: this.get('name'), - capture: this.get('capture'), - visible: this.get('visible'), - isComponent: true, - component: this, - delegateObject: this.getDelegateObject(), - })); - }; - // 离屏渲染 - GroupComponent.prototype.offScreenRender = function () { - this.clearOffScreenCache(); - var offScreenGroup = this.createOffScreenGroup(); - this.renderInner(offScreenGroup); - this.set('offScreenGroup', offScreenGroup); - // 包含包围盒的 bbox - this.set('offScreenBBox', Object(_util_util__WEBPACK_IMPORTED_MODULE_4__["getBBoxWithClip"])(offScreenGroup)); - return offScreenGroup; - }; - /** - * @protected - * 在组件上添加分组,主要解决 isReigeter 的问题 - * @param {IGroup} parent 父元素 - * @param {object} cfg 分组的配置项 - */ - GroupComponent.prototype.addGroup = function (parent, cfg) { - this.appendDelegateObject(parent, cfg); - var group = parent.addGroup(cfg); - if (this.get('isRegister')) { - this.registerElement(group); - } - return group; - }; - /** - * @protected - * 在组件上添加图形,主要解决 isReigeter 的问题 - * @param {IGroup} parent 父元素 - * @param {object} cfg 分组的配置项 - */ - GroupComponent.prototype.addShape = function (parent, cfg) { - this.appendDelegateObject(parent, cfg); - var shape = parent.addShape(cfg); - if (this.get('isRegister')) { - this.registerElement(shape); - } - return shape; - }; - /** - * 在组件上添加子组件 - * - * @param parent 父元素 - * @param cfg 子组件配置项 - */ - GroupComponent.prototype.addComponent = function (parent, cfg) { - var id = cfg.id, Ctor = cfg.component, restCfg = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__rest"])(cfg, ["id", "component"]); - // @ts-ignore - var inst = new Ctor(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, restCfg), { id: id, container: parent, updateAutoRender: this.get('updateAutoRender') })); - inst.init(); - inst.render(); - if (this.get('isRegister')) { - this.registerElement(inst.get('group')); - } - return inst; - }; - GroupComponent.prototype.initEvent = function () { }; - GroupComponent.prototype.removeEvent = function () { - var group = this.get('group'); - group.off(); - }; - GroupComponent.prototype.getElementId = function (localId) { - var id = this.get('id'); // 组件的 Id - var name = this.get('name'); // 组件的名称 - return id + "-" + name + "-" + localId; - }; - GroupComponent.prototype.registerElement = function (element) { - var id = element.get('id'); - this.get('shapesMap')[id] = element; - }; - GroupComponent.prototype.unregisterElement = function (element) { - var id = element.get('id'); - delete this.get('shapesMap')[id]; - }; - // 移动元素 - GroupComponent.prototype.moveElementTo = function (element, point) { - var matrix = Object(_util_matrix__WEBPACK_IMPORTED_MODULE_3__["getMatrixByTranslate"])(point); - element.attr('matrix', matrix); - }; - /** - * 图形元素新出现时的动画,默认图形从透明度 0 到当前透明度 - * @protected - * @param {string} elmentName 图形元素名称 - * @param {IElement} newElement 新的图形元素 - * @param {object} animateCfg 动画的配置项 - */ - GroupComponent.prototype.addAnimation = function (elmentName, newElement, animateCfg) { - // 缓存透明度 - var originOpacity = newElement.attr('opacity'); - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNil"])(originOpacity)) { - originOpacity = 1; - } - newElement.attr('opacity', 0); - newElement.animate({ opacity: originOpacity }, animateCfg); - }; - /** - * 图形元素新出现时的动画,默认图形从透明度 0 到当前透明度 - * @protected - * @param {string} elmentName 图形元素名称 - * @param {IElement} originElement 要删除的图形元素 - * @param {object} animateCfg 动画的配置项 - */ - GroupComponent.prototype.removeAnimation = function (elementName, originElement, animateCfg) { - originElement.animate({ opacity: 0 }, animateCfg); - }; - /** - * 图形元素的更新动画 - * @param {string} elmentName 图形元素名称 - * @param {IElement} originElement 现有的图形元素 - * @param {object} newAttrs 新的图形元素 - * @param {object} animateCfg 动画的配置项 - */ - GroupComponent.prototype.updateAnimation = function (elementName, originElement, newAttrs, animateCfg) { - originElement.animate(newAttrs, animateCfg); - }; - // 更新组件的图形 - GroupComponent.prototype.updateElements = function (newGroup, originGroup) { - var _this = this; - var animate = this.get('animate'); - var animateOption = this.get('animateOption'); - var children = newGroup.getChildren().slice(0); // 创建一个新数组,防止添加到 originGroup 时, children 变动 - var preElement; // 前面已经匹配到的图形元素,用于 - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(children, function (element) { - var elementId = element.get('id'); - var originElement = _this.getElementById(elementId); - var elementName = element.get('name'); - if (originElement) { - if (element.get('isComponent')) { - // 嵌套子组件更新 - var childComponent = element.get('component'); - var origChildComponent = originElement.get('component'); - var newCfg = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["pick"])(childComponent.cfg, Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["difference"])(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["keys"])(childComponent.cfg), COPY_PROPERTIES_EXCLUDES)); - origChildComponent.update(newCfg); - originElement.set(STATUS_UPDATE, 'update'); - } - else { - var replaceAttrs = _this.getReplaceAttrs(originElement, element); - // 更新 - if (animate && animateOption.update) { - // 没有动画 - _this.updateAnimation(elementName, originElement, replaceAttrs, animateOption.update); - } - else { - // originElement.attrs = replaceAttrs; // 直接替换 - originElement.attr(replaceAttrs); - } - // 如果是分组,则继续执行 - if (element.isGroup()) { - _this.updateElements(element, originElement); - } - // 复制属性 - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(COPY_PROPERTIES, function (name) { - originElement.set(name, element.get(name)); - }); - Object(_util_util__WEBPACK_IMPORTED_MODULE_4__["updateClip"])(originElement, element); - preElement = originElement; - // 执行完更新后设置状态位为更新 - originElement.set(STATUS_UPDATE, 'update'); - } - } - else { - // 没有对应的图形,则插入当前图形 - originGroup.add(element); // 应该在 group 加个 insertAt 的方法 - var siblings = originGroup.getChildren(); // 兄弟节点 - siblings.splice(siblings.length - 1, 1); // 先从数组中移除,然后放到合适的位置 - if (preElement) { - // 前面已经有更新的图形或者插入的图形,则在这个图形后面插入 - var index = siblings.indexOf(preElement); - siblings.splice(index + 1, 0, element); // 在已经更新的图形元素后面插入 - } - else { - siblings.unshift(element); - } - _this.registerElement(element); // 注册节点 - element.set(STATUS_UPDATE, 'add'); // 执行完更新后设置状态位为添加 - if (element.get('isComponent')) { - // 直接新增子组件container属性,实例不变 - var childComponent = element.get('component'); - childComponent.set('container', originGroup); - } - else if (element.isGroup()) { - // 如果元素是新增加的元素,则遍历注册所有的子节点 - _this.registerNewGroup(element); - } - preElement = element; - if (animate) { - var animateCfg = _this.get('isInit') ? animateOption.appear : animateOption.enter; - if (animateCfg) { - _this.addAnimation(elementName, element, animateCfg); - } - } - } - }); - }; - GroupComponent.prototype.clearUpdateStatus = function (group) { - var children = group.getChildren(); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(children, function (el) { - el.set(STATUS_UPDATE, null); // 清理掉更新状态 - }); - }; - // 清理离屏缓存 - GroupComponent.prototype.clearOffScreenCache = function () { - var offScreenGroup = this.get('offScreenGroup'); - if (offScreenGroup) { - // 销毁原先的离线 Group - offScreenGroup.destroy(); - } - this.set('offScreenGroup', null); - this.set('offScreenBBox', null); - }; - // private updateInner() { - // const group = this.get('group'); - // const newGroup = this.createOffScreenGroup(); - // this.renderInner(newGroup); - // this.applyOffset(); - // this.updateElements(newGroup, group); - // this.deleteElements(); - // newGroup.destroy(); // 销毁虚拟分组 - // } - // 获取发生委托时的对象,在事件中抛出 - GroupComponent.prototype.getDelegateObject = function () { - var _a; - var name = this.get('name'); - var delegateObject = (_a = {}, - _a[name] = this, - _a.component = this, - _a); - return delegateObject; - }; - // 附加委托信息,用于事件 - GroupComponent.prototype.appendDelegateObject = function (parent, cfg) { - var parentObject = parent.get('delegateObject'); - if (!cfg.delegateObject) { - cfg.delegateObject = {}; - } - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mix"])(cfg.delegateObject, parentObject); // 将父元素上的委托信息复制到自身 - }; - // 获取需要替换的属性,如果原先图形元素存在,而新图形不存在,则设置 undefined - GroupComponent.prototype.getReplaceAttrs = function (originElement, newElement) { - var originAttrs = originElement.attr(); - var newAttrs = newElement.attr(); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(originAttrs, function (v, k) { - if (newAttrs[k] === undefined) { - newAttrs[k] = undefined; - } - }); - return newAttrs; - }; - GroupComponent.prototype.registerNewGroup = function (group) { - var _this = this; - var children = group.getChildren(); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(children, function (element) { - _this.registerElement(element); // 注册节点 - element.set(STATUS_UPDATE, 'add'); // 执行完更新后设置状态位为添加 - if (element.isGroup()) { - _this.registerNewGroup(element); - } - }); - }; - // 移除多余的元素 - GroupComponent.prototype.deleteElements = function () { - var _this = this; - var shapesMap = this.get('shapesMap'); - var deleteArray = []; - // 遍历获取需要删除的图形元素 - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(shapesMap, function (element, id) { - if (!element.get(STATUS_UPDATE) || element.destroyed) { - deleteArray.push([id, element]); - } - else { - element.set(STATUS_UPDATE, null); // 清理掉更新状态 - } - }); - var animate = this.get('animate'); - var animateOption = this.get('animateOption'); - // 删除图形元素 - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(deleteArray, function (item) { - var id = item[0], element = item[1]; - if (!element.destroyed) { - var elementName = element.get('name'); - if (animate && animateOption.leave) { - // 需要动画结束时移除图形 - var callbackAnimCfg = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mix"])({ - callback: function () { - _this.removeElement(element); - }, - }, animateOption.leave); - _this.removeAnimation(elementName, element, callbackAnimCfg); - } - else { - _this.removeElement(element); - } - } - delete shapesMap[id]; // 从缓存中移除 - }); - }; - GroupComponent.prototype.removeElement = function (element) { - if (element.get('isGroup')) { - var component = element.get('component'); - if (component) { - component.destroy(); - } - } - element.remove(); - }; - return GroupComponent; -}(_component__WEBPACK_IMPORTED_MODULE_5__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (GroupComponent); -//# sourceMappingURL=group-component.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/abstract/html-component.js": -/*!*********************************************************************!*\ - !*** ./node_modules/@antv/component/esm/abstract/html-component.js ***! - \*********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_dom_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/dom-util */ "./node_modules/@antv/dom-util/esm/index.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/util */ "./node_modules/@antv/component/esm/util/util.js"); -/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./component */ "./node_modules/@antv/component/esm/abstract/component.js"); - - - - - -var HtmlComponent = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(HtmlComponent, _super); - function HtmlComponent() { - return _super !== null && _super.apply(this, arguments) || this; - } - HtmlComponent.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { container: null, containerTpl: '
', updateAutoRender: true, parent: null }); - return cfg; - }; - HtmlComponent.prototype.getContainer = function () { - return this.get('container'); - }; - /** - * 显示组件 - */ - HtmlComponent.prototype.show = function () { - var container = this.get('container'); - container.style.display = ''; - this.set('visible', true); - }; - /** - * 隐藏组件 - */ - HtmlComponent.prototype.hide = function () { - var container = this.get('container'); - container.style.display = 'none'; - this.set('visible', false); - }; - /** - * 是否允许捕捉事件 - * @param capture 事件捕捉 - */ - HtmlComponent.prototype.setCapture = function (capture) { - var container = this.getContainer(); - var value = capture ? 'auto' : 'none'; - container.style.pointerEvents = value; - this.set('capture', capture); - }; - HtmlComponent.prototype.getBBox = function () { - var container = this.getContainer(); - var x = parseFloat(container.style.left) || 0; - var y = parseFloat(container.style.top) || 0; - return Object(_util_util__WEBPACK_IMPORTED_MODULE_3__["createBBox"])(x, y, container.clientWidth, container.clientHeight); - }; - HtmlComponent.prototype.clear = function () { - var container = this.get('container'); - Object(_util_util__WEBPACK_IMPORTED_MODULE_3__["clearDom"])(container); - }; - HtmlComponent.prototype.destroy = function () { - this.removeEvent(); - this.removeDom(); - _super.prototype.destroy.call(this); - }; - /** - * 复写 init,主要是初始化 DOM 和事件 - */ - HtmlComponent.prototype.init = function () { - _super.prototype.init.call(this); - this.initContainer(); - this.initEvent(); - this.initCapture(); - this.initVisible(); - }; - HtmlComponent.prototype.initCapture = function () { - this.setCapture(this.get('capture')); - }; - HtmlComponent.prototype.initVisible = function () { - if (!this.get('visible')) { - // 设置初始显示状态 - this.hide(); - } - else { - this.show(); - } - }; - HtmlComponent.prototype.initContainer = function () { - var container = this.get('container'); - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isNil"])(container)) { - // 未指定 container 则创建 - container = this.createDom(); - var parent_1 = this.get('parent'); - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isString"])(parent_1)) { - parent_1 = document.getElementById(parent_1); - this.set('parent', parent_1); - } - parent_1.appendChild(container); - this.set('container', container); - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isString"])(container)) { - // 用户传入的 id, 作为 container - container = document.getElementById(container); - this.set('container', container); - } // else container 是 DOM - if (!this.get('parent')) { - this.set('parent', container.parentNode); - } - }; - /** - * @protected - */ - HtmlComponent.prototype.createDom = function () { - var containerTpl = this.get('containerTpl'); - return Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["createDom"])(containerTpl); - }; - /** - * @protected - * 初始化事件 - */ - HtmlComponent.prototype.initEvent = function () { }; - /** - * @protected - * 清理 DOM - */ - HtmlComponent.prototype.removeDom = function () { - var container = this.get('container'); - container && container.parentNode.removeChild(container); - }; - /** - * @protected - * 清理事件 - */ - HtmlComponent.prototype.removeEvent = function () { }; - return HtmlComponent; -}(_component__WEBPACK_IMPORTED_MODULE_4__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (HtmlComponent); -//# sourceMappingURL=html-component.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/annotation/arc.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/component/esm/annotation/arc.js ***! - \************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _abstract_group_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../abstract/group-component */ "./node_modules/@antv/component/esm/abstract/group-component.js"); -/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/util */ "./node_modules/@antv/component/esm/util/util.js"); - - - -var ArcAnnotation = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ArcAnnotation, _super); - function ArcAnnotation() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * @protected - * 默认的配置项 - * @returns {object} 默认的配置项 - */ - ArcAnnotation.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { name: 'annotation', type: 'arc', locationType: 'circle', center: null, radius: 100, startAngle: -Math.PI / 2, endAngle: (Math.PI * 3) / 2, style: { - stroke: '#999', - lineWidth: 1, - } }); - }; - ArcAnnotation.prototype.renderInner = function (group) { - this.renderArc(group); - }; - ArcAnnotation.prototype.getArcPath = function () { - var _a = this.getLocation(), center = _a.center, radius = _a.radius, startAngle = _a.startAngle, endAngle = _a.endAngle; - var startPoint = Object(_util_util__WEBPACK_IMPORTED_MODULE_2__["getCirclePoint"])(center, radius, startAngle); - var endPoint = Object(_util_util__WEBPACK_IMPORTED_MODULE_2__["getCirclePoint"])(center, radius, endAngle); - var largeFlag = endAngle - startAngle > Math.PI ? 1 : 0; - var path = [['M', startPoint.x, startPoint.y]]; - if (endAngle - startAngle === Math.PI * 2) { - // 整个圆是分割成两个圆 - var middlePoint = Object(_util_util__WEBPACK_IMPORTED_MODULE_2__["getCirclePoint"])(center, radius, startAngle + Math.PI); - path.push(['A', radius, radius, 0, largeFlag, 1, middlePoint.x, middlePoint.y]); - path.push(['A', radius, radius, 0, largeFlag, 1, endPoint.x, endPoint.y]); - } - else { - path.push(['A', radius, radius, 0, largeFlag, 1, endPoint.x, endPoint.y]); - } - return path; - }; - // 绘制 arc - ArcAnnotation.prototype.renderArc = function (group) { - // 也可以 通过 get('center') 类似的方式逐个获取 - var path = this.getArcPath(); - var style = this.get('style'); - this.addShape(group, { - type: 'path', - id: this.getElementId('arc'), - name: 'annotation-arc', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: path }, style), - }); - }; - return ArcAnnotation; -}(_abstract_group_component__WEBPACK_IMPORTED_MODULE_1__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (ArcAnnotation); -//# sourceMappingURL=arc.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/annotation/data-marker.js": -/*!********************************************************************!*\ - !*** ./node_modules/@antv/component/esm/annotation/data-marker.js ***! - \********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _abstract_group_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../abstract/group-component */ "./node_modules/@antv/component/esm/abstract/group-component.js"); -/* harmony import */ var _util_theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/theme */ "./node_modules/@antv/component/esm/util/theme.js"); - - - - -var DataMarkerAnnotation = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(DataMarkerAnnotation, _super); - function DataMarkerAnnotation() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * 默认的配置项 - * @returns {object} 默认的配置项 - */ - DataMarkerAnnotation.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { name: 'annotation', type: 'dataMarker', locationType: 'point', x: 0, y: 0, point: {}, line: {}, text: {}, direction: 'upward', autoAdjust: true, coordinateBBox: null, defaultCfg: { - point: { - display: true, - style: { - r: 3, - fill: '#FFFFFF', - stroke: '#1890FF', - lineWidth: 2, - }, - }, - line: { - display: true, - length: 20, - style: { - stroke: _util_theme__WEBPACK_IMPORTED_MODULE_3__["default"].lineColor, - lineWidth: 1, - }, - }, - text: { - content: '', - display: true, - style: { - fill: _util_theme__WEBPACK_IMPORTED_MODULE_3__["default"].textColor, - opacity: 0.65, - fontSize: 12, - textAlign: 'start', - fontFamily: _util_theme__WEBPACK_IMPORTED_MODULE_3__["default"].fontFamily, - }, - }, - } }); - }; - DataMarkerAnnotation.prototype.renderInner = function (group) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.get('line'), 'display')) { - this.renderLine(group); - } - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.get('text'), 'display')) { - this.renderText(group); - } - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.get('point'), 'display')) { - this.renderPoint(group); - } - if (this.get('autoAdjust')) { - this.autoAdjust(group); - } - }; - DataMarkerAnnotation.prototype.applyOffset = function () { - this.moveElementTo(this.get('group'), { - x: this.get('x') + this.get('offsetX'), - y: this.get('y') + this.get('offsetY'), - }); - }; - DataMarkerAnnotation.prototype.renderPoint = function (group) { - var point = this.getShapeAttrs().point; - this.addShape(group, { - type: 'circle', - id: this.getElementId('point'), - name: 'annotation-point', - attrs: point, - }); - }; - DataMarkerAnnotation.prototype.renderLine = function (group) { - var line = this.getShapeAttrs().line; - this.addShape(group, { - type: 'path', - id: this.getElementId('line'), - name: 'annotation-line', - attrs: line, - }); - }; - DataMarkerAnnotation.prototype.renderText = function (group) { - var text = this.getShapeAttrs().text; - this.addShape(group, { - type: 'text', - id: this.getElementId('text'), - name: 'annotation-text', - attrs: text, - }); - }; - DataMarkerAnnotation.prototype.autoAdjust = function (group) { - var direction = this.get('direction'); - var x = this.get('x'); - var y = this.get('y'); - var lineLength = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.get('line'), 'length', 0); - var coordinateBBox = this.get('coordinateBBox'); - var _a = group.getBBox(), minX = _a.minX, maxX = _a.maxX, minY = _a.minY, maxY = _a.maxY; - var textShape = group.findById(this.getElementId('text')); - var lineShape = group.findById(this.getElementId('line')); - if (!coordinateBBox) { - return; - } - if (textShape) { - if (x + minX <= coordinateBBox.minX) { - // 左侧超出 - textShape.attr('textAlign', 'start'); - } - if (x + maxX >= coordinateBBox.maxX) { - // 右侧超出 - textShape.attr('textAlign', 'end'); - } - } - if ((direction === 'upward' && y + minY <= coordinateBBox.minY) || - (direction !== 'upward' && y + maxY >= coordinateBBox.maxY)) { - // 上方或者下方超出 - var textBaseline = void 0; - var factor = void 0; - if (direction === 'upward' && y + minY <= coordinateBBox.minY) { - textBaseline = 'top'; - factor = 1; - } - else { - textBaseline = 'bottom'; - factor = -1; - } - textShape.attr('textBaseline', textBaseline); - if (lineShape) { - lineShape.attr('path', [ - ['M', 0, 0], - ['L', 0, lineLength * factor], - ]); - } - textShape.attr('y', (lineLength + 2) * factor); - } - }; - DataMarkerAnnotation.prototype.getShapeAttrs = function () { - var lineDisplay = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.get('line'), 'display'); - var pointStyle = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.get('point'), 'style', {}); - var lineStyle = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.get('line'), 'style', {}); - var textStyle = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.get('text'), 'style', {}); - var direction = this.get('direction'); - var lineLength = lineDisplay ? Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.get('line'), 'length', 0) : 0; - var factor = direction === 'upward' ? -1 : 1; - return { - point: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: 0, y: 0 }, pointStyle), - line: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: [ - ['M', 0, 0], - ['L', 0, lineLength * factor], - ] }, lineStyle), - text: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: 0, y: (lineLength + 2) * factor, text: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.get('text'), 'content', ''), textBaseline: direction === 'upward' ? 'bottom' : 'top' }, textStyle), - }; - }; - return DataMarkerAnnotation; -}(_abstract_group_component__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (DataMarkerAnnotation); -//# sourceMappingURL=data-marker.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/annotation/data-region.js": -/*!********************************************************************!*\ - !*** ./node_modules/@antv/component/esm/annotation/data-region.js ***! - \********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _abstract_group_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../abstract/group-component */ "./node_modules/@antv/component/esm/abstract/group-component.js"); -/* harmony import */ var _util_theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/theme */ "./node_modules/@antv/component/esm/util/theme.js"); -/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/util */ "./node_modules/@antv/component/esm/util/util.js"); - - - - - -var DataRegionAnnotation = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(DataRegionAnnotation, _super); - function DataRegionAnnotation() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * 默认的配置项 - * @returns {object} 默认的配置项 - */ - DataRegionAnnotation.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { name: 'annotation', type: 'dataRegion', locationType: 'points', points: [], lineLength: 0, region: {}, text: {}, defaultCfg: { - region: { - style: { - lineWidth: 0, - fill: _util_theme__WEBPACK_IMPORTED_MODULE_3__["default"].regionColor, - opacity: 0.4, - }, - }, - text: { - content: '', - style: { - textAlign: 'center', - textBaseline: 'bottom', - fontSize: 12, - fill: _util_theme__WEBPACK_IMPORTED_MODULE_3__["default"].textColor, - fontFamily: _util_theme__WEBPACK_IMPORTED_MODULE_3__["default"].fontFamily, - }, - }, - } }); - }; - DataRegionAnnotation.prototype.renderInner = function (group) { - var regionStyle = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.get('region'), 'style', {}); - var textStyle = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.get('text'), 'style', {}); - var lineLength = this.get('lineLength') || 0; - var points = this.get('points'); - if (!points.length) { - return; - } - var bbox = Object(_util_util__WEBPACK_IMPORTED_MODULE_4__["pointsToBBox"])(points); - // render region - var path = []; - path.push(['M', points[0].x, bbox.minY - lineLength]); - points.forEach(function (point) { - path.push(['L', point.x, point.y]); - }); - path.push(['L', points[points.length - 1].x, points[points.length - 1].y - lineLength]); - this.addShape(group, { - type: 'path', - id: this.getElementId('region'), - name: 'annotation-region', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: path }, regionStyle), - }); - // render text - this.addShape(group, { - type: 'text', - id: this.getElementId('text'), - name: 'annotation-text', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: (bbox.minX + bbox.maxX) / 2, y: bbox.minY - lineLength, text: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.get('text'), 'content', '') }, textStyle), - }); - }; - return DataRegionAnnotation; -}(_abstract_group_component__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (DataRegionAnnotation); -//# sourceMappingURL=data-region.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/annotation/image.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/component/esm/annotation/image.js ***! - \**************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _abstract_group_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../abstract/group-component */ "./node_modules/@antv/component/esm/abstract/group-component.js"); -/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/util */ "./node_modules/@antv/component/esm/util/util.js"); - - - -var ImageAnnotation = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ImageAnnotation, _super); - function ImageAnnotation() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * @protected - * 默认的配置项 - * @returns {object} 默认的配置项 - */ - ImageAnnotation.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { name: 'annotation', type: 'image', locationType: 'region', start: null, end: null, src: null, style: {} }); - }; - ImageAnnotation.prototype.renderInner = function (group) { - this.renderImage(group); - }; - ImageAnnotation.prototype.getImageAttrs = function () { - var start = this.get('start'); - var end = this.get('end'); - var style = this.get('style'); - var bbox = Object(_util_util__WEBPACK_IMPORTED_MODULE_2__["regionToBBox"])({ start: start, end: end }); - var src = this.get('src'); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: bbox.x, y: bbox.y, img: src, width: bbox.width, height: bbox.height }, style); - }; - // 绘制图片 - ImageAnnotation.prototype.renderImage = function (group) { - this.addShape(group, { - type: 'image', - id: this.getElementId('image'), - name: 'annotation-image', - attrs: this.getImageAttrs(), - }); - }; - return ImageAnnotation; -}(_abstract_group_component__WEBPACK_IMPORTED_MODULE_1__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (ImageAnnotation); -//# sourceMappingURL=image.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/annotation/index.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/component/esm/annotation/index.js ***! - \**************************************************************/ -/*! exports provided: Line, Text, Arc, Region, Image, DataMarker, DataRegion, RegionFilter */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _line__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./line */ "./node_modules/@antv/component/esm/annotation/line.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Line", function() { return _line__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./text */ "./node_modules/@antv/component/esm/annotation/text.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Text", function() { return _text__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - -/* harmony import */ var _arc__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./arc */ "./node_modules/@antv/component/esm/annotation/arc.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Arc", function() { return _arc__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - -/* harmony import */ var _region__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./region */ "./node_modules/@antv/component/esm/annotation/region.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Region", function() { return _region__WEBPACK_IMPORTED_MODULE_3__["default"]; }); - -/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./image */ "./node_modules/@antv/component/esm/annotation/image.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Image", function() { return _image__WEBPACK_IMPORTED_MODULE_4__["default"]; }); - -/* harmony import */ var _data_marker__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./data-marker */ "./node_modules/@antv/component/esm/annotation/data-marker.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataMarker", function() { return _data_marker__WEBPACK_IMPORTED_MODULE_5__["default"]; }); - -/* harmony import */ var _data_region__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./data-region */ "./node_modules/@antv/component/esm/annotation/data-region.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataRegion", function() { return _data_region__WEBPACK_IMPORTED_MODULE_6__["default"]; }); - -/* harmony import */ var _region_filter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./region-filter */ "./node_modules/@antv/component/esm/annotation/region-filter.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RegionFilter", function() { return _region_filter__WEBPACK_IMPORTED_MODULE_7__["default"]; }); - - - - - - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/annotation/line.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/component/esm/annotation/line.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _abstract_group_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../abstract/group-component */ "./node_modules/@antv/component/esm/abstract/group-component.js"); -/* harmony import */ var _util_matrix__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/matrix */ "./node_modules/@antv/component/esm/util/matrix.js"); -/* harmony import */ var _util_theme__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/theme */ "./node_modules/@antv/component/esm/util/theme.js"); -/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/util */ "./node_modules/@antv/component/esm/util/util.js"); - - - - - - -var LineAnnotation = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LineAnnotation, _super); - function LineAnnotation() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * @protected - * 默认的配置项 - * @returns {object} 默认的配置项 - */ - LineAnnotation.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { name: 'annotation', type: 'line', locationType: 'region', start: null, end: null, style: {}, text: null, defaultCfg: { - style: { - fill: _util_theme__WEBPACK_IMPORTED_MODULE_4__["default"].textColor, - fontSize: 12, - textAlign: 'center', - textBaseline: 'bottom', - fontFamily: _util_theme__WEBPACK_IMPORTED_MODULE_4__["default"].fontFamily, - }, - text: { - position: 'center', - autoRotate: true, - content: null, - offsetX: 0, - offsetY: 0, - style: { - stroke: _util_theme__WEBPACK_IMPORTED_MODULE_4__["default"].lineColor, - lineWidth: 1, - }, - }, - } }); - }; - LineAnnotation.prototype.renderInner = function (group) { - this.renderLine(group); - if (this.get('text')) { - this.renderLabel(group); - } - }; - // 绘制线 - LineAnnotation.prototype.renderLine = function (group) { - var start = this.get('start'); - var end = this.get('end'); - var style = this.get('style'); - this.addShape(group, { - type: 'line', - id: this.getElementId('line'), - name: 'annotation-line', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x1: start.x, y1: start.y, x2: end.x, y2: end.y }, style), - }); - }; - // 获取 label 的位置 - LineAnnotation.prototype.getLabelPoint = function (start, end, position) { - var percent; - if (position === 'start') { - percent = 0; - } - else if (position === 'center') { - percent = 0.5; - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isString"])(position) && position.indexOf('%') !== -1) { - percent = parseInt(position, 10) / 100; - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(position)) { - percent = position; - } - else { - percent = 1; - } - if (percent > 1 || percent < 0) { - percent = 1; - } - return { - x: Object(_util_util__WEBPACK_IMPORTED_MODULE_5__["getValueByPercent"])(start.x, end.x, percent), - y: Object(_util_util__WEBPACK_IMPORTED_MODULE_5__["getValueByPercent"])(start.y, end.y, percent), - }; - }; - // 绘制 label - LineAnnotation.prototype.renderLabel = function (group) { - var text = this.get('text'); - var start = this.get('start'); - var end = this.get('end'); - var position = text.position, content = text.content, style = text.style, offsetX = text.offsetX, offsetY = text.offsetY, autoRotate = text.autoRotate; - var point = this.getLabelPoint(start, end, position); - var attrs = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: point.x + offsetX, y: point.y + offsetY, text: content }, style); - // 如果自动旋转,需要计算矩阵 - if (autoRotate) { - var vector = [end.x - start.x, end.y - start.y]; - var angle = Math.atan2(vector[1], vector[0]); - var matrix = Object(_util_matrix__WEBPACK_IMPORTED_MODULE_3__["getMatrixByAngle"])(point, angle); - attrs.matrix = matrix; - } - this.addShape(group, { - type: 'text', - id: this.getElementId('line-text'), - name: 'annotation-line-text', - attrs: attrs, - }); - }; - return LineAnnotation; -}(_abstract_group_component__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (LineAnnotation); -//# sourceMappingURL=line.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/annotation/region-filter.js": -/*!**********************************************************************!*\ - !*** ./node_modules/@antv/component/esm/annotation/region-filter.js ***! - \**********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _abstract_group_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../abstract/group-component */ "./node_modules/@antv/component/esm/abstract/group-component.js"); -/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/util */ "./node_modules/@antv/component/esm/util/util.js"); - - - - -var RegionFilterAnnotation = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(RegionFilterAnnotation, _super); - function RegionFilterAnnotation() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * 默认的配置项 - * @returns {object} 默认的配置项 - */ - RegionFilterAnnotation.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { name: 'annotation', type: 'regionFilter', locationType: 'region', start: null, end: null, color: null, shape: [] }); - }; - RegionFilterAnnotation.prototype.renderInner = function (group) { - var _this = this; - var start = this.get('start'); - var end = this.get('end'); - // 1. add region layer - var layer = this.addGroup(group, { - id: this.getElementId('region-filter'), - capture: false, - }); - // 2. clone shape & color it - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(this.get('shapes'), function (shape, shapeIdx) { - var type = shape.get('type'); - var attrs = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(shape.attr()); - _this.adjustShapeAttrs(attrs); - _this.addShape(layer, { - id: _this.getElementId("shape-" + type + "-" + shapeIdx), - capture: false, - type: type, - attrs: attrs, - }); - }); - // 3. clip - var clipBBox = Object(_util_util__WEBPACK_IMPORTED_MODULE_3__["regionToBBox"])({ start: start, end: end }); - layer.setClip({ - type: 'rect', - attrs: { - x: clipBBox.minX, - y: clipBBox.minY, - width: clipBBox.width, - height: clipBBox.height, - }, - }); - }; - RegionFilterAnnotation.prototype.adjustShapeAttrs = function (attr) { - var color = this.get('color'); - if (attr.fill) { - attr.fill = attr.fillStyle = color; - } - attr.stroke = attr.strokeStyle = color; - }; - return RegionFilterAnnotation; -}(_abstract_group_component__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (RegionFilterAnnotation); -//# sourceMappingURL=region-filter.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/annotation/region.js": -/*!***************************************************************!*\ - !*** ./node_modules/@antv/component/esm/annotation/region.js ***! - \***************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _abstract_group_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../abstract/group-component */ "./node_modules/@antv/component/esm/abstract/group-component.js"); -/* harmony import */ var _util_theme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/theme */ "./node_modules/@antv/component/esm/util/theme.js"); -/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/util */ "./node_modules/@antv/component/esm/util/util.js"); - - - - -var RegionAnnotation = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(RegionAnnotation, _super); - function RegionAnnotation() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * @protected - * 默认的配置项 - * @returns {object} 默认的配置项 - */ - RegionAnnotation.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { name: 'annotation', type: 'region', locationType: 'region', start: null, end: null, style: {}, defaultCfg: { - style: { - lineWidth: 0, - fill: _util_theme__WEBPACK_IMPORTED_MODULE_2__["default"].regionColor, - opacity: 0.4, - }, - } }); - }; - RegionAnnotation.prototype.renderInner = function (group) { - this.renderRegion(group); - }; - RegionAnnotation.prototype.renderRegion = function (group) { - var start = this.get('start'); - var end = this.get('end'); - var style = this.get('style'); - var bbox = Object(_util_util__WEBPACK_IMPORTED_MODULE_3__["regionToBBox"])({ start: start, end: end }); - this.addShape(group, { - type: 'rect', - id: this.getElementId('region'), - name: 'annotation-region', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: bbox.x, y: bbox.y, width: bbox.width, height: bbox.height }, style), - }); - }; - return RegionAnnotation; -}(_abstract_group_component__WEBPACK_IMPORTED_MODULE_1__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (RegionAnnotation); -//# sourceMappingURL=region.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/annotation/text.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/component/esm/annotation/text.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _abstract_group_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../abstract/group-component */ "./node_modules/@antv/component/esm/abstract/group-component.js"); -/* harmony import */ var _util_matrix__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/matrix */ "./node_modules/@antv/component/esm/util/matrix.js"); -/* harmony import */ var _util_theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/theme */ "./node_modules/@antv/component/esm/util/theme.js"); - - - - -var TextAnnotation = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TextAnnotation, _super); - function TextAnnotation() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * @protected - * 默认的配置项 - * @returns {object} 默认的配置项 - */ - TextAnnotation.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { name: 'annotation', type: 'text', locationType: 'point', x: 0, y: 0, content: '', rotate: null, style: {}, defaultCfg: { - style: { - fill: _util_theme__WEBPACK_IMPORTED_MODULE_3__["default"].textColor, - fontSize: 12, - textAlign: 'center', - textBaseline: 'middle', - fontFamily: _util_theme__WEBPACK_IMPORTED_MODULE_3__["default"].fontFamily, - }, - } }); - }; - // 复写 setLocation 方法,不需要重新创建 text - TextAnnotation.prototype.setLocation = function (location) { - this.set('x', location.x); - this.set('y', location.y); - this.resetLocation(); - }; - TextAnnotation.prototype.renderInner = function (group) { - this.renderText(group); - }; - TextAnnotation.prototype.renderText = function (group) { - var _a = this.getLocation(), x = _a.x, y = _a.y; - var content = this.get('content'); - var style = this.get('style'); - var text = this.addShape(group, { - type: 'text', - id: this.getElementId('text'), - name: 'annotation-text', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: x, - y: y, text: content }, style), - }); - this.applyRotate(text, x, y); - }; - TextAnnotation.prototype.applyRotate = function (textShape, x, y) { - var rotate = this.get('rotate'); - var matrix = null; - if (rotate) { - matrix = Object(_util_matrix__WEBPACK_IMPORTED_MODULE_2__["getMatrixByAngle"])({ x: x, y: y }, rotate); - } - textShape.attr('matrix', matrix); - }; - TextAnnotation.prototype.resetLocation = function () { - var textShape = this.getElementByLocalId('text'); - if (textShape) { - var _a = this.getLocation(), x = _a.x, y = _a.y; - textShape.attr({ - x: x, - y: y, - }); - this.applyRotate(textShape, x, y); - } - }; - return TextAnnotation; -}(_abstract_group_component__WEBPACK_IMPORTED_MODULE_1__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (TextAnnotation); -//# sourceMappingURL=text.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/axis/base.js": -/*!*******************************************************!*\ - !*** ./node_modules/@antv/component/esm/axis/base.js ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/matrix-util */ "./node_modules/@antv/matrix-util/esm/index.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _abstract_group_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../abstract/group-component */ "./node_modules/@antv/component/esm/abstract/group-component.js"); -/* harmony import */ var _util_matrix__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/matrix */ "./node_modules/@antv/component/esm/util/matrix.js"); -/* harmony import */ var _util_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/state */ "./node_modules/@antv/component/esm/util/state.js"); -/* harmony import */ var _util_theme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../util/theme */ "./node_modules/@antv/component/esm/util/theme.js"); - - - - - - - -var AxisBase = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(AxisBase, _super); - function AxisBase() { - return _super !== null && _super.apply(this, arguments) || this; - } - AxisBase.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { name: 'axis', ticks: [], line: {}, tickLine: {}, subTickLine: null, title: null, - /** - * 文本标签的配置项 - */ - label: {}, - /** - * 垂直于坐标轴方向的因子,决定文本、title、tickLine 在坐标轴的哪一侧 - */ - verticalFactor: 1, - // 垂直方向限制的长度,对文本自适应有很大影响 - verticalLimitLength: null, overlapOrder: ['autoRotate', 'autoEllipsis', 'autoHide'], tickStates: {}, defaultCfg: { - line: { - // @type {Attrs} 坐标轴线的图形属性,如果设置成null,则不显示轴线 - style: { - lineWidth: 1, - stroke: _util_theme__WEBPACK_IMPORTED_MODULE_6__["default"].lineColor, - }, - }, - tickLine: { - // @type {Attrs} 标注坐标线的图形属性 - style: { - lineWidth: 1, - stroke: _util_theme__WEBPACK_IMPORTED_MODULE_6__["default"].lineColor, - }, - alignTick: true, - length: 5, - displayWithLabel: true, - }, - subTickLine: { - // @type {Attrs} 标注坐标线的图形属性 - style: { - lineWidth: 1, - stroke: _util_theme__WEBPACK_IMPORTED_MODULE_6__["default"].lineColor, - }, - count: 4, - length: 2, - }, - label: { - autoRotate: true, - autoHide: false, - autoEllipsis: false, - style: { - fontSize: 12, - fill: _util_theme__WEBPACK_IMPORTED_MODULE_6__["default"].textColor, - textBaseline: 'middle', - fontFamily: _util_theme__WEBPACK_IMPORTED_MODULE_6__["default"].fontFamily, - fontWeight: 'normal', - }, - offset: 10, - }, - title: { - autoRotate: true, - spacing: 5, - position: 'center', - style: { - fontSize: 12, - fill: _util_theme__WEBPACK_IMPORTED_MODULE_6__["default"].textColor, - textBaseline: 'middle', - fontFamily: _util_theme__WEBPACK_IMPORTED_MODULE_6__["default"].fontFamily, - textAlign: 'center', - }, - offset: 48, - }, - tickStates: { - active: { - labelStyle: { - fontWeight: 500, - }, - tickLineStyle: { - lineWidth: 2, - }, - }, - inactive: { - labelStyle: { - fill: _util_theme__WEBPACK_IMPORTED_MODULE_6__["default"].uncheckedColor, - }, - }, - }, - } }); - }; - /** - * 绘制组件 - */ - AxisBase.prototype.renderInner = function (group) { - if (this.get('line')) { - this.drawLine(group); - } - // drawTicks 包括 drawLabels 和 drawTickLines - this.drawTicks(group); - if (this.get('title')) { - this.drawTitle(group); - } - }; - // 实现 IList 接口 - AxisBase.prototype.isList = function () { - return true; - }; - /** - * 获取图例项 - * @return {ListItem[]} 列表项集合 - */ - AxisBase.prototype.getItems = function () { - return this.get('ticks'); - }; - /** - * 设置列表项 - * @param {ListItem[]} items 列表项集合 - */ - AxisBase.prototype.setItems = function (items) { - this.update({ - ticks: items, - }); - }; - /** - * 更新列表项 - * @param {ListItem} item 列表项 - * @param {object} cfg 列表项 - */ - AxisBase.prototype.updateItem = function (item, cfg) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["mix"])(item, cfg); - this.clear(); // 由于单个图例项变化,会引起全局变化,所以全部更新 - this.render(); - }; - /** - * 清空列表 - */ - AxisBase.prototype.clearItems = function () { - var itemGroup = this.getElementByLocalId('label-group'); - itemGroup && itemGroup.clear(); - }; - /** - * 设置列表项的状态 - * @param {ListItem} item 列表项 - * @param {string} state 状态名 - * @param {boolean} value 状态值, true, false - */ - AxisBase.prototype.setItemState = function (item, state, value) { - item[state] = value; - this.updateTickStates(item); // 应用状态样式 - }; - /** - * 是否存在指定的状态 - * @param {ListItem} item 列表项 - * @param {boolean} state 状态名 - */ - AxisBase.prototype.hasState = function (item, state) { - return !!item[state]; - }; - AxisBase.prototype.getItemStates = function (item) { - var tickStates = this.get('tickStates'); - var rst = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(tickStates, function (v, k) { - if (item[k]) { - // item.selected - rst.push(k); - } - }); - return rst; - }; - /** - * 清楚所有列表项的状态 - * @param {string} state 状态值 - */ - AxisBase.prototype.clearItemsState = function (state) { - var _this = this; - var items = this.getItemsByState(state); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(items, function (item) { - _this.setItemState(item, state, false); - }); - }; - /** - * 根据状态获取图例项 - * @param {string} state [description] - * @return {ListItem[]} [description] - */ - AxisBase.prototype.getItemsByState = function (state) { - var _this = this; - var items = this.getItems(); - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["filter"])(items, function (item) { - return _this.hasState(item, state); - }); - }; - AxisBase.prototype.getSidePoint = function (point, offset) { - var self = this; - var vector = self.getSideVector(offset, point); - return { - x: point.x + vector[0], - y: point.y + vector[1], - }; - }; - AxisBase.prototype.getTextAnchor = function (vector) { - var align; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isNumberEqual"])(vector[0], 0)) { - align = 'center'; - } - else if (vector[0] > 0) { - align = 'start'; - } - else if (vector[0] < 0) { - align = 'end'; - } - return align; - }; - AxisBase.prototype.processOverlap = function (labelGroup) { }; - // 绘制坐标轴线 - AxisBase.prototype.drawLine = function (group) { - var path = this.getLinePath(); - var line = this.get('line'); // line 的判空在调用 drawLine 之前,不在这里判定 - this.addShape(group, { - type: 'path', - id: this.getElementId('line'), - name: 'axis-line', - attrs: Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["mix"])({ - path: path, - }, line.style), - }); - }; - AxisBase.prototype.getTickLineItems = function (ticks) { - var _this = this; - var tickLineItems = []; - var tickLine = this.get('tickLine'); - var alignTick = tickLine.alignTick; - var tickLineLength = tickLine.length; - var tickSegment = 1; - var tickCount = ticks.length; - if (tickCount >= 2) { - tickSegment = ticks[1].value - ticks[0].value; - } - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(ticks, function (tick) { - var point = tick.point; - if (!alignTick) { - // tickLine 不同 tick 对齐时需要调整 point - point = _this.getTickPoint(tick.value - tickSegment / 2); - } - var endPoint = _this.getSidePoint(point, tickLineLength); - tickLineItems.push({ - startPoint: point, - tickValue: tick.value, - endPoint: endPoint, - tickId: tick.id, - id: "tickline-" + tick.id, - }); - }); - // 如果 tickLine 不居中对齐,则需要在最后面补充一个 tickLine - // if (!alignTick && tickCount > 0) { - // const tick = ticks[tickCount - 1]; - // const point = this.getTickPoint(tick.value + tickSegment / 2); - // } - return tickLineItems; - }; - AxisBase.prototype.getSubTickLineItems = function (tickLineItems) { - var subTickLineItems = []; - var subTickLine = this.get('subTickLine'); - var subCount = subTickLine.count; - var tickLineCount = tickLineItems.length; - // 刻度线的数量大于 2 时,才绘制子刻度 - if (tickLineCount >= 2) { - for (var i = 0; i < tickLineCount - 1; i++) { - var pre = tickLineItems[i]; - var next = tickLineItems[i + 1]; - for (var j = 0; j < subCount; j++) { - var percent = (j + 1) / (subCount + 1); - var tickValue = (1 - percent) * pre.tickValue + percent * next.tickValue; - var point = this.getTickPoint(tickValue); - var endPoint = this.getSidePoint(point, subTickLine.length); - subTickLineItems.push({ - startPoint: point, - endPoint: endPoint, - tickValue: tickValue, - id: "sub-" + pre.id + "-" + j, - }); - } - } - } - return subTickLineItems; - }; - AxisBase.prototype.getTickLineAttrs = function (tickItem) { - var tickLineStyle = this.get('tickLine').style; - var startPoint = tickItem.startPoint, endPoint = tickItem.endPoint; - var attrs = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["mix"])({ - x1: startPoint.x, - y1: startPoint.y, - x2: endPoint.x, - y2: endPoint.y, - }, tickLineStyle); - return attrs; - }; - // 绘制坐标轴刻度线 - AxisBase.prototype.drawTick = function (tickItem, tickLineGroup) { - this.addShape(tickLineGroup, { - type: 'line', - id: this.getElementId(tickItem.id), - name: 'axis-tickline', - attrs: this.getTickLineAttrs(tickItem), - }); - }; - // 绘制坐标轴刻度线,包括子刻度线 - AxisBase.prototype.drawTickLines = function (group) { - var _this = this; - var ticks = this.get('ticks'); - var subTickLine = this.get('subTickLine'); - var tickLineItems = this.getTickLineItems(ticks); - var tickLineGroup = this.addGroup(group, { - name: 'axis-tickline-group', - id: this.getElementId('tickline-group'), - }); - var tickCfg = this.get('tickLine'); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(tickLineItems, function (item) { - if (tickCfg.displayWithLabel) { - // 如果跟随 label 显示,则检测是否存在对应的 label - var labelId = _this.getElementId("label-" + item.tickId); - if (group.findById(labelId)) { - _this.drawTick(item, tickLineGroup); - } - } - else { - _this.drawTick(item, tickLineGroup); - } - }); - if (subTickLine) { - var subTickLineItems = this.getSubTickLineItems(tickLineItems); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(subTickLineItems, function (item) { - _this.drawTick(item, tickLineGroup); - }); - } - }; - // 预处理 ticks 确定位置和补充 id - AxisBase.prototype.processTicks = function () { - var _this = this; - var ticks = this.get('ticks'); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(ticks, function (tick) { - tick.point = _this.getTickPoint(tick.value); - // 补充 tick 的 id,为动画和更新做准备 - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isNil"])(tick.id)) { - // 默认使用 tick.name 作为id - tick.id = tick.name; - } - }); - }; - // 绘制 ticks 包括文本和 tickLine - AxisBase.prototype.drawTicks = function (group) { - var _this = this; - this.processTicks(); - if (this.get('label')) { - this.drawLabels(group); - } - if (this.get('tickLine')) { - this.drawTickLines(group); - } - var ticks = this.get('ticks'); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(ticks, function (tick) { - _this.applyTickStates(tick, group); - }); - }; - // 获取 label 的配置项 - AxisBase.prototype.getLabelAttrs = function (tick, index) { - var labelCfg = this.get('label'); - var offset = labelCfg.offset, style = labelCfg.style, rotate = labelCfg.rotate, formatter = labelCfg.formatter; - var point = this.getSidePoint(tick.point, offset); - var vector = this.getSideVector(offset, point); - var text = formatter ? formatter(tick.name, tick, index) : tick.name; - var attrs = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["mix"])({ - x: point.x, - y: point.y, - text: text, - textAlign: this.getTextAnchor(vector), - }, style); - if (rotate) { - attrs.matrix = Object(_util_matrix__WEBPACK_IMPORTED_MODULE_4__["getMatrixByAngle"])(point, rotate); - } - return attrs; - }; - // 绘制文本 - AxisBase.prototype.drawLabels = function (group) { - var _this = this; - var ticks = this.get('ticks'); - var labelGroup = this.addGroup(group, { - name: 'axis-label-group', - id: this.getElementId('label-group'), - }); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(ticks, function (tick, index) { - _this.addShape(labelGroup, { - type: 'text', - name: 'axis-label', - id: _this.getElementId("label-" + tick.id), - attrs: _this.getLabelAttrs(tick, index), - delegateObject: { - tick: tick, - item: tick, - index: index, - }, - }); - }); - this.processOverlap(labelGroup); - }; - // 标题的属性 - AxisBase.prototype.getTitleAttrs = function () { - var titleCfg = this.get('title'); - var style = titleCfg.style, position = titleCfg.position, offset = titleCfg.offset, autoRotate = titleCfg.autoRotate; - var percent = 0.5; - if (position === 'start') { - percent = 0; - } - else if (position === 'end') { - percent = 1; - } - var point = this.getTickPoint(percent); // 标题对应的坐标轴上的点 - var titlePoint = this.getSidePoint(point, offset); // 标题的点 - var attrs = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["mix"])({ - x: titlePoint.x, - y: titlePoint.y, - text: titleCfg.text, - }, style); - var rotate = titleCfg.rotate; // rotate 是角度值 - var angle = rotate; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isNil"])(rotate) && autoRotate) { - // 用户没有设定旋转角度,同时设置自动旋转 - var vector = this.getAxisVector(point); - var v1 = [1, 0]; // 水平方向的向量 - angle = _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["vec2"].angleTo(vector, v1, true); - } - if (angle) { - var matrix = Object(_util_matrix__WEBPACK_IMPORTED_MODULE_4__["getMatrixByAngle"])(titlePoint, angle); - attrs.matrix = matrix; - } - return attrs; - }; - // 绘制标题 - AxisBase.prototype.drawTitle = function (group) { - this.addShape(group, { - type: 'text', - id: this.getElementId('title'), - name: 'axis-title', - attrs: this.getTitleAttrs(), - }); - }; - AxisBase.prototype.applyTickStates = function (tick, group) { - var states = this.getItemStates(tick); - if (states.length) { - var tickStates = this.get('tickStates'); - // 分别更新 label 和 tickLine - var labelId = this.getElementId("label-" + tick.id); - var labelShape = group.findById(labelId); - if (labelShape) { - var labelStateStyle = Object(_util_state__WEBPACK_IMPORTED_MODULE_5__["getStatesStyle"])(tick, 'label', tickStates); - labelStateStyle && labelShape.attr(labelStateStyle); - } - var tickLineId = this.getElementId("tickline-" + tick.id); - var tickLineShape = group.findById(tickLineId); - if (tickLineShape) { - var tickLineStateStyle = Object(_util_state__WEBPACK_IMPORTED_MODULE_5__["getStatesStyle"])(tick, 'tickLine', tickStates); - tickLineStateStyle && tickLineShape.attr(tickLineStateStyle); - } - } - }; - AxisBase.prototype.updateTickStates = function (tick) { - var states = this.getItemStates(tick); - var tickStates = this.get('tickStates'); - var labelCfg = this.get('label'); - var labelShape = this.getElementByLocalId("label-" + tick.id); - var tickLineCfg = this.get('tickLine'); - var tickLineShape = this.getElementByLocalId("tickline-" + tick.id); - if (states.length) { - if (labelShape) { - var labelStateStyle = Object(_util_state__WEBPACK_IMPORTED_MODULE_5__["getStatesStyle"])(tick, 'label', tickStates); - labelStateStyle && labelShape.attr(labelStateStyle); - } - if (tickLineShape) { - var tickLineStateStyle = Object(_util_state__WEBPACK_IMPORTED_MODULE_5__["getStatesStyle"])(tick, 'tickLine', tickStates); - tickLineStateStyle && tickLineShape.attr(tickLineStateStyle); - } - } - else { - if (labelShape) { - labelShape.attr(labelCfg.style); - } - if (tickLineShape) { - tickLineShape.attr(tickLineCfg.style); - } - } - }; - return AxisBase; -}(_abstract_group_component__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (AxisBase); -//# sourceMappingURL=base.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/axis/circle.js": -/*!*********************************************************!*\ - !*** ./node_modules/@antv/component/esm/axis/circle.js ***! - \*********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/matrix-util */ "./node_modules/@antv/matrix-util/esm/index.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/component/esm/axis/base.js"); - - - -var Circle = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Circle, _super); - function Circle() { - return _super !== null && _super.apply(this, arguments) || this; - } - Circle.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { type: 'circle', locationType: 'circle', center: null, radius: null, startAngle: -Math.PI / 2, endAngle: (Math.PI * 3) / 2 }); - }; - Circle.prototype.getLinePath = function () { - var center = this.get('center'); - var x = center.x; - var y = center.y; - var rx = this.get('radius'); - var ry = rx; - var startAngle = this.get('startAngle'); - var endAngle = this.get('endAngle'); - var path = []; - if (Math.abs(endAngle - startAngle) === Math.PI * 2) { - path = [['M', x, y - ry], ['A', rx, ry, 0, 1, 1, x, y + ry], ['A', rx, ry, 0, 1, 1, x, y - ry], ['Z']]; - } - else { - var startPoint = this.getCirclePoint(startAngle); - var endPoint = this.getCirclePoint(endAngle); - var large = Math.abs(endAngle - startAngle) > Math.PI ? 1 : 0; - var sweep = startAngle > endAngle ? 0 : 1; - path = [ - ['M', x, y], - ['L', startPoint.x, startPoint.y], - ['A', rx, ry, 0, large, sweep, endPoint.x, endPoint.y], - ['L', x, y], - ]; - } - return path; - }; - Circle.prototype.getTickPoint = function (tickValue) { - var startAngle = this.get('startAngle'); - var endAngle = this.get('endAngle'); - var angle = startAngle + (endAngle - startAngle) * tickValue; - return this.getCirclePoint(angle); - }; - // 获取垂直于坐标轴的向量 - Circle.prototype.getSideVector = function (offset, point) { - var center = this.get('center'); - var vector = [point.x - center.x, point.y - center.y]; - var factor = this.get('verticalFactor'); - var vecLen = _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["vec2"].length(vector); - _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["vec2"].scale(vector, vector, (factor * offset) / vecLen); - return vector; - }; - // 获取沿坐标轴方向的向量 - Circle.prototype.getAxisVector = function (point) { - var center = this.get('center'); - var vector = [point.x - center.x, point.y - center.y]; - return [vector[1], -1 * vector[0]]; // 获取顺时针方向的向量 - }; - // 根据圆心和半径获取点 - Circle.prototype.getCirclePoint = function (angle, radius) { - var center = this.get('center'); - radius = radius || this.get('radius'); - return { - x: center.x + Math.cos(angle) * radius, - y: center.y + Math.sin(angle) * radius, - }; - }; - return Circle; -}(_base__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Circle); -//# sourceMappingURL=circle.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/axis/index.js": -/*!********************************************************!*\ - !*** ./node_modules/@antv/component/esm/axis/index.js ***! - \********************************************************/ -/*! exports provided: Line, Circle, Base */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _line__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./line */ "./node_modules/@antv/component/esm/axis/line.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Line", function() { return _line__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _circle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./circle */ "./node_modules/@antv/component/esm/axis/circle.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Circle", function() { return _circle__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/component/esm/axis/base.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Base", function() { return _base__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/axis/line.js": -/*!*******************************************************!*\ - !*** ./node_modules/@antv/component/esm/axis/line.js ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/matrix-util */ "./node_modules/@antv/matrix-util/esm/index.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/component/esm/axis/base.js"); -/* harmony import */ var _overlap__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./overlap */ "./node_modules/@antv/component/esm/axis/overlap/index.js"); - - - - - -var Line = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Line, _super); - function Line() { - return _super !== null && _super.apply(this, arguments) || this; - } - Line.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { type: 'line', locationType: 'region', - /** - * 起始点, x, y - * @type {object} - */ - start: null, - /** - * 结束点, x, y - * @type {object} - */ - end: null }); - }; - // 获取坐标轴线的 path - Line.prototype.getLinePath = function () { - var start = this.get('start'); - var end = this.get('end'); - var path = []; - path.push(['M', start.x, start.y]); - path.push(['L', end.x, end.y]); - return path; - }; - // 重新计算 layout bbox,考虑到 line 不显示 - Line.prototype.getInnerLayoutBBox = function () { - var start = this.get('start'); - var end = this.get('end'); - var bbox = _super.prototype.getInnerLayoutBBox.call(this); - var minX = Math.min(start.x, end.x, bbox.x); - var minY = Math.min(start.y, end.y, bbox.y); - var maxX = Math.max(start.x, end.x, bbox.maxX); - var maxY = Math.max(start.y, end.y, bbox.maxY); - return { - x: minX, - y: minY, - minX: minX, - minY: minY, - maxX: maxX, - maxY: maxY, - width: maxX - minX, - height: maxY - minY, - }; - }; - Line.prototype.isVertical = function () { - var start = this.get('start'); - var end = this.get('end'); - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isNumberEqual"])(start.x, end.x); - }; - Line.prototype.isHorizontal = function () { - var start = this.get('start'); - var end = this.get('end'); - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isNumberEqual"])(start.y, end.y); - }; - Line.prototype.getTickPoint = function (tickValue) { - var self = this; - var start = self.get('start'); - var end = self.get('end'); - var regionX = end.x - start.x; - var regionY = end.y - start.y; - return { - x: start.x + regionX * tickValue, - y: start.y + regionY * tickValue, - }; - }; - // 直线坐标轴下任一点的向量方向都相同 - Line.prototype.getSideVector = function (offset) { - var axisVector = this.getAxisVector(); - var normal = _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["vec2"].normalize([], axisVector); - var factor = this.get('verticalFactor'); - var verticalVector = [normal[1], normal[0] * -1]; // 垂直方向,逆时针方向 - return _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["vec2"].scale([], verticalVector, offset * factor); - }; - // 获取坐标轴的向量 - Line.prototype.getAxisVector = function () { - var start = this.get('start'); - var end = this.get('end'); - return [end.x - start.x, end.y - start.y]; - }; - Line.prototype.processOverlap = function (labelGroup) { - var _this = this; - var isVertical = this.isVertical(); - var isHorizontal = this.isHorizontal(); - // 非垂直,或者非水平时不处理遮挡问题 - if (!isVertical && !isHorizontal) { - return; - } - var labelCfg = this.get('label'); - var titleCfg = this.get('title'); - var verticalLimitLength = this.get('verticalLimitLength'); - var labelOffset = labelCfg.offset; - var limitLength = verticalLimitLength; - var titleHeight = 0; - var titleSpacing = 0; - if (titleCfg) { - titleHeight = titleCfg.style.fontSize; - titleSpacing = titleCfg.spacing; - } - if (limitLength) { - limitLength = limitLength - labelOffset - titleSpacing - titleHeight; - } - var overlapOrder = this.get('overlapOrder'); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(overlapOrder, function (name) { - if (labelCfg[name]) { - _this.autoProcessOverlap(name, labelCfg[name], labelGroup, limitLength); - } - }); - if (titleCfg) { - // 调整 title 的 offset - var bbox = labelGroup.getBBox(); - var length_1 = isVertical ? bbox.width : bbox.height; - titleCfg.offset = labelOffset + length_1 + titleSpacing + titleHeight / 2; - } - }; - Line.prototype.autoProcessOverlap = function (name, value, labelGroup, limitLength) { - var _this = this; - var isVertical = this.isVertical(); - var hasAdjusted = false; - var util = _overlap__WEBPACK_IMPORTED_MODULE_4__[name]; - if (value === true) { - // 默认使用固定角度的旋转方案 - hasAdjusted = util.getDefault()(isVertical, labelGroup, limitLength); - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(value)) { - // 用户可以传入回调函数 - hasAdjusted = value(isVertical, labelGroup, limitLength); - } - else if (util[value]) { - // 按照名称执行旋转函数 - hasAdjusted = util[value](isVertical, labelGroup, limitLength); - } - if (name === 'autoRotate') { - // 文本旋转后,文本的对齐方式可能就不合适了 - if (hasAdjusted) { - var labels = labelGroup.getChildren(); - var verticalFactor_1 = this.get('verticalFactor'); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(labels, function (label) { - var textAlign = label.attr('textAlign'); - if (textAlign === 'center') { - // 居中的文本需要调整旋转度 - var newAlign = verticalFactor_1 > 0 ? 'end' : 'start'; - label.attr('textAlign', newAlign); - } - }); - } - } - else if (name === 'autoHide') { - var children = labelGroup.getChildren().slice(0); // 复制数组,删除时不会出错 - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(children, function (label) { - if (!label.get('visible')) { - if (_this.get('isRegister')) { - // 已经注册过了,则删除 - _this.unregisterElement(label); - } - label.remove(); // 防止 label 数量太多,所以统一删除 - } - }); - } - }; - return Line; -}(_base__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Line); -//# sourceMappingURL=line.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/axis/overlap/auto-ellipsis.js": -/*!************************************************************************!*\ - !*** ./node_modules/@antv/component/esm/axis/overlap/auto-ellipsis.js ***! - \************************************************************************/ -/*! exports provided: getDefault, ellipsisHead, ellipsisTail, ellipsisMiddle */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDefault", function() { return getDefault; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ellipsisHead", function() { return ellipsisHead; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ellipsisTail", function() { return ellipsisTail; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ellipsisMiddle", function() { return ellipsisMiddle; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -var ELLIPSIS_CODE = '\u2026'; -var ELLIPSIS_CODE_LENGTH = 2; // 省略号的长度 -function strLen(str) { - var len = 0; - for (var i = 0; i < str.length; i++) { - len += charAtLength(str, i); - } - return len; -} -function charAtLength(str, i) { - if (str.charCodeAt(i) > 0 && str.charCodeAt(i) < 128) { - return 1; - } - else { - return 2; - } -} -function getLabelLength(isVertical, label) { - var bbox = label.getCanvasBBox(); - return isVertical ? bbox.width : bbox.height; -} -function ellipsisLabel(isVertical, label, limitLength, position) { - var text = label.attr('text'); - var labelLength = getLabelLength(isVertical, label); - var codeLength = strLen(text); - var ellipsised = false; - if (limitLength < labelLength) { - var reseveLength = Math.floor((limitLength / labelLength) * codeLength) - ELLIPSIS_CODE_LENGTH; // 计算出来的应该保存的长度 - var newText = void 0; - if (reseveLength >= 0) { - newText = ellipsisString(text, reseveLength, position); - } - else { - newText = ELLIPSIS_CODE; - } - if (newText) { - label.attr('text', newText); - ellipsised = true; - } - } - if (ellipsised) { - label.set('tip', text); - } - else { - label.set('tip', null); - } - return ellipsised; -} -function ellipsisString(str, reseveLength, position) { - var count = str.length; - var rst = ''; - if (position === 'tail') { - for (var i = 0, index = 0; i < reseveLength;) { - var charLength = charAtLength(str, index); - if (i + charLength <= reseveLength) { - rst += str[index]; - i += charAtLength(str, index); - index++; - } - else { - break; - } - } - rst += ELLIPSIS_CODE; - } - else if (position === 'head') { - for (var i = 0, index = count - 1; i < reseveLength;) { - var charLength = charAtLength(str, index); - if (i + charLength <= reseveLength) { - rst += str[index]; - i += charAtLength(str, index); - index--; - } - else { - break; - } - } - rst = ELLIPSIS_CODE + rst; - } - else { - var startStr = ''; - var endStr = ''; - for (var i = 0, startIndex = 0, endIndex = count - 1; i < reseveLength;) { - var startCodeLen = charAtLength(str, startIndex); - var hasAdd = false; // 设置标志位,防止头尾都没有附加字符 - if (startCodeLen + i <= reseveLength) { - startStr += str[startIndex]; - startIndex++; - i += startCodeLen; - hasAdd = true; - } - var endCodeLen = charAtLength(str, endIndex); - if (endCodeLen + i <= reseveLength) { - endStr = str[endIndex] + endStr; - i += endCodeLen; - endIndex--; - hasAdd = true; - } - if (!hasAdd) { - // 如果都没有增加字符,说明都不适合则中断 - break; - } - } - rst = startStr + ELLIPSIS_CODE + endStr; - } - return rst; -} -function ellipseLabels(isVertical, labelGroup, limitLength, position) { - var children = labelGroup.getChildren(); - var ellipsised = false; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(children, function (label) { - var rst = ellipsisLabel(isVertical, label, limitLength, position); - ellipsised = ellipsised || rst; - }); - return ellipsised; -} -function getDefault() { - return ellipsisTail; -} -function ellipsisHead(isVertical, labelGroup, limitLength) { - return ellipseLabels(isVertical, labelGroup, limitLength, 'head'); -} -function ellipsisTail(isVertical, labelGroup, limitLength) { - return ellipseLabels(isVertical, labelGroup, limitLength, 'tail'); -} -function ellipsisMiddle(isVertical, labelGroup, limitLength) { - return ellipseLabels(isVertical, labelGroup, limitLength, 'middle'); -} -//# sourceMappingURL=auto-ellipsis.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/axis/overlap/auto-hide.js": -/*!********************************************************************!*\ - !*** ./node_modules/@antv/component/esm/axis/overlap/auto-hide.js ***! - \********************************************************************/ -/*! exports provided: getDefault, reserveFirst, reserveLast, reserveBoth, equidistance */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDefault", function() { return getDefault; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reserveFirst", function() { return reserveFirst; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reserveLast", function() { return reserveLast; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reserveBoth", function() { return reserveBoth; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equidistance", function() { return equidistance; }); -/* harmony import */ var _util_label__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/label */ "./node_modules/@antv/component/esm/util/label.js"); - -// 文本是否旋转 -function isRotate(label) { - var matrix = label.attr('matrix'); - return matrix && matrix[0] !== 1; // 仅在这个场景下判定 -} -// autohide 不再考虑超出限制 -// function isOutLimit(isVertical: boolean, label: IElement, limitLength: number) { -// if (!limitLength) { -// // 如果没限制 limitLength 则直接返回 false -// return false; -// } -// const canvasBBox = label.getCanvasBBox(); -// let isOut = false; -// if (isVertical) { -// isOut = canvasBBox.width > limitLength; -// } else { -// isOut = canvasBBox.height > limitLength; -// } -// return isOut; -// } -// 是否重叠 -function isOverlap(isVertical, rotated, preBox, curBox, reversed) { - if (reversed === void 0) { reversed = false; } - var overlap = false; - if (isVertical) { - // 垂直时检测边高 - overlap = Math.abs(preBox.y - curBox.y) < preBox.height; - } - else { - // 水平时检测 - if (rotated) { - // 如果旋转了,则检测两者 x 之间的间距是否小于前一个的高度 - var height = reversed ? curBox.height : preBox.height; - overlap = Math.abs(preBox.x - curBox.x) < height; - } - else { - // 检测两者是否 x 方向重合 - var width = reversed ? curBox.width : preBox.width; - overlap = Math.abs(preBox.x - curBox.x) < width; - } - } - return overlap; -} -// 保留第一个或者最后一个 -function reserveOne(isVertical, labelsGroup, reversed) { - var labels = labelsGroup.getChildren().slice(); // 复制数组 - if (!labels.length) { - return false; - } - var hasHide = false; - if (reversed) { - // 翻转 - labels.reverse(); - } - var count = labels.length; - var first = labels[0]; - var rotated = isRotate(first); - var preBox = first.getBBox(); - for (var i = 1; i < count; i++) { - var label = labels[i]; - var curBBox = label.getBBox(); - // 不再考虑超出限制,而仅仅根据是否重叠进行隐藏 isOutLimit(isVertical, label, limitLength) || - var isHide = isOverlap(isVertical, rotated, preBox, curBBox, reversed); - if (isHide) { - label.hide(); - hasHide = true; - } - else { - preBox = curBBox; - } - } - return hasHide; -} -function getDefault() { - return equidistance; -} -/** - * 保证首个 label 可见,即使超过 limitLength 也不隐藏 - * @param {boolean} isVertical 是否垂直 - * @param {IGroup} labelsGroup label 的分组 - */ -function reserveFirst(isVertical, labelsGroup) { - return reserveOne(isVertical, labelsGroup, false); -} -/** - * 保证最后一个 label 可见,即使超过 limitLength 也不隐藏 - * @param {boolean} isVertical 是否垂直 - * @param {IGroup} labelsGroup label 的分组 - */ -function reserveLast(isVertical, labelsGroup) { - return reserveOne(isVertical, labelsGroup, true); -} -/** - * 保证第一个最后一个 label 可见,即使超过 limitLength 也不隐藏 - * @param {boolean} isVertical 是否垂直 - * @param {IGroup} labelsGroup label 的分组 - */ -function reserveBoth(isVertical, labelsGroup) { - var labels = labelsGroup.getChildren().slice(); // 复制数组 - if (labels.length <= 2) { - // 如果数量小于或等于 2 则直接返回 - return false; - } - var hasHide = false; - var count = labels.length; - var first = labels[0]; - var last = labels[count - 1]; - var rotated = isRotate(first); - var preBox = first.getBBox(); - var preLabel = first; - // 按照先保存第一个的逻辑循环一遍,最后一个不参与循环 - for (var i = 1; i < count - 1; i++) { - var label = labels[i]; - var curBBox = label.getBBox(); - // 废弃 isOutLimit(isVertical, label, limitLength) || - var isHide = isOverlap(isVertical, rotated, preBox, curBBox); - if (isHide) { - label.hide(); - hasHide = true; - } - else { - preBox = curBBox; - preLabel = label; - } - } - var lastBBox = last.getBBox(); - var overlap = isOverlap(isVertical, rotated, preBox, lastBBox); // 不检测超出 limit - if (overlap) { - // 发生冲突,则隐藏前一个保留后一个 - preLabel.hide(); - hasHide = true; - } - return hasHide; -} -/** - * 保证 label 均匀显示,主要解决文本层叠的问题,对于 limitLength 不处理 - * @param {boolean} isVertical 是否垂直 - * @param {IGroup} labelsGroup label 的分组 - */ -function equidistance(isVertical, labelsGroup) { - var labels = labelsGroup.getChildren().slice(); // 复制数组 - if (labels.length < 2) { - // 如果数量小于 2 则直接返回,等于 2 时可能也会重合 - return false; - } - var hasHide = false; - var first = labels[0]; - var firstBBox = first.getBBox(); - var second = labels[1]; - var rotated = isRotate(first); - var count = labels.length; - var interval = 0; // 不重叠的坐标文本间距个数 - if (isVertical) { - // 垂直的坐标轴计算垂直方向的间距 - var distance = Math.abs(second.attr('y') - first.attr('y')); - interval = firstBBox.height / distance; - } - else { - // 水平坐标轴 - if (rotated) { - var distance = Math.abs(second.attr('x') - first.attr('x')); - interval = firstBBox.width / distance; - } - else { - var maxWidth = Object(_util_label__WEBPACK_IMPORTED_MODULE_0__["getMaxLabelWidth"])(labels); - var distance = Math.abs(second.attr('x') - first.attr('x')); - interval = maxWidth / distance; - } - } - // interval > 1 时需要对 label 进行隐藏 - if (interval > 1) { - interval = Math.ceil(interval); - for (var i = 0; i < count; i++) { - if (i % interval !== 0) { - // 仅保留被整除的 label - labels[i].hide(); - hasHide = true; - } - } - } - return hasHide; -} -//# sourceMappingURL=auto-hide.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/axis/overlap/auto-rotate.js": -/*!**********************************************************************!*\ - !*** ./node_modules/@antv/component/esm/axis/overlap/auto-rotate.js ***! - \**********************************************************************/ -/*! exports provided: getDefault, fixedAngle, unfixedAngle */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDefault", function() { return getDefault; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fixedAngle", function() { return fixedAngle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unfixedAngle", function() { return unfixedAngle; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_label__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/label */ "./node_modules/@antv/component/esm/util/label.js"); -/* harmony import */ var _util_matrix__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/matrix */ "./node_modules/@antv/component/esm/util/matrix.js"); -/* harmony import */ var _util_theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/theme */ "./node_modules/@antv/component/esm/util/theme.js"); - - - - -// 统一设置文本的角度 -function setLabelsAngle(labels, angle) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(labels, function (label) { - var x = label.attr('x'); - var y = label.attr('y'); - var matrix = Object(_util_matrix__WEBPACK_IMPORTED_MODULE_2__["getMatrixByAngle"])({ x: x, y: y }, angle); - label.attr('matrix', matrix); - }); -} -// 旋转文本 -function labelRotate(isVertical, labelsGroup, limitLength, getAngle) { - var labels = labelsGroup.getChildren(); - if (!labels.length) { - return false; - } - if (!isVertical && labels.length < 2) { - // 水平时至少有两个时才旋转 - return false; - } - var maxWidth = Object(_util_label__WEBPACK_IMPORTED_MODULE_1__["getMaxLabelWidth"])(labels); - var isOverlap = false; - if (isVertical) { - // limitLength 为 0 或者 null 时不生效 - isOverlap = !!limitLength && maxWidth > limitLength; - } - else { - // 同 limitLength 无关 - var tickWidth = Math.abs(labels[1].attr('x') - labels[0].attr('x')); - isOverlap = maxWidth > tickWidth; - } - if (isOverlap) { - var angle = getAngle(limitLength, maxWidth); - setLabelsAngle(labels, angle); - } - return isOverlap; -} -function getDefault() { - return fixedAngle; -} -/** - * 固定角度旋转文本 - * @param {boolean} isVertical 是否垂直方向 - * @param {IGroup} labelsGroup 文本的 group - * @param {number} limitLength 限定长度 - * @return {boolean} 是否发生了旋转 - */ -function fixedAngle(isVertical, labelsGroup, limitLength) { - return labelRotate(isVertical, labelsGroup, limitLength, function () { - return isVertical ? _util_theme__WEBPACK_IMPORTED_MODULE_3__["default"].verticalAxisRotate : _util_theme__WEBPACK_IMPORTED_MODULE_3__["default"].horizontalAxisRotate; - }); -} -/** - * 非固定角度旋转文本 - * @param {boolean} isVertical 是否垂直方向 - * @param {IGroup} labelsGroup 文本的 group - * @param {number} limitLength 限定长度 - * @return {boolean} 是否发生了旋转 - */ -function unfixedAngle(isVertical, labelsGroup, limitLength) { - return labelRotate(isVertical, labelsGroup, limitLength, function (length, maxWidth) { - if (!length) { - // 如果没有设置 limitLength,则使用固定的角度旋转 - return isVertical ? _util_theme__WEBPACK_IMPORTED_MODULE_3__["default"].verticalAxisRotate : _util_theme__WEBPACK_IMPORTED_MODULE_3__["default"].horizontalAxisRotate; - } - if (isVertical) { - // 垂直时不需要判定 limitLength > maxWidth ,因为此时不会 overlap - return -Math.acos(length / maxWidth); - } - else { - var angle = 0; - if (length > maxWidth) { - // 需要判定,asin 的参数 -1, 1 - angle = Math.PI / 4; - } - else { - angle = Math.asin(length / maxWidth); - if (angle > Math.PI / 4) { - // 大于 Math.PI / 4 时没意义 - angle = Math.PI / 4; - } - } - return angle; - } - }); -} -//# sourceMappingURL=auto-rotate.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/axis/overlap/index.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/component/esm/axis/overlap/index.js ***! - \****************************************************************/ -/*! exports provided: autoHide, autoRotate, autoEllipsis */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _auto_ellipsis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./auto-ellipsis */ "./node_modules/@antv/component/esm/axis/overlap/auto-ellipsis.js"); -/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "autoEllipsis", function() { return _auto_ellipsis__WEBPACK_IMPORTED_MODULE_0__; }); -/* harmony import */ var _auto_hide__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./auto-hide */ "./node_modules/@antv/component/esm/axis/overlap/auto-hide.js"); -/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "autoHide", function() { return _auto_hide__WEBPACK_IMPORTED_MODULE_1__; }); -/* harmony import */ var _auto_rotate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./auto-rotate */ "./node_modules/@antv/component/esm/axis/overlap/auto-rotate.js"); -/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "autoRotate", function() { return _auto_rotate__WEBPACK_IMPORTED_MODULE_2__; }); - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/crosshair/base.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/component/esm/crosshair/base.js ***! - \************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _abstract_group_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../abstract/group-component */ "./node_modules/@antv/component/esm/abstract/group-component.js"); -/* harmony import */ var _util_matrix__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/matrix */ "./node_modules/@antv/component/esm/util/matrix.js"); -/* harmony import */ var _util_theme__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/theme */ "./node_modules/@antv/component/esm/util/theme.js"); -/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/util */ "./node_modules/@antv/component/esm/util/util.js"); - - - - - - -var CrosshairBase = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CrosshairBase, _super); - function CrosshairBase() { - return _super !== null && _super.apply(this, arguments) || this; - } - CrosshairBase.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { name: 'crosshair', type: 'base', line: {}, text: null, textBackground: {}, capture: false, defaultCfg: { - line: { - style: { - lineWidth: 1, - stroke: _util_theme__WEBPACK_IMPORTED_MODULE_4__["default"].lineColor, - }, - }, - text: { - position: 'start', - offset: 10, - autoRotate: false, - content: null, - style: { - fill: _util_theme__WEBPACK_IMPORTED_MODULE_4__["default"].textColor, - textAlign: 'center', - textBaseline: 'middle', - fontFamily: _util_theme__WEBPACK_IMPORTED_MODULE_4__["default"].fontFamily, - }, - }, - textBackground: { - padding: 5, - style: { - stroke: _util_theme__WEBPACK_IMPORTED_MODULE_4__["default"].lineColor, - }, - }, - } }); - }; - CrosshairBase.prototype.renderInner = function (group) { - if (this.get('line')) { - this.renderLine(group); - } - if (this.get('text')) { - this.renderText(group); - this.renderBackground(group); - } - }; - CrosshairBase.prototype.renderText = function (group) { - var text = this.get('text'); - var style = text.style, autoRotate = text.autoRotate, content = text.content; - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNil"])(content)) { - var textPoint = this.getTextPoint(); - var matrix = null; - if (autoRotate) { - var angle = this.getRotateAngle(); - matrix = Object(_util_matrix__WEBPACK_IMPORTED_MODULE_3__["getMatrixByAngle"])(textPoint, angle); - } - this.addShape(group, { - type: 'text', - name: 'crosshair-text', - id: this.getElementId('text'), - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, textPoint), { text: content, matrix: matrix }), style), - }); - } - }; - CrosshairBase.prototype.renderLine = function (group) { - var path = this.getLinePath(); - var line = this.get('line'); - var style = line.style; - this.addShape(group, { - type: 'path', - name: 'crosshair-line', - id: this.getElementId('line'), - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: path }, style), - }); - }; - // 绘制文本的背景 - CrosshairBase.prototype.renderBackground = function (group) { - var textId = this.getElementId('text'); - var textShape = group.findById(textId); // 查找文本 - var textBackground = this.get('textBackground'); - if (textBackground && textShape) { - var textBBox = textShape.getBBox(); - var padding = Object(_util_util__WEBPACK_IMPORTED_MODULE_5__["formatPadding"])(textBackground.padding); // 用户传入的 padding 格式不定 - var style = textBackground.style; - var backgroundShape = this.addShape(group, { - type: 'rect', - name: 'crosshair-text-background', - id: this.getElementId('text-background'), - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: textBBox.x - padding[3], y: textBBox.y - padding[0], width: textBBox.width + padding[1] + padding[3], height: textBBox.height + padding[0] + padding[2], matrix: textShape.attr('matrix') }, style), - }); - backgroundShape.toBack(); - } - }; - return CrosshairBase; -}(_abstract_group_component__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (CrosshairBase); -//# sourceMappingURL=base.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/crosshair/circle.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/component/esm/crosshair/circle.js ***! - \**************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/util */ "./node_modules/@antv/component/esm/util/util.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/component/esm/crosshair/base.js"); - - - -var LineCrosshair = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LineCrosshair, _super); - function LineCrosshair() { - return _super !== null && _super.apply(this, arguments) || this; - } - LineCrosshair.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { type: 'circle', locationType: 'circle', center: null, radius: 100, startAngle: -Math.PI / 2, endAngle: (Math.PI * 3) / 2 }); - }; - LineCrosshair.prototype.getRotateAngle = function () { - var _a = this.getLocation(), startAngle = _a.startAngle, endAngle = _a.endAngle; - var position = this.get('text').position; - var tangentAngle = position === 'start' ? startAngle + Math.PI / 2 : endAngle - Math.PI / 2; - return tangentAngle; - }; - LineCrosshair.prototype.getTextPoint = function () { - var text = this.get('text'); - var position = text.position, offset = text.offset; - var _a = this.getLocation(), center = _a.center, radius = _a.radius, startAngle = _a.startAngle, endAngle = _a.endAngle; - var angle = position === 'start' ? startAngle : endAngle; - var tangentAngle = this.getRotateAngle() - Math.PI; - var point = Object(_util_util__WEBPACK_IMPORTED_MODULE_1__["getCirclePoint"])(center, radius, angle); - // 这个地方其实应该求切线向量然后在乘以 offset,但是太啰嗦了,直接给出结果 - // const tangent = [Math.cos(tangentAngle), Math.sin(tangentAngle)]; - // const offsetVector = vec2.scale([], tangent, offset); - var offsetX = Math.cos(tangentAngle) * offset; - var offsetY = Math.sin(tangentAngle) * offset; - return { - x: point.x + offsetX, - y: point.y + offsetY, - }; - }; - LineCrosshair.prototype.getLinePath = function () { - var _a = this.getLocation(), center = _a.center, radius = _a.radius, startAngle = _a.startAngle, endAngle = _a.endAngle; - var path = null; - if (endAngle - startAngle === Math.PI * 2) { - // 整圆 - var x = center.x, y = center.y; - path = [ - ['M', x, y - radius], - ['A', radius, radius, 0, 1, 1, x, y + radius], - ['A', radius, radius, 0, 1, 1, x, y - radius], - ['Z'], - ]; - } - else { - var startPoint = Object(_util_util__WEBPACK_IMPORTED_MODULE_1__["getCirclePoint"])(center, radius, startAngle); - var endPoint = Object(_util_util__WEBPACK_IMPORTED_MODULE_1__["getCirclePoint"])(center, radius, endAngle); - var large = Math.abs(endAngle - startAngle) > Math.PI ? 1 : 0; - var sweep = startAngle > endAngle ? 0 : 1; - path = [ - ['M', startPoint.x, startPoint.y], - ['A', radius, radius, 0, large, sweep, endPoint.x, endPoint.y], - ]; - } - return path; - }; - return LineCrosshair; -}(_base__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (LineCrosshair); -//# sourceMappingURL=circle.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/crosshair/index.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/component/esm/crosshair/index.js ***! - \*************************************************************/ -/*! exports provided: Line, Circle, Base */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _line__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./line */ "./node_modules/@antv/component/esm/crosshair/line.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Line", function() { return _line__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _circle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./circle */ "./node_modules/@antv/component/esm/crosshair/circle.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Circle", function() { return _circle__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/component/esm/crosshair/base.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Base", function() { return _base__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/crosshair/line.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/component/esm/crosshair/line.js ***! - \************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/util */ "./node_modules/@antv/component/esm/util/util.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/component/esm/crosshair/base.js"); - - - -var LineCrosshair = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LineCrosshair, _super); - function LineCrosshair() { - return _super !== null && _super.apply(this, arguments) || this; - } - LineCrosshair.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { type: 'line', locationType: 'region', start: null, end: null }); - }; - // 直线的文本需要同直线垂直 - LineCrosshair.prototype.getRotateAngle = function () { - var _a = this.getLocation(), start = _a.start, end = _a.end; - var position = this.get('text').position; - var angle = Math.atan2(end.y - start.y, end.x - start.x); - var tangentAngle = position === 'start' ? angle - Math.PI / 2 : angle + Math.PI / 2; - return tangentAngle; - }; - LineCrosshair.prototype.getTextPoint = function () { - var _a = this.getLocation(), start = _a.start, end = _a.end; - var text = this.get('text'); - var position = text.position, offset = text.offset; - var lineLength = Object(_util_util__WEBPACK_IMPORTED_MODULE_1__["distance"])(start, end); - var offsetPercent = offset / lineLength; // 计算间距同线的比例,用于计算最终的位置 - var percent = 0; - if (position === 'start') { - percent = 0 - offsetPercent; - } - else if (position === 'end') { - percent = 1 + offsetPercent; - } - return { - x: Object(_util_util__WEBPACK_IMPORTED_MODULE_1__["getValueByPercent"])(start.x, end.x, percent), - y: Object(_util_util__WEBPACK_IMPORTED_MODULE_1__["getValueByPercent"])(start.y, end.y, percent), - }; - }; - LineCrosshair.prototype.getLinePath = function () { - var _a = this.getLocation(), start = _a.start, end = _a.end; - return [ - ['M', start.x, start.y], - ['L', end.x, end.y], - ]; - }; - return LineCrosshair; -}(_base__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (LineCrosshair); -//# sourceMappingURL=line.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/grid/base.js": -/*!*******************************************************!*\ - !*** ./node_modules/@antv/component/esm/grid/base.js ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _abstract_group_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../abstract/group-component */ "./node_modules/@antv/component/esm/abstract/group-component.js"); -/* harmony import */ var _util_theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/theme */ "./node_modules/@antv/component/esm/util/theme.js"); - - - - -var GridBase = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GridBase, _super); - function GridBase() { - return _super !== null && _super.apply(this, arguments) || this; - } - GridBase.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { name: 'grid', line: {}, alternateColor: null, capture: false, items: [], closed: false, defaultCfg: { - line: { - type: 'line', - style: { - lineWidth: 1, - stroke: _util_theme__WEBPACK_IMPORTED_MODULE_3__["default"].lineColor, - }, - }, - } }); - }; - /** - * 获取栅格线的类型 - * @return {string} 栅格线类型 - */ - GridBase.prototype.getLineType = function () { - var line = this.get('line') || this.get('defaultCfg').line; - return line.type; - }; - GridBase.prototype.renderInner = function (group) { - this.drawGrid(group); - }; - GridBase.prototype.getAlternatePath = function (prePoints, points) { - var regionPath = this.getGridPath(prePoints); - var reversePoints = points.slice(0).reverse(); - var nextPath = this.getGridPath(reversePoints, true); - var closed = this.get('closed'); - if (closed) { - regionPath = regionPath.concat(nextPath); - } - else { - nextPath[0][0] = 'L'; // 更新第一个节点 - regionPath = regionPath.concat(nextPath); - regionPath.push(['Z']); - } - return regionPath; - }; - // 获取路径的配置项 - GridBase.prototype.getPathStyle = function () { - return this.get('line').style; - }; - // 绘制栅格 - GridBase.prototype.drawGrid = function (group) { - var _this = this; - var line = this.get('line'); - var items = this.get('items'); - var alternateColor = this.get('alternateColor'); - var preItem = null; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(items, function (item, index) { - var id = item.id || index; - // 绘制栅格线 - if (line) { - var style = _this.getPathStyle(); - var lineId = _this.getElementId("line-" + id); - var gridPath = _this.getGridPath(item.points); - _this.addShape(group, { - type: 'path', - name: 'grid-line', - id: lineId, - attrs: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mix"])({ - path: gridPath, - }, style), - }); - } - // 如果存在 alternateColor 则绘制矩形 - // 从第二个栅格线开始绘制 - if (alternateColor && index > 0) { - var regionId = _this.getElementId("region-" + id); - var isEven = index % 2 === 0; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isString"])(alternateColor)) { - // 如果颜色是单值,则是仅绘制偶数时的区域 - if (isEven) { - _this.drawAlternateRegion(regionId, group, preItem.points, item.points, alternateColor); - } - } - else { - var color = isEven ? alternateColor[1] : alternateColor[0]; - _this.drawAlternateRegion(regionId, group, preItem.points, item.points, color); - } - } - preItem = item; - }); - }; - // 绘制栅格线间的间隔 - GridBase.prototype.drawAlternateRegion = function (id, group, prePoints, points, color) { - var regionPath = this.getAlternatePath(prePoints, points); - this.addShape(group, { - type: 'path', - id: id, - name: 'grid-region', - attrs: { - path: regionPath, - fill: color, - }, - }); - }; - return GridBase; -}(_abstract_group_component__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (GridBase); -//# sourceMappingURL=base.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/grid/circle.js": -/*!*********************************************************!*\ - !*** ./node_modules/@antv/component/esm/grid/circle.js ***! - \*********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/component/esm/grid/base.js"); - - - -function distance(x1, y1, x2, y2) { - var dx = x2 - x1; - var dy = y2 - y1; - return Math.sqrt(dx * dx + dy * dy); -} -var Circle = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Circle, _super); - function Circle() { - return _super !== null && _super.apply(this, arguments) || this; - } - Circle.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { type: 'circle', - /** - * 中心点 - * @type {object} - */ - center: null, - /** - * 栅格线是否封闭 - * @type {true} - */ - closed: true }); - }; - Circle.prototype.getGridPath = function (points, reversed) { - var lineType = this.getLineType(); - var closed = this.get('closed'); - var path = []; - if (points.length) { - // 防止出错 - if (lineType === 'circle') { - var center = this.get('center'); - var firstPoint = points[0]; - var radius_1 = distance(center.x, center.y, firstPoint.x, firstPoint.y); - var sweepFlag_1 = reversed ? 0 : 1; // 顺时针还是逆时针 - if (closed) { - // 封闭时,绘制整个圆 - path.push(['M', center.x, center.y - radius_1]); - path.push(['A', radius_1, radius_1, 0, 0, sweepFlag_1, center.x, center.y + radius_1]); - path.push(['A', radius_1, radius_1, 0, 0, sweepFlag_1, center.x, center.y - radius_1]); - path.push(['Z']); - } - else { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(points, function (point, index) { - if (index === 0) { - path.push(['M', point.x, point.y]); - } - else { - path.push(['A', radius_1, radius_1, 0, 0, sweepFlag_1, point.x, point.y]); - } - }); - } - } - else { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(points, function (point, index) { - if (index === 0) { - path.push(['M', point.x, point.y]); - } - else { - path.push(['L', point.x, point.y]); - } - }); - if (closed) { - path.push(['Z']); - } - } - } - return path; - }; - return Circle; -}(_base__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Circle); -//# sourceMappingURL=circle.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/grid/index.js": -/*!********************************************************!*\ - !*** ./node_modules/@antv/component/esm/grid/index.js ***! - \********************************************************/ -/*! exports provided: Base, Circle, Line */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/component/esm/grid/base.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Base", function() { return _base__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _circle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./circle */ "./node_modules/@antv/component/esm/grid/circle.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Circle", function() { return _circle__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - -/* harmony import */ var _line__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line */ "./node_modules/@antv/component/esm/grid/line.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Line", function() { return _line__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/grid/line.js": -/*!*******************************************************!*\ - !*** ./node_modules/@antv/component/esm/grid/line.js ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/component/esm/grid/base.js"); - - - -var Line = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Line, _super); - function Line() { - return _super !== null && _super.apply(this, arguments) || this; - } - Line.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { type: 'line' }); - }; - Line.prototype.getGridPath = function (points) { - var path = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(points, function (point, index) { - if (index === 0) { - path.push(['M', point.x, point.y]); - } - else { - path.push(['L', point.x, point.y]); - } - }); - return path; - }; - return Line; -}(_base__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Line); -//# sourceMappingURL=line.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/index.js": -/*!***************************************************!*\ - !*** ./node_modules/@antv/component/esm/index.js ***! - \***************************************************/ -/*! exports provided: Component, GroupComponent, HtmlComponent, Axis, Annotation, Grid, Legend, Tooltip, Crosshair, Slider, Scrollbar */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _annotation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./annotation */ "./node_modules/@antv/component/esm/annotation/index.js"); -/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "Annotation", function() { return _annotation__WEBPACK_IMPORTED_MODULE_0__; }); -/* harmony import */ var _axis__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./axis */ "./node_modules/@antv/component/esm/axis/index.js"); -/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "Axis", function() { return _axis__WEBPACK_IMPORTED_MODULE_1__; }); -/* harmony import */ var _crosshair__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./crosshair */ "./node_modules/@antv/component/esm/crosshair/index.js"); -/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "Crosshair", function() { return _crosshair__WEBPACK_IMPORTED_MODULE_2__; }); -/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./grid */ "./node_modules/@antv/component/esm/grid/index.js"); -/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "Grid", function() { return _grid__WEBPACK_IMPORTED_MODULE_3__; }); -/* harmony import */ var _legend__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./legend */ "./node_modules/@antv/component/esm/legend/index.js"); -/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "Legend", function() { return _legend__WEBPACK_IMPORTED_MODULE_4__; }); -/* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./tooltip */ "./node_modules/@antv/component/esm/tooltip/index.js"); -/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "Tooltip", function() { return _tooltip__WEBPACK_IMPORTED_MODULE_5__; }); -/* harmony import */ var _abstract_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./abstract/component */ "./node_modules/@antv/component/esm/abstract/component.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Component", function() { return _abstract_component__WEBPACK_IMPORTED_MODULE_6__["default"]; }); - -/* harmony import */ var _abstract_group_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./abstract/group-component */ "./node_modules/@antv/component/esm/abstract/group-component.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupComponent", function() { return _abstract_group_component__WEBPACK_IMPORTED_MODULE_7__["default"]; }); - -/* harmony import */ var _abstract_html_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./abstract/html-component */ "./node_modules/@antv/component/esm/abstract/html-component.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HtmlComponent", function() { return _abstract_html_component__WEBPACK_IMPORTED_MODULE_8__["default"]; }); - -/* harmony import */ var _slider__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./slider */ "./node_modules/@antv/component/esm/slider/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Slider", function() { return _slider__WEBPACK_IMPORTED_MODULE_9__["Slider"]; }); - -/* harmony import */ var _scrollbar__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./scrollbar */ "./node_modules/@antv/component/esm/scrollbar/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scrollbar", function() { return _scrollbar__WEBPACK_IMPORTED_MODULE_10__["Scrollbar"]; }); - - - - - - - - - - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/legend/base.js": -/*!*********************************************************!*\ - !*** ./node_modules/@antv/component/esm/legend/base.js ***! - \*********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _abstract_group_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../abstract/group-component */ "./node_modules/@antv/component/esm/abstract/group-component.js"); -/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/util */ "./node_modules/@antv/component/esm/util/util.js"); - - - -var LegendBase = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LegendBase, _super); - function LegendBase() { - return _super !== null && _super.apply(this, arguments) || this; - } - LegendBase.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { name: 'legend', - /** - * 布局方式: horizontal,vertical - * @type {String} - */ - layout: 'horizontal', locationType: 'point', x: 0, y: 0, offsetX: 0, offsetY: 0, title: null, background: null }); - }; - LegendBase.prototype.getLayoutBBox = function () { - var bbox = _super.prototype.getLayoutBBox.call(this); - var x = this.get('x'); - var y = this.get('y'); - var offsetX = this.get('offsetX'); - var offsetY = this.get('offsetY'); - var maxWidth = this.get('maxWidth'); - var maxHeight = this.get('maxHeight'); - var minX = x + offsetX; - var minY = y + offsetY; - var width = bbox.maxX - minX; - var height = bbox.maxY - minY; - if (maxWidth) { - width = Math.min(width, maxWidth); - } - if (maxHeight) { - height = Math.min(height, maxHeight); - } - return Object(_util_util__WEBPACK_IMPORTED_MODULE_2__["createBBox"])(minX, minY, width, height); - }; - LegendBase.prototype.setLocation = function (cfg) { - this.set('x', cfg.x); - this.set('y', cfg.y); - this.resetLocation(); - }; - LegendBase.prototype.resetLocation = function () { - var x = this.get('x'); - var y = this.get('y'); - var offsetX = this.get('offsetX'); - var offsetY = this.get('offsetY'); - this.moveElementTo(this.get('group'), { - x: x + offsetX, - y: y + offsetY, - }); - }; - LegendBase.prototype.applyOffset = function () { - this.resetLocation(); - }; - // 获取当前绘制的点 - LegendBase.prototype.getDrawPoint = function () { - return this.get('currentPoint'); - }; - LegendBase.prototype.setDrawPoint = function (point) { - return this.set('currentPoint', point); - }; - // 复写父类定义的绘制方法 - LegendBase.prototype.renderInner = function (group) { - this.resetDraw(); - if (this.get('title')) { - this.drawTitle(group); - } - this.drawLegendContent(group); - if (this.get('background')) { - this.drawBackground(group); - } - // this.resetLocation(); // 在顶层已经在处理偏移时一起处理了 - }; - // 绘制背景 - LegendBase.prototype.drawBackground = function (group) { - var background = this.get('background'); - var bbox = group.getBBox(); - var padding = Object(_util_util__WEBPACK_IMPORTED_MODULE_2__["formatPadding"])(background.padding); - var attrs = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ - // 背景从 (0,0) 开始绘制 - x: 0, y: 0, width: bbox.width + padding[1] + padding[3], height: bbox.height + padding[0] + padding[2] }, background.style); - var backgroundShape = this.addShape(group, { - type: 'rect', - id: this.getElementId('background'), - name: 'legend-background', - attrs: attrs, - }); - backgroundShape.toBack(); - }; - // 绘制标题,标题在图例项的上面 - LegendBase.prototype.drawTitle = function (group) { - var currentPoint = this.get('currentPoint'); - var titleCfg = this.get('title'); - var spacing = titleCfg.spacing, style = titleCfg.style, text = titleCfg.text; - var shape = this.addShape(group, { - type: 'text', - id: this.getElementId('title'), - name: 'legend-title', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ text: text, x: currentPoint.x, y: currentPoint.y }, style), - }); - var bbox = shape.getBBox(); - // 标题单独在一行 - this.set('currentPoint', { x: currentPoint.x, y: bbox.maxY + spacing }); - }; - // 重置绘制时开始的位置,如果绘制边框,考虑边框的 padding - LegendBase.prototype.resetDraw = function () { - var background = this.get('background'); - var currentPoint = { x: 0, y: 0 }; - if (background) { - var padding = Object(_util_util__WEBPACK_IMPORTED_MODULE_2__["formatPadding"])(background.padding); - currentPoint.x = padding[3]; // 左边 padding - currentPoint.y = padding[0]; // 上面 padding - } - this.set('currentPoint', currentPoint); // 设置绘制的初始位置 - }; - return LegendBase; -}(_abstract_group_component__WEBPACK_IMPORTED_MODULE_1__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (LegendBase); -//# sourceMappingURL=base.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/legend/category.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/component/esm/legend/category.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_matrix__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/matrix */ "./node_modules/@antv/component/esm/util/matrix.js"); -/* harmony import */ var _util_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/state */ "./node_modules/@antv/component/esm/util/state.js"); -/* harmony import */ var _util_theme__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/theme */ "./node_modules/@antv/component/esm/util/theme.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/component/esm/legend/base.js"); - - - - - - -var Category = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Category, _super); - function Category() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.currentPageIndex = 1; - _this.totalPagesCnt = 1; - _this.pageWidth = 0; - _this.pageHeight = 0; - _this.startX = 0; - _this.startY = 0; - _this.onNavigationBack = function () { - var itemGroup = _this.getElementByLocalId('item-group'); - if (_this.currentPageIndex > 1) { - _this.currentPageIndex -= 1; - _this.updateNavigation(); - var matrix = _this.getCurrentNavigationMatrix(); - if (_this.get('animate')) { - itemGroup.animate({ - matrix: matrix, - }, 100); - } - else { - itemGroup.attr({ matrix: matrix }); - } - } - }; - _this.onNavigationAfter = function () { - var itemGroup = _this.getElementByLocalId('item-group'); - if (_this.currentPageIndex < _this.totalPagesCnt) { - _this.currentPageIndex += 1; - _this.updateNavigation(); - var matrix = _this.getCurrentNavigationMatrix(); - if (_this.get('animate')) { - itemGroup.animate({ - matrix: matrix, - }, 100); - } - else { - itemGroup.attr({ matrix: matrix }); - } - } - }; - return _this; - } - Category.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { name: 'legend', type: 'category', itemSpacing: 24, itemWidth: null, itemHeight: null, itemName: {}, itemValue: null, maxWidth: null, maxHeight: null, marker: {}, items: [], itemStates: {}, itemBackground: {}, defaultCfg: { - title: { - spacing: 5, - style: { - fill: _util_theme__WEBPACK_IMPORTED_MODULE_4__["default"].textColor, - fontSize: 12, - textAlign: 'start', - textBaseline: 'top', - }, - }, - background: { - padding: 5, - style: { - stroke: _util_theme__WEBPACK_IMPORTED_MODULE_4__["default"].lineColor, - }, - }, - itemBackground: { - style: { - opacity: 0, - fill: '#fff', - }, - }, - itemName: { - spacing: 16, - style: { - fill: _util_theme__WEBPACK_IMPORTED_MODULE_4__["default"].textColor, - fontSize: 12, - textAlign: 'start', - textBaseline: 'middle', - }, - }, - marker: { - spacing: 8, - style: { - r: 6, - symbol: 'circle', - }, - }, - itemValue: { - alignRight: false, - formatter: null, - style: { - fill: _util_theme__WEBPACK_IMPORTED_MODULE_4__["default"].textColor, - fontSize: 12, - textAlign: 'start', - textBaseline: 'middle', - }, - }, - itemStates: { - active: { - nameStyle: { - opacity: 0.8, - }, - }, - unchecked: { - nameStyle: { - fill: _util_theme__WEBPACK_IMPORTED_MODULE_4__["default"].uncheckedColor, - }, - markerStyle: { - fill: _util_theme__WEBPACK_IMPORTED_MODULE_4__["default"].uncheckedColor, - stroke: _util_theme__WEBPACK_IMPORTED_MODULE_4__["default"].uncheckedColor, - }, - }, - inactive: { - nameStyle: { - fill: _util_theme__WEBPACK_IMPORTED_MODULE_4__["default"].uncheckedColor, - }, - markerStyle: { - opacity: 0.2, - }, - }, - }, - } }); - }; - // 实现 IList 接口 - Category.prototype.isList = function () { - return true; - }; - /** - * 获取图例项 - * @return {ListItem[]} 列表项集合 - */ - Category.prototype.getItems = function () { - return this.get('items'); - }; - /** - * 设置列表项 - * @param {ListItem[]} items 列表项集合 - */ - Category.prototype.setItems = function (items) { - this.update({ - items: items, - }); - }; - /** - * 更新列表项 - * @param {ListItem} item 列表项 - * @param {object} cfg 列表项 - */ - Category.prototype.updateItem = function (item, cfg) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mix"])(item, cfg); - this.clear(); // 由于单个图例项变化,会引起全局变化,所以全部更新 - this.render(); - }; - /** - * 清空列表 - */ - Category.prototype.clearItems = function () { - var itemGroup = this.getElementByLocalId('item-group'); - itemGroup && itemGroup.clear(); - }; - /** - * 设置列表项的状态 - * @param {ListItem} item 列表项 - * @param {string} state 状态名 - * @param {boolean} value 状态值, true, false - */ - Category.prototype.setItemState = function (item, state, value) { - item[state] = value; - var itemElement = this.getElementByLocalId("item-" + item.id); - if (itemElement) { - var items = this.getItems(); - var index = items.indexOf(item); - var offsetGroup = this.createOffScreenGroup(); // 离屏的 group - var newElement = this.drawItem(item, index, this.getItemHeight(), offsetGroup); - this.updateElements(newElement, itemElement); // 更新整个分组 - this.clearUpdateStatus(itemElement); // 清理更新状态,防止出现 bug - } - }; - /** - * 是否存在指定的状态 - * @param {ListItem} item 列表项 - * @param {boolean} state 状态名 - */ - Category.prototype.hasState = function (item, state) { - return !!item[state]; - }; - Category.prototype.getItemStates = function (item) { - var itemStates = this.get('itemStates'); - var rst = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(itemStates, function (v, k) { - if (item[k]) { - // item.selected - rst.push(k); - } - }); - return rst; - }; - /** - * 清楚所有列表项的状态 - * @param {string} state 状态值 - */ - Category.prototype.clearItemsState = function (state) { - var _this = this; - var items = this.getItemsByState(state); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(items, function (item) { - _this.setItemState(item, state, false); - }); - }; - /** - * 根据状态获取图例项 - * @param {string} state [description] - * @return {ListItem[]} [description] - */ - Category.prototype.getItemsByState = function (state) { - var _this = this; - var items = this.getItems(); - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["filter"])(items, function (item) { - return _this.hasState(item, state); - }); - }; - // 绘制 legend 的选项 - Category.prototype.drawLegendContent = function (group) { - this.processItems(); - this.drawItems(group); - }; - // 防止未设置 id - Category.prototype.processItems = function () { - var items = this.get('items'); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(items, function (item) { - if (!item.id) { - // 如果没有设置 id,默认使用 name - item.id = item.name; - } - }); - }; - // 绘制所有的图例选项 - Category.prototype.drawItems = function (group) { - var _this = this; - var itemContainerGroup = this.addGroup(group, { - id: this.getElementId('item-container-group'), - name: 'legend-item-container-group', - }); - var itemGroup = this.addGroup(itemContainerGroup, { - id: this.getElementId('item-group'), - name: 'legend-item-group', - }); - var itemHeight = this.getItemHeight(); - var itemWidth = this.get('itemWidth'); - var itemSpacing = this.get('itemSpacing'); - var currentPoint = this.get('currentPoint'); - var startX = currentPoint.x; - var startY = currentPoint.y; - var layout = this.get('layout'); - var items = this.get('items'); - var wrapped = false; - var pageWidth = 0; - var maxWidth = this.get('maxWidth'); // 最大宽度,会导致 layout : 'horizontal' 时自动换行 - var maxHeight = this.get('maxHeight'); // 最大高度,会导致出现分页 - // 暂时不考虑分页 - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(items, function (item, index) { - var subGroup = _this.drawItem(item, index, itemHeight, itemGroup); - var bbox = subGroup.getBBox(); - var width = itemWidth || bbox.width; - if (width > pageWidth) { - pageWidth = width; - } - if (layout === 'horizontal') { - // 如果水平布局 - if (maxWidth && maxWidth < currentPoint.x + width - startX) { - // 检测是否换行 - wrapped = true; - currentPoint.x = startX; - currentPoint.y += itemHeight; - } - _this.moveElementTo(subGroup, currentPoint); - currentPoint.x += width + itemSpacing; - } - else { - // 如果垂直布局 - if (maxHeight && maxHeight < currentPoint.y + itemHeight - startY) { - // 换行 - wrapped = true; - currentPoint.x += pageWidth + itemSpacing; - currentPoint.y = startY; - pageWidth = 0; - } - _this.moveElementTo(subGroup, currentPoint); - currentPoint.y += itemHeight; // itemSpacing 仅影响水平间距 - } - }); - if (wrapped && this.get('flipPage')) { - this.pageHeight = 0; - this.pageWidth = 0; - this.totalPagesCnt = 1; - this.startX = startX; - this.startY = startY; - this.adjustNavigation(group, itemGroup); - } - }; - // 获取图例项的高度,如果未定义,则按照 name 的高度计算 - Category.prototype.getItemHeight = function () { - var itemHeight = this.get('itemHeight'); - if (!itemHeight) { - var nameCfg = this.get('itemName'); - if (nameCfg) { - itemHeight = nameCfg.style.fontSize + 8; - } - } - return itemHeight; - }; - // 绘制 marker - Category.prototype.drawMarker = function (container, markerCfg, item, itemHeight) { - var markerAttrs = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: 0, y: itemHeight / 2 }, markerCfg.style), { symbol: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(item.marker, 'symbol', 'circle') }), Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(item.marker, 'style', {})); - var shape = this.addShape(container, { - type: 'marker', - id: this.getElementId("item-" + item.id + "-marker"), - name: 'legend-item-marker', - attrs: markerAttrs, - }); - var bbox = shape.getBBox(); - shape.attr('x', bbox.width / 2); // marker 需要左对齐,所以不能占用左侧的空间 - var _a = shape.attr(), stroke = _a.stroke, fill = _a.fill; - if (stroke) { - shape.set('isStroke', true); - } - if (fill) { - shape.set('isFill', true); - } - return shape; - }; - // 绘制文本 - Category.prototype.drawItemText = function (container, textName, cfg, item, itemHeight, xPosition, index) { - var formatter = cfg.formatter; - var attrs = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: xPosition, y: itemHeight / 2, text: formatter ? formatter(item[textName], item, index) : item[textName] }, cfg.style); - return this.addShape(container, { - type: 'text', - id: this.getElementId("item-" + item.id + "-" + textName), - name: "legend-item-" + textName, - attrs: attrs, - }); - }; - // 绘制图例项 - Category.prototype.drawItem = function (item, index, itemHeight, itemGroup) { - var groupId = "item-" + item.id; - var subGroup = this.addGroup(itemGroup, { - name: 'legend-item', - id: this.getElementId(groupId), - delegateObject: { - item: item, - index: index, - }, - }); - var marker = this.get('marker'); - var itemName = this.get('itemName'); - var itemValue = this.get('itemValue'); - var itemBackground = this.get('itemBackground'); - var curX = 0; // 记录当前 x 的位置 - if (marker) { - var markerShape = this.drawMarker(subGroup, marker, item, itemHeight); - curX = markerShape.getBBox().maxX + marker.spacing; - } - if (itemName) { - var nameShape = this.drawItemText(subGroup, 'name', itemName, item, itemHeight, curX, index); - curX = nameShape.getBBox().maxX + itemName.spacing; - } - if (itemValue) { - var valueShape = this.drawItemText(subGroup, 'value', itemValue, item, itemHeight, curX, index); - var itemWidth = this.get('itemWidth'); - if (itemWidth && itemValue.alignRight) { - // 当文本右对齐,同时制定了列宽度时,调整文本位置和对齐方式 - valueShape.attr({ - textAlign: 'right', - x: itemWidth, - }); - } // 如果考虑 value 和 name 的覆盖,这个地方需要做文本自动省略的功能 - } - // 添加透明的背景,便于拾取和包围盒计算 - if (itemBackground) { - var bbox = subGroup.getBBox(); - var backShape = this.addShape(subGroup, { - type: 'rect', - name: 'legend-item-background', - id: this.getElementId(groupId + "-background"), - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: 0, y: 0, width: bbox.width, height: itemHeight }, itemBackground.style), - }); - backShape.toBack(); - } - this.applyItemStates(item, subGroup); - return subGroup; - }; - // 加上分页器并重新排序 items - Category.prototype.adjustNavigation = function (container, itemGroup) { - var _this = this; - var startX = this.startX; - var startY = this.startY; - var layout = this.get('layout'); - var subGroups = itemGroup.findAll(function (item) { return item.get('name') === 'legend-item'; }); - var maxWidth = this.get('maxWidth'); - var maxHeight = this.get('maxHeight'); - var itemWidth = this.get('itemWidth'); - var itemSpacing = this.get('itemSpacing'); - var itemHeight = this.getItemHeight(); - var navigation = this.drawNavigation(container, layout, '00/00', 12); - var navigationBBox = navigation.getBBox(); - var currentPoint = { x: startX, y: startY }; - var pages = 1; - var widthLimit = 0; - var pageWidth = 0; - var maxItemWidth = 0; - if (layout === 'horizontal') { - this.pageHeight = itemHeight; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(subGroups, function (item) { - var bbox = item.getBBox(); - var width = itemWidth || bbox.width; - if ((widthLimit && widthLimit < currentPoint.x + width + itemSpacing) || - maxWidth < currentPoint.x + width + itemSpacing + navigationBBox.width) { - if (pages === 1) { - widthLimit = currentPoint.x + itemSpacing; - _this.pageWidth = widthLimit; - _this.moveElementTo(navigation, { - x: maxWidth - itemSpacing - navigationBBox.width - navigationBBox.minX, - y: currentPoint.y + itemHeight / 2 - navigationBBox.height / 2 - navigationBBox.minY, - }); - } - pages += 1; - currentPoint.x = startX; - currentPoint.y += itemHeight; - } - _this.moveElementTo(item, currentPoint); - currentPoint.x += width + itemSpacing; - }); - } - else { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(subGroups, function (item) { - var bbox = item.getBBox(); - if (bbox.width > pageWidth) { - pageWidth = bbox.width; - } - }); - maxItemWidth = pageWidth; - pageWidth += itemSpacing; - if (maxWidth) { - // maxWidth 限制加上 - pageWidth = Math.min(maxWidth, pageWidth); - maxItemWidth = Math.min(maxWidth, maxItemWidth); - } - this.pageWidth = pageWidth; - this.pageHeight = maxHeight - Math.max(navigationBBox.height, itemHeight); - var cntPerPage_1 = Math.floor(this.pageHeight / itemHeight); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(subGroups, function (item, index) { - if (index !== 0 && index % cntPerPage_1 === 0) { - pages += 1; - currentPoint.x += pageWidth; - currentPoint.y = startY; - } - _this.moveElementTo(item, currentPoint); - // item.setClip({ - // type: 'rect', - // attrs: { - // x: currentPoint.x, - // y: currentPoint.y, - // width: pageWidth, - // height: itemHeight, - // }, - // }); - currentPoint.y += itemHeight; - }); - this.totalPagesCnt = pages; - this.moveElementTo(navigation, { - x: startX + maxItemWidth / 2 - navigationBBox.width / 2 - navigationBBox.minX, - y: maxHeight - navigationBBox.height - navigationBBox.minY, - }); - } - if (this.pageHeight && this.pageWidth) { - // 为了使固定的 clip 生效,clip 设置在 itemContainerGroup 上,itemGroup 需要在翻页时会设置 matrix - itemGroup.getParent().setClip({ - type: 'rect', - attrs: { - x: this.startX, - y: this.startY, - width: this.pageWidth, - height: this.pageHeight, - }, - }); - } - this.totalPagesCnt = pages; - if (this.currentPageIndex > this.totalPagesCnt) { - this.currentPageIndex = 1; - } - this.updateNavigation(navigation); - // update initial matrix - itemGroup.attr('matrix', this.getCurrentNavigationMatrix()); - }; - Category.prototype.drawNavigation = function (group, layout, text, size) { - var currentPoint = { x: 0, y: 0 }; - var subGroup = this.addGroup(group, { - id: this.getElementId('navigation-group'), - name: 'legend-navigation', - }); - var leftArrow = this.drawArrow(subGroup, currentPoint, 'navigation-arrow-left', layout === 'horizontal' ? 'up' : 'left', size); - leftArrow.on('click', this.onNavigationBack); - var leftArrowBBox = leftArrow.getBBox(); - currentPoint.x += leftArrowBBox.width + 2; - var textShape = this.addShape(subGroup, { - type: 'text', - id: this.getElementId('navigation-text'), - name: 'navigation-text', - attrs: { - x: currentPoint.x, - y: currentPoint.y + size / 2, - text: text, - fontSize: 12, - fill: '#ccc', - textBaseline: 'middle', - }, - }); - var textBBox = textShape.getBBox(); - currentPoint.x += textBBox.width + 2; - var rightArrow = this.drawArrow(subGroup, currentPoint, 'navigation-arrow-right', layout === 'horizontal' ? 'down' : 'right', size); - rightArrow.on('click', this.onNavigationAfter); - return subGroup; - }; - Category.prototype.updateNavigation = function (navigation) { - var text = this.currentPageIndex + "/" + this.totalPagesCnt; - var textShape = navigation ? navigation.getChildren()[1] : this.getElementByLocalId('navigation-text'); - var leftArrow = navigation - ? navigation.findById(this.getElementId('navigation-arrow-left')) - : this.getElementByLocalId('navigation-arrow-left'); - var rightArrow = navigation - ? navigation.findById(this.getElementId('navigation-arrow-right')) - : this.getElementByLocalId('navigation-arrow-right'); - var origBBox = textShape.getBBox(); - textShape.attr('text', text); - var newBBox = textShape.getBBox(); - textShape.attr('x', textShape.attr('x') - (newBBox.width - origBBox.width) / 2); - leftArrow.attr('opacity', this.currentPageIndex === 1 ? 0.45 : 1); - leftArrow.attr('cursor', this.currentPageIndex === 1 ? 'not-allowed' : 'pointer'); - rightArrow.attr('opacity', this.currentPageIndex === this.totalPagesCnt ? 0.45 : 1); - rightArrow.attr('cursor', this.currentPageIndex === this.totalPagesCnt ? 'not-allowed' : 'pointer'); - }; - Category.prototype.drawArrow = function (group, currentPoint, name, direction, size) { - var x = currentPoint.x, y = currentPoint.y; - var rotateMap = { - right: (90 * Math.PI) / 180, - left: ((360 - 90) * Math.PI) / 180, - up: 0, - down: (180 * Math.PI) / 180, - }; - var shape = this.addShape(group, { - type: 'path', - id: this.getElementId(name), - name: name, - attrs: { - path: [['M', x + size / 2, y], ['L', x, y + size], ['L', x + size, y + size], ['Z']], - fill: '#000', - cursor: 'pointer', - }, - }); - shape.attr('matrix', Object(_util_matrix__WEBPACK_IMPORTED_MODULE_2__["getMatrixByAngle"])({ x: x + size / 2, y: y + size / 2 }, rotateMap[direction])); - return shape; - }; - Category.prototype.getCurrentNavigationMatrix = function () { - var _a = this, currentPageIndex = _a.currentPageIndex, pageWidth = _a.pageWidth, pageHeight = _a.pageHeight; - var layout = this.get('layout'); - var translate = layout === 'horizontal' - ? { - x: 0, - y: pageHeight * (1 - currentPageIndex), - } - : { - x: pageWidth * (1 - currentPageIndex), - y: 0, - }; - return Object(_util_matrix__WEBPACK_IMPORTED_MODULE_2__["getMatrixByTranslate"])(translate); - }; - // 附加状态对应的样式 - Category.prototype.applyItemStates = function (item, subGroup) { - var states = this.getItemStates(item); - var hasStates = states.length > 0; - if (hasStates) { - var children = subGroup.getChildren(); - var itemStates_1 = this.get('itemStates'); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(children, function (element) { - var name = element.get('name'); - var elName = name.split('-')[2]; // marker, name, value - var statesStyle = Object(_util_state__WEBPACK_IMPORTED_MODULE_3__["getStatesStyle"])(item, elName, itemStates_1); - if (statesStyle) { - element.attr(statesStyle); - if (elName === 'marker' && !(element.get('isStroke') && element.get('isFill'))) { - // 如果 marker 是单填充或者单描边的话,就不要额外添加 stroke 或这 fill 属性,否则会影响 unchecked 后的显示 - if (element.get('isStroke')) { - element.attr('fill', null); - } - if (element.get('isFill')) { - element.attr('stroke', null); - } - } - } - }); - } - }; - return Category; -}(_base__WEBPACK_IMPORTED_MODULE_5__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Category); -//# sourceMappingURL=category.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/legend/continuous.js": -/*!***************************************************************!*\ - !*** ./node_modules/@antv/component/esm/legend/continuous.js ***! - \***************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_theme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/theme */ "./node_modules/@antv/component/esm/util/theme.js"); -/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/util */ "./node_modules/@antv/component/esm/util/util.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/component/esm/legend/base.js"); - - - - - -var HANDLER_HEIGHT_RATIO = 1.4; -var HANDLER_TRIANGLE_RATIO = 0.4; -var ContinueLegend = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ContinueLegend, _super); - function ContinueLegend() { - return _super !== null && _super.apply(this, arguments) || this; - } - ContinueLegend.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { type: 'continue', min: 0, max: 100, value: null, colors: [], track: {}, rail: {}, label: {}, handler: {}, slidable: true, tip: null, step: null, maxWidth: null, maxHeight: null, defaultCfg: { - label: { - align: 'rail', - spacing: 5, - formatter: null, - style: { - fontSize: 12, - fill: _util_theme__WEBPACK_IMPORTED_MODULE_2__["default"].textColor, - textBaseline: 'middle', - fontFamily: _util_theme__WEBPACK_IMPORTED_MODULE_2__["default"].fontFamily, - }, - }, - handler: { - size: 10, - style: { - fill: '#fff', - stroke: '#333', - }, - }, - track: {}, - rail: { - type: 'color', - size: 20, - defaultLength: 100, - style: { - fill: '#DCDEE2', - }, - }, - title: { - spacing: 5, - style: { - fill: _util_theme__WEBPACK_IMPORTED_MODULE_2__["default"].textColor, - fontSize: 12, - textAlign: 'start', - textBaseline: 'top', - }, - }, - } }); - }; - ContinueLegend.prototype.isSlider = function () { - return true; - }; - // 实现 IList 接口 - ContinueLegend.prototype.getValue = function () { - return this.getCurrentValue(); - }; - ContinueLegend.prototype.getRange = function () { - return { - min: this.get('min'), - max: this.get('max'), - }; - }; - // 改变 range - ContinueLegend.prototype.setRange = function (min, max) { - this.update({ - min: min, - max: max, - }); - }; - ContinueLegend.prototype.setValue = function (value) { - var originValue = this.getValue(); - this.set('value', value); - var group = this.get('group'); - this.resetTrackClip(); - if (this.get('slidable')) { - this.resetHandlers(group); - } - this.delegateEmit('valuechanged', { - originValue: originValue, - value: value, - }); - }; - ContinueLegend.prototype.initEvent = function () { - var group = this.get('group'); - this.bindSliderEvent(group); - this.bindRailEvent(group); - this.bindTrackEvent(group); - }; - ContinueLegend.prototype.drawLegendContent = function (group) { - this.drawRail(group); - this.drawLabels(group); - this.fixedElements(group); // 调整各个图形位置,适应宽高的限制 - this.resetTrack(group); - this.resetTrackClip(group); - if (this.get('slidable')) { - this.resetHandlers(group); - } - }; - ContinueLegend.prototype.bindSliderEvent = function (group) { - this.bindHandlersEvent(group); - }; - ContinueLegend.prototype.bindHandlersEvent = function (group) { - var _this = this; - group.on('legend-handler-min:drag', function (ev) { - var minValue = _this.getValueByCanvasPoint(ev.x, ev.y); - var currentValue = _this.getCurrentValue(); - var maxValue = currentValue[1]; - if (maxValue < minValue) { - // 如果小于最小值,则调整最小值 - maxValue = minValue; - } - _this.setValue([minValue, maxValue]); - }); - group.on('legend-handler-max:drag', function (ev) { - var maxValue = _this.getValueByCanvasPoint(ev.x, ev.y); - var currentValue = _this.getCurrentValue(); - var minValue = currentValue[0]; - if (minValue > maxValue) { - // 如果小于最小值,则调整最小值 - minValue = maxValue; - } - _this.setValue([minValue, maxValue]); - }); - }; - ContinueLegend.prototype.bindRailEvent = function (group) { }; - ContinueLegend.prototype.bindTrackEvent = function (group) { - var _this = this; - var prePoint = null; - group.on('legend-track:dragstart', function (ev) { - prePoint = { - x: ev.x, - y: ev.y - }; - }); - group.on('legend-track:drag', function (ev) { - if (!prePoint) { - return; - } - var preValue = _this.getValueByCanvasPoint(prePoint.x, prePoint.y); - var curValue = _this.getValueByCanvasPoint(ev.x, ev.y); - var currentValue = _this.getCurrentValue(); - var curDiff = currentValue[1] - currentValue[0]; - var range = _this.getRange(); - var dValue = curValue - preValue; - if (dValue < 0) { // 减小, 同时未出边界 - if (currentValue[0] + dValue > range.min) { - _this.setValue([currentValue[0] + dValue, currentValue[1] + dValue]); - } - else { - _this.setValue([range.min, range.min + curDiff]); - } - // && || - } - else if (dValue > 0) { - if ((dValue > 0 && currentValue[1] + dValue < range.max)) { - _this.setValue([currentValue[0] + dValue, currentValue[1] + dValue]); - } - else { - _this.setValue([range.max - curDiff, range.max]); - } - } - prePoint = { - x: ev.x, - y: ev.y - }; - }); - group.on('legend-track:dragend', function (ev) { - prePoint = null; - }); - }; - ContinueLegend.prototype.drawLabels = function (group) { - this.drawLabel('min', group); - this.drawLabel('max', group); - }; - ContinueLegend.prototype.drawLabel = function (name, group) { - var labelCfg = this.get('label'); - var style = labelCfg.style; - var labelAlign = labelCfg.align; - var value = this.get(name); - var alignAttrs = this.getLabelAlignAttrs(name, labelAlign); - var localId = "label-" + name; - this.addShape(group, { - type: 'text', - id: this.getElementId(localId), - name: "legend-label-" + name, - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: 0, y: 0, text: value }, style), alignAttrs), - }); - }; - // 获取文本的对齐方式,为了自适应真实操碎了心 - ContinueLegend.prototype.getLabelAlignAttrs = function (name, align) { - var isVertical = this.isVertical(); - var textAlign = 'center'; - var textBaseline = 'middle'; - if (isVertical) { - // 垂直布局的所有的文本都左对齐 - textAlign = 'start'; - if (align !== 'rail') { - if (name === 'min') { - textBaseline = 'top'; - } - else { - textBaseline = 'bottom'; - } - } - else { - textBaseline = 'top'; - } - } - else { - if (align !== 'rail') { - textBaseline = 'top'; - if (name === 'min') { - textAlign = 'start'; - } - else { - textAlign = 'end'; - } - } - else { - textAlign = 'start'; - textBaseline = 'middle'; - } - } - return { - textAlign: textAlign, - textBaseline: textBaseline, - }; - }; - ContinueLegend.prototype.getRailPath = function (x, y, w, h) { - var railCfg = this.get('rail'); - var size = railCfg.size, defaultLength = railCfg.defaultLength, type = railCfg.type; - var isVertical = this.isVertical(); - var length = defaultLength; - var width = w; - var height = h; - if (!width) { - width = isVertical ? size : length; - } - if (!height) { - height = isVertical ? length : size; - } - var path = []; - if (type === 'color') { - path.push(['M', x, y]); - path.push(['L', x + width, y]); - path.push(['L', x + width, y + height]); - path.push(['L', x, y + height]); - path.push(['Z']); - } - else { - path.push(['M', x + width, y]); - path.push(['L', x + width, y + height]); - path.push(['L', x, y + height]); - path.push(['Z']); - } - return path; - }; - ContinueLegend.prototype.drawRail = function (group) { - var railCfg = this.get('rail'); - var style = railCfg.style; - this.addShape(group, { - type: 'path', - id: this.getElementId('rail'), - name: 'legend-rail', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: this.getRailPath(0, 0) }, style), - }); - }; - // 将传入的颜色转换成渐变色 - ContinueLegend.prototype.getTrackColor = function (colors) { - var count = colors.length; - if (!count) { - return null; - } - if (count === 1) { - return colors[0]; - } - var color; // 最终形态 l(0) 0:colors[0] 0.5:colors[1] 1:colors[2]; - if (this.isVertical()) { - // 根据方向设置渐变方向 - color = 'l(90)'; - } - else { - color = 'l(0)'; - } - for (var i = 0; i < count; i++) { - var percent = i / (count - 1); - color += " " + percent + ":" + colors[i]; - } - return color; - }; - ContinueLegend.prototype.getTrackPath = function (group) { - var railShape = this.getRailShape(group); - var path = railShape.attr('path'); - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(path); - }; - ContinueLegend.prototype.getClipTrackAttrs = function (group) { - var value = this.getCurrentValue(); - var min = value[0], max = value[1]; - var railBBox = this.getRailBBox(group); - var startPoint = this.getPointByValue(min, group); - var endPoint = this.getPointByValue(max, group); - var isVertical = this.isVertical(); - var x; - var y; - var width; - var height; - if (isVertical) { - x = railBBox.minX; - y = startPoint.y; - width = railBBox.width; - height = endPoint.y - startPoint.y; - } - else { - x = startPoint.x; - y = railBBox.minY; - width = endPoint.x - startPoint.x; - height = railBBox.height; - } - return { - x: x, - y: y, - width: width, - height: height, - }; - }; - // 获取 track 的属性,由 path 和 颜色构成 - ContinueLegend.prototype.getTrackAttrs = function (group) { - var trackCfg = this.get('track'); - var colors = this.get('colors'); - var path = this.getTrackPath(group); - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mix"])({ - path: path, - fill: this.getTrackColor(colors), - }, trackCfg.style); - }; - ContinueLegend.prototype.resetTrackClip = function (group) { - var container = group || this.get('group'); - var trackId = this.getElementId('track'); - var trackShape = container.findById(trackId); - var clipShape = trackShape.getClip(); - var attrs = this.getClipTrackAttrs(group); - if (!clipShape) { - trackShape.setClip({ - type: 'rect', - attrs: attrs, - }); - } - else { - clipShape.attr(attrs); - } - }; - ContinueLegend.prototype.resetTrack = function (group) { - var trackId = this.getElementId('track'); - var trackShape = group.findById(trackId); - var trackAttrs = this.getTrackAttrs(group); - if (trackShape) { - trackShape.attr(trackAttrs); - } - else { - this.addShape(group, { - type: 'path', - id: trackId, - draggable: this.get('slidable'), - name: 'legend-track', - attrs: trackAttrs, - }); - } - }; - ContinueLegend.prototype.getPointByValue = function (value, group) { - var _a = this.getRange(), min = _a.min, max = _a.max; - var percent = (value - min) / (max - min); - var bbox = this.getRailBBox(group); - var isVertcal = this.isVertical(); - var point = { x: 0, y: 0 }; - if (isVertcal) { - point.x = bbox.minX + bbox.width / 2; - point.y = Object(_util_util__WEBPACK_IMPORTED_MODULE_3__["getValueByPercent"])(bbox.minY, bbox.maxY, percent); - } - else { - point.x = Object(_util_util__WEBPACK_IMPORTED_MODULE_3__["getValueByPercent"])(bbox.minX, bbox.maxX, percent); - point.y = bbox.minY + bbox.height / 2; - } - return point; - }; - ContinueLegend.prototype.getRailShape = function (group) { - var container = group || this.get('group'); - return container.findById(this.getElementId('rail')); - }; - // 获取滑轨的宽高信息 - ContinueLegend.prototype.getRailBBox = function (group) { - var railShape = this.getRailShape(group); - var bbox = railShape.getBBox(); - return bbox; - }; - ContinueLegend.prototype.getRailCanvasBBox = function () { - var container = this.get('group'); - var railShape = container.findById(this.getElementId('rail')); - var bbox = railShape.getCanvasBBox(); - return bbox; - }; - // 是否垂直 - ContinueLegend.prototype.isVertical = function () { - return this.get('layout') === 'vertical'; - }; - // 用于交互时 - ContinueLegend.prototype.getValueByCanvasPoint = function (x, y) { - var _a = this.getRange(), min = _a.min, max = _a.max; - var bbox = this.getRailCanvasBBox(); // 因为 x, y 是画布坐标 - var isVertcal = this.isVertical(); - var step = this.get('step'); - var percent; - if (isVertcal) { - // 垂直时计算 y - percent = (y - bbox.minY) / bbox.height; - } - else { - // 水平时计算 x - percent = (x - bbox.minX) / bbox.width; - } - var value = Object(_util_util__WEBPACK_IMPORTED_MODULE_3__["getValueByPercent"])(min, max, percent); - if (step) { - var count = Math.round((value - min) / step); - value = min + count * step; // 移动到最近的 - } - if (value > max) { - value = max; - } - if (value < min) { - value = min; - } - return value; - }; - // 当前选中的范围 - ContinueLegend.prototype.getCurrentValue = function () { - var value = this.get('value'); - if (!value) { - // 如果没有定义,取最大范围 - value = [this.get('min'), this.get('max')]; - } - return value; - }; - // 重置滑块 handler - ContinueLegend.prototype.resetHandlers = function (group) { - var currentValue = this.getCurrentValue(); - var min = currentValue[0], max = currentValue[1]; - this.resetHandler(group, 'min', min); - this.resetHandler(group, 'max', max); - }; - // 获取滑块的 path - ContinueLegend.prototype.getHandlerPath = function (handlerCfg, point) { - var isVertical = this.isVertical(); - var path = []; - var width = handlerCfg.size; - var x = point.x, y = point.y; - var height = width * HANDLER_HEIGHT_RATIO; - var halfWidth = width / 2; - var oneSixthWidth = width / 6; - if (isVertical) { - /** - * 竖直情况下的滑块 handler,左侧顶点是 x,y - * /----| - * -- | - * -- | - * \----| - */ - var triangleX = x + height * HANDLER_TRIANGLE_RATIO; - path.push(['M', x, y]); - path.push(['L', triangleX, y + halfWidth]); - path.push(['L', x + height, y + halfWidth]); - path.push(['L', x + height, y - halfWidth]); - path.push(['L', triangleX, y - halfWidth]); - path.push(['Z']); - // 绘制两条横线 - path.push(['M', triangleX, y + oneSixthWidth]); - path.push(['L', x + height - 2, y + oneSixthWidth]); - path.push(['M', triangleX, y - oneSixthWidth]); - path.push(['L', x + height - 2, y - oneSixthWidth]); - } - else { - /** - * 水平情况下的滑块,上面顶点处是 x,y - * / \ - * | | | | - * | | | | - * ----- - */ - var triangleY = y + height * HANDLER_TRIANGLE_RATIO; - path.push(['M', x, y]); - path.push(['L', x - halfWidth, triangleY]); - path.push(['L', x - halfWidth, y + height]); - path.push(['L', x + halfWidth, y + height]); - path.push(['L', x + halfWidth, triangleY]); - path.push(['Z']); - // 绘制两条竖线 - path.push(['M', x - oneSixthWidth, triangleY]); - path.push(['L', x - oneSixthWidth, y + height - 2]); - path.push(['M', x + oneSixthWidth, triangleY]); - path.push(['L', x + oneSixthWidth, y + height - 2]); - } - return path; - }; - // 调整 handler 的位置,如果未存在则绘制 - ContinueLegend.prototype.resetHandler = function (group, name, value) { - var point = this.getPointByValue(value, group); - var handlerCfg = this.get('handler'); - var path = this.getHandlerPath(handlerCfg, point); - var id = this.getElementId("handler-" + name); - var handlerShape = group.findById(id); - var isVertical = this.isVertical(); - if (handlerShape) { - handlerShape.attr('path', path); - } - else { - this.addShape(group, { - type: 'path', - name: "legend-handler-" + name, - draggable: true, - id: id, - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: path }, handlerCfg.style), { cursor: isVertical ? 'ns-resize' : 'ew-resize' }), - }); - } - }; - // 当设置了 maxWidth, maxHeight 时调整 rail 的宽度, - // 文本的位置 - ContinueLegend.prototype.fixedElements = function (group) { - var railShape = group.findById(this.getElementId('rail')); - var minLabel = group.findById(this.getElementId('label-min')); - var maxLabel = group.findById(this.getElementId('label-max')); - var startPoint = this.getDrawPoint(); - if (this.isVertical()) { - // 横向布局 - this.fixedVertail(minLabel, maxLabel, railShape, startPoint); - } - else { - // 水平布局 - this.fixedHorizontal(minLabel, maxLabel, railShape, startPoint); - } - }; - ContinueLegend.prototype.fitRailLength = function (minLabelBBox, maxLabelBBox, railBBox, railShape) { - var isVertical = this.isVertical(); - var lengthField = isVertical ? 'height' : 'width'; - var labelCfg = this.get('label'); - var labelAlign = labelCfg.align; - var spacing = labelCfg.spacing; - var maxLength = this.get("max" + Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["upperFirst"])(lengthField)); // get('maxWidth') - if (maxLength) { - var elementsLength = labelAlign === 'rail' - ? railBBox[lengthField] + minLabelBBox[lengthField] + maxLabelBBox[lengthField] + spacing * 2 - : railBBox[lengthField]; - var diff = elementsLength - maxLength; - if (diff > 0) { - // 大于限制的长度 - this.changeRailLength(railShape, lengthField, railBBox[lengthField] - diff); - } - } - }; - ContinueLegend.prototype.changeRailLength = function (railShape, lengthField, length) { - var bbox = railShape.getBBox(); - var path; - if (lengthField === 'height') { - path = this.getRailPath(bbox.x, bbox.y, bbox.width, length); - } - else { - path = this.getRailPath(bbox.x, bbox.y, length, bbox.height); - } - railShape.attr('path', path); - }; - ContinueLegend.prototype.changeRailPosition = function (railShape, x, y) { - var bbox = railShape.getBBox(); - var path = this.getRailPath(x, y, bbox.width, bbox.height); - railShape.attr('path', path); - }; - ContinueLegend.prototype.fixedHorizontal = function (minLabel, maxLabel, railShape, startPoint) { - var labelCfg = this.get('label'); - var labelAlign = labelCfg.align; - var spacing = labelCfg.spacing; - var railBBox = railShape.getBBox(); - var minLabelBBox = minLabel.getBBox(); - var maxLabelBBox = maxLabel.getBBox(); - var railHeight = railBBox.height; // 取 rail 的高度,作为高度 - this.fitRailLength(minLabelBBox, maxLabelBBox, railBBox, railShape); - railBBox = railShape.getBBox(); - if (labelAlign === 'rail') { - // 沿着 rail 方向 - minLabel.attr({ - x: startPoint.x, - y: startPoint.y + railHeight / 2, - }); - this.changeRailPosition(railShape, startPoint.x + minLabelBBox.width + spacing, startPoint.y); - maxLabel.attr({ - x: startPoint.x + minLabelBBox.width + railBBox.width + spacing * 2, - y: startPoint.y + railHeight / 2, - }); - } - else if (labelAlign === 'top') { - minLabel.attr({ - x: startPoint.x, - y: startPoint.y, - }); - maxLabel.attr({ - x: startPoint.x + railBBox.width, - y: startPoint.y, - }); - this.changeRailPosition(railShape, startPoint.x, startPoint.y + minLabelBBox.height + spacing); - } - else { - this.changeRailPosition(railShape, startPoint.x, startPoint.y); - minLabel.attr({ - x: startPoint.x, - y: startPoint.y + railBBox.height + spacing, - }); - maxLabel.attr({ - x: startPoint.x + railBBox.width, - y: startPoint.y + railBBox.height + spacing, - }); - } - }; - ContinueLegend.prototype.fixedVertail = function (minLabel, maxLabel, railShape, startPoint) { - var labelCfg = this.get('label'); - var labelAlign = labelCfg.align; - var spacing = labelCfg.spacing; - var railBBox = railShape.getBBox(); - var minLabelBBox = minLabel.getBBox(); - var maxLabelBBox = maxLabel.getBBox(); - this.fitRailLength(minLabelBBox, maxLabelBBox, railBBox, railShape); - railBBox = railShape.getBBox(); - if (labelAlign === 'rail') { - // 沿着 rail 方向 - minLabel.attr({ - x: startPoint.x, - y: startPoint.y, - }); - this.changeRailPosition(railShape, startPoint.x, startPoint.y + minLabelBBox.height + spacing); - maxLabel.attr({ - x: startPoint.x, - y: startPoint.y + minLabelBBox.height + railBBox.height + spacing * 2, - }); - } - else if (labelAlign === 'right') { - minLabel.attr({ - x: startPoint.x + railBBox.width + spacing, - y: startPoint.y, - }); - this.changeRailPosition(railShape, startPoint.x, startPoint.y); - maxLabel.attr({ - x: startPoint.x + railBBox.width + spacing, - y: startPoint.y + railBBox.height, - }); - } - else { - // left - var maxLabelWidth = Math.max(minLabelBBox.width, maxLabelBBox.width); - minLabel.attr({ - x: startPoint.x, - y: startPoint.y, - }); - this.changeRailPosition(railShape, startPoint.x + maxLabelWidth + spacing, startPoint.y); - maxLabel.attr({ - x: startPoint.x, - y: startPoint.y + railBBox.height, - }); - } - }; - return ContinueLegend; -}(_base__WEBPACK_IMPORTED_MODULE_4__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (ContinueLegend); -//# sourceMappingURL=continuous.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/legend/index.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/component/esm/legend/index.js ***! - \**********************************************************/ -/*! exports provided: Category, Continuous, Base */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _category__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./category */ "./node_modules/@antv/component/esm/legend/category.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Category", function() { return _category__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous */ "./node_modules/@antv/component/esm/legend/continuous.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Continuous", function() { return _continuous__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/component/esm/legend/base.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Base", function() { return _base__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/scrollbar/index.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/component/esm/scrollbar/index.js ***! - \*************************************************************/ -/*! exports provided: DEFAULT_THEME, Scrollbar */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _scrollbar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scrollbar */ "./node_modules/@antv/component/esm/scrollbar/scrollbar.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_THEME", function() { return _scrollbar__WEBPACK_IMPORTED_MODULE_0__["DEFAULT_THEME"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scrollbar", function() { return _scrollbar__WEBPACK_IMPORTED_MODULE_0__["Scrollbar"]; }); - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/scrollbar/scrollbar.js": -/*!*****************************************************************!*\ - !*** ./node_modules/@antv/component/esm/scrollbar/scrollbar.js ***! - \*****************************************************************/ -/*! exports provided: DEFAULT_THEME, Scrollbar */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_THEME", function() { return DEFAULT_THEME; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scrollbar", function() { return Scrollbar; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_dom_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/dom-util */ "./node_modules/@antv/dom-util/esm/index.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _abstract_group_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../abstract/group-component */ "./node_modules/@antv/component/esm/abstract/group-component.js"); - - - - -var DEFAULT_STYLE = { - trackColor: 'rgba(0,0,0,0)', - thumbColor: 'rgba(0,0,0,0.15)', - size: 8, - lineCap: 'round', -}; -var DEFAULT_THEME = { - // 默认样式 - default: DEFAULT_STYLE, - // 鼠标 hover 的样式 - hover: { - thumbColor: 'rgba(0,0,0,0.2)', - }, -}; -var Scrollbar = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Scrollbar, _super); - function Scrollbar() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.clearEvents = _antv_util__WEBPACK_IMPORTED_MODULE_2__["noop"]; - _this.onStartEvent = function (isMobile) { return function (e) { - _this.isMobile = isMobile; - e.originalEvent.preventDefault(); - var clientX = isMobile ? Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["get"])(e.originalEvent, 'touches.0.clientX') : e.clientX; - var clientY = isMobile ? Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["get"])(e.originalEvent, 'touches.0.clientY') : e.clientY; - // 将开始的点记录下来 - _this.startPos = _this.cfg.isHorizontal ? clientX : clientY; - _this.bindLaterEvent(); - }; }; - _this.bindLaterEvent = function () { - var containerDOM = _this.getContainerDOM(); - var events = []; - if (_this.isMobile) { - events = [ - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["addEventListener"])(containerDOM, 'touchmove', _this.onMouseMove), - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["addEventListener"])(containerDOM, 'touchend', _this.onMouseUp), - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["addEventListener"])(containerDOM, 'touchcancel', _this.onMouseUp), - ]; - } - else { - events = [ - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["addEventListener"])(containerDOM, 'mousemove', _this.onMouseMove), - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["addEventListener"])(containerDOM, 'mouseup', _this.onMouseUp), - // 为了保证划出 canvas containerDom 时还没触发 mouseup - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["addEventListener"])(containerDOM, 'mouseleave', _this.onMouseUp), - ]; - } - _this.clearEvents = function () { - events.forEach(function (e) { - e.remove(); - }); - }; - }; - // 拖拽滑块的事件回调 - // 这里是 dom 原生事件,绑定在 dom 元素上的 - _this.onMouseMove = function (e) { - var _a = _this.cfg, isHorizontal = _a.isHorizontal, thumbOffset = _a.thumbOffset; - e.preventDefault(); - var clientX = _this.isMobile ? Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["get"])(e, 'touches.0.clientX') : e.clientX; - var clientY = _this.isMobile ? Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["get"])(e, 'touches.0.clientY') : e.clientY; - // 鼠标松开的位置 - var endPos = isHorizontal ? clientX : clientY; - // 滑块需要移动的距离, 由于这里是对滑块监听,所以移动的距离就是 diffDis, 如果监听对象是 container dom,则需要算比例 - var diff = endPos - _this.startPos; - // 更新 _startPos - _this.startPos = endPos; - _this.updateThumbOffset(thumbOffset + diff); - }; - _this.onMouseUp = function (e) { - e.preventDefault(); - _this.clearEvents(); - }; - // 点击滑道的事件回调,移动滑块位置 - _this.onTrackClick = function (e) { - var _a = _this.cfg, isHorizontal = _a.isHorizontal, x = _a.x, y = _a.y, thumbLen = _a.thumbLen; - var containerDOM = _this.getContainerDOM(); - var rect = containerDOM.getBoundingClientRect(); - var clientX = e.clientX, clientY = e.clientY; - var offset = isHorizontal ? clientX - rect.left - x - thumbLen / 2 : clientY - rect.top - y - thumbLen / 2; - var newOffset = _this.validateRange(offset); - _this.updateThumbOffset(newOffset); - }; - _this.onThumbMouseOver = function () { - var thumbColor = _this.cfg.theme.hover.thumbColor; - _this.getElementByLocalId('thumb').attr('stroke', thumbColor); - _this.draw(); - }; - _this.onThumbMouseOut = function () { - var thumbColor = _this.cfg.theme.default.thumbColor; - _this.getElementByLocalId('thumb').attr('stroke', thumbColor); - _this.draw(); - }; - return _this; - } - Scrollbar.prototype.setRange = function (min, max) { - this.set('minLimit', min); - this.set('maxLimit', max); - }; - Scrollbar.prototype.getRange = function () { - var min = this.get('minLimit'); - var max = this.get('maxLimit'); - return { min: min, max: max }; - }; - Scrollbar.prototype.setValue = function (value) { - var originalValue = this.getValue(); - this.update({ - thumbOffset: this.get('trackLen') - this.get('thumbLen') * Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["clamp"])(value, 0, 1), - }); - this.delegateEmit('valuechange', { - originalValue: originalValue, - value: this.getValue(), - }); - }; - Scrollbar.prototype.getValue = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["clamp"])(this.get('thumbOffset') / (this.get('trackLen') - this.get('thumbLen')), 0, 1); - }; - Scrollbar.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { name: 'scrollbar', isHorizontal: true, minThumbLen: 20, thumbOffset: 0, theme: DEFAULT_THEME }); - }; - Scrollbar.prototype.renderInner = function (group) { - this.renderTrackShape(group); - this.renderThumbShape(group); - }; - Scrollbar.prototype.applyOffset = function () { - this.moveElementTo(this.get('group'), { - x: this.get('x'), - y: this.get('y'), - }); - }; - Scrollbar.prototype.initEvent = function () { - this.bindEvents(); - }; - // 创建滑道的 shape - Scrollbar.prototype.renderTrackShape = function (group) { - var _a = this.cfg, trackLen = _a.trackLen, _b = _a.theme, theme = _b === void 0 ? { default: {} } : _b; - var _c = theme.default, lineCap = _c.lineCap, trackColor = _c.trackColor, size = _c.size; - var attrs = this.get('isHorizontal') - ? { - x1: 0 + size / 2, - y1: size / 2, - x2: trackLen - size / 2, - y2: size / 2, - lineWidth: size, - stroke: trackColor, - lineCap: lineCap, - } - : { - x1: size / 2, - y1: 0 + size / 2, - x2: size / 2, - y2: trackLen - size / 2, - lineWidth: size, - stroke: trackColor, - lineCap: lineCap, - }; - return this.addShape(group, { - id: this.getElementId('track'), - name: 'track', - type: 'line', - attrs: attrs, - }); - }; - // 创建滑块的 shape - Scrollbar.prototype.renderThumbShape = function (group) { - var _a = this.cfg, thumbOffset = _a.thumbOffset, thumbLen = _a.thumbLen, _b = _a.theme, theme = _b === void 0 ? { default: {} } : _b; - var _c = theme.default, size = _c.size, lineCap = _c.lineCap, thumbColor = _c.thumbColor; - var attrs = this.get('isHorizontal') - ? { - x1: thumbOffset + size / 2, - y1: size / 2, - x2: thumbOffset + thumbLen - size / 2, - y2: size / 2, - lineWidth: size, - stroke: thumbColor, - lineCap: lineCap, - cursor: 'default', - } - : { - x1: size / 2, - y1: thumbOffset + size / 2, - x2: size / 2, - y2: thumbOffset + thumbLen - size / 2, - lineWidth: size, - stroke: thumbColor, - lineCap: lineCap, - cursor: 'default', - }; - return this.addShape(group, { - id: this.getElementId('thumb'), - name: 'thumb', - type: 'line', - attrs: attrs, - }); - }; - Scrollbar.prototype.bindEvents = function () { - var group = this.get('group'); - group.on('mousedown', this.onStartEvent(false)); - group.on('mouseup', this.onMouseUp); - group.on('touchstart', this.onStartEvent(true)); - group.on('touchend', this.onMouseUp); - var trackShape = group.findById(this.getElementId('track')); - trackShape.on('click', this.onTrackClick); - var thumbShape = group.findById(this.getElementId('thumb')); - thumbShape.on('mouseover', this.onThumbMouseOver); - thumbShape.on('mouseout', this.onThumbMouseOut); - }; - Scrollbar.prototype.getContainerDOM = function () { - var container = this.get('container'); - var canvas = container && container.get('canvas'); - return canvas && canvas.get('container'); - }; - Scrollbar.prototype.validateRange = function (offset) { - var _a = this.cfg, thumbLen = _a.thumbLen, trackLen = _a.trackLen; - var newOffset = offset; - if (offset + thumbLen > trackLen) { - newOffset = trackLen - thumbLen; - } - else if (offset + thumbLen < thumbLen) { - newOffset = 0; - } - return newOffset; - }; - Scrollbar.prototype.draw = function () { - var container = this.get('container'); - var canvas = container && container.get('canvas'); - if (canvas) { - canvas.draw(); - } - }; - Scrollbar.prototype.updateThumbOffset = function (offset) { - var _a = this.cfg, thumbOffset = _a.thumbOffset, isHorizontal = _a.isHorizontal, thumbLen = _a.thumbLen, size = _a.size; - var newOffset = this.validateRange(offset); - if (newOffset === thumbOffset) { - // 如果更新后的 offset 与原值相同,则不改变 - return; - } - var thumbShape = this.getElementByLocalId('thumb'); - if (isHorizontal) { - thumbShape.attr({ - x1: newOffset + size / 2, - x2: newOffset + thumbLen - size / 2, - }); - } - else { - thumbShape.attr({ - y1: newOffset + size / 2, - y2: newOffset + thumbLen - size / 2, - }); - } - this.emitOffsetChange(newOffset); - }; - Scrollbar.prototype.emitOffsetChange = function (offset) { - var _a = this.cfg, originalValue = _a.thumbOffset, trackLen = _a.trackLen, thumbLen = _a.thumbLen; - this.cfg.thumbOffset = offset; - // 发送事件 - this.emit('scrollchange', { - thumbOffset: offset, - ratio: Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["clamp"])(offset / (trackLen - thumbLen), 0, 1), - }); - this.delegateEmit('valuechange', { - originalValue: originalValue, - value: offset, - }); - }; - return Scrollbar; -}(_abstract_group_component__WEBPACK_IMPORTED_MODULE_3__["default"])); - -//# sourceMappingURL=scrollbar.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/slider/constant.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/component/esm/slider/constant.js ***! - \*************************************************************/ -/*! exports provided: BACKGROUND_STYLE, FOREGROUND_STYLE, DEFAULT_HANDLER_WIDTH, HANDLER_STYLE, TEXT_STYLE, SLIDER_CHANGE */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BACKGROUND_STYLE", function() { return BACKGROUND_STYLE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FOREGROUND_STYLE", function() { return FOREGROUND_STYLE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_HANDLER_WIDTH", function() { return DEFAULT_HANDLER_WIDTH; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HANDLER_STYLE", function() { return HANDLER_STYLE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TEXT_STYLE", function() { return TEXT_STYLE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SLIDER_CHANGE", function() { return SLIDER_CHANGE; }); -/** - * 一些默认的样式配置 - */ -var BACKGROUND_STYLE = { - fill: '#416180 ', - opacity: 0.05, -}; -var FOREGROUND_STYLE = { - fill: '#5B8FF9', - opacity: 0.15, - cursor: 'move', -}; -var DEFAULT_HANDLER_WIDTH = 10; -var HANDLER_STYLE = { - width: DEFAULT_HANDLER_WIDTH, - height: 24, -}; -var TEXT_STYLE = { - textBaseline: 'middle', - fill: '#000', - opacity: 0.45, -}; -var SLIDER_CHANGE = 'sliderchange'; -//# sourceMappingURL=constant.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/slider/handler.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/component/esm/slider/handler.js ***! - \************************************************************/ -/*! exports provided: Handler, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Handler", function() { return Handler; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _abstract_group_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../abstract/group-component */ "./node_modules/@antv/component/esm/abstract/group-component.js"); - - -var DEFAULT_STYLE = { - fill: '#F7F7F7', - stroke: '#BFBFBF', - radius: 2, - opacity: 1, - cursor: 'ew-resize', - // 高亮的颜色 - highLightFill: '#FFF', -}; -var Handler = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Handler, _super); - function Handler() { - return _super !== null && _super.apply(this, arguments) || this; - } - Handler.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { name: 'handler', x: 0, y: 0, width: 10, height: 24, style: DEFAULT_STYLE }); - }; - Handler.prototype.renderInner = function (group) { - var _a = this.cfg, width = _a.width, height = _a.height, style = _a.style; - var fill = style.fill, stroke = style.stroke, radius = style.radius, opacity = style.opacity, cursor = style.cursor; - // 按钮框框 - this.addShape(group, { - type: 'rect', - id: this.getElementId('background'), - attrs: { - x: 0, - y: 0, - width: width, - height: height, - fill: fill, - stroke: stroke, - radius: radius, - opacity: opacity, - cursor: cursor, - }, - }); - // 两根竖线 - var x1 = (1 / 3) * width; - var x2 = (2 / 3) * width; - var y1 = (1 / 4) * height; - var y2 = (3 / 4) * height; - this.addShape(group, { - id: this.getElementId('line-left'), - type: 'line', - attrs: { - x1: x1, - y1: y1, - x2: x1, - y2: y2, - stroke: stroke, - cursor: cursor, - }, - }); - this.addShape(group, { - id: this.getElementId('line-right'), - type: 'line', - attrs: { - x1: x2, - y1: y1, - x2: x2, - y2: y2, - stroke: stroke, - cursor: cursor, - }, - }); - }; - Handler.prototype.applyOffset = function () { - this.moveElementTo(this.get('group'), { - x: this.get('x'), - y: this.get('y'), - }); - }; - Handler.prototype.initEvent = function () { - this.bindEvents(); - }; - Handler.prototype.bindEvents = function () { - var _this = this; - this.get('group').on('mouseenter', function () { - var highLightFill = _this.get('style').highLightFill; - _this.getElementByLocalId('background').attr('fill', highLightFill); - _this.draw(); - }); - this.get('group').on('mouseleave', function () { - var fill = _this.get('style').fill; - _this.getElementByLocalId('background').attr('fill', fill); - _this.draw(); - }); - }; - Handler.prototype.draw = function () { - var canvas = this.get('container').get('canvas'); - if (canvas) { - canvas.draw(); - } - }; - return Handler; -}(_abstract_group_component__WEBPACK_IMPORTED_MODULE_1__["default"])); - -/* harmony default export */ __webpack_exports__["default"] = (Handler); -//# sourceMappingURL=handler.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/slider/index.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/component/esm/slider/index.js ***! - \**********************************************************/ -/*! exports provided: Slider */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _slider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./slider */ "./node_modules/@antv/component/esm/slider/slider.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Slider", function() { return _slider__WEBPACK_IMPORTED_MODULE_0__["Slider"]; }); - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/slider/slider.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/component/esm/slider/slider.js ***! - \***********************************************************/ -/*! exports provided: Slider, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Slider", function() { return Slider; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _abstract_group_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../abstract/group-component */ "./node_modules/@antv/component/esm/abstract/group-component.js"); -/* harmony import */ var _trend_trend__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../trend/trend */ "./node_modules/@antv/component/esm/trend/trend.js"); -/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constant */ "./node_modules/@antv/component/esm/slider/constant.js"); -/* harmony import */ var _handler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./handler */ "./node_modules/@antv/component/esm/slider/handler.js"); - - - - - - -var Slider = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Slider, _super); - function Slider() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.onMouseDown = function (target) { return function (e) { - _this.currentTarget = target; - // 取出原生事件 - var event = e.originalEvent; - // 2. 存储当前点击位置 - event.stopPropagation(); - event.preventDefault(); - // 兼容移动端获取数据 - _this.prevX = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(event, 'touches.0.pageX', event.pageX); - _this.prevY = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(event, 'touches.0.pageY', event.pageY); - // 3. 开始滑动的时候,绑定 move 和 up 事件 - var containerDOM = _this.getContainerDOM(); - containerDOM.addEventListener('mousemove', _this.onMouseMove); - containerDOM.addEventListener('mouseup', _this.onMouseUp); - containerDOM.addEventListener('mouseleave', _this.onMouseUp); - // 移动端事件 - containerDOM.addEventListener('touchmove', _this.onMouseMove); - containerDOM.addEventListener('touchend', _this.onMouseUp); - containerDOM.addEventListener('touchcancel', _this.onMouseUp); - }; }; - _this.onMouseMove = function (event) { - var width = _this.cfg.width; - var originValue = [_this.get('start'), _this.get('end')]; - // 滑动过程中,计算偏移,更新滑块,然后 emit 数据出去 - event.stopPropagation(); - event.preventDefault(); - var x = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(event, 'touches.0.pageX', event.pageX); - var y = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(event, 'touches.0.pageY', event.pageY); - // 横向的 slider 只处理 x - var offsetX = x - _this.prevX; - var offsetXRange = _this.adjustOffsetRange(offsetX / width); - // 更新 start end range 范围 - _this.updateStartEnd(offsetXRange); - // 更新 ui - _this.updateUI(_this.getElementByLocalId('foreground'), _this.getElementByLocalId('minText'), _this.getElementByLocalId('maxText')); - _this.prevX = x; - _this.prevY = y; - _this.draw(); - // 因为存储的 start、end 可能不一定是按大小存储的,所以排序一下,对外是 end >= start - _this.emit(_constant__WEBPACK_IMPORTED_MODULE_4__["SLIDER_CHANGE"], [_this.get('start'), _this.get('end')].sort()); - _this.delegateEmit('valuechanged', { - originValue: originValue, - value: [_this.get('start'), _this.get('end')], - }); - }; - _this.onMouseUp = function () { - // 结束之后,取消绑定的事件 - if (_this.currentTarget) { - _this.currentTarget = undefined; - } - var containerDOM = _this.getContainerDOM(); - if (containerDOM) { - containerDOM.removeEventListener('mousemove', _this.onMouseMove); - containerDOM.removeEventListener('mouseup', _this.onMouseUp); - // 防止滑动到 canvas 外部之后,状态丢失 - containerDOM.removeEventListener('mouseleave', _this.onMouseUp); - // 移动端事件 - containerDOM.removeEventListener('touchmove', _this.onMouseMove); - containerDOM.removeEventListener('touchend', _this.onMouseUp); - containerDOM.removeEventListener('touchcancel', _this.onMouseUp); - } - }; - return _this; - } - Slider.prototype.setRange = function (min, max) { - this.set('minLimit', min); - this.set('maxLimit', max); - }; - Slider.prototype.getRange = function () { - return { - min: this.get('minLimit') || 0, - max: this.get('maxLimit') || 1, - }; - }; - Slider.prototype.setValue = function (value) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(value) && value.length === 2) { - var originValue = [this.get('start'), this.get('end')]; - this.update({ - start: value[0], - end: value[1], - }); - if (!this.get('updateAutoRender')) { - this.render(); - } - this.delegateEmit('valuechanged', { - originValue: originValue, - value: value, - }); - } - }; - Slider.prototype.getValue = function () { - return [this.get('start'), this.get('end')]; - }; - Slider.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { name: 'slider', x: 0, y: 0, width: 100, height: 16, backgroundStyle: {}, foregroundStyle: {}, handlerStyle: {}, textStyle: {}, defaultCfg: { - backgroundStyle: _constant__WEBPACK_IMPORTED_MODULE_4__["BACKGROUND_STYLE"], - foregroundStyle: _constant__WEBPACK_IMPORTED_MODULE_4__["FOREGROUND_STYLE"], - handlerStyle: _constant__WEBPACK_IMPORTED_MODULE_4__["HANDLER_STYLE"], - textStyle: _constant__WEBPACK_IMPORTED_MODULE_4__["TEXT_STYLE"], - } }); - }; - Slider.prototype.update = function (cfg) { - var start = cfg.start, end = cfg.end; - var validCfg = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg); - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNil"])(start)) { - validCfg.start = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clamp"])(start, 0, 1); - } - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNil"])(end)) { - validCfg.end = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clamp"])(end, 0, 1); - } - _super.prototype.update.call(this, validCfg); - this.minHandler = this.getChildComponentById(this.getElementId('minHandler')); - this.maxHandler = this.getChildComponentById(this.getElementId('maxHandler')); - }; - Slider.prototype.init = function () { - this.set('start', Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clamp"])(this.get('start'), 0, 1)); - this.set('end', Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clamp"])(this.get('end'), 0, 1)); - _super.prototype.init.call(this); - }; - Slider.prototype.renderInner = function (group) { - var _a = this.cfg, start = _a.start, end = _a.end, width = _a.width, height = _a.height, _b = _a.trendCfg, trendCfg = _b === void 0 ? {} : _b, minText = _a.minText, maxText = _a.maxText, _c = _a.backgroundStyle, backgroundStyle = _c === void 0 ? {} : _c, _d = _a.foregroundStyle, foregroundStyle = _d === void 0 ? {} : _d, _e = _a.textStyle, textStyle = _e === void 0 ? {} : _e, _f = _a.handlerStyle, handlerStyle = _f === void 0 ? {} : _f; - var min = start * width; - var max = end * width; - // 趋势图数据 - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["size"])(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(trendCfg, 'data'))) { - this.addComponent(group, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ component: _trend_trend__WEBPACK_IMPORTED_MODULE_3__["Trend"], id: this.getElementId('trend'), x: 0, y: 0, width: width, - height: height }, trendCfg)); - } - // 1. 背景 - this.addShape(group, { - id: this.getElementId('background'), - type: 'rect', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: 0, y: 0, width: width, - height: height }, backgroundStyle), - }); - // 2. 左右文字 - var minTextShape = this.addShape(group, { - id: this.getElementId('minText'), - type: 'text', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ - // x: 0, - y: height / 2, textAlign: 'right', text: minText, silent: false }, textStyle), - }); - var maxTextShape = this.addShape(group, { - id: this.getElementId('maxText'), - type: 'text', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ - // x: 0, - y: height / 2, textAlign: 'left', text: maxText, silent: false }, textStyle), - }); - // 3. 前景 选中背景框 - var foregroundShape = this.addShape(group, { - id: this.getElementId('foreground'), - name: 'foreground', - type: 'rect', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ - // x: 0, - y: 0, - // width: 0, - height: height }, foregroundStyle), - }); - // 滑块相关的大小信息 - // const handlerWidth = get(handlerStyle, 'width', 10); - var handlerHeight = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(handlerStyle, 'height', 24); - // 4. 左右滑块 - this.minHandler = this.addComponent(group, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ component: _handler__WEBPACK_IMPORTED_MODULE_5__["Handler"], id: this.getElementId('minHandler'), name: 'handler-min', x: 0, y: (height - handlerHeight) / 2, width: width, height: handlerHeight, cursor: 'ew-resize' }, handlerStyle)); - this.maxHandler = this.addComponent(group, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ component: _handler__WEBPACK_IMPORTED_MODULE_5__["Handler"], id: this.getElementId('maxHandler'), name: 'handler-max', x: 0, y: (height - handlerHeight) / 2, width: width, height: handlerHeight, cursor: 'ew-resize' }, handlerStyle)); - this.updateUI(foregroundShape, minTextShape, maxTextShape); - }; - Slider.prototype.applyOffset = function () { - this.moveElementTo(this.get('group'), { - x: this.get('x'), - y: this.get('y'), - }); - }; - Slider.prototype.initEvent = function () { - this.bindEvents(); - }; - Slider.prototype.updateUI = function (foregroundShape, minTextShape, maxTextShape) { - var _a = this.cfg, start = _a.start, end = _a.end, width = _a.width, minText = _a.minText, maxText = _a.maxText, handlerStyle = _a.handlerStyle; - var min = start * width; - var max = end * width; - // 1. foreground - foregroundShape.attr('x', min); - foregroundShape.attr('width', max - min); - // 滑块相关的大小信息 - var handlerWidth = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(handlerStyle, 'width', _constant__WEBPACK_IMPORTED_MODULE_4__["DEFAULT_HANDLER_WIDTH"]); - // 设置文本 - minTextShape.attr('text', minText); - maxTextShape.attr('text', maxText); - var _b = this._dodgeText([min, max], minTextShape, maxTextShape), minAttrs = _b[0], maxAttrs = _b[1]; - // 2. 左侧滑块和文字位置 - if (this.minHandler) { - this.minHandler.update({ - x: min - handlerWidth / 2, - }); - if (!this.get('updateAutoRender')) { - this.minHandler.render(); - } - } - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(minAttrs, function (v, k) { return minTextShape.attr(k, v); }); - // 3. 右侧滑块和文字位置 - if (this.maxHandler) { - this.maxHandler.update({ - x: max - handlerWidth / 2, - }); - if (!this.get('updateAutoRender')) { - this.maxHandler.render(); - } - } - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(maxAttrs, function (v, k) { return maxTextShape.attr(k, v); }); - }; - Slider.prototype.bindEvents = function () { - var group = this.get('group'); - group.on('handler-min:mousedown', this.onMouseDown('minHandler')); - group.on('handler-min:touchstart', this.onMouseDown('minHandler')); - // 2. 右滑块的滑动 - group.on('handler-max:mousedown', this.onMouseDown('maxHandler')); - group.on('handler-max:touchstart', this.onMouseDown('maxHandler')); - // 3. 前景选中区域 - var foreground = group.findById(this.getElementId('foreground')); - foreground.on('mousedown', this.onMouseDown('foreground')); - foreground.on('touchstart', this.onMouseDown('foreground')); - }; - /** - * 调整 offsetRange,因为一些范围的限制 - * @param offsetRange - */ - Slider.prototype.adjustOffsetRange = function (offsetRange) { - var _a = this.cfg, start = _a.start, end = _a.end; - // 针对不同的滑动组件,处理的方式不同 - switch (this.currentTarget) { - case 'minHandler': { - var min = 0 - start; - var max = 1 - start; - return Math.min(max, Math.max(min, offsetRange)); - } - case 'maxHandler': { - var min = 0 - end; - var max = 1 - end; - return Math.min(max, Math.max(min, offsetRange)); - } - case 'foreground': { - var min = 0 - start; - var max = 1 - end; - return Math.min(max, Math.max(min, offsetRange)); - } - default: - return 0; - } - }; - Slider.prototype.updateStartEnd = function (offsetRange) { - var _a = this.cfg, start = _a.start, end = _a.end; - // 操作不同的组件,反馈不一样 - switch (this.currentTarget) { - case 'minHandler': - start += offsetRange; - break; - case 'maxHandler': - end += offsetRange; - break; - case 'foreground': - start += offsetRange; - end += offsetRange; - break; - } - this.set('start', start); - this.set('end', end); - }; - /** - * 调整 text 的位置,自动躲避 - * 根据位置,调整返回新的位置 - * @param range - */ - Slider.prototype._dodgeText = function (range, minTextShape, maxTextShape) { - var _a, _b; - var _c = this.cfg, handlerStyle = _c.handlerStyle, width = _c.width; - var PADDING = 2; - var handlerWidth = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(handlerStyle, 'width', _constant__WEBPACK_IMPORTED_MODULE_4__["DEFAULT_HANDLER_WIDTH"]); - var min = range[0], max = range[1]; - var sorted = false; - // 如果交换了位置,则对应的 min max 也交互 - if (min > max) { - _a = [max, min], min = _a[0], max = _a[1]; - _b = [maxTextShape, minTextShape], minTextShape = _b[0], maxTextShape = _b[1]; - sorted = true; - } - // 避让规则,优先显示在两侧,只有显示不下的时候,才显示在中间 - var minBBox = minTextShape.getBBox(); - var maxBBox = maxTextShape.getBBox(); - var minAttrs = minBBox.width > min - PADDING - ? { x: min + handlerWidth / 2 + PADDING, textAlign: 'left' } - : { x: min - handlerWidth / 2 - PADDING, textAlign: 'right' }; - var maxAttrs = maxBBox.width > width - max - PADDING - ? { x: max - handlerWidth / 2 - PADDING, textAlign: 'right' } - : { x: max + handlerWidth / 2 + PADDING, textAlign: 'left' }; - return !sorted ? [minAttrs, maxAttrs] : [maxAttrs, minAttrs]; - }; - Slider.prototype.draw = function () { - var container = this.get('container'); - var canvas = container && container.get('canvas'); - if (canvas) { - canvas.draw(); - } - }; - Slider.prototype.getContainerDOM = function () { - var container = this.get('container'); - var canvas = container && container.get('canvas'); - return canvas && canvas.get('container'); - }; - return Slider; -}(_abstract_group_component__WEBPACK_IMPORTED_MODULE_2__["default"])); - -/* harmony default export */ __webpack_exports__["default"] = (Slider); -//# sourceMappingURL=slider.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/tooltip/css-const.js": -/*!***************************************************************!*\ - !*** ./node_modules/@antv/component/esm/tooltip/css-const.js ***! - \***************************************************************/ -/*! exports provided: CONTAINER_CLASS, TITLE_CLASS, LIST_CLASS, LIST_ITEM_CLASS, MARKER_CLASS, VALUE_CLASS, NAME_CLASS, CROSSHAIR_X, CROSSHAIR_Y */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONTAINER_CLASS", function() { return CONTAINER_CLASS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TITLE_CLASS", function() { return TITLE_CLASS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LIST_CLASS", function() { return LIST_CLASS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LIST_ITEM_CLASS", function() { return LIST_ITEM_CLASS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MARKER_CLASS", function() { return MARKER_CLASS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VALUE_CLASS", function() { return VALUE_CLASS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NAME_CLASS", function() { return NAME_CLASS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CROSSHAIR_X", function() { return CROSSHAIR_X; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CROSSHAIR_Y", function() { return CROSSHAIR_Y; }); -var CONTAINER_CLASS = 'g2-tooltip'; -var TITLE_CLASS = 'g2-tooltip-title'; -var LIST_CLASS = 'g2-tooltip-list'; -var LIST_ITEM_CLASS = 'g2-tooltip-list-item'; -var MARKER_CLASS = 'g2-tooltip-marker'; -var VALUE_CLASS = 'g2-tooltip-value'; -var NAME_CLASS = 'g2-tooltip-name'; -var CROSSHAIR_X = 'g2-tooltip-crosshair-x'; -var CROSSHAIR_Y = 'g2-tooltip-crosshair-y'; -//# sourceMappingURL=css-const.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/tooltip/html-theme.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/component/esm/tooltip/html-theme.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _util_theme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/theme */ "./node_modules/@antv/component/esm/util/theme.js"); -/* harmony import */ var _css_const__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./css-const */ "./node_modules/@antv/component/esm/tooltip/css-const.js"); -var _a; - -// tooltip 相关 dom 的 css 类名 - -/* harmony default export */ __webpack_exports__["default"] = (_a = {}, - // css style for tooltip - _a["" + _css_const__WEBPACK_IMPORTED_MODULE_1__["CONTAINER_CLASS"]] = { - position: 'absolute', - visibility: 'visible', - // @2018-07-25 by blue.lb 这里去掉浮动,火狐上存在样式错位 - // whiteSpace: 'nowrap', - zIndex: 8, - transition: 'visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), ' + - 'left 0.4s cubic-bezier(0.23, 1, 0.32, 1), ' + - 'top 0.4s cubic-bezier(0.23, 1, 0.32, 1)', - backgroundColor: 'rgba(255, 255, 255, 0.9)', - boxShadow: '0px 0px 10px #aeaeae', - borderRadius: '3px', - color: 'rgb(87, 87, 87)', - fontSize: '12px', - fontFamily: _util_theme__WEBPACK_IMPORTED_MODULE_0__["default"].fontFamily, - lineHeight: '20px', - padding: '10px 10px 6px 10px', - }, - _a["" + _css_const__WEBPACK_IMPORTED_MODULE_1__["TITLE_CLASS"]] = { - marginBottom: '4px', - }, - _a["" + _css_const__WEBPACK_IMPORTED_MODULE_1__["LIST_CLASS"]] = { - margin: 0, - listStyleType: 'none', - padding: 0, - }, - _a["" + _css_const__WEBPACK_IMPORTED_MODULE_1__["LIST_ITEM_CLASS"]] = { - listStyleType: 'none', - marginBottom: '4px', - }, - _a["" + _css_const__WEBPACK_IMPORTED_MODULE_1__["MARKER_CLASS"]] = { - width: '8px', - height: '8px', - borderRadius: '50%', - display: 'inline-block', - marginRight: '8px', - }, - _a["" + _css_const__WEBPACK_IMPORTED_MODULE_1__["VALUE_CLASS"]] = { - display: 'inline-block', - float: 'right', - marginLeft: '30px', - }, - _a["" + _css_const__WEBPACK_IMPORTED_MODULE_1__["CROSSHAIR_X"]] = { - position: 'absolute', - width: '1px', - backgroundColor: 'rgba(0, 0, 0, 0.25)', - }, - _a["" + _css_const__WEBPACK_IMPORTED_MODULE_1__["CROSSHAIR_Y"]] = { - position: 'absolute', - height: '1px', - backgroundColor: 'rgba(0, 0, 0, 0.25)', - }, - _a); -//# sourceMappingURL=html-theme.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/tooltip/html.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/component/esm/tooltip/html.js ***! - \**********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_dom_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/dom-util */ "./node_modules/@antv/dom-util/esm/index.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _antv_color_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @antv/color-util */ "./node_modules/@antv/color-util/esm/index.js"); -/* harmony import */ var _abstract_html_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../abstract/html-component */ "./node_modules/@antv/component/esm/abstract/html-component.js"); -/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/util */ "./node_modules/@antv/component/esm/util/util.js"); -/* harmony import */ var _css_const__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./css-const */ "./node_modules/@antv/component/esm/tooltip/css-const.js"); -/* harmony import */ var _html_theme__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./html-theme */ "./node_modules/@antv/component/esm/tooltip/html-theme.js"); -/* harmony import */ var _util_align__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../util/align */ "./node_modules/@antv/component/esm/util/align.js"); - - - - - - - - - -function toPx(number) { - return number + "px"; -} -function hasOneKey(obj, keys) { - var result = false; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(keys, function (key) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["hasKey"])(obj, key)) { - result = true; - return false; - } - }); - return result; -} -var Tooltip = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Tooltip, _super); - function Tooltip() { - return _super !== null && _super.apply(this, arguments) || this; - } - Tooltip.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { name: 'tooltip', type: 'html', x: 0, y: 0, items: [], containerTpl: "
", itemTpl: "
  • \n \n {name}:\n {value}\n
  • ", xCrosshairTpl: "
    ", yCrosshairTpl: "
    ", title: null, showTitle: true, - /** - * tooltip 限制的区域 - * @type {Region} - */ - region: null, - // crosshair 的限制区域 - crosshairsRegion: null, - // x, y, xy - crosshairs: null, offset: 10, position: 'right', domStyles: null, defaultStyles: _html_theme__WEBPACK_IMPORTED_MODULE_7__["default"] }); - return cfg; - }; - // tooltip 渲染时,渲染 title,items 和 corosshairs - Tooltip.prototype.render = function () { - this.resetTitle(); - this.renderItems(); - // 绘制完成后,再定位 - this.resetPosition(); - }; - // 复写清空函数,因为有模板的存在,所以默认的写法不合适 - Tooltip.prototype.clear = function () { - // 由于 crosshair 没有在 container 内,所以需要单独清理 - this.clearCrosshairs(); - this.setTitle(''); // 清空标题 - this.clearItemDoms(); - }; - // 更新属性的同时,可能会引起 DOM 的变化,这里对可能引起 DOM 变化的场景做了处理 - Tooltip.prototype.update = function (cfg) { - _super.prototype.update.call(this, cfg); - // 更新标题 - if (hasOneKey(cfg, ['title', 'showTitle'])) { - this.resetTitle(); - } - // 更新内容 - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["hasKey"])(cfg, 'items')) { - this.renderItems(); - } - // 更新样式 - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["hasKey"])(cfg, 'domStyles')) { - this.resetStyles(); - this.applyStyles(); - } - // 只要属性发生变化,都调整一些位置 - this.resetPosition(); - }; - Tooltip.prototype.show = function () { - var container = this.getContainer(); - if (!container || this.destroyed) { - // 防止容器不存在或者被销毁时报错 - return; - } - this.set('visible', true); - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["modifyCSS"])(container, { - visibility: 'visible', - }); - this.setCrossHairsVisible(true); - }; - Tooltip.prototype.hide = function () { - var container = this.getContainer(); - // relative: https://github.com/antvis/g2/issues/1221 - if (!container || this.destroyed) { - return; - } - this.set('visible', false); - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["modifyCSS"])(container, { - visibility: 'hidden', - }); - this.setCrossHairsVisible(false); - }; - // 实现 IPointLocation 的接口 - Tooltip.prototype.getLocation = function () { - return { x: this.get('x'), y: this.get('y') }; - }; - // 实现 IPointLocation 的接口 - Tooltip.prototype.setLocation = function (point) { - this.set('x', point.x); - this.set('y', point.y); - this.resetPosition(); - }; - Tooltip.prototype.setCrossHairsVisible = function (visible) { - var display = visible ? '' : 'none'; - var xCrosshairDom = this.get('xCrosshairDom'); - var yCrosshairDom = this.get('yCrosshairDom'); - xCrosshairDom && - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["modifyCSS"])(xCrosshairDom, { - display: display, - }); - yCrosshairDom && - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["modifyCSS"])(yCrosshairDom, { - display: display, - }); - }; - Tooltip.prototype.initContainer = function () { - _super.prototype.initContainer.call(this); - this.cacheDoms(); - this.resetStyles(); // 初始化样式 - this.applyStyles(); // 应用样式 - }; - // 清理 DOM - Tooltip.prototype.removeDom = function () { - _super.prototype.removeDom.call(this); - this.clearCrosshairs(); - }; - // 缓存模板设置的各种 DOM - Tooltip.prototype.cacheDoms = function () { - var container = this.getContainer(); - var titleDom = container.getElementsByClassName(_css_const__WEBPACK_IMPORTED_MODULE_6__["TITLE_CLASS"])[0]; - var listDom = container.getElementsByClassName(_css_const__WEBPACK_IMPORTED_MODULE_6__["LIST_CLASS"])[0]; - this.set('titleDom', titleDom); - this.set('listDom', listDom); - }; - // 调整位置 - Tooltip.prototype.resetPosition = function () { - var x = this.get('x'); - var y = this.get('y'); - var offset = this.get('offset'); - var _a = this.getOffset(), offsetX = _a.offsetX, offsetY = _a.offsetY; - var position = this.get('position'); - var region = this.get('region'); - var container = this.getContainer(); - var bbox = this.getBBox(); - var width = bbox.width, height = bbox.height; - var limitBox; - if (region) { - // 不限制位置 - limitBox = Object(_util_util__WEBPACK_IMPORTED_MODULE_5__["regionToBBox"])(region); - } - var point = Object(_util_align__WEBPACK_IMPORTED_MODULE_8__["getAlignPoint"])(x, y, offset, width, height, position, limitBox); - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["modifyCSS"])(container, { - left: toPx(point.x + offsetX), - top: toPx(point.y + offsetY), - }); - this.resetCrosshairs(); - }; - // 重置 title - Tooltip.prototype.resetTitle = function () { - var title = this.get('title'); - var showTitle = this.get('showTitle'); - if (showTitle && title) { - this.setTitle(title); - } - else { - this.setTitle(''); - } - }; - // 设置 title 文本 - Tooltip.prototype.setTitle = function (text) { - var titleDom = this.get('titleDom'); - if (titleDom) { - titleDom.innerText = text; - } - }; - // 终止 crosshair - Tooltip.prototype.resetCrosshairs = function () { - var crosshairsRegion = this.get('crosshairsRegion'); - var crosshairs = this.get('crosshairs'); - if (!crosshairsRegion || !crosshairs) { - // 不显示 crosshair,都移除,没有设定 region 也都移除掉 - this.clearCrosshairs(); - } - else { - var crosshairBox = Object(_util_util__WEBPACK_IMPORTED_MODULE_5__["regionToBBox"])(crosshairsRegion); - var xCrosshairDom = this.get('xCrosshairDom'); - var yCrosshairDom = this.get('yCrosshairDom'); - if (crosshairs === 'x') { - this.resetCrosshair('x', crosshairBox); - // 仅显示 x 的 crosshair,y 移除 - if (yCrosshairDom) { - yCrosshairDom.remove(); - this.set('yCrosshairDom', null); - } - } - else if (crosshairs === 'y') { - this.resetCrosshair('y', crosshairBox); - // 仅显示 y 的 crosshair,x 移除 - if (xCrosshairDom) { - xCrosshairDom.remove(); - this.set('xCrosshairDom', null); - } - } - else { - this.resetCrosshair('x', crosshairBox); - this.resetCrosshair('y', crosshairBox); - } - this.setCrossHairsVisible(this.get('visible')); - } - }; - // 设定 crosshair 的位置,需要区分 x,y - Tooltip.prototype.resetCrosshair = function (name, bbox) { - var croshairDom = this.checkCrosshair(name); - var value = this.get(name); - if (name === 'x') { - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["modifyCSS"])(croshairDom, { - left: toPx(value), - top: toPx(bbox.y), - height: toPx(bbox.height), - }); - } - else { - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["modifyCSS"])(croshairDom, { - top: toPx(value), - left: toPx(bbox.x), - width: toPx(bbox.width), - }); - } - }; - // 如果 crosshair 对应的 dom 不存在,则创建 - Tooltip.prototype.checkCrosshair = function (name) { - var domName = name + "CrosshairDom"; - var tplName = name + "CrosshairTpl"; - var constName = "CROSSHAIR_" + name.toUpperCase(); - var styleName = _css_const__WEBPACK_IMPORTED_MODULE_6__[constName]; - var croshairDom = this.get(domName); - var parent = this.get('parent'); - if (!croshairDom) { - croshairDom = Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["createDom"])(this.get(tplName)); // 创建 - this.applyStyle(styleName, croshairDom); // 设置初始样式 - parent.appendChild(croshairDom); // 添加到跟 tooltip 同级的目录下 - this.set(domName, croshairDom); - } - return croshairDom; - }; - // 样式需要进行合并,不能单纯的替换,否则使用非常不方便 - Tooltip.prototype.resetStyles = function () { - var style = this.get('domStyles'); - var defaultStyles = this.get('defaultStyles'); - if (!style) { - style = defaultStyles; - } - else { - style = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["deepMix"])({}, defaultStyles, style); - } - this.set('domStyles', style); - }; - // 应用所有的样式 - Tooltip.prototype.applyStyles = function () { - var domStyles = this.get('domStyles'); - var container = this.getContainer(); - this.applyChildrenStyles(container, domStyles); - if (Object(_util_util__WEBPACK_IMPORTED_MODULE_5__["hasClass"])(container, _css_const__WEBPACK_IMPORTED_MODULE_6__["CONTAINER_CLASS"])) { - var containerCss = domStyles[_css_const__WEBPACK_IMPORTED_MODULE_6__["CONTAINER_CLASS"]]; - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["modifyCSS"])(container, containerCss); - } - }; - Tooltip.prototype.applyChildrenStyles = function (element, styles) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(styles, function (style, name) { - var elements = element.getElementsByClassName(name); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(elements, function (el) { - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["modifyCSS"])(el, style); - }); - }); - }; - // 应用到单个 DOM - Tooltip.prototype.applyStyle = function (cssName, dom) { - var domStyles = this.get('domStyles'); - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["modifyCSS"])(dom, domStyles[cssName]); - }; - Tooltip.prototype.renderItems = function () { - this.clearItemDoms(); - var items = this.get('items'); - var itemTpl = this.get('itemTpl'); - var listDom = this.get('listDom'); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(items, function (item) { - var color = _antv_color_util__WEBPACK_IMPORTED_MODULE_3__["default"].toCSSGradient(item.color); - var substituteObj = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, item), { color: color }); - var domStr = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["substitute"])(itemTpl, substituteObj); - var itemDom = Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["createDom"])(domStr); - listDom.appendChild(itemDom); - }); - this.applyChildrenStyles(listDom, this.get('domStyles')); - }; - Tooltip.prototype.clearItemDoms = function () { - Object(_util_util__WEBPACK_IMPORTED_MODULE_5__["clearDom"])(this.get('listDom')); - }; - Tooltip.prototype.clearCrosshairs = function () { - var xCrosshairDom = this.get('xCrosshairDom'); - var yCrosshairDom = this.get('yCrosshairDom'); - xCrosshairDom && xCrosshairDom.remove(); - yCrosshairDom && yCrosshairDom.remove(); - this.set('xCrosshairDom', null); - this.set('yCrosshairDom', null); - }; - return Tooltip; -}(_abstract_html_component__WEBPACK_IMPORTED_MODULE_4__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Tooltip); -//# sourceMappingURL=html.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/tooltip/index.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/component/esm/tooltip/index.js ***! - \***********************************************************/ -/*! exports provided: Html */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./html */ "./node_modules/@antv/component/esm/tooltip/html.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Html", function() { return _html__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/trend/constant.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/component/esm/trend/constant.js ***! - \************************************************************/ -/*! exports provided: BACKGROUND_STYLE, LINE_STYLE, AREA_STYLE */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BACKGROUND_STYLE", function() { return BACKGROUND_STYLE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LINE_STYLE", function() { return LINE_STYLE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AREA_STYLE", function() { return AREA_STYLE; }); -var BACKGROUND_STYLE = { - // fill: 'red', - opacity: 0, -}; -var LINE_STYLE = { - stroke: '#C5C5C5', - strokeOpacity: 0.85, -}; -var AREA_STYLE = { - fill: '#CACED4', - opacity: 0.85, -}; -//# sourceMappingURL=constant.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/trend/path.js": -/*!********************************************************!*\ - !*** ./node_modules/@antv/component/esm/trend/path.js ***! - \********************************************************/ -/*! exports provided: getLinePath, getSmoothLinePath, dataToPath, linePathToAreaPath */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLinePath", function() { return getLinePath; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSmoothLinePath", function() { return getSmoothLinePath; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dataToPath", function() { return dataToPath; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linePathToAreaPath", function() { return linePathToAreaPath; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_path_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/path-util */ "./node_modules/@antv/path-util/esm/index.js"); -/* harmony import */ var _antv_scale__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/scale */ "./node_modules/@antv/scale/esm/index.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - - - - -/** - * 点数组转 path - * @param points - */ -function pointsToPath(points) { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["map"])(points, function (p, idx) { - var command = idx === 0 ? 'M' : 'L'; - var x = p[0], y = p[1]; - return [command, x, y]; - }); -} -/** - * 将点连接成路径 path - * @param points - */ -function getLinePath(points) { - return pointsToPath(points); -} -/** - * 将点连成平滑的曲线 - * @param points - */ -function getSmoothLinePath(points) { - if (points.length <= 2) { - // 两点以内直接绘制成路径 - return getLinePath(points); - } - var data = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["each"])(points, function (p) { - // 当前点和上一个点一样的时候,忽略掉 - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["isEqual"])(p, data.slice(data.length - 2))) { - data.push(p[0], p[1]); - } - }); - // const constraint = [ // 范围 - // [ 0, 0 ], - // [ 1, 1 ], - // ]; - var path = Object(_antv_path_util__WEBPACK_IMPORTED_MODULE_1__["catmullRom2Bezier"])(data, false); - var _a = Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["head"])(points), x = _a[0], y = _a[1]; - path.unshift(['M', x, y]); - return path; -} -/** - * 将数据转成 path,利用 scale 的归一化能力 - * @param data - * @param width - * @param height - * @param smooth - */ -function dataToPath(data, width, height, smooth) { - if (smooth === void 0) { smooth = true; } - // 利用 scale 来获取 y 上的映射 - var y = new _antv_scale__WEBPACK_IMPORTED_MODULE_2__["Linear"]({ - values: data, - }); - var x = new _antv_scale__WEBPACK_IMPORTED_MODULE_2__["Category"]({ - values: Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["map"])(data, function (v, idx) { return idx; }), - }); - var points = Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["map"])(data, function (v, idx) { - return [x.scale(idx) * width, height - y.scale(v) * height]; - }); - return smooth ? getSmoothLinePath(points) : getLinePath(points); -} -/** - * 线 path 转 area path - * @param path - * @param width - * @param height - */ -function linePathToAreaPath(path, width, height) { - var areaPath = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArrays"])(path); - areaPath.push(['L', width, 0]); - areaPath.push(['L', 0, height]); - areaPath.push(['Z']); - return areaPath; -} -//# sourceMappingURL=path.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/trend/trend.js": -/*!*********************************************************!*\ - !*** ./node_modules/@antv/component/esm/trend/trend.js ***! - \*********************************************************/ -/*! exports provided: Trend, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Trend", function() { return Trend; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _abstract_group_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../abstract/group-component */ "./node_modules/@antv/component/esm/abstract/group-component.js"); -/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant */ "./node_modules/@antv/component/esm/trend/constant.js"); -/* harmony import */ var _path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./path */ "./node_modules/@antv/component/esm/trend/path.js"); - - - - -var Trend = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Trend, _super); - function Trend() { - return _super !== null && _super.apply(this, arguments) || this; - } - Trend.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, cfg), { name: 'trend', x: 0, y: 0, width: 200, height: 16, smooth: true, isArea: false, data: [], backgroundStyle: _constant__WEBPACK_IMPORTED_MODULE_2__["BACKGROUND_STYLE"], lineStyle: _constant__WEBPACK_IMPORTED_MODULE_2__["LINE_STYLE"], areaStyle: _constant__WEBPACK_IMPORTED_MODULE_2__["AREA_STYLE"] }); - }; - Trend.prototype.renderInner = function (group) { - var _a = this.cfg, width = _a.width, height = _a.height, data = _a.data, smooth = _a.smooth, isArea = _a.isArea, backgroundStyle = _a.backgroundStyle, lineStyle = _a.lineStyle, areaStyle = _a.areaStyle; - // 背景 - this.addShape(group, { - id: this.getElementId('background'), - type: 'rect', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: 0, y: 0, width: width, - height: height }, backgroundStyle), - }); - var path = Object(_path__WEBPACK_IMPORTED_MODULE_3__["dataToPath"])(data, width, height, smooth); - // 线 - this.addShape(group, { - id: this.getElementId('line'), - type: 'path', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: path }, lineStyle), - }); - // area - // 在 path 的基础上,增加两个坐标点 - if (isArea) { - var areaPath = Object(_path__WEBPACK_IMPORTED_MODULE_3__["linePathToAreaPath"])(path, width, height); - this.addShape(group, { - id: this.getElementId('area'), - type: 'path', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: areaPath }, areaStyle), - }); - } - }; - Trend.prototype.applyOffset = function () { - var _a = this.cfg, x = _a.x, y = _a.y; - // 统一移动到对应的位置 - this.moveElementTo(this.get('group'), { - x: x, - y: y, - }); - }; - return Trend; -}(_abstract_group_component__WEBPACK_IMPORTED_MODULE_1__["default"])); - -/* harmony default export */ __webpack_exports__["default"] = (Trend); -//# sourceMappingURL=trend.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/util/align.js": -/*!********************************************************!*\ - !*** ./node_modules/@antv/component/esm/util/align.js ***! - \********************************************************/ -/*! exports provided: getOutSides, getPointByPosition, getAlignPoint */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOutSides", function() { return getOutSides; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPointByPosition", function() { return getPointByPosition; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAlignPoint", function() { return getAlignPoint; }); -// 检测各边是否超出 -function getOutSides(x, y, width, height, limitBox) { - var hits = { - left: x < limitBox.x, - right: x + width > limitBox.x + limitBox.width, - top: y < limitBox.y, - bottom: y + height > limitBox.y + limitBox.height, - }; - return hits; -} -function getPointByPosition(x, y, offset, width, height, position) { - var px = x; - var py = y; - switch (position) { - case 'left': // left center - px = x - width - offset; - py = y - height / 2; - break; - case 'right': - px = x + offset; - py = y - height / 2; - break; - case 'top': - px = x - width / 2; - py = y - height - offset; - break; - case 'bottom': - // bottom - px = x - width / 2; - py = y + offset; - break; - default: - // auto, 在 top-right - px = x + offset; - py = y - height - offset; - break; - } - return { - x: px, - y: py, - }; -} -function getAlignPoint(x, y, offset, width, height, position, limitBox) { - var point = getPointByPosition(x, y, offset, width, height, position); - if (limitBox) { - var outSides = getOutSides(point.x, point.y, width, height, limitBox); - if (position === 'auto') { // 如果是 auto,默认 tooltip 在右上角,仅需要判定右侧和上测冲突即可 - if (outSides.right) { - point.x = x - width - offset; - } - if (outSides.top) { - point.y = y + offset; - } - } - else if (position === 'top' || position === 'bottom') { - if (outSides.left) { - // 左侧躲避 - point.x = limitBox.x; - } - if (outSides.right) { - // 右侧躲避 - point.x = limitBox.x + limitBox.width - width; - } - if (position === 'top' && outSides.top) { - // 如果上面对齐检测上面,不检测下面 - point.y = y + offset; - } - if (position === 'bottom' && outSides.bottom) { - point.y = y - height - offset; - } - } - else { - // 检测左右位置 - if (outSides.top) { - point.y = limitBox.y; - } - if (outSides.bottom) { - point.y = limitBox.y + limitBox.height - height; - } - if (position === 'left' && outSides.left) { - point.x = x + offset; - } - if (position === 'right' && outSides.right) { - point.x = x - width - offset; - } - } - } - return point; -} -//# sourceMappingURL=align.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/util/event.js": -/*!********************************************************!*\ - !*** ./node_modules/@antv/component/esm/util/event.js ***! - \********************************************************/ -/*! exports provided: propagationDelegate */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "propagationDelegate", function() { return propagationDelegate; }); -/* harmony import */ var _antv_g_base_lib_event_graph_event__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/g-base/lib/event/graph-event */ "./node_modules/@antv/g-base/lib/event/graph-event.js"); -/* harmony import */ var _antv_g_base_lib_event_graph_event__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_antv_g_base_lib_event_graph_event__WEBPACK_IMPORTED_MODULE_0__); - -/** - * - * @param group 分组 - * @param eventName 事件名 - * @param eventObject 事件对象 - */ -function propagationDelegate(group, eventName, eventObject) { - var event = new _antv_g_base_lib_event_graph_event__WEBPACK_IMPORTED_MODULE_0___default.a(eventName, eventObject); - event.target = group; - event.propagationPath.push(group); // 从当前 group 开始触发 delegation - group.emitDelegation(eventName, event); - var parent = group.getParent(); - // 执行冒泡 - while (parent) { - // 委托事件要先触发 - parent.emitDelegation(eventName, event); - event.propagationPath.push(parent); - parent = parent.getParent(); - } -} -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/util/label.js": -/*!********************************************************!*\ - !*** ./node_modules/@antv/component/esm/util/label.js ***! - \********************************************************/ -/*! exports provided: getMaxLabelWidth */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMaxLabelWidth", function() { return getMaxLabelWidth; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -function getMaxLabelWidth(labels) { - var max = 0; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(labels, function (label) { - var bbox = label.getBBox(); - var width = bbox.width; - if (max < width) { - max = width; - } - }); - return max; -} -//# sourceMappingURL=label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/util/matrix.js": -/*!*********************************************************!*\ - !*** ./node_modules/@antv/component/esm/util/matrix.js ***! - \*********************************************************/ -/*! exports provided: getMatrixByAngle, getMatrixByTranslate, getAngleByMatrix, applyMatrix2BBox */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMatrixByAngle", function() { return getMatrixByAngle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMatrixByTranslate", function() { return getMatrixByTranslate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAngleByMatrix", function() { return getAngleByMatrix; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyMatrix2BBox", function() { return applyMatrix2BBox; }); -/* harmony import */ var _antv_matrix_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/matrix-util */ "./node_modules/@antv/matrix-util/esm/index.js"); - -var identityMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1]; -function getMatrixByAngle(point, angle) { - if (!angle) { - // 角度为 0 或者 null 时返回 null - return null; - } - var m = Object(_antv_matrix_util__WEBPACK_IMPORTED_MODULE_0__["transform"])(identityMatrix, [ - ['t', -point.x, -point.y], - ['r', angle], - ['t', point.x, point.y], - ]); - return m; -} -function getMatrixByTranslate(point, currentMatrix) { - if (!point.x && !point.y) { - // 0,0 或者 nan 的情况下返回 null - return null; - } - return Object(_antv_matrix_util__WEBPACK_IMPORTED_MODULE_0__["transform"])(currentMatrix || identityMatrix, [['t', point.x, point.y]]); -} -// 从矩阵获取旋转的角度 -function getAngleByMatrix(matrix) { - var xVector = [1, 0, 0]; - var out = []; - _antv_matrix_util__WEBPACK_IMPORTED_MODULE_0__["vec3"].transformMat3(out, xVector, matrix); - return Math.atan2(out[1], out[0]); -} -// 矩阵 * 向量 -function multiplyVec2(matrix, v) { - var out = []; - _antv_matrix_util__WEBPACK_IMPORTED_MODULE_0__["vec2"].transformMat3(out, v, matrix); - return out; -} -function applyMatrix2BBox(matrix, bbox) { - var topLeft = multiplyVec2(matrix, [bbox.minX, bbox.minY]); - var topRight = multiplyVec2(matrix, [bbox.maxX, bbox.minY]); - var bottomLeft = multiplyVec2(matrix, [bbox.minX, bbox.maxY]); - var bottomRight = multiplyVec2(matrix, [bbox.maxX, bbox.maxY]); - var minX = Math.min(topLeft[0], topRight[0], bottomLeft[0], bottomRight[0]); - var maxX = Math.max(topLeft[0], topRight[0], bottomLeft[0], bottomRight[0]); - var minY = Math.min(topLeft[1], topRight[1], bottomLeft[1], bottomRight[1]); - var maxY = Math.max(topLeft[1], topRight[1], bottomLeft[1], bottomRight[1]); - return { - x: minX, - y: minY, - minX: minX, - minY: minY, - maxX: maxX, - maxY: maxY, - width: maxX - minX, - height: maxY - minY, - }; -} -//# sourceMappingURL=matrix.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/util/state.js": -/*!********************************************************!*\ - !*** ./node_modules/@antv/component/esm/util/state.js ***! - \********************************************************/ -/*! exports provided: getStatesStyle */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getStatesStyle", function() { return getStatesStyle; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -// 获取多个状态量的合并值 -function getStatesStyle(item, elementName, stateStyles) { - var styleName = elementName + "Style"; // activeStyle - var styles = null; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(stateStyles, function (v, state) { - if (item[state] && v[styleName]) { - if (!styles) { - styles = {}; - } - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["mix"])(styles, v[styleName]); // 合并样式 - } - }); - return styles; -} -//# sourceMappingURL=state.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/util/theme.js": -/*!********************************************************!*\ - !*** ./node_modules/@antv/component/esm/util/theme.js ***! - \********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = ({ - fontFamily: "\n \"-apple-system\", BlinkMacSystemFont, \"Segoe UI\", Roboto,\"Helvetica Neue\",\n Helvetica, \"PingFang SC\", \"Hiragino Sans GB\", \"Microsoft YaHei\",\n SimSun, \"sans-serif\"", - textColor: '#2C3542', - activeTextColor: '#333333', - uncheckedColor: '#D8D8D8', - lineColor: '#416180', - regionColor: '#CCD7EB', - verticalAxisRotate: -Math.PI / 4, - horizontalAxisRotate: Math.PI / 4, -}); -//# sourceMappingURL=theme.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/esm/util/util.js": -/*!*******************************************************!*\ - !*** ./node_modules/@antv/component/esm/util/util.js ***! - \*******************************************************/ -/*! exports provided: formatPadding, clearDom, hasClass, regionToBBox, pointsToBBox, createBBox, getValueByPercent, getCirclePoint, distance, wait, near, intersectBBox, mergeBBox, getBBoxWithClip, updateClip */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatPadding", function() { return formatPadding; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearDom", function() { return clearDom; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasClass", function() { return hasClass; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "regionToBBox", function() { return regionToBBox; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pointsToBBox", function() { return pointsToBBox; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createBBox", function() { return createBBox; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getValueByPercent", function() { return getValueByPercent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCirclePoint", function() { return getCirclePoint; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distance", function() { return distance; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wait", function() { return wait; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "near", function() { return near; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "intersectBBox", function() { return intersectBBox; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeBBox", function() { return mergeBBox; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBBoxWithClip", function() { return getBBoxWithClip; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateClip", function() { return updateClip; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -function formatPadding(padding) { - var top = 0; - var left = 0; - var right = 0; - var bottom = 0; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNumber"])(padding)) { - top = left = right = bottom = padding; - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isArray"])(padding)) { - top = padding[0]; - right = !Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(padding[1]) ? padding[1] : padding[0]; - bottom = !Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(padding[2]) ? padding[2] : padding[0]; - left = !Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(padding[3]) ? padding[3] : right; - } - return [top, right, bottom, left]; -} -function clearDom(container) { - var children = container.childNodes; - var length = children.length; - for (var i = length - 1; i >= 0; i--) { - container.removeChild(children[i]); - } -} -function hasClass(elements, cName) { - return !!elements.className.match(new RegExp("(\\s|^)" + cName + "(\\s|$)")); -} -function regionToBBox(region) { - var start = region.start, end = region.end; - var minX = Math.min(start.x, end.x); - var minY = Math.min(start.y, end.y); - var maxX = Math.max(start.x, end.x); - var maxY = Math.max(start.y, end.y); - return { - x: minX, - y: minY, - minX: minX, - minY: minY, - maxX: maxX, - maxY: maxY, - width: maxX - minX, - height: maxY - minY, - }; -} -function pointsToBBox(points) { - var xs = points.map(function (point) { return point.x; }); - var ys = points.map(function (point) { return point.y; }); - var minX = Math.min.apply(Math, xs); - var minY = Math.min.apply(Math, ys); - var maxX = Math.max.apply(Math, xs); - var maxY = Math.max.apply(Math, ys); - return { - x: minX, - y: minY, - minX: minX, - minY: minY, - maxX: maxX, - maxY: maxY, - width: maxX - minX, - height: maxY - minY, - }; -} -function createBBox(x, y, width, height) { - return { - x: x, - y: y, - width: width, - height: height, - minX: x, - minY: y, - maxX: x + width, - maxY: y + height, - }; -} -function getValueByPercent(min, max, percent) { - return (1 - percent) * min + max * percent; -} -function getCirclePoint(center, radius, angle) { - return { - x: center.x + Math.cos(angle) * radius, - y: center.y + Math.sin(angle) * radius, - }; -} -function distance(p1, p2) { - var dx = p2.x - p1.x; - var dy = p2.y - p1.y; - return Math.sqrt(dx * dx + dy * dy); -} -var wait = function (interval) { - return new Promise(function (resolve) { - setTimeout(resolve, interval); - }); -}; -var near = function (x, y) { - return [x, y].includes(Infinity) ? Math.abs(x) === Math.abs(y) : Math.abs(x - y) < Math.pow(Number.EPSILON, 0.5); -}; -function intersectBBox(box1, box2) { - var minX = Math.max(box1.minX, box2.minX); - var minY = Math.max(box1.minY, box2.minY); - var maxX = Math.min(box1.maxX, box2.maxX); - var maxY = Math.min(box1.maxY, box2.maxY); - return createBBox(minX, minY, maxX - minX, maxY - minY); -} -function mergeBBox(box1, box2) { - var minX = Math.min(box1.minX, box2.minX); - var minY = Math.min(box1.minY, box2.minY); - var maxX = Math.max(box1.maxX, box2.maxX); - var maxY = Math.max(box1.maxY, box2.maxY); - return createBBox(minX, minY, maxX - minX, maxY - minY); -} -function getBBoxWithClip(element) { - var clipShape = element.getClip(); - var clipBBox = clipShape && clipShape.getBBox(); - var bbox; - if (!element.isGroup()) { // 如果是普通的图形 - bbox = element.getBBox(); - } - else { - var minX_1 = Infinity; - var maxX_1 = -Infinity; - var minY_1 = Infinity; - var maxY_1 = -Infinity; - var children = element.getChildren(); - if (children.length > 0) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(children, function (child) { - if (child.get('visible')) { - // 如果分组没有子元素,则直接跳过 - if (child.isGroup() && child.get('children').length === 0) { - return true; - } - var box = getBBoxWithClip(child); - // 计算 4 个顶点 - var leftTop = child.applyToMatrix([box.minX, box.minY, 1]); - var leftBottom = child.applyToMatrix([box.minX, box.maxY, 1]); - var rightTop = child.applyToMatrix([box.maxX, box.minY, 1]); - var rightBottom = child.applyToMatrix([box.maxX, box.maxY, 1]); - // 从中取最小的范围 - var boxMinX = Math.min(leftTop[0], leftBottom[0], rightTop[0], rightBottom[0]); - var boxMaxX = Math.max(leftTop[0], leftBottom[0], rightTop[0], rightBottom[0]); - var boxMinY = Math.min(leftTop[1], leftBottom[1], rightTop[1], rightBottom[1]); - var boxMaxY = Math.max(leftTop[1], leftBottom[1], rightTop[1], rightBottom[1]); - if (boxMinX < minX_1) { - minX_1 = boxMinX; - } - if (boxMaxX > maxX_1) { - maxX_1 = boxMaxX; - } - if (boxMinY < minY_1) { - minY_1 = boxMinY; - } - if (boxMaxY > maxY_1) { - maxY_1 = boxMaxY; - } - } - }); - } - else { - minX_1 = 0; - maxX_1 = 0; - minY_1 = 0; - maxY_1 = 0; - } - bbox = createBBox(minX_1, minY_1, maxX_1 - minX_1, maxY_1 - minY_1); - } - if (clipBBox) { - return intersectBBox(bbox, clipBBox); - } - else { - return bbox; - } -} -function updateClip(element, newElement) { - if (!element.getClip() && !newElement.getClip()) { // 两者都没有 clip - return; - } - var newClipShape = newElement.getClip(); - if (!newClipShape) { // 新的 element 没有 clip - element.setClip(null); // 移除 clip - return; - } - var clipCfg = { - type: newClipShape.get('type'), - attrs: newClipShape.attr() - }; - element.setClip(clipCfg); -} -//# sourceMappingURL=util.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/lib/abstract/component.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/component/lib/abstract/component.js ***! - \****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -var g_base_1 = __webpack_require__(/*! @antv/g-base */ "./node_modules/@antv/g-base/esm/index.js"); -var util_1 = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -var LOCATION_FIELD_MAP = { - none: [], - point: ['x', 'y'], - region: ['start', 'end'], - points: ['points'], - circle: ['center', 'radius', 'startAngle', 'endAngle'], -}; -var Component = /** @class */ (function (_super) { - tslib_1.__extends(Component, _super); - function Component(cfg) { - var _this = _super.call(this, cfg) || this; - _this.initCfg(); - return _this; - } - /** - * @protected - * 默认的配置项 - * @returns {object} 默认的配置项 - */ - Component.prototype.getDefaultCfg = function () { - return { - id: '', - name: '', - type: '', - locationType: 'none', - offsetX: 0, - offsetY: 0, - animate: false, - capture: true, - updateAutoRender: false, - animateOption: { - appear: null, - update: { - duration: 400, - easing: 'easeQuadInOut', - }, - enter: { - duration: 400, - easing: 'easeQuadInOut', - }, - leave: { - duration: 350, - easing: 'easeQuadIn', - }, - }, - events: null, - defaultCfg: {}, - visible: true, - }; - }; - /** - * 清理组件的内容,一般配合 render 使用 - * @example - * axis.clear(); - * axis.render(); - */ - Component.prototype.clear = function () { }; - /** - * 更新组件 - * @param {object} cfg 更新属性 - */ - Component.prototype.update = function (cfg) { - var _this = this; - var defaultCfg = this.get('defaultCfg'); - util_1.each(cfg, function (value, name) { - var originCfg = _this.get(name); - var newCfg = value; - if (originCfg !== value) { - // 判断两者是否相等,主要是进行 null 的判定 - if (util_1.isObject(value) && defaultCfg[name]) { - // 新设置的属性与默认值进行合并 - newCfg = util_1.deepMix({}, defaultCfg[name], value); - } - _this.set(name, newCfg); - } - }); - // 更新时考虑显示、隐藏 - if (util_1.hasKey(cfg, 'visible')) { - if (cfg.visible) { - this.show(); - } - else { - this.hide(); - } - } - // 更新时考虑capture - if (util_1.hasKey(cfg, 'capture')) { - this.setCapture(cfg.capture); - } - }; - Component.prototype.getLayoutBBox = function () { - return this.getBBox(); // 默认返回 getBBox,不同的组件内部单独实现 - }; - Component.prototype.getLocationType = function () { - return this.get('locationType'); - }; - Component.prototype.getOffset = function () { - return { - offsetX: this.get('offsetX'), - offsetY: this.get('offsetY'), - }; - }; - // 默认使用 update - Component.prototype.setOffset = function (offsetX, offsetY) { - this.update({ - offsetX: offsetX, - offsetY: offsetY, - }); - }; - Component.prototype.setLocation = function (cfg) { - var location = tslib_1.__assign({}, cfg); - this.update(location); - }; - // 实现 ILocation 接口的 getLocation - Component.prototype.getLocation = function () { - var _this = this; - var location = {}; - var locationType = this.get('locationType'); - var fields = LOCATION_FIELD_MAP[locationType]; - util_1.each(fields, function (field) { - location[field] = _this.get(field); - }); - return location; - }; - Component.prototype.isList = function () { - return false; - }; - Component.prototype.isSlider = function () { - return false; - }; - /** - * @protected - * 初始化,用于具体的组件继承 - */ - Component.prototype.init = function () { }; - // 将组件默认的配置项设置合并到传入的配置项 - Component.prototype.initCfg = function () { - var _this = this; - var defaultCfg = this.get('defaultCfg'); - util_1.each(defaultCfg, function (value, name) { - var cfg = _this.get(name); - if (util_1.isObject(cfg)) { - var newCfg = util_1.deepMix({}, value, cfg); - _this.set(name, newCfg); - } - }); - }; - return Component; -}(g_base_1.Base)); -exports.default = Component; -//# sourceMappingURL=component.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/lib/abstract/html-component.js": -/*!*********************************************************************!*\ - !*** ./node_modules/@antv/component/lib/abstract/html-component.js ***! - \*********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -var dom_util_1 = __webpack_require__(/*! @antv/dom-util */ "./node_modules/@antv/dom-util/esm/index.js"); -var util_1 = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -var util_2 = __webpack_require__(/*! ../util/util */ "./node_modules/@antv/component/lib/util/util.js"); -var component_1 = __webpack_require__(/*! ./component */ "./node_modules/@antv/component/lib/abstract/component.js"); -var HtmlComponent = /** @class */ (function (_super) { - tslib_1.__extends(HtmlComponent, _super); - function HtmlComponent() { - return _super !== null && _super.apply(this, arguments) || this; - } - HtmlComponent.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return tslib_1.__assign(tslib_1.__assign({}, cfg), { container: null, containerTpl: '
    ', updateAutoRender: true, parent: null }); - return cfg; - }; - HtmlComponent.prototype.getContainer = function () { - return this.get('container'); - }; - /** - * 显示组件 - */ - HtmlComponent.prototype.show = function () { - var container = this.get('container'); - container.style.display = ''; - this.set('visible', true); - }; - /** - * 隐藏组件 - */ - HtmlComponent.prototype.hide = function () { - var container = this.get('container'); - container.style.display = 'none'; - this.set('visible', false); - }; - /** - * 是否允许捕捉事件 - * @param capture 事件捕捉 - */ - HtmlComponent.prototype.setCapture = function (capture) { - var container = this.getContainer(); - var value = capture ? 'auto' : 'none'; - container.style.pointerEvents = value; - this.set('capture', capture); - }; - HtmlComponent.prototype.getBBox = function () { - var container = this.getContainer(); - var x = parseFloat(container.style.left) || 0; - var y = parseFloat(container.style.top) || 0; - return util_2.createBBox(x, y, container.clientWidth, container.clientHeight); - }; - HtmlComponent.prototype.clear = function () { - var container = this.get('container'); - util_2.clearDom(container); - }; - HtmlComponent.prototype.destroy = function () { - this.removeEvent(); - this.removeDom(); - _super.prototype.destroy.call(this); - }; - /** - * 复写 init,主要是初始化 DOM 和事件 - */ - HtmlComponent.prototype.init = function () { - _super.prototype.init.call(this); - this.initContainer(); - this.initEvent(); - this.initCapture(); - this.initVisible(); - }; - HtmlComponent.prototype.initCapture = function () { - this.setCapture(this.get('capture')); - }; - HtmlComponent.prototype.initVisible = function () { - if (!this.get('visible')) { - // 设置初始显示状态 - this.hide(); - } - else { - this.show(); - } - }; - HtmlComponent.prototype.initContainer = function () { - var container = this.get('container'); - if (util_1.isNil(container)) { - // 未指定 container 则创建 - container = this.createDom(); - var parent_1 = this.get('parent'); - if (util_1.isString(parent_1)) { - parent_1 = document.getElementById(parent_1); - this.set('parent', parent_1); - } - parent_1.appendChild(container); - this.set('container', container); - } - else if (util_1.isString(container)) { - // 用户传入的 id, 作为 container - container = document.getElementById(container); - this.set('container', container); - } // else container 是 DOM - if (!this.get('parent')) { - this.set('parent', container.parentNode); - } - }; - /** - * @protected - */ - HtmlComponent.prototype.createDom = function () { - var containerTpl = this.get('containerTpl'); - return dom_util_1.createDom(containerTpl); - }; - /** - * @protected - * 初始化事件 - */ - HtmlComponent.prototype.initEvent = function () { }; - /** - * @protected - * 清理 DOM - */ - HtmlComponent.prototype.removeDom = function () { - var container = this.get('container'); - container && container.parentNode.removeChild(container); - }; - /** - * @protected - * 清理事件 - */ - HtmlComponent.prototype.removeEvent = function () { }; - return HtmlComponent; -}(component_1.default)); -exports.default = HtmlComponent; -//# sourceMappingURL=html-component.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/lib/tooltip/css-const.js": -/*!***************************************************************!*\ - !*** ./node_modules/@antv/component/lib/tooltip/css-const.js ***! - \***************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CONTAINER_CLASS = 'g2-tooltip'; -exports.TITLE_CLASS = 'g2-tooltip-title'; -exports.LIST_CLASS = 'g2-tooltip-list'; -exports.LIST_ITEM_CLASS = 'g2-tooltip-list-item'; -exports.MARKER_CLASS = 'g2-tooltip-marker'; -exports.VALUE_CLASS = 'g2-tooltip-value'; -exports.NAME_CLASS = 'g2-tooltip-name'; -exports.CROSSHAIR_X = 'g2-tooltip-crosshair-x'; -exports.CROSSHAIR_Y = 'g2-tooltip-crosshair-y'; -//# sourceMappingURL=css-const.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/lib/tooltip/html-theme.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/component/lib/tooltip/html-theme.js ***! - \****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var _a; -Object.defineProperty(exports, "__esModule", { value: true }); -var theme_1 = __webpack_require__(/*! ../util/theme */ "./node_modules/@antv/component/lib/util/theme.js"); -// tooltip 相关 dom 的 css 类名 -var CssConst = __webpack_require__(/*! ./css-const */ "./node_modules/@antv/component/lib/tooltip/css-const.js"); -exports.default = (_a = {}, - // css style for tooltip - _a["" + CssConst.CONTAINER_CLASS] = { - position: 'absolute', - visibility: 'visible', - // @2018-07-25 by blue.lb 这里去掉浮动,火狐上存在样式错位 - // whiteSpace: 'nowrap', - zIndex: 8, - transition: 'visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), ' + - 'left 0.4s cubic-bezier(0.23, 1, 0.32, 1), ' + - 'top 0.4s cubic-bezier(0.23, 1, 0.32, 1)', - backgroundColor: 'rgba(255, 255, 255, 0.9)', - boxShadow: '0px 0px 10px #aeaeae', - borderRadius: '3px', - color: 'rgb(87, 87, 87)', - fontSize: '12px', - fontFamily: theme_1.default.fontFamily, - lineHeight: '20px', - padding: '10px 10px 6px 10px', - }, - _a["" + CssConst.TITLE_CLASS] = { - marginBottom: '4px', - }, - _a["" + CssConst.LIST_CLASS] = { - margin: 0, - listStyleType: 'none', - padding: 0, - }, - _a["" + CssConst.LIST_ITEM_CLASS] = { - listStyleType: 'none', - marginBottom: '4px', - }, - _a["" + CssConst.MARKER_CLASS] = { - width: '8px', - height: '8px', - borderRadius: '50%', - display: 'inline-block', - marginRight: '8px', - }, - _a["" + CssConst.VALUE_CLASS] = { - display: 'inline-block', - float: 'right', - marginLeft: '30px', - }, - _a["" + CssConst.CROSSHAIR_X] = { - position: 'absolute', - width: '1px', - backgroundColor: 'rgba(0, 0, 0, 0.25)', - }, - _a["" + CssConst.CROSSHAIR_Y] = { - position: 'absolute', - height: '1px', - backgroundColor: 'rgba(0, 0, 0, 0.25)', - }, - _a); -//# sourceMappingURL=html-theme.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/lib/tooltip/html.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/component/lib/tooltip/html.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -var dom_util_1 = __webpack_require__(/*! @antv/dom-util */ "./node_modules/@antv/dom-util/esm/index.js"); -var util_1 = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -var color_util_1 = __webpack_require__(/*! @antv/color-util */ "./node_modules/@antv/color-util/esm/index.js"); -var html_component_1 = __webpack_require__(/*! ../abstract/html-component */ "./node_modules/@antv/component/lib/abstract/html-component.js"); -var util_2 = __webpack_require__(/*! ../util/util */ "./node_modules/@antv/component/lib/util/util.js"); -var CssConst = __webpack_require__(/*! ./css-const */ "./node_modules/@antv/component/lib/tooltip/css-const.js"); -var html_theme_1 = __webpack_require__(/*! ./html-theme */ "./node_modules/@antv/component/lib/tooltip/html-theme.js"); -var align_1 = __webpack_require__(/*! ../util/align */ "./node_modules/@antv/component/lib/util/align.js"); -function toPx(number) { - return number + "px"; -} -function hasOneKey(obj, keys) { - var result = false; - util_1.each(keys, function (key) { - if (util_1.hasKey(obj, key)) { - result = true; - return false; - } - }); - return result; -} -var Tooltip = /** @class */ (function (_super) { - tslib_1.__extends(Tooltip, _super); - function Tooltip() { - return _super !== null && _super.apply(this, arguments) || this; - } - Tooltip.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - return tslib_1.__assign(tslib_1.__assign({}, cfg), { name: 'tooltip', type: 'html', x: 0, y: 0, items: [], containerTpl: "
    ", itemTpl: "
  • \n \n {name}:\n {value}\n
  • ", xCrosshairTpl: "
    ", yCrosshairTpl: "
    ", title: null, showTitle: true, - /** - * tooltip 限制的区域 - * @type {Region} - */ - region: null, - // crosshair 的限制区域 - crosshairsRegion: null, - // x, y, xy - crosshairs: null, offset: 10, position: 'right', domStyles: null, defaultStyles: html_theme_1.default }); - return cfg; - }; - // tooltip 渲染时,渲染 title,items 和 corosshairs - Tooltip.prototype.render = function () { - this.resetTitle(); - this.renderItems(); - // 绘制完成后,再定位 - this.resetPosition(); - }; - // 复写清空函数,因为有模板的存在,所以默认的写法不合适 - Tooltip.prototype.clear = function () { - // 由于 crosshair 没有在 container 内,所以需要单独清理 - this.clearCrosshairs(); - this.setTitle(''); // 清空标题 - this.clearItemDoms(); - }; - // 更新属性的同时,可能会引起 DOM 的变化,这里对可能引起 DOM 变化的场景做了处理 - Tooltip.prototype.update = function (cfg) { - _super.prototype.update.call(this, cfg); - // 更新标题 - if (hasOneKey(cfg, ['title', 'showTitle'])) { - this.resetTitle(); - } - // 更新内容 - if (util_1.hasKey(cfg, 'items')) { - this.renderItems(); - } - // 更新样式 - if (util_1.hasKey(cfg, 'domStyles')) { - this.resetStyles(); - this.applyStyles(); - } - // 只要属性发生变化,都调整一些位置 - this.resetPosition(); - }; - Tooltip.prototype.show = function () { - var container = this.getContainer(); - if (!container || this.destroyed) { - // 防止容器不存在或者被销毁时报错 - return; - } - this.set('visible', true); - dom_util_1.modifyCSS(container, { - visibility: 'visible', - }); - this.setCrossHairsVisible(true); - }; - Tooltip.prototype.hide = function () { - var container = this.getContainer(); - // relative: https://github.com/antvis/g2/issues/1221 - if (!container || this.destroyed) { - return; - } - this.set('visible', false); - dom_util_1.modifyCSS(container, { - visibility: 'hidden', - }); - this.setCrossHairsVisible(false); - }; - // 实现 IPointLocation 的接口 - Tooltip.prototype.getLocation = function () { - return { x: this.get('x'), y: this.get('y') }; - }; - // 实现 IPointLocation 的接口 - Tooltip.prototype.setLocation = function (point) { - this.set('x', point.x); - this.set('y', point.y); - this.resetPosition(); - }; - Tooltip.prototype.setCrossHairsVisible = function (visible) { - var display = visible ? '' : 'none'; - var xCrosshairDom = this.get('xCrosshairDom'); - var yCrosshairDom = this.get('yCrosshairDom'); - xCrosshairDom && - dom_util_1.modifyCSS(xCrosshairDom, { - display: display, - }); - yCrosshairDom && - dom_util_1.modifyCSS(yCrosshairDom, { - display: display, - }); - }; - Tooltip.prototype.initContainer = function () { - _super.prototype.initContainer.call(this); - this.cacheDoms(); - this.resetStyles(); // 初始化样式 - this.applyStyles(); // 应用样式 - }; - // 清理 DOM - Tooltip.prototype.removeDom = function () { - _super.prototype.removeDom.call(this); - this.clearCrosshairs(); - }; - // 缓存模板设置的各种 DOM - Tooltip.prototype.cacheDoms = function () { - var container = this.getContainer(); - var titleDom = container.getElementsByClassName(CssConst.TITLE_CLASS)[0]; - var listDom = container.getElementsByClassName(CssConst.LIST_CLASS)[0]; - this.set('titleDom', titleDom); - this.set('listDom', listDom); - }; - // 调整位置 - Tooltip.prototype.resetPosition = function () { - var x = this.get('x'); - var y = this.get('y'); - var offset = this.get('offset'); - var _a = this.getOffset(), offsetX = _a.offsetX, offsetY = _a.offsetY; - var position = this.get('position'); - var region = this.get('region'); - var container = this.getContainer(); - var bbox = this.getBBox(); - var width = bbox.width, height = bbox.height; - var limitBox; - if (region) { - // 不限制位置 - limitBox = util_2.regionToBBox(region); - } - var point = align_1.getAlignPoint(x, y, offset, width, height, position, limitBox); - dom_util_1.modifyCSS(container, { - left: toPx(point.x + offsetX), - top: toPx(point.y + offsetY), - }); - this.resetCrosshairs(); - }; - // 重置 title - Tooltip.prototype.resetTitle = function () { - var title = this.get('title'); - var showTitle = this.get('showTitle'); - if (showTitle && title) { - this.setTitle(title); - } - else { - this.setTitle(''); - } - }; - // 设置 title 文本 - Tooltip.prototype.setTitle = function (text) { - var titleDom = this.get('titleDom'); - if (titleDom) { - titleDom.innerText = text; - } - }; - // 终止 crosshair - Tooltip.prototype.resetCrosshairs = function () { - var crosshairsRegion = this.get('crosshairsRegion'); - var crosshairs = this.get('crosshairs'); - if (!crosshairsRegion || !crosshairs) { - // 不显示 crosshair,都移除,没有设定 region 也都移除掉 - this.clearCrosshairs(); - } - else { - var crosshairBox = util_2.regionToBBox(crosshairsRegion); - var xCrosshairDom = this.get('xCrosshairDom'); - var yCrosshairDom = this.get('yCrosshairDom'); - if (crosshairs === 'x') { - this.resetCrosshair('x', crosshairBox); - // 仅显示 x 的 crosshair,y 移除 - if (yCrosshairDom) { - yCrosshairDom.remove(); - this.set('yCrosshairDom', null); - } - } - else if (crosshairs === 'y') { - this.resetCrosshair('y', crosshairBox); - // 仅显示 y 的 crosshair,x 移除 - if (xCrosshairDom) { - xCrosshairDom.remove(); - this.set('xCrosshairDom', null); - } - } - else { - this.resetCrosshair('x', crosshairBox); - this.resetCrosshair('y', crosshairBox); - } - this.setCrossHairsVisible(this.get('visible')); - } - }; - // 设定 crosshair 的位置,需要区分 x,y - Tooltip.prototype.resetCrosshair = function (name, bbox) { - var croshairDom = this.checkCrosshair(name); - var value = this.get(name); - if (name === 'x') { - dom_util_1.modifyCSS(croshairDom, { - left: toPx(value), - top: toPx(bbox.y), - height: toPx(bbox.height), - }); - } - else { - dom_util_1.modifyCSS(croshairDom, { - top: toPx(value), - left: toPx(bbox.x), - width: toPx(bbox.width), - }); - } - }; - // 如果 crosshair 对应的 dom 不存在,则创建 - Tooltip.prototype.checkCrosshair = function (name) { - var domName = name + "CrosshairDom"; - var tplName = name + "CrosshairTpl"; - var constName = "CROSSHAIR_" + name.toUpperCase(); - var styleName = CssConst[constName]; - var croshairDom = this.get(domName); - var parent = this.get('parent'); - if (!croshairDom) { - croshairDom = dom_util_1.createDom(this.get(tplName)); // 创建 - this.applyStyle(styleName, croshairDom); // 设置初始样式 - parent.appendChild(croshairDom); // 添加到跟 tooltip 同级的目录下 - this.set(domName, croshairDom); - } - return croshairDom; - }; - // 样式需要进行合并,不能单纯的替换,否则使用非常不方便 - Tooltip.prototype.resetStyles = function () { - var style = this.get('domStyles'); - var defaultStyles = this.get('defaultStyles'); - if (!style) { - style = defaultStyles; - } - else { - style = util_1.deepMix({}, defaultStyles, style); - } - this.set('domStyles', style); - }; - // 应用所有的样式 - Tooltip.prototype.applyStyles = function () { - var domStyles = this.get('domStyles'); - var container = this.getContainer(); - this.applyChildrenStyles(container, domStyles); - if (util_2.hasClass(container, CssConst.CONTAINER_CLASS)) { - var containerCss = domStyles[CssConst.CONTAINER_CLASS]; - dom_util_1.modifyCSS(container, containerCss); - } - }; - Tooltip.prototype.applyChildrenStyles = function (element, styles) { - util_1.each(styles, function (style, name) { - var elements = element.getElementsByClassName(name); - util_1.each(elements, function (el) { - dom_util_1.modifyCSS(el, style); - }); - }); - }; - // 应用到单个 DOM - Tooltip.prototype.applyStyle = function (cssName, dom) { - var domStyles = this.get('domStyles'); - dom_util_1.modifyCSS(dom, domStyles[cssName]); - }; - Tooltip.prototype.renderItems = function () { - this.clearItemDoms(); - var items = this.get('items'); - var itemTpl = this.get('itemTpl'); - var listDom = this.get('listDom'); - util_1.each(items, function (item) { - var color = color_util_1.default.toCSSGradient(item.color); - var substituteObj = tslib_1.__assign(tslib_1.__assign({}, item), { color: color }); - var domStr = util_1.substitute(itemTpl, substituteObj); - var itemDom = dom_util_1.createDom(domStr); - listDom.appendChild(itemDom); - }); - this.applyChildrenStyles(listDom, this.get('domStyles')); - }; - Tooltip.prototype.clearItemDoms = function () { - util_2.clearDom(this.get('listDom')); - }; - Tooltip.prototype.clearCrosshairs = function () { - var xCrosshairDom = this.get('xCrosshairDom'); - var yCrosshairDom = this.get('yCrosshairDom'); - xCrosshairDom && xCrosshairDom.remove(); - yCrosshairDom && yCrosshairDom.remove(); - this.set('xCrosshairDom', null); - this.set('yCrosshairDom', null); - }; - return Tooltip; -}(html_component_1.default)); -exports.default = Tooltip; -//# sourceMappingURL=html.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/lib/util/align.js": -/*!********************************************************!*\ - !*** ./node_modules/@antv/component/lib/util/align.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -// 检测各边是否超出 -function getOutSides(x, y, width, height, limitBox) { - var hits = { - left: x < limitBox.x, - right: x + width > limitBox.x + limitBox.width, - top: y < limitBox.y, - bottom: y + height > limitBox.y + limitBox.height, - }; - return hits; -} -exports.getOutSides = getOutSides; -function getPointByPosition(x, y, offset, width, height, position) { - var px = x; - var py = y; - switch (position) { - case 'left': // left center - px = x - width - offset; - py = y - height / 2; - break; - case 'right': - px = x + offset; - py = y - height / 2; - break; - case 'top': - px = x - width / 2; - py = y - height - offset; - break; - case 'bottom': - // bottom - px = x - width / 2; - py = y + offset; - break; - default: - // auto, 在 top-right - px = x + offset; - py = y - height - offset; - break; - } - return { - x: px, - y: py, - }; -} -exports.getPointByPosition = getPointByPosition; -function getAlignPoint(x, y, offset, width, height, position, limitBox) { - var point = getPointByPosition(x, y, offset, width, height, position); - if (limitBox) { - var outSides = getOutSides(point.x, point.y, width, height, limitBox); - if (position === 'auto') { // 如果是 auto,默认 tooltip 在右上角,仅需要判定右侧和上测冲突即可 - if (outSides.right) { - point.x = x - width - offset; - } - if (outSides.top) { - point.y = y + offset; - } - } - else if (position === 'top' || position === 'bottom') { - if (outSides.left) { - // 左侧躲避 - point.x = limitBox.x; - } - if (outSides.right) { - // 右侧躲避 - point.x = limitBox.x + limitBox.width - width; - } - if (position === 'top' && outSides.top) { - // 如果上面对齐检测上面,不检测下面 - point.y = y + offset; - } - if (position === 'bottom' && outSides.bottom) { - point.y = y - height - offset; - } - } - else { - // 检测左右位置 - if (outSides.top) { - point.y = limitBox.y; - } - if (outSides.bottom) { - point.y = limitBox.y + limitBox.height - height; - } - if (position === 'left' && outSides.left) { - point.x = x + offset; - } - if (position === 'right' && outSides.right) { - point.x = x - width - offset; - } - } - } - return point; -} -exports.getAlignPoint = getAlignPoint; -//# sourceMappingURL=align.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/lib/util/theme.js": -/*!********************************************************!*\ - !*** ./node_modules/@antv/component/lib/util/theme.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = { - fontFamily: "\n \"-apple-system\", BlinkMacSystemFont, \"Segoe UI\", Roboto,\"Helvetica Neue\",\n Helvetica, \"PingFang SC\", \"Hiragino Sans GB\", \"Microsoft YaHei\",\n SimSun, \"sans-serif\"", - textColor: '#2C3542', - activeTextColor: '#333333', - uncheckedColor: '#D8D8D8', - lineColor: '#416180', - regionColor: '#CCD7EB', - verticalAxisRotate: -Math.PI / 4, - horizontalAxisRotate: Math.PI / 4, -}; -//# sourceMappingURL=theme.js.map - -/***/ }), - -/***/ "./node_modules/@antv/component/lib/util/util.js": -/*!*******************************************************!*\ - !*** ./node_modules/@antv/component/lib/util/util.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var util_1 = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -function formatPadding(padding) { - var top = 0; - var left = 0; - var right = 0; - var bottom = 0; - if (util_1.isNumber(padding)) { - top = left = right = bottom = padding; - } - else if (util_1.isArray(padding)) { - top = padding[0]; - right = !util_1.isNil(padding[1]) ? padding[1] : padding[0]; - bottom = !util_1.isNil(padding[2]) ? padding[2] : padding[0]; - left = !util_1.isNil(padding[3]) ? padding[3] : right; - } - return [top, right, bottom, left]; -} -exports.formatPadding = formatPadding; -function clearDom(container) { - var children = container.childNodes; - var length = children.length; - for (var i = length - 1; i >= 0; i--) { - container.removeChild(children[i]); - } -} -exports.clearDom = clearDom; -function hasClass(elements, cName) { - return !!elements.className.match(new RegExp("(\\s|^)" + cName + "(\\s|$)")); -} -exports.hasClass = hasClass; -function regionToBBox(region) { - var start = region.start, end = region.end; - var minX = Math.min(start.x, end.x); - var minY = Math.min(start.y, end.y); - var maxX = Math.max(start.x, end.x); - var maxY = Math.max(start.y, end.y); - return { - x: minX, - y: minY, - minX: minX, - minY: minY, - maxX: maxX, - maxY: maxY, - width: maxX - minX, - height: maxY - minY, - }; -} -exports.regionToBBox = regionToBBox; -function pointsToBBox(points) { - var xs = points.map(function (point) { return point.x; }); - var ys = points.map(function (point) { return point.y; }); - var minX = Math.min.apply(Math, xs); - var minY = Math.min.apply(Math, ys); - var maxX = Math.max.apply(Math, xs); - var maxY = Math.max.apply(Math, ys); - return { - x: minX, - y: minY, - minX: minX, - minY: minY, - maxX: maxX, - maxY: maxY, - width: maxX - minX, - height: maxY - minY, - }; -} -exports.pointsToBBox = pointsToBBox; -function createBBox(x, y, width, height) { - return { - x: x, - y: y, - width: width, - height: height, - minX: x, - minY: y, - maxX: x + width, - maxY: y + height, - }; -} -exports.createBBox = createBBox; -function getValueByPercent(min, max, percent) { - return (1 - percent) * min + max * percent; -} -exports.getValueByPercent = getValueByPercent; -function getCirclePoint(center, radius, angle) { - return { - x: center.x + Math.cos(angle) * radius, - y: center.y + Math.sin(angle) * radius, - }; -} -exports.getCirclePoint = getCirclePoint; -function distance(p1, p2) { - var dx = p2.x - p1.x; - var dy = p2.y - p1.y; - return Math.sqrt(dx * dx + dy * dy); -} -exports.distance = distance; -exports.wait = function (interval) { - return new Promise(function (resolve) { - setTimeout(resolve, interval); - }); -}; -exports.near = function (x, y) { - return [x, y].includes(Infinity) ? Math.abs(x) === Math.abs(y) : Math.abs(x - y) < Math.pow(Number.EPSILON, 0.5); -}; -function intersectBBox(box1, box2) { - var minX = Math.max(box1.minX, box2.minX); - var minY = Math.max(box1.minY, box2.minY); - var maxX = Math.min(box1.maxX, box2.maxX); - var maxY = Math.min(box1.maxY, box2.maxY); - return createBBox(minX, minY, maxX - minX, maxY - minY); -} -exports.intersectBBox = intersectBBox; -function mergeBBox(box1, box2) { - var minX = Math.min(box1.minX, box2.minX); - var minY = Math.min(box1.minY, box2.minY); - var maxX = Math.max(box1.maxX, box2.maxX); - var maxY = Math.max(box1.maxY, box2.maxY); - return createBBox(minX, minY, maxX - minX, maxY - minY); -} -exports.mergeBBox = mergeBBox; -function getBBoxWithClip(element) { - var clipShape = element.getClip(); - var clipBBox = clipShape && clipShape.getBBox(); - var bbox; - if (!element.isGroup()) { // 如果是普通的图形 - bbox = element.getBBox(); - } - else { - var minX_1 = Infinity; - var maxX_1 = -Infinity; - var minY_1 = Infinity; - var maxY_1 = -Infinity; - var children = element.getChildren(); - if (children.length > 0) { - util_1.each(children, function (child) { - if (child.get('visible')) { - // 如果分组没有子元素,则直接跳过 - if (child.isGroup() && child.get('children').length === 0) { - return true; - } - var box = getBBoxWithClip(child); - // 计算 4 个顶点 - var leftTop = child.applyToMatrix([box.minX, box.minY, 1]); - var leftBottom = child.applyToMatrix([box.minX, box.maxY, 1]); - var rightTop = child.applyToMatrix([box.maxX, box.minY, 1]); - var rightBottom = child.applyToMatrix([box.maxX, box.maxY, 1]); - // 从中取最小的范围 - var boxMinX = Math.min(leftTop[0], leftBottom[0], rightTop[0], rightBottom[0]); - var boxMaxX = Math.max(leftTop[0], leftBottom[0], rightTop[0], rightBottom[0]); - var boxMinY = Math.min(leftTop[1], leftBottom[1], rightTop[1], rightBottom[1]); - var boxMaxY = Math.max(leftTop[1], leftBottom[1], rightTop[1], rightBottom[1]); - if (boxMinX < minX_1) { - minX_1 = boxMinX; - } - if (boxMaxX > maxX_1) { - maxX_1 = boxMaxX; - } - if (boxMinY < minY_1) { - minY_1 = boxMinY; - } - if (boxMaxY > maxY_1) { - maxY_1 = boxMaxY; - } - } - }); - } - else { - minX_1 = 0; - maxX_1 = 0; - minY_1 = 0; - maxY_1 = 0; - } - bbox = createBBox(minX_1, minY_1, maxX_1 - minX_1, maxY_1 - minY_1); - } - if (clipBBox) { - return intersectBBox(bbox, clipBBox); - } - else { - return bbox; - } -} -exports.getBBoxWithClip = getBBoxWithClip; -function updateClip(element, newElement) { - if (!element.getClip() && !newElement.getClip()) { // 两者都没有 clip - return; - } - var newClipShape = newElement.getClip(); - if (!newClipShape) { // 新的 element 没有 clip - element.setClip(null); // 移除 clip - return; - } - var clipCfg = { - type: newClipShape.get('type'), - attrs: newClipShape.attr() - }; - element.setClip(clipCfg); -} -exports.updateClip = updateClip; -//# sourceMappingURL=util.js.map - -/***/ }), - -/***/ "./node_modules/@antv/coord/esm/coord/base.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/coord/esm/coord/base.js ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/matrix-util */ "./node_modules/@antv/matrix-util/esm/index.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - - - -/** - * Coordinate Base Class - */ -var Coordinate = /** @class */ (function () { - function Coordinate(cfg) { - // 自身属性 - this.type = 'coordinate'; - this.isRect = false; - this.isHelix = false; - this.isPolar = false; - this.isReflectX = false; - this.isReflectY = false; - var start = cfg.start, end = cfg.end, _a = cfg.matrix, matrix = _a === void 0 ? [1, 0, 0, 0, 1, 0, 0, 0, 1] : _a, _b = cfg.isTransposed, isTransposed = _b === void 0 ? false : _b; - this.start = start; - this.end = end; - this.matrix = matrix; - this.originalMatrix = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArrays"])(matrix); // 去除引用 - this.isTransposed = isTransposed; - } - /** - * 初始化流程 - */ - Coordinate.prototype.initial = function () { - // center、width、height - this.center = { - x: (this.start.x + this.end.x) / 2, - y: (this.start.y + this.end.y) / 2, - }; - this.width = Math.abs(this.end.x - this.start.x); - this.height = Math.abs(this.end.y - this.start.y); - }; - /** - * 更新配置 - * @param cfg - */ - Coordinate.prototype.update = function (cfg) { - _antv_util__WEBPACK_IMPORTED_MODULE_2__["assign"](this, cfg); - this.initial(); - }; - Coordinate.prototype.convertDim = function (percent, dim) { - var _a; - var _b = this[dim], start = _b.start, end = _b.end; - // 交换 - if (this.isReflect(dim)) { - _a = [end, start], start = _a[0], end = _a[1]; - } - return start + percent * (end - start); - }; - Coordinate.prototype.invertDim = function (value, dim) { - var _a; - var _b = this[dim], start = _b.start, end = _b.end; - // 交换 - if (this.isReflect(dim)) { - _a = [end, start], start = _a[0], end = _a[1]; - } - return (value - start) / (end - start); - }; - /** - * 将坐标点进行矩阵变换 - * @param x 对应 x 轴画布坐标 - * @param y 对应 y 轴画布坐标 - * @param tag 默认为 0,可取值 0, 1 - * @return 返回变换后的三阶向量 [x, y, z] - */ - Coordinate.prototype.applyMatrix = function (x, y, tag) { - if (tag === void 0) { tag = 0; } - var matrix = this.matrix; - var vector = [x, y, tag]; - _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["vec3"].transformMat3(vector, vector, matrix); - return vector; - }; - /** - * 将坐标点进行矩阵逆变换 - * @param x 对应 x 轴画布坐标 - * @param y 对应 y 轴画布坐标 - * @param tag 默认为 0,可取值 0, 1 - * @return 返回矩阵逆变换后的三阶向量 [x, y, z] - */ - Coordinate.prototype.invertMatrix = function (x, y, tag) { - if (tag === void 0) { tag = 0; } - var matrix = this.matrix; - var inverted = _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["mat3"].invert([], matrix); - var vector = [x, y, tag]; - _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["vec3"].transformMat3(vector, vector, inverted); - return vector; - }; - /** - * 将归一化的坐标点数据转换为画布坐标,并根据坐标系当前矩阵进行变换 - * @param point 归一化的坐标点 - * @return 返回进行矩阵变换后的画布坐标 - */ - Coordinate.prototype.convert = function (point) { - var _a = this.convertPoint(point), x = _a.x, y = _a.y; - var vector = this.applyMatrix(x, y, 1); - return { - x: vector[0], - y: vector[1], - }; - }; - /** - * 将进行过矩阵变换画布坐标转换为归一化坐标 - * @param point 画布坐标 - * @return 返回归一化的坐标点 - */ - Coordinate.prototype.invert = function (point) { - var vector = this.invertMatrix(point.x, point.y, 1); - return this.invertPoint({ - x: vector[0], - y: vector[1], - }); - }; - /** - * 坐标系旋转变换 - * @param radian 旋转弧度 - * @return 返回坐标系对象 - */ - Coordinate.prototype.rotate = function (radian) { - var matrix = this.matrix; - var center = this.center; - _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["mat3"].translate(matrix, matrix, [-center.x, -center.y]); - _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["mat3"].rotate(matrix, matrix, radian); - _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["mat3"].translate(matrix, matrix, [center.x, center.y]); - return this; - }; - /** - * 坐标系反射变换 - * @param dim 反射维度 - * @return 返回坐标系对象 - */ - Coordinate.prototype.reflect = function (dim) { - if (dim === 'x') { - this.isReflectX = !this.isReflectX; - } - else { - this.isReflectY = !this.isReflectY; - } - return this; - }; - /** - * 坐标系比例变换 - * @param s1 x 方向缩放比例 - * @param s2 y 方向缩放比例 - * @return 返回坐标系对象 - */ - Coordinate.prototype.scale = function (s1, s2) { - var matrix = this.matrix; - var center = this.center; - _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["mat3"].translate(matrix, matrix, [-center.x, -center.y]); - _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["mat3"].scale(matrix, matrix, [s1, s2]); - _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["mat3"].translate(matrix, matrix, [center.x, center.y]); - return this; - }; - /** - * 坐标系平移变换 - * @param x x 方向平移像素 - * @param y y 方向平移像素 - * @return 返回坐标系对象 - */ - Coordinate.prototype.translate = function (x, y) { - var matrix = this.matrix; - _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["mat3"].translate(matrix, matrix, [x, y]); - return this; - }; - /** - * 将坐标系 x y 两个轴进行转置 - * @return 返回坐标系对象 - */ - Coordinate.prototype.transpose = function () { - this.isTransposed = !this.isTransposed; - return this; - }; - Coordinate.prototype.getCenter = function () { - return this.center; - }; - Coordinate.prototype.getWidth = function () { - return this.width; - }; - Coordinate.prototype.getHeight = function () { - return this.height; - }; - Coordinate.prototype.getRadius = function () { - return this.radius; - }; - /** - * whether has reflect - * @param dim - */ - Coordinate.prototype.isReflect = function (dim) { - return dim === 'x' ? this.isReflectX : this.isReflectY; - }; - /** - * 重置 matrix - * @param matrix 如果传入,则使用,否则使用构造函数中传入的默认 matrix - */ - Coordinate.prototype.resetMatrix = function (matrix) { - // 去除引用关系 - this.matrix = matrix ? matrix : Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArrays"])(this.originalMatrix); - }; - return Coordinate; -}()); -/* harmony default export */ __webpack_exports__["default"] = (Coordinate); -//# sourceMappingURL=base.js.map - -/***/ }), - -/***/ "./node_modules/@antv/coord/esm/coord/cartesian.js": -/*!*********************************************************!*\ - !*** ./node_modules/@antv/coord/esm/coord/cartesian.js ***! - \*********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/coord/esm/coord/base.js"); - - -/** - * 笛卡尔坐标系 - * https://www.zhihu.com/question/20665303 - */ -var Cartesian = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Cartesian, _super); - function Cartesian(cfg) { - var _this = _super.call(this, cfg) || this; - _this.isRect = true; - _this.type = 'cartesian'; - _this.initial(); - return _this; - } - Cartesian.prototype.initial = function () { - _super.prototype.initial.call(this); - var start = this.start; - var end = this.end; - this.x = { - start: start.x, - end: end.x, - }; - this.y = { - start: start.y, - end: end.y, - }; - }; - Cartesian.prototype.convertPoint = function (point) { - var _a; - var x = point.x, y = point.y; - // 交换 - if (this.isTransposed) { - _a = [y, x], x = _a[0], y = _a[1]; - } - return { - x: this.convertDim(x, 'x'), - y: this.convertDim(y, 'y'), - }; - }; - Cartesian.prototype.invertPoint = function (point) { - var _a; - var x = this.invertDim(point.x, 'x'); - var y = this.invertDim(point.y, 'y'); - if (this.isTransposed) { - _a = [y, x], x = _a[0], y = _a[1]; - } - return { x: x, y: y }; - }; - return Cartesian; -}(_base__WEBPACK_IMPORTED_MODULE_1__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Cartesian); -//# sourceMappingURL=cartesian.js.map - -/***/ }), - -/***/ "./node_modules/@antv/coord/esm/coord/helix.js": -/*!*****************************************************!*\ - !*** ./node_modules/@antv/coord/esm/coord/helix.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/matrix-util */ "./node_modules/@antv/matrix-util/esm/index.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/coord/esm/coord/base.js"); - - - - -/** - * 螺旋坐标系 - */ -var Helix = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Helix, _super); - function Helix(cfg) { - var _this = _super.call(this, cfg) || this; - _this.isHelix = true; - _this.type = 'helix'; - var _a = cfg.startAngle, startAngle = _a === void 0 ? 1.25 * Math.PI : _a, _b = cfg.endAngle, endAngle = _b === void 0 ? 7.25 * Math.PI : _b, _c = cfg.innerRadius, innerRadius = _c === void 0 ? 0 : _c, radius = cfg.radius; - _this.startAngle = startAngle; - _this.endAngle = endAngle; - _this.innerRadius = innerRadius; - _this.radius = radius; - _this.initial(); - return _this; - } - Helix.prototype.initial = function () { - _super.prototype.initial.call(this); - var index = (this.endAngle - this.startAngle) / (2 * Math.PI) + 1; // 螺线圈数 - var maxRadius = Math.min(this.width, this.height) / 2; - if (this.radius && this.radius >= 0 && this.radius <= 1) { - maxRadius = maxRadius * this.radius; - } - this.d = Math.floor((maxRadius * (1 - this.innerRadius)) / index); - this.a = this.d / (Math.PI * 2); // 螺线系数 - this.x = { - start: this.startAngle, - end: this.endAngle, - }; - this.y = { - start: this.innerRadius * maxRadius, - end: this.innerRadius * maxRadius + this.d * 0.99, - }; - }; - /** - * 将百分比数据变成屏幕坐标 - * @param point 归一化的点坐标 - * @return 返回对应的屏幕坐标 - */ - Helix.prototype.convertPoint = function (point) { - var _a; - var x = point.x, y = point.y; - if (this.isTransposed) { - _a = [y, x], x = _a[0], y = _a[1]; - } - var thi = this.convertDim(x, 'x'); - var r = this.a * thi; - var newY = this.convertDim(y, 'y'); - return { - x: this.center.x + Math.cos(thi) * (r + newY), - y: this.center.y + Math.sin(thi) * (r + newY), - }; - }; - /** - * 将屏幕坐标点还原成百分比数据 - * @param point 屏幕坐标 - * @return 返回对应的归一化后的数据 - */ - Helix.prototype.invertPoint = function (point) { - var _a; - var d = this.d + this.y.start; - var v = _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["vec2"].subtract([], [point.x, point.y], [this.center.x, this.center.y]); - var thi = _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["vec2"].angleTo(v, [1, 0], true); - var rMin = thi * this.a; // 坐标与原点的连线在第一圈上的交点,最小r值 - if (_antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["vec2"].length(v) < rMin) { - // 坐标与原点的连线不可能小于最小r值,但不排除因小数计算产生的略小于rMin的情况 - rMin = _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["vec2"].length(v); - } - var index = Math.floor((_antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["vec2"].length(v) - rMin) / d); // 当前点位于第index圈 - thi = 2 * index * Math.PI + thi; - var r = this.a * thi; - var newY = _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["vec2"].length(v) - r; - newY = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isNumberEqual"])(newY, 0) ? 0 : newY; - var x = this.invertDim(thi, 'x'); - var y = this.invertDim(newY, 'y'); - x = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isNumberEqual"])(x, 0) ? 0 : x; - y = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isNumberEqual"])(y, 0) ? 0 : y; - if (this.isTransposed) { - _a = [y, x], x = _a[0], y = _a[1]; - } - return { x: x, y: y }; - }; - return Helix; -}(_base__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Helix); -//# sourceMappingURL=helix.js.map - -/***/ }), - -/***/ "./node_modules/@antv/coord/esm/coord/polar.js": -/*!*****************************************************!*\ - !*** ./node_modules/@antv/coord/esm/coord/polar.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/matrix-util */ "./node_modules/@antv/matrix-util/esm/index.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/coord/esm/coord/base.js"); - - - - -var Polar = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Polar, _super); - function Polar(cfg) { - var _this = _super.call(this, cfg) || this; - _this.isPolar = true; - _this.type = 'polar'; - var _a = cfg.startAngle, startAngle = _a === void 0 ? -Math.PI / 2 : _a, _b = cfg.endAngle, endAngle = _b === void 0 ? (Math.PI * 3) / 2 : _b, _c = cfg.innerRadius, innerRadius = _c === void 0 ? 0 : _c, radius = cfg.radius; - _this.startAngle = startAngle; - _this.endAngle = endAngle; - _this.innerRadius = innerRadius; - _this.radius = radius; - _this.initial(); - return _this; - } - Polar.prototype.initial = function () { - _super.prototype.initial.call(this); - while (this.endAngle < this.startAngle) { - this.endAngle += Math.PI * 2; - } - var oneBox = this.getOneBox(); - var oneWidth = oneBox.maxX - oneBox.minX; - var oneHeight = oneBox.maxY - oneBox.minY; - var left = Math.abs(oneBox.minX) / oneWidth; - var top = Math.abs(oneBox.minY) / oneHeight; - var maxRadius; - if (this.height / oneHeight > this.width / oneWidth) { - // width 为主 - maxRadius = this.width / oneWidth; - this.circleCenter = { - x: this.center.x - (0.5 - left) * this.width, - y: this.center.y - (0.5 - top) * maxRadius * oneHeight, - }; - } - else { - // height 为主 - maxRadius = this.height / oneHeight; - this.circleCenter = { - x: this.center.x - (0.5 - left) * maxRadius * oneWidth, - y: this.center.y - (0.5 - top) * this.height, - }; - } - this.polarRadius = this.radius; - if (!this.radius) { - this.polarRadius = maxRadius; - } - else if (this.radius > 0 && this.radius <= 1) { - this.polarRadius = maxRadius * this.radius; - } - else if (this.radius <= 0 || this.radius > maxRadius) { - this.polarRadius = maxRadius; - } - this.x = { - start: this.startAngle, - end: this.endAngle, - }; - this.y = { - start: this.innerRadius * this.polarRadius, - end: this.polarRadius, - }; - }; - Polar.prototype.getRadius = function () { - return this.polarRadius; - }; - Polar.prototype.convertPoint = function (point) { - var _a; - var center = this.getCenter(); - var x = point.x, y = point.y; - if (this.isTransposed) { - _a = [y, x], x = _a[0], y = _a[1]; - } - x = this.convertDim(x, 'x'); - y = this.convertDim(y, 'y'); - return { - x: center.x + Math.cos(x) * y, - y: center.y + Math.sin(x) * y, - }; - }; - Polar.prototype.invertPoint = function (point) { - var center = this.getCenter(); - var vPoint = [point.x - center.x, point.y - center.y]; - var m = [1, 0, 0, 0, 1, 0, 0, 0, 1]; - _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["mat3"].rotate(m, m, this.startAngle); - var vStart = [1, 0, 0]; - _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["vec3"].transformMat3(vStart, vStart, m); - vStart = [vStart[0], vStart[1]]; - var angle = _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["vec2"].angleTo(vStart, vPoint, this.endAngle < this.startAngle); - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isNumberEqual"])(angle, Math.PI * 2)) { - angle = 0; - } - var radius = _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["vec2"].length(vPoint); - var xPercent = angle / (this.endAngle - this.startAngle); - xPercent = this.endAngle - this.startAngle > 0 ? xPercent : -xPercent; - var yPercent = this.invertDim(radius, 'y'); - var rst = { x: 0, y: 0 }; - rst.x = this.isTransposed ? yPercent : xPercent; - rst.y = this.isTransposed ? xPercent : yPercent; - return rst; - }; - Polar.prototype.getCenter = function () { - return this.circleCenter; - }; - Polar.prototype.getOneBox = function () { - var startAngle = this.startAngle; - var endAngle = this.endAngle; - if (Math.abs(endAngle - startAngle) >= Math.PI * 2) { - return { - minX: -1, - maxX: 1, - minY: -1, - maxY: 1, - }; - } - var xs = [0, Math.cos(startAngle), Math.cos(endAngle)]; - var ys = [0, Math.sin(startAngle), Math.sin(endAngle)]; - for (var i = Math.min(startAngle, endAngle); i < Math.max(startAngle, endAngle); i += Math.PI / 18) { - xs.push(Math.cos(i)); - ys.push(Math.sin(i)); - } - return { - minX: Math.min.apply(Math, xs), - maxX: Math.max.apply(Math, xs), - minY: Math.min.apply(Math, ys), - maxY: Math.max.apply(Math, ys), - }; - }; - return Polar; -}(_base__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Polar); -//# sourceMappingURL=polar.js.map - -/***/ }), - -/***/ "./node_modules/@antv/coord/esm/factory.js": -/*!*************************************************!*\ - !*** ./node_modules/@antv/coord/esm/factory.js ***! - \*************************************************/ -/*! exports provided: getCoordinate, registerCoordinate */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCoordinate", function() { return getCoordinate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerCoordinate", function() { return registerCoordinate; }); -// 所有的 Coordinate map -var COORDINATE_MAP = {}; -/** - * 通过类型获得 coordinate 类 - * @param type - */ -var getCoordinate = function (type) { - return COORDINATE_MAP[type.toLowerCase()]; -}; -/** - * 注册 coordinate 类 - * @param type - * @param ctor - */ -var registerCoordinate = function (type, ctor) { - // 存储到 map 中 - COORDINATE_MAP[type.toLowerCase()] = ctor; -}; -//# sourceMappingURL=factory.js.map - -/***/ }), - -/***/ "./node_modules/@antv/coord/esm/index.js": -/*!***********************************************!*\ - !*** ./node_modules/@antv/coord/esm/index.js ***! - \***********************************************/ -/*! exports provided: getCoordinate, registerCoordinate, Coordinate */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _coord_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./coord/base */ "./node_modules/@antv/coord/esm/coord/base.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Coordinate", function() { return _coord_base__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _coord_cartesian__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./coord/cartesian */ "./node_modules/@antv/coord/esm/coord/cartesian.js"); -/* harmony import */ var _coord_helix__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./coord/helix */ "./node_modules/@antv/coord/esm/coord/helix.js"); -/* harmony import */ var _coord_polar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./coord/polar */ "./node_modules/@antv/coord/esm/coord/polar.js"); -/* harmony import */ var _factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./factory */ "./node_modules/@antv/coord/esm/factory.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getCoordinate", function() { return _factory__WEBPACK_IMPORTED_MODULE_4__["getCoordinate"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "registerCoordinate", function() { return _factory__WEBPACK_IMPORTED_MODULE_4__["registerCoordinate"]; }); - - - - - - -Object(_factory__WEBPACK_IMPORTED_MODULE_4__["registerCoordinate"])('rect', _coord_cartesian__WEBPACK_IMPORTED_MODULE_1__["default"]); -Object(_factory__WEBPACK_IMPORTED_MODULE_4__["registerCoordinate"])('cartesian', _coord_cartesian__WEBPACK_IMPORTED_MODULE_1__["default"]); -Object(_factory__WEBPACK_IMPORTED_MODULE_4__["registerCoordinate"])('polar', _coord_polar__WEBPACK_IMPORTED_MODULE_3__["default"]); -Object(_factory__WEBPACK_IMPORTED_MODULE_4__["registerCoordinate"])('helix', _coord_helix__WEBPACK_IMPORTED_MODULE_2__["default"]); - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/dom-util/esm/add-event-listener.js": -/*!***************************************************************!*\ - !*** ./node_modules/@antv/dom-util/esm/add-event-listener.js ***! - \***************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addEventListener; }); -function addEventListener(target, eventType, callback) { - if (target) { - if (typeof target.addEventListener === 'function') { - target.addEventListener(eventType, callback, false); - return { - remove: function () { - target.removeEventListener(eventType, callback, false); - }, - }; - // @ts-ignore - } - if (typeof target.attachEvent === 'function') { - // @ts-ignore - target.attachEvent('on' + eventType, callback); - return { - remove: function () { - // @ts-ignore - target.detachEvent('on' + eventType, callback); - }, - }; - } - } -} -//# sourceMappingURL=add-event-listener.js.map - -/***/ }), - -/***/ "./node_modules/@antv/dom-util/esm/create-dom.js": -/*!*******************************************************!*\ - !*** ./node_modules/@antv/dom-util/esm/create-dom.js ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createDom; }); -/** - * 创建DOM 节点 - * @param {String} str Dom 字符串 - * @return {HTMLElement} DOM 节点 - */ -var TABLE; -var TABLE_TR; -var FRAGMENT_REG; -var CONTAINERS; -function initConstants() { - TABLE = document.createElement('table'); - TABLE_TR = document.createElement('tr'); - FRAGMENT_REG = /^\s*<(\w+|!)[^>]*>/; - CONTAINERS = { - tr: document.createElement('tbody'), - tbody: TABLE, - thead: TABLE, - tfoot: TABLE, - td: TABLE_TR, - th: TABLE_TR, - '*': document.createElement('div'), - }; -} -function createDom(str) { - if (!TABLE) { - initConstants(); - } - var name = FRAGMENT_REG.test(str) && RegExp.$1; - if (!name || !(name in CONTAINERS)) { - name = '*'; - } - var container = CONTAINERS[name]; - str = str.replace(/(^\s*)|(\s*$)/g, ''); - container.innerHTML = '' + str; - var dom = container.childNodes[0]; - container.removeChild(dom); - return dom; -} -//# sourceMappingURL=create-dom.js.map - -/***/ }), - -/***/ "./node_modules/@antv/dom-util/esm/get-height.js": -/*!*******************************************************!*\ - !*** ./node_modules/@antv/dom-util/esm/get-height.js ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getHeight; }); -/* harmony import */ var _get_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./get-style */ "./node_modules/@antv/dom-util/esm/get-style.js"); - -function getHeight(el, defaultValue) { - var height = Object(_get_style__WEBPACK_IMPORTED_MODULE_0__["default"])(el, 'height', defaultValue); - if (height === 'auto') { - height = el.offsetHeight; - } - return parseFloat(height); -} -//# sourceMappingURL=get-height.js.map - -/***/ }), - -/***/ "./node_modules/@antv/dom-util/esm/get-outer-height.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/dom-util/esm/get-outer-height.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getOuterHeight; }); -/* harmony import */ var _get_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./get-style */ "./node_modules/@antv/dom-util/esm/get-style.js"); -/* harmony import */ var _get_height__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./get-height */ "./node_modules/@antv/dom-util/esm/get-height.js"); - - -function getOuterHeight(el, defaultValue) { - var height = Object(_get_height__WEBPACK_IMPORTED_MODULE_1__["default"])(el, defaultValue); - var bTop = parseFloat(Object(_get_style__WEBPACK_IMPORTED_MODULE_0__["default"])(el, 'borderTopWidth')) || 0; - var pTop = parseFloat(Object(_get_style__WEBPACK_IMPORTED_MODULE_0__["default"])(el, 'paddingTop')) || 0; - var pBottom = parseFloat(Object(_get_style__WEBPACK_IMPORTED_MODULE_0__["default"])(el, 'paddingBottom')) || 0; - var bBottom = parseFloat(Object(_get_style__WEBPACK_IMPORTED_MODULE_0__["default"])(el, 'borderBottomWidth')) || 0; - var mTop = parseFloat(Object(_get_style__WEBPACK_IMPORTED_MODULE_0__["default"])(el, 'marginTop')) || 0; - var mBottom = parseFloat(Object(_get_style__WEBPACK_IMPORTED_MODULE_0__["default"])(el, 'marginBottom')) || 0; - return height + bTop + bBottom + pTop + pBottom + mTop + mBottom; -} -//# sourceMappingURL=get-outer-height.js.map - -/***/ }), - -/***/ "./node_modules/@antv/dom-util/esm/get-outer-width.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/dom-util/esm/get-outer-width.js ***! - \************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getOuterWidth; }); -/* harmony import */ var _get_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./get-style */ "./node_modules/@antv/dom-util/esm/get-style.js"); -/* harmony import */ var _get_width__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./get-width */ "./node_modules/@antv/dom-util/esm/get-width.js"); - - -function getOuterWidth(el, defaultValue) { - var width = Object(_get_width__WEBPACK_IMPORTED_MODULE_1__["default"])(el, defaultValue); - var bLeft = parseFloat(Object(_get_style__WEBPACK_IMPORTED_MODULE_0__["default"])(el, 'borderLeftWidth')) || 0; - var pLeft = parseFloat(Object(_get_style__WEBPACK_IMPORTED_MODULE_0__["default"])(el, 'paddingLeft')) || 0; - var pRight = parseFloat(Object(_get_style__WEBPACK_IMPORTED_MODULE_0__["default"])(el, 'paddingRight')) || 0; - var bRight = parseFloat(Object(_get_style__WEBPACK_IMPORTED_MODULE_0__["default"])(el, 'borderRightWidth')) || 0; - var mRight = parseFloat(Object(_get_style__WEBPACK_IMPORTED_MODULE_0__["default"])(el, 'marginRight')) || 0; - var mLeft = parseFloat(Object(_get_style__WEBPACK_IMPORTED_MODULE_0__["default"])(el, 'marginLeft')) || 0; - return width + bLeft + bRight + pLeft + pRight + mLeft + mRight; -} -//# sourceMappingURL=get-outer-width.js.map - -/***/ }), - -/***/ "./node_modules/@antv/dom-util/esm/get-ratio.js": -/*!******************************************************!*\ - !*** ./node_modules/@antv/dom-util/esm/get-ratio.js ***! - \******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getRatio; }); -function getRatio() { - return window.devicePixelRatio ? window.devicePixelRatio : 2; -} -//# sourceMappingURL=get-ratio.js.map - -/***/ }), - -/***/ "./node_modules/@antv/dom-util/esm/get-style.js": -/*!******************************************************!*\ - !*** ./node_modules/@antv/dom-util/esm/get-style.js ***! - \******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getStyle; }); -/** - * 获取样式 - * @param {Object} dom DOM节点 - * @param {String} name 样式名 - * @param {Any} defaultValue 默认值 - * @return {String} 属性值 - */ -function getStyle(dom, name, defaultValue) { - var v; - try { - v = window.getComputedStyle ? - window.getComputedStyle(dom, null)[name] : - dom.style[name]; // 一般不会走到这个逻辑,dom.style 获取的是标签 style 属性,也不准确 - } - catch (e) { - // do nothing - } - finally { - v = v === undefined ? defaultValue : v; - } - return v; -} -//# sourceMappingURL=get-style.js.map - -/***/ }), - -/***/ "./node_modules/@antv/dom-util/esm/get-width.js": -/*!******************************************************!*\ - !*** ./node_modules/@antv/dom-util/esm/get-width.js ***! - \******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getHeight; }); -/* harmony import */ var _get_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./get-style */ "./node_modules/@antv/dom-util/esm/get-style.js"); - -function getHeight(el, defaultValue) { - var width = Object(_get_style__WEBPACK_IMPORTED_MODULE_0__["default"])(el, 'width', defaultValue); - if (width === 'auto') { - width = el.offsetWidth; - } - return parseFloat(width); -} -//# sourceMappingURL=get-width.js.map - -/***/ }), - -/***/ "./node_modules/@antv/dom-util/esm/index.js": -/*!**************************************************!*\ - !*** ./node_modules/@antv/dom-util/esm/index.js ***! - \**************************************************/ -/*! exports provided: addEventListener, createDom, getHeight, getOuterHeight, getOuterWidth, getRatio, getStyle, getWidth, modifyCSS */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _add_event_listener__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add-event-listener */ "./node_modules/@antv/dom-util/esm/add-event-listener.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addEventListener", function() { return _add_event_listener__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _create_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./create-dom */ "./node_modules/@antv/dom-util/esm/create-dom.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createDom", function() { return _create_dom__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - -/* harmony import */ var _get_height__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./get-height */ "./node_modules/@antv/dom-util/esm/get-height.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getHeight", function() { return _get_height__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - -/* harmony import */ var _get_outer_height__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./get-outer-height */ "./node_modules/@antv/dom-util/esm/get-outer-height.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getOuterHeight", function() { return _get_outer_height__WEBPACK_IMPORTED_MODULE_3__["default"]; }); - -/* harmony import */ var _get_outer_width__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./get-outer-width */ "./node_modules/@antv/dom-util/esm/get-outer-width.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getOuterWidth", function() { return _get_outer_width__WEBPACK_IMPORTED_MODULE_4__["default"]; }); - -/* harmony import */ var _get_ratio__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./get-ratio */ "./node_modules/@antv/dom-util/esm/get-ratio.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getRatio", function() { return _get_ratio__WEBPACK_IMPORTED_MODULE_5__["default"]; }); - -/* harmony import */ var _get_style__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./get-style */ "./node_modules/@antv/dom-util/esm/get-style.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getStyle", function() { return _get_style__WEBPACK_IMPORTED_MODULE_6__["default"]; }); - -/* harmony import */ var _get_width__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./get-width */ "./node_modules/@antv/dom-util/esm/get-width.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getWidth", function() { return _get_width__WEBPACK_IMPORTED_MODULE_7__["default"]; }); - -/* harmony import */ var _modify_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./modify-css */ "./node_modules/@antv/dom-util/esm/modify-css.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "modifyCSS", function() { return _modify_css__WEBPACK_IMPORTED_MODULE_8__["default"]; }); - -// dom - - - - - - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/dom-util/esm/modify-css.js": -/*!*******************************************************!*\ - !*** ./node_modules/@antv/dom-util/esm/modify-css.js ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return modifyCSS; }); -function modifyCSS(dom, css) { - if (dom) { - for (var key in css) { - if (css.hasOwnProperty(key)) { - dom.style[key] = css[key]; - } - } - } - return dom; -} -//# sourceMappingURL=modify-css.js.map - -/***/ }), - -/***/ "./node_modules/@antv/event-emitter/lib/index.js": -/*!*******************************************************!*\ - !*** ./node_modules/@antv/event-emitter/lib/index.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var WILDCARD = '*'; -/* event-emitter */ -var EventEmitter = /** @class */ (function () { - function EventEmitter() { - this._events = {}; - } - /** - * 监听一个事件 - * @param evt - * @param callback - * @param once - */ - EventEmitter.prototype.on = function (evt, callback, once) { - if (!this._events[evt]) { - this._events[evt] = []; - } - this._events[evt].push({ - callback: callback, - once: !!once, - }); - return this; - }; - /** - * 监听一个事件一次 - * @param evt - * @param callback - */ - EventEmitter.prototype.once = function (evt, callback) { - this.on(evt, callback, true); - return this; - }; - /** - * 触发一个事件 - * @param evt - * @param args - */ - EventEmitter.prototype.emit = function (evt) { - var _this = this; - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - var events = this._events[evt] || []; - var wildcardEvents = this._events[WILDCARD] || []; - // 实际的处理 emit 方法 - var doEmit = function (es) { - var length = es.length; - for (var i = 0; i < length; i++) { - var _a = es[i], callback = _a.callback, once = _a.once; - if (once) { - es.splice(i, 1); - if (es.length === 0) { - delete _this._events[evt]; - } - length--; - i--; - } - callback.apply(_this, args); - } - }; - doEmit(events); - doEmit(wildcardEvents); - }; - /** - * 取消监听一个事件,或者一个channel - * @param evt - * @param callback - */ - EventEmitter.prototype.off = function (evt, callback) { - if (!evt) { - // evt 为空全部清除 - this._events = {}; - } - else { - if (!callback) { - // evt 存在,callback 为空,清除事件所有方法 - delete this._events[evt]; - } - else { - // evt 存在,callback 存在,清除匹配的 - var events = this._events[evt] || []; - var length = events.length; - for (var i = 0; i < length; i++) { - if (events[i].callback === callback) { - events.splice(i, 1); - length--; - i--; - } - } - if (events.length === 0) { - delete this._events[evt]; - } - } - } - return this; - }; - /* 当前所有的事件 */ - EventEmitter.prototype.getEvents = function () { - return this._events; - }; - return EventEmitter; -}()); -exports.default = EventEmitter; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g-base/esm/abstract/base.js": -/*!********************************************************!*\ - !*** ./node_modules/@antv/g-base/esm/abstract/base.js ***! - \********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_event_emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/event-emitter */ "./node_modules/@antv/event-emitter/lib/index.js"); -/* harmony import */ var _antv_event_emitter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_antv_event_emitter__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/util */ "./node_modules/@antv/g-base/esm/util/util.js"); - - - -var Base = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Base, _super); - function Base(cfg) { - var _this = _super.call(this) || this; - /** - * 是否被销毁 - * @type {boolean} - */ - _this.destroyed = false; - var defaultCfg = _this.getDefaultCfg(); - _this.cfg = Object(_util_util__WEBPACK_IMPORTED_MODULE_2__["mix"])(defaultCfg, cfg); - return _this; - } - /** - * @protected - * 默认的配置项 - * @returns {object} 默认的配置项 - */ - Base.prototype.getDefaultCfg = function () { - return {}; - }; - // 实现接口的方法 - Base.prototype.get = function (name) { - return this.cfg[name]; - }; - // 实现接口的方法 - Base.prototype.set = function (name, value) { - this.cfg[name] = value; - }; - // 实现接口的方法 - Base.prototype.destroy = function () { - this.cfg = { - destroyed: true, - }; - this.off(); - this.destroyed = true; - }; - return Base; -}(_antv_event_emitter__WEBPACK_IMPORTED_MODULE_1___default.a)); -/* harmony default export */ __webpack_exports__["default"] = (Base); -//# sourceMappingURL=base.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g-base/esm/abstract/canvas.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/g-base/esm/abstract/canvas.js ***! - \**********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _container__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./container */ "./node_modules/@antv/g-base/esm/abstract/container.js"); -/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/util */ "./node_modules/@antv/g-base/esm/util/util.js"); -/* harmony import */ var _animate_timeline__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../animate/timeline */ "./node_modules/@antv/g-base/esm/animate/timeline.js"); - - - - -var PX_SUFFIX = 'px'; -var Canvas = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Canvas, _super); - function Canvas(cfg) { - var _this = _super.call(this, cfg) || this; - _this.initContainer(); - _this.initDom(); - _this.initEvents(); - _this.initTimeline(); - return _this; - } - Canvas.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - // set default cursor style for canvas - cfg['cursor'] = 'default'; - return cfg; - }; - /** - * @protected - * 初始化容器 - */ - Canvas.prototype.initContainer = function () { - var container = this.get('container'); - if (Object(_util_util__WEBPACK_IMPORTED_MODULE_2__["isString"])(container)) { - container = document.getElementById(container); - this.set('container', container); - } - }; - /** - * @protected - * 初始化 DOM - */ - Canvas.prototype.initDom = function () { - var el = this.createDom(); - this.set('el', el); - // 附加到容器 - var container = this.get('container'); - container.appendChild(el); - // 设置初始宽度 - this.setDOMSize(this.get('width'), this.get('height')); - }; - /** - * @protected - * 初始化绑定的事件 - */ - Canvas.prototype.initEvents = function () { }; - /** - * @protected - * 初始化时间轴 - */ - Canvas.prototype.initTimeline = function () { - var timeline = new _animate_timeline__WEBPACK_IMPORTED_MODULE_3__["default"](this); - this.set('timeline', timeline); - }; - /** - * @protected - * 修改画布对应的 DOM 的大小 - * @param {number} width 宽度 - * @param {number} height 高度 - */ - Canvas.prototype.setDOMSize = function (width, height) { - var el = this.get('el'); - if (_util_util__WEBPACK_IMPORTED_MODULE_2__["isBrowser"]) { - el.style.width = width + PX_SUFFIX; - el.style.height = height + PX_SUFFIX; - } - }; - // 实现接口 - Canvas.prototype.changeSize = function (width, height) { - this.setDOMSize(width, height); - this.set('width', width); - this.set('height', height); - this.onCanvasChange('changeSize'); - }; - /** - * 获取当前的渲染引擎 - * @return {Renderer} 返回当前的渲染引擎 - */ - Canvas.prototype.getRenderer = function () { - return this.get('renderer'); - }; - /** - * 获取画布的 cursor 样式 - * @return {Cursor} - */ - Canvas.prototype.getCursor = function () { - return this.get('cursor'); - }; - /** - * 设置画布的 cursor 样式 - * @param {Cursor} cursor cursor 样式 - */ - Canvas.prototype.setCursor = function (cursor) { - this.set('cursor', cursor); - var el = this.get('el'); - if (_util_util__WEBPACK_IMPORTED_MODULE_2__["isBrowser"] && el) { - // 直接设置样式,不等待鼠标移动时再设置 - el.style.cursor = cursor; - } - }; - // 实现接口 - Canvas.prototype.getPointByClient = function (clientX, clientY) { - var el = this.get('el'); - var bbox = el.getBoundingClientRect(); - return { - x: clientX - bbox.left, - y: clientY - bbox.top, - }; - }; - // 实现接口 - Canvas.prototype.getClientByPoint = function (x, y) { - var el = this.get('el'); - var bbox = el.getBoundingClientRect(); - return { - x: x + bbox.left, - y: y + bbox.top, - }; - }; - // 实现接口 - Canvas.prototype.draw = function () { }; - /** - * @protected - * 销毁 DOM 容器 - */ - Canvas.prototype.removeDom = function () { - var el = this.get('el'); - el.parentNode.removeChild(el); - }; - /** - * @protected - * 清理所有的事件 - */ - Canvas.prototype.clearEvents = function () { }; - Canvas.prototype.isCanvas = function () { - return true; - }; - Canvas.prototype.getParent = function () { - return null; - }; - Canvas.prototype.destroy = function () { - var timeline = this.get('timeline'); - if (this.get('destroyed')) { - return; - } - this.clear(); - // 同初始化时相反顺序调用 - if (timeline) { - // 画布销毁时自动停止动画 - timeline.stop(); - } - this.clearEvents(); - this.removeDom(); - _super.prototype.destroy.call(this); - }; - return Canvas; -}(_container__WEBPACK_IMPORTED_MODULE_1__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Canvas); -//# sourceMappingURL=canvas.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g-base/esm/abstract/container.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g-base/esm/abstract/container.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./element */ "./node_modules/@antv/g-base/esm/abstract/element.js"); -/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/util */ "./node_modules/@antv/g-base/esm/util/util.js"); - - - -var SHAPE_MAP = {}; -var INDEX = '_INDEX'; -function afterAdd(element) { - if (element.isGroup()) { - if (element.isEntityGroup() || element.get('children').length) { - element.onCanvasChange('add'); - } - } - else { - element.onCanvasChange('add'); - } -} -/** - * 设置 canvas - * @param {IElement} element 元素 - * @param {ICanvas} canvas 画布 - */ -function setCanvas(element, canvas) { - element.set('canvas', canvas); - if (element.isGroup()) { - var children = element.get('children'); - if (children.length) { - children.forEach(function (child) { - setCanvas(child, canvas); - }); - } - } -} -/** - * 设置 timeline - * @param {IElement} element 元素 - * @param {Timeline} timeline 时间轴 - */ -function setTimeline(element, timeline) { - element.set('timeline', timeline); - if (element.isGroup()) { - var children = element.get('children'); - if (children.length) { - children.forEach(function (child) { - setTimeline(child, timeline); - }); - } - } -} -function contains(container, element) { - var children = container.getChildren(); - return children.indexOf(element) >= 0; -} -function removeChild(container, element, destroy) { - if (destroy === void 0) { destroy = true; } - // 不再调用 element.remove() 方法,会出现循环调用 - if (destroy) { - element.destroy(); - } - else { - element.set('parent', null); - element.set('canvas', null); - } - Object(_util_util__WEBPACK_IMPORTED_MODULE_2__["removeFromArray"])(container.getChildren(), element); -} -function getComparer(compare) { - return function (left, right) { - var result = compare(left, right); - return result === 0 ? left[INDEX] - right[INDEX] : result; - }; -} -function isAllowCapture(element) { - return element.get('visible') && element.get('capture'); -} -var Container = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Container, _super); - function Container() { - return _super !== null && _super.apply(this, arguments) || this; - } - Container.prototype.isCanvas = function () { - return false; - }; - // 根据子节点确定 BBox - Container.prototype.getBBox = function () { - // 所有的值可能在画布的可视区外 - var minX = Infinity; - var maxX = -Infinity; - var minY = Infinity; - var maxY = -Infinity; - var xArr = []; - var yArr = []; - // 将可见元素、图形以及不为空的图形分组筛选出来,用于包围盒合并 - var children = this.getChildren().filter(function (child) { - return child.get('visible') && (!child.isGroup() || (child.isGroup() && child.getChildren().length > 0)); - }); - if (children.length > 0) { - Object(_util_util__WEBPACK_IMPORTED_MODULE_2__["each"])(children, function (child) { - var box = child.getBBox(); - xArr.push(box.minX, box.maxX); - yArr.push(box.minY, box.maxY); - }); - minX = Math.min.apply(null, xArr); - maxX = Math.max.apply(null, xArr); - minY = Math.min.apply(null, yArr); - maxY = Math.max.apply(null, yArr); - } - else { - minX = 0; - maxX = 0; - minY = 0; - maxY = 0; - } - var box = { - x: minX, - y: minY, - minX: minX, - minY: minY, - maxX: maxX, - maxY: maxY, - width: maxX - minX, - height: maxY - minY, - }; - return box; - }; - // 获取画布的包围盒 - Container.prototype.getCanvasBBox = function () { - var minX = Infinity; - var maxX = -Infinity; - var minY = Infinity; - var maxY = -Infinity; - var xArr = []; - var yArr = []; - // 将可见元素、图形以及不为空的图形分组筛选出来,用于包围盒合并 - var children = this.getChildren().filter(function (child) { - return child.get('visible') && (!child.isGroup() || (child.isGroup() && child.getChildren().length > 0)); - }); - if (children.length > 0) { - Object(_util_util__WEBPACK_IMPORTED_MODULE_2__["each"])(children, function (child) { - var box = child.getCanvasBBox(); - xArr.push(box.minX, box.maxX); - yArr.push(box.minY, box.maxY); - }); - minX = Math.min.apply(null, xArr); - maxX = Math.max.apply(null, xArr); - minY = Math.min.apply(null, yArr); - maxY = Math.max.apply(null, yArr); - } - else { - minX = 0; - maxX = 0; - minY = 0; - maxY = 0; - } - var box = { - x: minX, - y: minY, - minX: minX, - minY: minY, - maxX: maxX, - maxY: maxY, - width: maxX - minX, - height: maxY - minY, - }; - return box; - }; - Container.prototype.getDefaultCfg = function () { - var cfg = _super.prototype.getDefaultCfg.call(this); - cfg['children'] = []; - return cfg; - }; - Container.prototype.onAttrChange = function (name, value, originValue) { - _super.prototype.onAttrChange.call(this, name, value, originValue); - if (name === 'matrix') { - var totalMatrix = this.getTotalMatrix(); - this._applyChildrenMarix(totalMatrix); - } - }; - // 不但应用到自己身上还要应用于子元素 - Container.prototype.applyMatrix = function (matrix) { - var preTotalMatrix = this.getTotalMatrix(); - _super.prototype.applyMatrix.call(this, matrix); - var totalMatrix = this.getTotalMatrix(); - // totalMatrix 没有发生变化时,这里仅考虑两者都为 null 时 - // 不继续向下传递矩阵 - if (totalMatrix === preTotalMatrix) { - return; - } - this._applyChildrenMarix(totalMatrix); - }; - // 在子元素上设置矩阵 - Container.prototype._applyChildrenMarix = function (totalMatrix) { - var children = this.getChildren(); - Object(_util_util__WEBPACK_IMPORTED_MODULE_2__["each"])(children, function (child) { - child.applyMatrix(totalMatrix); - }); - }; - // 兼容老版本的接口 - Container.prototype.addShape = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var type = args[0]; - var cfg = args[1]; - if (Object(_util_util__WEBPACK_IMPORTED_MODULE_2__["isObject"])(type)) { - cfg = type; - } - else { - cfg['type'] = type; - } - var shapeType = SHAPE_MAP[cfg.type]; - if (!shapeType) { - shapeType = Object(_util_util__WEBPACK_IMPORTED_MODULE_2__["upperFirst"])(cfg.type); - SHAPE_MAP[cfg.type] = shapeType; - } - var ShapeBase = this.getShapeBase(); - var shape = new ShapeBase[shapeType](cfg); - this.add(shape); - return shape; - }; - Container.prototype.addGroup = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var groupClass = args[0], cfg = args[1]; - var group; - if (Object(_util_util__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(groupClass)) { - if (cfg) { - group = new groupClass(cfg); - } - else { - group = new groupClass({ - // canvas, - parent: this, - }); - } - } - else { - var tmpCfg = groupClass || {}; - var TmpGroupClass = this.getGroupBase(); - group = new TmpGroupClass(tmpCfg); - } - this.add(group); - return group; - }; - Container.prototype.getCanvas = function () { - var canvas; - if (this.isCanvas()) { - canvas = this; - } - else { - canvas = this.get('canvas'); - } - return canvas; - }; - Container.prototype.getShape = function (x, y, ev) { - // 如果不支持拾取,则直接返回 - if (!isAllowCapture(this)) { - return null; - } - var children = this.getChildren(); - var shape; - // 如果容器是 group - if (!this.isCanvas()) { - var v = [x, y, 1]; - // 将 x, y 转换成对应于 group 的局部坐标 - v = this.invertFromMatrix(v); - if (!this.isClipped(v[0], v[1])) { - shape = this._findShape(children, v[0], v[1], ev); - } - } - else { - shape = this._findShape(children, x, y, ev); - } - return shape; - }; - Container.prototype._findShape = function (children, x, y, ev) { - var shape = null; - for (var i = children.length - 1; i >= 0; i--) { - var child = children[i]; - if (isAllowCapture(child)) { - if (child.isGroup()) { - shape = child.getShape(x, y, ev); - } - else if (child.isHit(x, y)) { - shape = child; - } - } - if (shape) { - break; - } - } - return shape; - }; - Container.prototype.add = function (element) { - var canvas = this.getCanvas(); - var children = this.getChildren(); - var timeline = this.get('timeline'); - var preParent = element.getParent(); - if (preParent) { - removeChild(preParent, element, false); - } - element.set('parent', this); - if (canvas) { - setCanvas(element, canvas); - } - if (timeline) { - setTimeline(element, timeline); - } - children.push(element); - afterAdd(element); - this._applyElementMatrix(element); - }; - // 将当前容器的矩阵应用到子元素 - Container.prototype._applyElementMatrix = function (element) { - var totalMatrix = this.getTotalMatrix(); - // 添加图形或者分组时,需要把当前图元的矩阵设置进去 - if (totalMatrix) { - element.applyMatrix(totalMatrix); - } - }; - Container.prototype.getChildren = function () { - return this.get('children'); - }; - Container.prototype.sort = function () { - var children = this.getChildren(); - // 稳定排序 - Object(_util_util__WEBPACK_IMPORTED_MODULE_2__["each"])(children, function (child, index) { - child[INDEX] = index; - return child; - }); - children.sort(getComparer(function (obj1, obj2) { - return obj1.get('zIndex') - obj2.get('zIndex'); - })); - this.onCanvasChange('sort'); - }; - Container.prototype.clear = function () { - this.set('clearing', true); - if (this.destroyed) { - return; - } - var children = this.getChildren(); - for (var i = children.length - 1; i >= 0; i--) { - children[i].destroy(); // 销毁子元素 - } - this.set('children', []); - this.onCanvasChange('clear'); - this.set('clearing', false); - }; - Container.prototype.destroy = function () { - if (this.get('destroyed')) { - return; - } - this.clear(); - _super.prototype.destroy.call(this); - }; - /** - * 获取第一个子元素 - * @return {IElement} 第一个元素 - */ - Container.prototype.getFirst = function () { - return this.getChildByIndex(0); - }; - /** - * 获取最后一个子元素 - * @return {IElement} 元素 - */ - Container.prototype.getLast = function () { - var children = this.getChildren(); - return this.getChildByIndex(children.length - 1); - }; - /** - * 根据索引获取子元素 - * @return {IElement} 第一个元素 - */ - Container.prototype.getChildByIndex = function (index) { - var children = this.getChildren(); - return children[index]; - }; - /** - * 子元素的数量 - * @return {number} 子元素数量 - */ - Container.prototype.getCount = function () { - var children = this.getChildren(); - return children.length; - }; - /** - * 是否包含对应元素 - * @param {IElement} element 元素 - * @return {boolean} - */ - Container.prototype.contain = function (element) { - var children = this.getChildren(); - return children.indexOf(element) > -1; - }; - /** - * 移除对应子元素 - * @param {IElement} element 子元素 - * @param {boolean} destroy 是否销毁子元素,默认为 true - */ - Container.prototype.removeChild = function (element, destroy) { - if (destroy === void 0) { destroy = true; } - if (this.contain(element)) { - element.remove(destroy); - } - }; - /** - * 查找所有匹配的元素 - * @param {ElementFilterFn} fn 匹配函数 - * @return {IElement[]} 元素数组 - */ - Container.prototype.findAll = function (fn) { - var rst = []; - var children = this.getChildren(); - Object(_util_util__WEBPACK_IMPORTED_MODULE_2__["each"])(children, function (element) { - if (fn(element)) { - rst.push(element); - } - if (element.isGroup()) { - rst = rst.concat(element.findAll(fn)); - } - }); - return rst; - }; - /** - * 查找元素,找到第一个返回 - * @param {ElementFilterFn} fn 匹配函数 - * @return {IElement|null} 元素,可以为空 - */ - Container.prototype.find = function (fn) { - var rst = null; - var children = this.getChildren(); - Object(_util_util__WEBPACK_IMPORTED_MODULE_2__["each"])(children, function (element) { - if (fn(element)) { - rst = element; - } - else if (element.isGroup()) { - rst = element.find(fn); - } - if (rst) { - return false; - } - }); - return rst; - }; - /** - * 根据 ID 查找元素 - * @param {string} id 元素 id - * @return {IElement|null} 元素 - */ - Container.prototype.findById = function (id) { - return this.find(function (element) { - return element.get('id') === id; - }); - }; - /** - * 该方法即将废弃,不建议使用 - * 根据 className 查找元素 - * TODO: 该方式定义暂时只给 G6 3.3 以后的版本使用,待 G6 中的 findByClassName 方法移除后,G 也需要同步移除 - * @param {string} className 元素 className - * @return {IElement | null} 元素 - */ - Container.prototype.findByClassName = function (className) { - return this.find(function (element) { - return element.get('className') === className; - }); - }; - /** - * 根据 name 查找元素列表 - * @param {string} name 元素名称 - * @return {IElement[]} 元素 - */ - Container.prototype.findAllByName = function (name) { - return this.findAll(function (element) { - return element.get('name') === name; - }); - }; - return Container; -}(_element__WEBPACK_IMPORTED_MODULE_1__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Container); -//# sourceMappingURL=container.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g-base/esm/abstract/element.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/g-base/esm/abstract/element.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _antv_matrix_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/matrix-util */ "./node_modules/@antv/matrix-util/esm/index.js"); -/* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/util */ "./node_modules/@antv/g-base/esm/util/util.js"); -/* harmony import */ var _util_matrix__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/matrix */ "./node_modules/@antv/g-base/esm/util/matrix.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/g-base/esm/abstract/base.js"); - - - - - - -var MATRIX = 'matrix'; -var ARRAY_ATTRS = { - matrix: 'matrix', - path: 'path', - points: 'points', - lineDash: 'lineDash', -}; -var CLONE_CFGS = ['zIndex', 'capture', 'visible', 'type']; -// 可以在 toAttrs 中设置,但不属于绘图属性的字段 -var RESERVED_PORPS = ['repeat']; -var DELEGATION_SPLIT = ':'; -var WILDCARD = '*'; -// 需要考虑数组嵌套数组的场景 -// 数组嵌套对象的场景不考虑 -function _cloneArrayAttr(arr) { - var result = []; - for (var i = 0; i < arr.length; i++) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(arr[i])) { - result.push([].concat(arr[i])); - } - else { - result.push(arr[i]); - } - } - return result; -} -function getFormatFromAttrs(toAttrs, shape) { - var fromAttrs = {}; - var attrs = shape.attrs; - for (var k in toAttrs) { - fromAttrs[k] = attrs[k]; - } - return fromAttrs; -} -function getFormatToAttrs(props, shape) { - var toAttrs = {}; - var attrs = shape.attr(); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(props, function (v, k) { - if (RESERVED_PORPS.indexOf(k) === -1 && !Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isEqual"])(attrs[k], v)) { - toAttrs[k] = v; - } - }); - return toAttrs; -} -function checkExistedAttrs(animations, animation) { - if (animation.onFrame) { - return animations; - } - var startTime = animation.startTime, delay = animation.delay, duration = animation.duration; - var hasOwnProperty = Object.prototype.hasOwnProperty; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(animations, function (item) { - // 后一个动画开始执行的时间 < 前一个动画的结束时间 && 后一个动画的执行时间 > 前一个动画的延迟 - if (startTime + delay < item.startTime + item.delay + item.duration && duration > item.delay) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(animation.toAttrs, function (v, k) { - if (hasOwnProperty.call(item.toAttrs, k)) { - delete item.toAttrs[k]; - delete item.fromAttrs[k]; - } - }); - } - }); - return animations; -} -var Element = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Element, _super); - function Element(cfg) { - var _this = _super.call(this, cfg) || this; - /** - * @protected - * 图形属性 - * @type {ShapeAttrs} - */ - _this.attrs = {}; - var attrs = _this.getDefaultAttrs(); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mix"])(attrs, cfg.attrs); - _this.attrs = attrs; - _this.initAttrs(attrs); - _this.initAnimate(); // 初始化动画 - return _this; - } - // override - Element.prototype.getDefaultCfg = function () { - return { - visible: true, - capture: true, - zIndex: 0, - }; - }; - /** - * @protected - * 获取默认的属相 - */ - Element.prototype.getDefaultAttrs = function () { - return { - matrix: this.getDefaultMatrix(), - opacity: 1, - }; - }; - /** - * @protected - * 一些方法调用会引起画布变化 - * @param {ChangeType} changeType 改变的类型 - */ - Element.prototype.onCanvasChange = function (changeType) { }; - /** - * @protected - * 初始化属性,有些属性需要加工 - * @param {object} attrs 属性值 - */ - Element.prototype.initAttrs = function (attrs) { }; - /** - * @protected - * 初始化动画 - */ - Element.prototype.initAnimate = function () { - this.set('animable', true); - this.set('animating', false); - }; - Element.prototype.isGroup = function () { - return false; - }; - Element.prototype.getParent = function () { - return this.get('parent'); - }; - Element.prototype.getCanvas = function () { - return this.get('canvas'); - }; - Element.prototype.attr = function () { - var _a; - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var name = args[0], value = args[1]; - if (!name) - return this.attrs; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isObject"])(name)) { - for (var k in name) { - this.setAttr(k, name[k]); - } - this.afterAttrsChange(name); - return this; - } - if (args.length === 2) { - this.setAttr(name, value); - this.afterAttrsChange((_a = {}, - _a[name] = value, - _a)); - return this; - } - return this.attrs[name]; - }; - // 是否被裁剪,被裁剪则不显示,不参与拾取 - Element.prototype.isClipped = function (refX, refY) { - var clip = this.getClip(); - return clip && !clip.isHit(refX, refY); - }; - /** - * 内部设置属性值的接口 - * @param {string} name 属性名 - * @param {any} value 属性值 - */ - Element.prototype.setAttr = function (name, value) { - var originValue = this.attrs[name]; - if (originValue !== value) { - this.attrs[name] = value; - this.onAttrChange(name, value, originValue); - } - }; - /** - * @protected - * 属性值发生改变 - * @param {string} name 属性名 - * @param {any} value 属性值 - * @param {any} originValue 属性值 - */ - Element.prototype.onAttrChange = function (name, value, originValue) { - if (name === 'matrix') { - this.set('totalMatrix', null); - } - }; - /** - * 属性更改后需要做的事情 - * @protected - */ - Element.prototype.afterAttrsChange = function (targetAttrs) { - this.onCanvasChange('attr'); - }; - Element.prototype.show = function () { - // 不是高频操作直接使用 set - this.set('visible', true); - this.onCanvasChange('show'); - return this; - }; - Element.prototype.hide = function () { - // 不是高频操作直接使用 set - this.set('visible', false); - this.onCanvasChange('hide'); - return this; - }; - Element.prototype.setZIndex = function (zIndex) { - this.set('zIndex', zIndex); - var parent = this.getParent(); - if (parent) { - // 改变 zIndex 不应该立即触发渲染 (调用 onCanvasChange('zIndex')),需要经过 sort 再触发 - parent.sort(); - } - return this; - }; - Element.prototype.toFront = function () { - var parent = this.getParent(); - if (!parent) { - return; - } - var children = parent.getChildren(); - var el = this.get('el'); - var index = children.indexOf(this); - children.splice(index, 1); - children.push(this); - this.onCanvasChange('zIndex'); - }; - Element.prototype.toBack = function () { - var parent = this.getParent(); - if (!parent) { - return; - } - var children = parent.getChildren(); - var el = this.get('el'); - var index = children.indexOf(this); - children.splice(index, 1); - children.unshift(this); - this.onCanvasChange('zIndex'); - }; - Element.prototype.remove = function (destroy) { - if (destroy === void 0) { destroy = true; } - var parent = this.getParent(); - if (parent) { - Object(_util_util__WEBPACK_IMPORTED_MODULE_3__["removeFromArray"])(parent.getChildren(), this); - if (!parent.get('clearing')) { - // 如果父元素正在清理,当前元素不触发 remove - this.onCanvasChange('remove'); - } - } - else { - this.onCanvasChange('remove'); - } - if (destroy) { - this.destroy(); - } - }; - Element.prototype.resetMatrix = function () { - this.attr(MATRIX, this.getDefaultMatrix()); - this.onCanvasChange('matrix'); - }; - Element.prototype.getMatrix = function () { - return this.attr(MATRIX); - }; - Element.prototype.setMatrix = function (m) { - this.attr(MATRIX, m); - this.onCanvasChange('matrix'); - }; - // 获取总的 matrix - Element.prototype.getTotalMatrix = function () { - var totalMatrix = this.get('totalMatrix'); - if (!totalMatrix) { - var currentMatrix = this.attr('matrix'); - var parentMatrix = this.get('parentMatrix'); - if (parentMatrix && currentMatrix) { - totalMatrix = Object(_util_matrix__WEBPACK_IMPORTED_MODULE_4__["multiplyMatrix"])(parentMatrix, currentMatrix); - } - else { - totalMatrix = currentMatrix || parentMatrix; - } - this.set('totalMatrix', totalMatrix); - } - return totalMatrix; - }; - // 上层分组设置 matrix - Element.prototype.applyMatrix = function (matrix) { - var currentMatrix = this.attr('matrix'); - var totalMatrix = null; - if (matrix && currentMatrix) { - totalMatrix = Object(_util_matrix__WEBPACK_IMPORTED_MODULE_4__["multiplyMatrix"])(matrix, currentMatrix); - } - else { - totalMatrix = currentMatrix || matrix; - } - this.set('totalMatrix', totalMatrix); - this.set('parentMatrix', matrix); - }; - /** - * @protected - * 获取默认的矩阵 - * @returns {number[]|null} 默认的矩阵 - */ - Element.prototype.getDefaultMatrix = function () { - return null; - }; - // 将向量应用设置的矩阵 - Element.prototype.applyToMatrix = function (v) { - var matrix = this.attr('matrix'); - if (matrix) { - return Object(_util_matrix__WEBPACK_IMPORTED_MODULE_4__["multiplyVec2"])(matrix, v); - } - return v; - }; - // 根据设置的矩阵,将向量转换相对于图形/分组的位置 - Element.prototype.invertFromMatrix = function (v) { - var matrix = this.attr('matrix'); - if (matrix) { - var invertMatrix = Object(_util_matrix__WEBPACK_IMPORTED_MODULE_4__["invert"])(matrix); - return Object(_util_matrix__WEBPACK_IMPORTED_MODULE_4__["multiplyVec2"])(invertMatrix, v); - } - return v; - }; - // 设置 clip - Element.prototype.setClip = function (clipCfg) { - var canvas = this.getCanvas(); - // 应该只设置当前元素的 clip,不应该去修改 clip 本身,方便 clip 被复用 - // TODO: setClip 的传参既 shape 配置,也支持 shape 对象 - // const preShape = this.get('clipShape'); - // if (preShape) { - // // 将之前的 clipShape 销毁 - // preShape.destroy(); - // } - var clipShape = null; - // 如果配置项为 null,则不移除 clipShape - if (clipCfg) { - var ShapeBase = this.getShapeBase(); - var shapeType = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["upperFirst"])(clipCfg.type); - var Cons = ShapeBase[shapeType]; - if (Cons) { - clipShape = new Cons({ - type: clipCfg.type, - isClipShape: true, - attrs: clipCfg.attrs, - canvas: canvas, - }); - } - } - this.set('clipShape', clipShape); - this.onCanvasChange('clip'); - return clipShape; - }; - Element.prototype.getClip = function () { - var clipShape = this.get('clipShape'); - // 未设置时返回 Null,保证一致性 - if (!clipShape) { - return null; - } - return clipShape; - }; - Element.prototype.clone = function () { - var _this = this; - var originAttrs = this.attrs; - var attrs = {}; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(originAttrs, function (i, k) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(originAttrs[k])) { - attrs[k] = _cloneArrayAttr(originAttrs[k]); - } - else { - attrs[k] = originAttrs[k]; - } - }); - var cons = this.constructor; - // @ts-ignore - var clone = new cons({ attrs: attrs }); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(CLONE_CFGS, function (cfgName) { - clone.set(cfgName, _this.get(cfgName)); - }); - return clone; - }; - Element.prototype.destroy = function () { - var destroyed = this.destroyed; - if (destroyed) { - return; - } - this.attrs = {}; - _super.prototype.destroy.call(this); - // this.onCanvasChange('destroy'); - }; - /** - * 是否处于动画暂停状态 - * @return {boolean} 是否处于动画暂停状态 - */ - Element.prototype.isAnimatePaused = function () { - return this.get('_pause').isPaused; - }; - /** - * 执行动画,支持多种函数签名 - * 1. animate(toAttrs: ElementAttrs, duration: number, easing?: string, callback?: () => void, delay?: number) - * 2. animate(onFrame: OnFrame, duration: number, easing?: string, callback?: () => void, delay?: number) - * 3. animate(toAttrs: ElementAttrs, cfg: AnimateCfg) - * 4. animate(onFrame: OnFrame, cfg: AnimateCfg) - * 各个参数的含义为: - * toAttrs 动画最终状态 - * onFrame 自定义帧动画函数 - * duration 动画执行时间 - * easing 动画缓动效果 - * callback 动画执行后的回调 - * delay 动画延迟时间 - */ - Element.prototype.animate = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - this.set('animating', true); - var timeline = this.get('timeline'); - if (!timeline) { - timeline = this.get('canvas').get('timeline'); - this.set('timeline', timeline); - } - var animations = this.get('animations') || []; - // 初始化 tick - if (!timeline.timer) { - timeline.initTimer(); - } - var toAttrs = args[0], duration = args[1], _a = args[2], easing = _a === void 0 ? 'easeLinear' : _a, _b = args[3], callback = _b === void 0 ? _antv_util__WEBPACK_IMPORTED_MODULE_1__["noop"] : _b, _c = args[4], delay = _c === void 0 ? 0 : _c; - var onFrame; - var repeat; - var pauseCallback; - var resumeCallback; - var animateCfg; - // 第二个参数,既可以是动画最终状态 toAttrs,也可以是自定义帧动画函数 onFrame - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(toAttrs)) { - onFrame = toAttrs; - toAttrs = {}; - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isObject"])(toAttrs) && toAttrs.onFrame) { - // 兼容 3.0 中的写法,onFrame 和 repeat 可在 toAttrs 中设置 - onFrame = toAttrs.onFrame; - repeat = toAttrs.repeat; - } - // 第二个参数,既可以是执行时间 duration,也可以是动画参数 animateCfg - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isObject"])(duration)) { - animateCfg = duration; - duration = animateCfg.duration; - easing = animateCfg.easing || 'easeLinear'; - delay = animateCfg.delay || 0; - // animateCfg 中的设置优先级更高 - repeat = animateCfg.repeat || repeat || false; - callback = animateCfg.callback || _antv_util__WEBPACK_IMPORTED_MODULE_1__["noop"]; - pauseCallback = animateCfg.pauseCallback || _antv_util__WEBPACK_IMPORTED_MODULE_1__["noop"]; - resumeCallback = animateCfg.resumeCallback || _antv_util__WEBPACK_IMPORTED_MODULE_1__["noop"]; - } - else { - // 第四个参数,既可以是回调函数 callback,也可以是延迟时间 delay - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(callback)) { - delay = callback; - callback = null; - } - // 第三个参数,既可以是缓动参数 easing,也可以是回调函数 callback - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(easing)) { - callback = easing; - easing = 'easeLinear'; - } - else { - easing = easing || 'easeLinear'; - } - } - var formatToAttrs = getFormatToAttrs(toAttrs, this); - var animation = { - fromAttrs: getFormatFromAttrs(formatToAttrs, this), - toAttrs: formatToAttrs, - duration: duration, - easing: easing, - repeat: repeat, - callback: callback, - pauseCallback: pauseCallback, - resumeCallback: resumeCallback, - delay: delay, - startTime: timeline.getTime(), - id: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["uniqueId"])(), - onFrame: onFrame, - pathFormatted: false, - }; - // 如果动画元素队列中已经有这个图形了 - if (animations.length > 0) { - // 先检查是否需要合并属性。若有相同的动画,将该属性从前一个动画中删除,直接用后一个动画中 - animations = checkExistedAttrs(animations, animation); - } - else { - // 否则将图形添加到动画元素队列 - timeline.addAnimator(this); - } - animations.push(animation); - this.set('animations', animations); - this.set('_pause', { isPaused: false }); - }; - /** - * 停止动画 - * @param {boolean} toEnd 是否到动画的最终状态 - */ - Element.prototype.stopAnimate = function (toEnd) { - var _this = this; - if (toEnd === void 0) { toEnd = true; } - var animations = this.get('animations'); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(animations, function (animation) { - // 将动画执行到最后一帧 - if (toEnd) { - if (animation.onFrame) { - _this.attr(animation.onFrame(1)); - } - else { - _this.attr(animation.toAttrs); - } - } - if (animation.callback) { - // 动画停止时的回调 - animation.callback(); - } - }); - this.set('animating', false); - this.set('animations', []); - }; - /** - * 暂停动画 - */ - Element.prototype.pauseAnimate = function () { - var timeline = this.get('timeline'); - var animations = this.get('animations'); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(animations, function (animation) { - if (animation.pauseCallback) { - // 动画暂停时的回调 - animation.pauseCallback(); - } - }); - // 记录下是在什么时候暂停的 - this.set('_pause', { - isPaused: true, - pauseTime: timeline.getTime(), - }); - return this; - }; - /** - * 恢复动画 - */ - Element.prototype.resumeAnimate = function () { - var timeline = this.get('timeline'); - var current = timeline.getTime(); - var animations = this.get('animations'); - var pauseTime = this.get('_pause').pauseTime; - // 之后更新属性需要计算动画已经执行的时长,如果暂停了,就把初始时间调后 - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(animations, function (animation) { - animation.startTime = animation.startTime + (current - pauseTime); - animation._paused = false; - animation._pauseTime = null; - if (animation.resumeCallback) { - animation.resumeCallback(); - } - }); - this.set('_pause', { - isPaused: false, - }); - this.set('animations', animations); - return this; - }; - /** - * 触发委托事件 - * @param {string} type 事件类型 - * @param {GraphEvent} eventObj 事件对象 - */ - Element.prototype.emitDelegation = function (type, eventObj) { - var paths = eventObj.propagationPath; - var events = this.getEvents(); - // 至少有一个对象,且第一个对象为 shape - for (var i = 0; i < paths.length; i++) { - var element = paths[i]; - // 暂定跟 name 绑定 - var name_1 = element.get('name'); - if (name_1) { - // 事件委托的形式 name:type - var eventName = name_1 + DELEGATION_SPLIT + type; - if (events[eventName] || events[WILDCARD]) { - // 对于通配符 *,事件名称 = 委托事件名称 - eventObj.name = eventName; - eventObj.currentTarget = element; - eventObj.delegateTarget = this; - // 将委托事件的监听对象 delegateObject 挂载到事件对象上 - eventObj.delegateObject = element.get('delegateObject'); - this.emit(eventName, eventObj); - } - } - } - }; - /** - * 移动元素 - * @param {number} translateX 水平移动距离 - * @param {number} translateY 垂直移动距离 - * @return {IElement} 元素 - */ - Element.prototype.translate = function (translateX, translateY) { - if (translateX === void 0) { translateX = 0; } - if (translateY === void 0) { translateY = 0; } - var matrix = this.getMatrix(); - var newMatrix = Object(_antv_matrix_util__WEBPACK_IMPORTED_MODULE_2__["transform"])(matrix, [['t', translateX, translateY]]); - this.setMatrix(newMatrix); - return this; - }; - /** - * 移动元素到目标位置 - * @param {number} targetX 目标位置的水平坐标 - * @param {number} targetX 目标位置的垂直坐标 - * @return {IElement} 元素 - */ - Element.prototype.move = function (targetX, targetY) { - var x = this.attr('x') || 0; - var y = this.attr('y') || 0; - this.translate(targetX - x, targetY - y); - return this; - }; - /** - * 移动元素到目标位置,等价于 move 方法。由于 moveTo 的语义性更强,因此在文档中推荐使用 moveTo 方法 - * @param {number} targetX 目标位置的 x 轴坐标 - * @param {number} targetY 目标位置的 y 轴坐标 - * @return {IElement} 元素 - */ - Element.prototype.moveTo = function (targetX, targetY) { - return this.move(targetX, targetY); - }; - /** - * 缩放元素 - * @param {number} ratioX 水平缩放比例 - * @param {number} ratioY 垂直缩放比例 - * @return {IElement} 元素 - */ - Element.prototype.scale = function (ratioX, ratioY) { - var matrix = this.getMatrix(); - var newMatrix = Object(_antv_matrix_util__WEBPACK_IMPORTED_MODULE_2__["transform"])(matrix, [['s', ratioX, ratioY || ratioX]]); - this.setMatrix(newMatrix); - return this; - }; - /** - * 以画布左上角 (0, 0) 为中心旋转元素 - * @param {number} radian 旋转角度(弧度值) - * @return {IElement} 元素 - */ - Element.prototype.rotate = function (radian) { - var matrix = this.getMatrix(); - var newMatrix = Object(_antv_matrix_util__WEBPACK_IMPORTED_MODULE_2__["transform"])(matrix, [['r', radian]]); - this.setMatrix(newMatrix); - return this; - }; - /** - * 以起始点为中心旋转元素 - * @param {number} radian 旋转角度(弧度值) - * @return {IElement} 元素 - */ - Element.prototype.rotateAtStart = function (rotate) { - var _a = this.attr(), x = _a.x, y = _a.y; - var matrix = this.getMatrix(); - var newMatrix = Object(_antv_matrix_util__WEBPACK_IMPORTED_MODULE_2__["transform"])(matrix, [ - ['t', -x, -y], - ['r', rotate], - ['t', x, y], - ]); - this.setMatrix(newMatrix); - return this; - }; - /** - * 以任意点 (x, y) 为中心旋转元素 - * @param {number} radian 旋转角度(弧度值) - * @return {IElement} 元素 - */ - Element.prototype.rotateAtPoint = function (x, y, rotate) { - var matrix = this.getMatrix(); - var newMatrix = Object(_antv_matrix_util__WEBPACK_IMPORTED_MODULE_2__["transform"])(matrix, [ - ['t', -x, -y], - ['r', rotate], - ['t', x, y], - ]); - this.setMatrix(newMatrix); - return this; - }; - return Element; -}(_base__WEBPACK_IMPORTED_MODULE_5__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Element); -//# sourceMappingURL=element.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g-base/esm/abstract/group.js": -/*!*********************************************************!*\ - !*** ./node_modules/@antv/g-base/esm/abstract/group.js ***! - \*********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _container__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./container */ "./node_modules/@antv/g-base/esm/abstract/container.js"); - - -var AbstractGroup = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(AbstractGroup, _super); - function AbstractGroup() { - return _super !== null && _super.apply(this, arguments) || this; - } - AbstractGroup.prototype.isGroup = function () { - return true; - }; - AbstractGroup.prototype.isEntityGroup = function () { - return false; - }; - AbstractGroup.prototype.clone = function () { - var clone = _super.prototype.clone.call(this); - // 获取构造函数 - var children = this.getChildren(); - for (var i = 0; i < children.length; i++) { - var child = children[i]; - clone.add(child.clone()); - } - return clone; - }; - return AbstractGroup; -}(_container__WEBPACK_IMPORTED_MODULE_1__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (AbstractGroup); -//# sourceMappingURL=group.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g-base/esm/abstract/shape.js": -/*!*********************************************************!*\ - !*** ./node_modules/@antv/g-base/esm/abstract/shape.js ***! - \*********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./element */ "./node_modules/@antv/g-base/esm/abstract/element.js"); -/* harmony import */ var _util_matrix__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/matrix */ "./node_modules/@antv/g-base/esm/util/matrix.js"); - - - -var AbstractShape = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(AbstractShape, _super); - function AbstractShape(cfg) { - return _super.call(this, cfg) || this; - } - // 是否在包围盒内 - AbstractShape.prototype._isInBBox = function (refX, refY) { - var bbox = this.getBBox(); - return bbox.minX <= refX && bbox.maxX >= refX && bbox.minY <= refY && bbox.maxY >= refY; - }; - /** - * 属性更改后需要做的事情 - * @protected - * @param {ShapeAttrs} targetAttrs 渲染的图像属性 - */ - AbstractShape.prototype.afterAttrsChange = function (targetAttrs) { - _super.prototype.afterAttrsChange.call(this, targetAttrs); - this.clearCacheBBox(); - }; - // 计算包围盒时,需要缓存,这是一个高频的操作 - AbstractShape.prototype.getBBox = function () { - var bbox = this.get('bbox'); - if (!bbox) { - bbox = this.calculateBBox(); - this.set('bbox', bbox); - } - return bbox; - }; - // 计算相对于画布的包围盒 - AbstractShape.prototype.getCanvasBBox = function () { - var canvasBox = this.get('canvasBox'); - if (!canvasBox) { - canvasBox = this.calculateCanvasBBox(); - this.set('canvasBox', canvasBox); - } - return canvasBox; - }; - AbstractShape.prototype.applyMatrix = function (matrix) { - _super.prototype.applyMatrix.call(this, matrix); - // 清理掉缓存的包围盒 - this.set('canvasBox', null); - }; - /** - * 计算相对于画布的包围盒,默认等同于 bbox - * @return {BBox} 包围盒 - */ - AbstractShape.prototype.calculateCanvasBBox = function () { - var bbox = this.getBBox(); - var totalMatrix = this.getTotalMatrix(); - var minX = bbox.minX, minY = bbox.minY, maxX = bbox.maxX, maxY = bbox.maxY; - if (totalMatrix) { - var topLeft = Object(_util_matrix__WEBPACK_IMPORTED_MODULE_2__["multiplyVec2"])(totalMatrix, [bbox.minX, bbox.minY]); - var topRight = Object(_util_matrix__WEBPACK_IMPORTED_MODULE_2__["multiplyVec2"])(totalMatrix, [bbox.maxX, bbox.minY]); - var bottomLeft = Object(_util_matrix__WEBPACK_IMPORTED_MODULE_2__["multiplyVec2"])(totalMatrix, [bbox.minX, bbox.maxY]); - var bottomRight = Object(_util_matrix__WEBPACK_IMPORTED_MODULE_2__["multiplyVec2"])(totalMatrix, [bbox.maxX, bbox.maxY]); - minX = Math.min(topLeft[0], topRight[0], bottomLeft[0], bottomRight[0]); - maxX = Math.max(topLeft[0], topRight[0], bottomLeft[0], bottomRight[0]); - minY = Math.min(topLeft[1], topRight[1], bottomLeft[1], bottomRight[1]); - maxY = Math.max(topLeft[1], topRight[1], bottomLeft[1], bottomRight[1]); - } - var attrs = this.attrs; - // 如果存在 shadow 则计算 shadow - if (attrs.shadowColor) { - var _a = attrs.shadowBlur, shadowBlur = _a === void 0 ? 0 : _a, _b = attrs.shadowOffsetX, shadowOffsetX = _b === void 0 ? 0 : _b, _c = attrs.shadowOffsetY, shadowOffsetY = _c === void 0 ? 0 : _c; - var shadowLeft = minX - shadowBlur + shadowOffsetX; - var shadowRight = maxX + shadowBlur + shadowOffsetX; - var shadowTop = minY - shadowBlur + shadowOffsetY; - var shadowBottom = maxY + shadowBlur + shadowOffsetY; - minX = Math.min(minX, shadowLeft); - maxX = Math.max(maxX, shadowRight); - minY = Math.min(minY, shadowTop); - maxY = Math.max(maxY, shadowBottom); - } - return { - x: minX, - y: minY, - minX: minX, - minY: minY, - maxX: maxX, - maxY: maxY, - width: maxX - minX, - height: maxY - minY, - }; - }; - /** - * @protected - * 清理缓存的 bbox - */ - AbstractShape.prototype.clearCacheBBox = function () { - this.set('bbox', null); - this.set('canvasBox', null); - }; - // 实现接口 - AbstractShape.prototype.isClipShape = function () { - return this.get('isClipShape'); - }; - /** - * @protected - * 不同的图形自己实现是否在图形内部的逻辑,要判断边和填充区域 - * @param {number} refX 相对于图形的坐标 x - * @param {number} refY 相对于图形的坐标 Y - * @return {boolean} 点是否在图形内部 - */ - AbstractShape.prototype.isInShape = function (refX, refY) { - return false; - }; - /** - * 是否仅仅使用 BBox 检测就可以判定拾取到图形 - * 默认是 false,但是有些图形例如 image、marker 等都可直接使用 BBox 的检测而不需要使用图形拾取 - * @return {Boolean} 仅仅使用 BBox 进行拾取 - */ - AbstractShape.prototype.isOnlyHitBox = function () { - return false; - }; - // 不同的 Shape 各自实现 - AbstractShape.prototype.isHit = function (x, y) { - var startArrowShape = this.get('startArrowShape'); - var endArrowShape = this.get('endArrowShape'); - var vec = [x, y, 1]; - vec = this.invertFromMatrix(vec); - var refX = vec[0], refY = vec[1]; - var inBBox = this._isInBBox(refX, refY); - // 跳过图形的拾取,在某些图形中可以省略一倍的检测成本 - if (this.isOnlyHitBox()) { - return inBBox; - } - // 被裁减掉的和不在包围盒内的不进行计算 - if (inBBox && !this.isClipped(refX, refY)) { - // 对图形进行拾取判断 - if (this.isInShape(refX, refY)) { - return true; - } - // 对起始箭头进行拾取判断 - if (startArrowShape && startArrowShape.isHit(refX, refY)) { - return true; - } - // 对结束箭头进行拾取判断 - if (endArrowShape && endArrowShape.isHit(refX, refY)) { - return true; - } - } - return false; - }; - return AbstractShape; -}(_element__WEBPACK_IMPORTED_MODULE_1__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (AbstractShape); -//# sourceMappingURL=shape.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g-base/esm/animate/timeline.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/g-base/esm/animate/timeline.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-timer */ "./node_modules/d3-timer/src/index.js"); -/* harmony import */ var d3_ease__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-ease */ "./node_modules/d3-ease/src/index.js"); -/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js"); -/* harmony import */ var _util_path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/path */ "./node_modules/@antv/g-base/esm/util/path.js"); -/* harmony import */ var _util_color__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/color */ "./node_modules/@antv/g-base/esm/util/color.js"); - - - - // 目前整体动画只需要数值和数组的差值计算 - - -var IDENTITY_MATRIX = [1, 0, 0, 0, 1, 0, 0, 0, 1]; -/** - * 使用 ratio 进行插值计算来更新属性 - * @param {IElement} shape 元素 - * @param {Animation} animation 动画 - * @param {number} ratio 比例 - * @return {boolean} 动画是否执行完成 - */ -function _update(shape, animation, ratio) { - var cProps = {}; // 此刻属性 - var fromAttrs = animation.fromAttrs, toAttrs = animation.toAttrs; - if (shape.destroyed) { - return; - } - var interf; // 差值函数 - for (var k in toAttrs) { - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isEqual"])(fromAttrs[k], toAttrs[k])) { - if (k === 'path') { - var toPath = toAttrs[k]; - var fromPath = fromAttrs[k]; - if (toPath.length > fromPath.length) { - toPath = _util_path__WEBPACK_IMPORTED_MODULE_4__["parsePathString"](toAttrs[k]); // 终点状态 - fromPath = _util_path__WEBPACK_IMPORTED_MODULE_4__["parsePathString"](fromAttrs[k]); // 起始状态 - fromPath = _util_path__WEBPACK_IMPORTED_MODULE_4__["fillPathByDiff"](fromPath, toPath); - fromPath = _util_path__WEBPACK_IMPORTED_MODULE_4__["formatPath"](fromPath, toPath); - animation.fromAttrs.path = fromPath; - animation.toAttrs.path = toPath; - } - else if (!animation.pathFormatted) { - toPath = _util_path__WEBPACK_IMPORTED_MODULE_4__["parsePathString"](toAttrs[k]); - fromPath = _util_path__WEBPACK_IMPORTED_MODULE_4__["parsePathString"](fromAttrs[k]); - fromPath = _util_path__WEBPACK_IMPORTED_MODULE_4__["formatPath"](fromPath, toPath); - animation.fromAttrs.path = fromPath; - animation.toAttrs.path = toPath; - animation.pathFormatted = true; - } - cProps[k] = []; - for (var i = 0; i < toPath.length; i++) { - var toPathPoint = toPath[i]; - var fromPathPoint = fromPath[i]; - var cPathPoint = []; - for (var j = 0; j < toPathPoint.length; j++) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNumber"])(toPathPoint[j]) && fromPathPoint && Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNumber"])(fromPathPoint[j])) { - interf = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_3__["interpolate"])(fromPathPoint[j], toPathPoint[j]); - cPathPoint.push(interf(ratio)); - } - else { - cPathPoint.push(toPathPoint[j]); - } - } - cProps[k].push(cPathPoint); - } - } - else if (k === 'matrix') { - /* - 对矩阵进行插值时,需要保证矩阵不为空,为空则使用单位矩阵 - TODO: 二维和三维场景下单位矩阵不同,之后 WebGL 版需要做进一步处理 - */ - var matrixFn = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_3__["interpolateArray"])(fromAttrs[k] || IDENTITY_MATRIX, toAttrs[k] || IDENTITY_MATRIX); - var currentMatrix = matrixFn(ratio); - cProps[k] = currentMatrix; - } - else if (Object(_util_color__WEBPACK_IMPORTED_MODULE_5__["isColorProp"])(k) && Object(_util_color__WEBPACK_IMPORTED_MODULE_5__["isGradientColor"])(toAttrs[k])) { - cProps[k] = toAttrs[k]; - } - else if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(toAttrs[k])) { - // 非函数类型的值才能做插值 - interf = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_3__["interpolate"])(fromAttrs[k], toAttrs[k]); - cProps[k] = interf(ratio); - } - } - } - shape.attr(cProps); -} -/** - * 根据自定义帧动画函数 onFrame 来更新属性 - * @param {IElement} shape 元素 - * @param {Animation} animation 动画 - * @param {number} elapsed 动画执行时间(毫秒) - * @return {boolean} 动画是否执行完成 - */ -function update(shape, animation, elapsed) { - var startTime = animation.startTime, delay = animation.delay; - // 如果还没有开始执行或暂停,先不更新 - if (elapsed < startTime + delay || animation._paused) { - return false; - } - var ratio; - var duration = animation.duration; - var easing = animation.easing; - // 已执行时间 - elapsed = elapsed - startTime - animation.delay; - if (animation.repeat) { - // 如果动画重复执行,则 elapsed > duration,计算 ratio 时需取模 - ratio = (elapsed % duration) / duration; - ratio = d3_ease__WEBPACK_IMPORTED_MODULE_2__[easing](ratio); - } - else { - ratio = elapsed / duration; - if (ratio < 1) { - // 动画未执行完 - ratio = d3_ease__WEBPACK_IMPORTED_MODULE_2__[easing](ratio); - } - else { - // 动画已执行完 - if (animation.onFrame) { - shape.attr(animation.onFrame(1)); - } - else { - shape.attr(animation.toAttrs); - } - return true; - } - } - if (animation.onFrame) { - var attrs = animation.onFrame(ratio); - shape.attr(attrs); - } - else { - _update(shape, animation, ratio); - } - return false; -} -var Timeline = /** @class */ (function () { - /** - * 时间轴构造函数,依赖于画布 - * @param {} - */ - function Timeline(canvas) { - /** - * 执行动画的元素列表 - * @type {IElement[]} - */ - this.animators = []; - /** - * 当前时间 - * @type {number} - */ - this.current = 0; - /** - * 定时器 - * @type {d3Timer.Timer} - */ - this.timer = null; - this.canvas = canvas; - } - /** - * 初始化定时器 - */ - Timeline.prototype.initTimer = function () { - var _this = this; - var isFinished = false; - var shape; - var animations; - var animation; - this.timer = d3_timer__WEBPACK_IMPORTED_MODULE_1__["timer"](function (elapsed) { - _this.current = elapsed; - if (_this.animators.length > 0) { - for (var i = _this.animators.length - 1; i >= 0; i--) { - shape = _this.animators[i]; - if (shape.destroyed) { - // 如果已经被销毁,直接移出队列 - _this.removeAnimator(i); - continue; - } - if (!shape.isAnimatePaused()) { - animations = shape.get('animations'); - for (var j = animations.length - 1; j >= 0; j--) { - animation = animations[j]; - isFinished = update(shape, animation, elapsed); - if (isFinished) { - animations.splice(j, 1); - isFinished = false; - if (animation.callback) { - animation.callback(); - } - } - } - } - if (animations.length === 0) { - _this.removeAnimator(i); - } - } - var autoDraw = _this.canvas.get('autoDraw'); - // 非自动渲染模式下,手动调用 canvas.draw() 重新渲染 - if (!autoDraw) { - _this.canvas.draw(); - } - } - }); - }; - /** - * 增加动画元素 - */ - Timeline.prototype.addAnimator = function (shape) { - this.animators.push(shape); - }; - /** - * 移除动画元素 - */ - Timeline.prototype.removeAnimator = function (index) { - this.animators.splice(index, 1); - }; - /** - * 是否有动画在执行 - */ - Timeline.prototype.isAnimating = function () { - return !!this.animators.length; - }; - /** - * 停止定时器 - */ - Timeline.prototype.stop = function () { - if (this.timer) { - this.timer.stop(); - } - }; - /** - * 停止时间轴上所有元素的动画,并置空动画元素列表 - * @param {boolean} toEnd 是否到动画的最终状态,用来透传给动画元素的 stopAnimate 方法 - */ - Timeline.prototype.stopAllAnimations = function (toEnd) { - if (toEnd === void 0) { toEnd = true; } - this.animators.forEach(function (animator) { - animator.stopAnimate(toEnd); - }); - this.animators = []; - this.canvas.draw(); - }; - /** - * 获取当前时间 - */ - Timeline.prototype.getTime = function () { - return this.current; - }; - return Timeline; -}()); -/* harmony default export */ __webpack_exports__["default"] = (Timeline); -//# sourceMappingURL=timeline.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g-base/esm/event/graph-event.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/g-base/esm/event/graph-event.js ***! - \************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var GraphEvent = /** @class */ (function () { - function GraphEvent(type, event) { - /** - * 是否允许冒泡 - * @type {boolean} - */ - this.bubbles = true; - /** - * 触发对象 - * @type {object} - */ - this.target = null; - /** - * 监听对象 - * @type {object} - */ - this.currentTarget = null; - /** - * 委托对象 - * @type {object} - */ - this.delegateTarget = null; - /** - * 委托事件监听对象的代理对象,即 ev.delegateObject = ev.currentTarget.get('delegateObject') - * @type {object} - */ - this.delegateObject = null; - /** - * 是否阻止了原生事件 - * @type {boolean} - */ - this.defaultPrevented = false; - /** - * 是否阻止传播(向上冒泡) - * @type {boolean} - */ - this.propagationStopped = false; - /** - * 触发事件的图形 - * @type {IShape} - */ - this.shape = null; - /** - * 开始触发事件的图形 - * @type {IShape} - */ - this.fromShape = null; - /** - * 事件结束时的触发图形 - * @type {IShape} - */ - this.toShape = null; - // 触发事件的路径 - this.propagationPath = []; - this.type = type; - this.name = type; - this.originalEvent = event; - this.timeStamp = event.timeStamp; - } - /** - * 阻止浏览器默认的行为 - */ - GraphEvent.prototype.preventDefault = function () { - this.defaultPrevented = true; - if (this.originalEvent.preventDefault) { - this.originalEvent.preventDefault(); - } - }; - /** - * 阻止冒泡 - */ - GraphEvent.prototype.stopPropagation = function () { - this.propagationStopped = true; - }; - GraphEvent.prototype.toString = function () { - var type = this.type; - return "[Event (type=" + type + ")]"; - }; - GraphEvent.prototype.save = function () { }; - GraphEvent.prototype.restore = function () { }; - return GraphEvent; -}()); -/* harmony default export */ __webpack_exports__["default"] = (GraphEvent); -//# sourceMappingURL=graph-event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g-base/esm/index.js": -/*!************************************************!*\ - !*** ./node_modules/@antv/g-base/esm/index.js ***! - \************************************************/ -/*! exports provided: version, Event, Base, AbstractCanvas, AbstractGroup, AbstractShape, PathUtil */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return version; }); -/* harmony import */ var _util_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/path */ "./node_modules/@antv/g-base/esm/util/path.js"); -/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "PathUtil", function() { return _util_path__WEBPACK_IMPORTED_MODULE_0__; }); -/* harmony import */ var _event_graph_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./event/graph-event */ "./node_modules/@antv/g-base/esm/event/graph-event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Event", function() { return _event_graph_event__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - -/* harmony import */ var _abstract_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./abstract/base */ "./node_modules/@antv/g-base/esm/abstract/base.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Base", function() { return _abstract_base__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - -/* harmony import */ var _abstract_canvas__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./abstract/canvas */ "./node_modules/@antv/g-base/esm/abstract/canvas.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AbstractCanvas", function() { return _abstract_canvas__WEBPACK_IMPORTED_MODULE_3__["default"]; }); - -/* harmony import */ var _abstract_group__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./abstract/group */ "./node_modules/@antv/g-base/esm/abstract/group.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AbstractGroup", function() { return _abstract_group__WEBPACK_IMPORTED_MODULE_4__["default"]; }); - -/* harmony import */ var _abstract_shape__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./abstract/shape */ "./node_modules/@antv/g-base/esm/abstract/shape.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AbstractShape", function() { return _abstract_shape__WEBPACK_IMPORTED_MODULE_5__["default"]; }); - -/** - * @fileoverview G 的基础接口定义和所有的抽象类 - * @author dxq613@gmail.com - */ - -var pkg = __webpack_require__(/*! ../package.json */ "./node_modules/@antv/g-base/package.json"); -var version = pkg.version; - - - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g-base/esm/util/color.js": -/*!*****************************************************!*\ - !*** ./node_modules/@antv/g-base/esm/util/color.js ***! - \*****************************************************/ -/*! exports provided: isColorProp, isGradientColor */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isColorProp", function() { return isColorProp; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isGradientColor", function() { return isGradientColor; }); -var isColorProp = function (prop) { return ['fill', 'stroke', 'fillStyle', 'strokeStyle'].includes(prop); }; -var isGradientColor = function (val) { return /^[r,R,L,l]{1}[\s]*\(/.test(val); }; -//# sourceMappingURL=color.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g-base/esm/util/matrix.js": -/*!******************************************************!*\ - !*** ./node_modules/@antv/g-base/esm/util/matrix.js ***! - \******************************************************/ -/*! exports provided: multiplyMatrix, multiplyVec2, invert */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiplyMatrix", function() { return multiplyMatrix; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiplyVec2", function() { return multiplyVec2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "invert", function() { return invert; }); -/** - * @fileoverview 矩阵运算,本来是要引入 gl-matrix, 但是考虑到 g-mobile 对大小有限制,同时 g-webgl 使用的 matrix 不一致 - * 所以,这里仅实现 2D 几个运算,上层自己引入 gl-matrix - * @author dxq613@gmail.com - */ -/** - * 3阶矩阵相乘 - * @param {number[]} a 矩阵1 - * @param {number[]} b 矩阵2 - */ -function multiplyMatrix(a, b) { - var out = []; - var a00 = a[0]; - var a01 = a[1]; - var a02 = a[2]; - var a10 = a[3]; - var a11 = a[4]; - var a12 = a[5]; - var a20 = a[6]; - var a21 = a[7]; - var a22 = a[8]; - var b00 = b[0]; - var b01 = b[1]; - var b02 = b[2]; - var b10 = b[3]; - var b11 = b[4]; - var b12 = b[5]; - var b20 = b[6]; - var b21 = b[7]; - var b22 = b[8]; - out[0] = b00 * a00 + b01 * a10 + b02 * a20; - out[1] = b00 * a01 + b01 * a11 + b02 * a21; - out[2] = b00 * a02 + b01 * a12 + b02 * a22; - out[3] = b10 * a00 + b11 * a10 + b12 * a20; - out[4] = b10 * a01 + b11 * a11 + b12 * a21; - out[5] = b10 * a02 + b11 * a12 + b12 * a22; - out[6] = b20 * a00 + b21 * a10 + b22 * a20; - out[7] = b20 * a01 + b21 * a11 + b22 * a21; - out[8] = b20 * a02 + b21 * a12 + b22 * a22; - return out; -} -/** - * 3阶矩阵同2阶向量相乘 - * @param {number[]} m 矩阵 - * @param {number[]} v 二阶向量 - */ -function multiplyVec2(m, v) { - var out = []; - var x = v[0]; - var y = v[1]; - out[0] = m[0] * x + m[3] * y + m[6]; - out[1] = m[1] * x + m[4] * y + m[7]; - return out; -} -/** - * 矩阵的逆 - * @param {number[]} a 矩阵 - */ -function invert(a) { - var out = []; - var a00 = a[0]; - var a01 = a[1]; - var a02 = a[2]; - var a10 = a[3]; - var a11 = a[4]; - var a12 = a[5]; - var a20 = a[6]; - var a21 = a[7]; - var a22 = a[8]; - var b01 = a22 * a11 - a12 * a21; - var b11 = -a22 * a10 + a12 * a20; - var b21 = a21 * a10 - a11 * a20; - // Calculate the determinant - var det = a00 * b01 + a01 * b11 + a02 * b21; - if (!det) { - return null; - } - det = 1.0 / det; - out[0] = b01 * det; - out[1] = (-a22 * a01 + a02 * a21) * det; - out[2] = (a12 * a01 - a02 * a11) * det; - out[3] = b11 * det; - out[4] = (a22 * a00 - a02 * a20) * det; - out[5] = (-a12 * a00 + a02 * a10) * det; - out[6] = b21 * det; - out[7] = (-a21 * a00 + a01 * a20) * det; - out[8] = (a11 * a00 - a01 * a10) * det; - return out; -} -//# sourceMappingURL=matrix.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g-base/esm/util/path.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/g-base/esm/util/path.js ***! - \****************************************************/ -/*! exports provided: catmullRomToBezier, fillPath, fillPathByDiff, formatPath, intersection, parsePathArray, parsePathString, pathToAbsolute, pathToCurve, rectPath */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "catmullRomToBezier", function() { return catmullRomToBezier; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fillPath", function() { return fillPath; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fillPathByDiff", function() { return fillPathByDiff; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatPath", function() { return formatPath; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "intersection", function() { return intersection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parsePathArray", function() { return parsePathArray; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parsePathString", function() { return parsePathString; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pathToAbsolute", function() { return pathToAbsolute; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pathToCurve", function() { return pathToCurve; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rectPath", function() { return rectPath; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -var SPACES = '\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029'; -var PATH_COMMAND = new RegExp("([a-z])[" + SPACES + ",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?[" + SPACES + "]*,?[" + SPACES + "]*)+)", 'ig'); -var PATH_VALUES = new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)[" + SPACES + "]*,?[" + SPACES + "]*", 'ig'); -// Parse given path string into an array of arrays of path segments -var parsePathString = function (pathString) { - if (!pathString) { - return null; - } - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isArray"])(pathString)) { - return pathString; - } - var paramCounts = { - a: 7, - c: 6, - o: 2, - h: 1, - l: 2, - m: 2, - r: 4, - q: 4, - s: 4, - t: 2, - v: 1, - u: 3, - z: 0, - }; - var data = []; - String(pathString).replace(PATH_COMMAND, function (a, b, c) { - var params = []; - var name = b.toLowerCase(); - c.replace(PATH_VALUES, function (a, b) { - b && params.push(+b); - }); - if (name === 'm' && params.length > 2) { - data.push([b].concat(params.splice(0, 2))); - name = 'l'; - b = b === 'm' ? 'l' : 'L'; - } - if (name === 'o' && params.length === 1) { - data.push([b, params[0]]); - } - if (name === 'r') { - data.push([b].concat(params)); - } - else { - while (params.length >= paramCounts[name]) { - data.push([b].concat(params.splice(0, paramCounts[name]))); - if (!paramCounts[name]) { - break; - } - } - } - return pathString; - }); - return data; -}; -// http://schepers.cc/getting-to-the-point -var catmullRomToBezier = function (crp, z) { - var d = []; - // @ts-ignore - for (var i = 0, iLen = crp.length; iLen - 2 * !z > i; i += 2) { - var p = [ - { - x: +crp[i - 2], - y: +crp[i - 1], - }, - { - x: +crp[i], - y: +crp[i + 1], - }, - { - x: +crp[i + 2], - y: +crp[i + 3], - }, - { - x: +crp[i + 4], - y: +crp[i + 5], - }, - ]; - if (z) { - if (!i) { - p[0] = { - x: +crp[iLen - 2], - y: +crp[iLen - 1], - }; - } - else if (iLen - 4 === i) { - p[3] = { - x: +crp[0], - y: +crp[1], - }; - } - else if (iLen - 2 === i) { - p[2] = { - x: +crp[0], - y: +crp[1], - }; - p[3] = { - x: +crp[2], - y: +crp[3], - }; - } - } - else { - if (iLen - 4 === i) { - p[3] = p[2]; - } - else if (!i) { - p[0] = { - x: +crp[i], - y: +crp[i + 1], - }; - } - } - d.push([ - 'C', - (-p[0].x + 6 * p[1].x + p[2].x) / 6, - (-p[0].y + 6 * p[1].y + p[2].y) / 6, - (p[1].x + 6 * p[2].x - p[3].x) / 6, - (p[1].y + 6 * p[2].y - p[3].y) / 6, - p[2].x, - p[2].y, - ]); - } - return d; -}; -var ellipsePath = function (x, y, rx, ry, a) { - var res = []; - if (a === null && ry === null) { - ry = rx; - } - x = +x; - y = +y; - rx = +rx; - ry = +ry; - if (a !== null) { - var rad = Math.PI / 180; - var x1 = x + rx * Math.cos(-ry * rad); - var x2 = x + rx * Math.cos(-a * rad); - var y1 = y + rx * Math.sin(-ry * rad); - var y2 = y + rx * Math.sin(-a * rad); - res = [ - ['M', x1, y1], - ['A', rx, rx, 0, +(a - ry > 180), 0, x2, y2], - ]; - } - else { - res = [['M', x, y], ['m', 0, -ry], ['a', rx, ry, 0, 1, 1, 0, 2 * ry], ['a', rx, ry, 0, 1, 1, 0, -2 * ry], ['z']]; - } - return res; -}; -var pathToAbsolute = function (pathArray) { - pathArray = parsePathString(pathArray); - if (!pathArray || !pathArray.length) { - return [['M', 0, 0]]; - } - var res = []; - var x = 0; - var y = 0; - var mx = 0; - var my = 0; - var start = 0; - var pa0; - var dots; - if (pathArray[0][0] === 'M') { - x = +pathArray[0][1]; - y = +pathArray[0][2]; - mx = x; - my = y; - start++; - res[0] = ['M', x, y]; - } - var crz = pathArray.length === 3 && - pathArray[0][0] === 'M' && - pathArray[1][0].toUpperCase() === 'R' && - pathArray[2][0].toUpperCase() === 'Z'; - for (var r = void 0, pa = void 0, i = start, ii = pathArray.length; i < ii; i++) { - res.push((r = [])); - pa = pathArray[i]; - pa0 = pa[0]; - if (pa0 !== pa0.toUpperCase()) { - r[0] = pa0.toUpperCase(); - switch (r[0]) { - case 'A': - r[1] = pa[1]; - r[2] = pa[2]; - r[3] = pa[3]; - r[4] = pa[4]; - r[5] = pa[5]; - r[6] = +pa[6] + x; - r[7] = +pa[7] + y; - break; - case 'V': - r[1] = +pa[1] + y; - break; - case 'H': - r[1] = +pa[1] + x; - break; - case 'R': - dots = [x, y].concat(pa.slice(1)); - for (var j = 2, jj = dots.length; j < jj; j++) { - dots[j] = +dots[j] + x; - dots[++j] = +dots[j] + y; - } - res.pop(); - res = res.concat(catmullRomToBezier(dots, crz)); - break; - case 'O': - res.pop(); - dots = ellipsePath(x, y, pa[1], pa[2]); - dots.push(dots[0]); - res = res.concat(dots); - break; - case 'U': - res.pop(); - res = res.concat(ellipsePath(x, y, pa[1], pa[2], pa[3])); - r = ['U'].concat(res[res.length - 1].slice(-2)); - break; - case 'M': - mx = +pa[1] + x; - my = +pa[2] + y; - break; // for lint - default: - for (var j = 1, jj = pa.length; j < jj; j++) { - r[j] = +pa[j] + (j % 2 ? x : y); - } - } - } - else if (pa0 === 'R') { - dots = [x, y].concat(pa.slice(1)); - res.pop(); - res = res.concat(catmullRomToBezier(dots, crz)); - r = ['R'].concat(pa.slice(-2)); - } - else if (pa0 === 'O') { - res.pop(); - dots = ellipsePath(x, y, pa[1], pa[2]); - dots.push(dots[0]); - res = res.concat(dots); - } - else if (pa0 === 'U') { - res.pop(); - res = res.concat(ellipsePath(x, y, pa[1], pa[2], pa[3])); - r = ['U'].concat(res[res.length - 1].slice(-2)); - } - else { - for (var k = 0, kk = pa.length; k < kk; k++) { - r[k] = pa[k]; - } - } - pa0 = pa0.toUpperCase(); - if (pa0 !== 'O') { - switch (r[0]) { - case 'Z': - x = +mx; - y = +my; - break; - case 'H': - x = r[1]; - break; - case 'V': - y = r[1]; - break; - case 'M': - mx = r[r.length - 2]; - my = r[r.length - 1]; - break; // for lint - default: - x = r[r.length - 2]; - y = r[r.length - 1]; - } - } - } - return res; -}; -var l2c = function (x1, y1, x2, y2) { - return [x1, y1, x2, y2, x2, y2]; -}; -var q2c = function (x1, y1, ax, ay, x2, y2) { - var _13 = 1 / 3; - var _23 = 2 / 3; - return [_13 * x1 + _23 * ax, _13 * y1 + _23 * ay, _13 * x2 + _23 * ax, _13 * y2 + _23 * ay, x2, y2]; -}; -var a2c = function (x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) { - // for more information of where this math came from visit: - // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes - if (rx === ry) { - rx += 1; - } - var _120 = (Math.PI * 120) / 180; - var rad = (Math.PI / 180) * (+angle || 0); - var res = []; - var xy; - var f1; - var f2; - var cx; - var cy; - var rotate = function (x, y, rad) { - var X = x * Math.cos(rad) - y * Math.sin(rad); - var Y = x * Math.sin(rad) + y * Math.cos(rad); - return { - x: X, - y: Y, - }; - }; - if (!recursive) { - xy = rotate(x1, y1, -rad); - x1 = xy.x; - y1 = xy.y; - xy = rotate(x2, y2, -rad); - x2 = xy.x; - y2 = xy.y; - if (x1 === x2 && y1 === y2) { - // 若弧的起始点和终点重叠则错开一点 - x2 += 1; - y2 += 1; - } - // const cos = Math.cos(Math.PI / 180 * angle); - // const sin = Math.sin(Math.PI / 180 * angle); - var x = (x1 - x2) / 2; - var y = (y1 - y2) / 2; - var h = (x * x) / (rx * rx) + (y * y) / (ry * ry); - if (h > 1) { - h = Math.sqrt(h); - rx = h * rx; - ry = h * ry; - } - var rx2 = rx * rx; - var ry2 = ry * ry; - var k = (large_arc_flag === sweep_flag ? -1 : 1) * - Math.sqrt(Math.abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x))); - cx = (k * rx * y) / ry + (x1 + x2) / 2; - cy = (k * -ry * x) / rx + (y1 + y2) / 2; - // @ts-ignore - f1 = Math.asin(((y1 - cy) / ry).toFixed(9)); - // @ts-ignore - f2 = Math.asin(((y2 - cy) / ry).toFixed(9)); - f1 = x1 < cx ? Math.PI - f1 : f1; - f2 = x2 < cx ? Math.PI - f2 : f2; - f1 < 0 && (f1 = Math.PI * 2 + f1); - f2 < 0 && (f2 = Math.PI * 2 + f2); - if (sweep_flag && f1 > f2) { - f1 = f1 - Math.PI * 2; - } - if (!sweep_flag && f2 > f1) { - f2 = f2 - Math.PI * 2; - } - } - else { - f1 = recursive[0]; - f2 = recursive[1]; - cx = recursive[2]; - cy = recursive[3]; - } - var df = f2 - f1; - if (Math.abs(df) > _120) { - var f2old = f2; - var x2old = x2; - var y2old = y2; - f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1); - x2 = cx + rx * Math.cos(f2); - y2 = cy + ry * Math.sin(f2); - res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]); - } - df = f2 - f1; - var c1 = Math.cos(f1); - var s1 = Math.sin(f1); - var c2 = Math.cos(f2); - var s2 = Math.sin(f2); - var t = Math.tan(df / 4); - var hx = (4 / 3) * rx * t; - var hy = (4 / 3) * ry * t; - var m1 = [x1, y1]; - var m2 = [x1 + hx * s1, y1 - hy * c1]; - var m3 = [x2 + hx * s2, y2 - hy * c2]; - var m4 = [x2, y2]; - m2[0] = 2 * m1[0] - m2[0]; - m2[1] = 2 * m1[1] - m2[1]; - if (recursive) { - return [m2, m3, m4].concat(res); - } - res = [m2, m3, m4] - .concat(res) - .join() - .split(','); - var newres = []; - for (var i = 0, ii = res.length; i < ii; i++) { - newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x; - } - return newres; -}; -var pathToCurve = function (path, path2) { - var p = pathToAbsolute(path); - var p2 = path2 && pathToAbsolute(path2); - var attrs = { - x: 0, - y: 0, - bx: 0, - by: 0, - X: 0, - Y: 0, - qx: null, - qy: null, - }; - var attrs2 = { - x: 0, - y: 0, - bx: 0, - by: 0, - X: 0, - Y: 0, - qx: null, - qy: null, - }; - var pcoms1 = []; // path commands of original path p - var pcoms2 = []; // path commands of original path p2 - var pfirst = ''; // temporary holder for original path command - var pcom = ''; // holder for previous path command of original path - var ii; - var processPath = function (path, d, pcom) { - var nx; - var ny; - if (!path) { - return ['C', d.x, d.y, d.x, d.y, d.x, d.y]; - } - !(path[0] in - { - T: 1, - Q: 1, - }) && (d.qx = d.qy = null); - switch (path[0]) { - case 'M': - d.X = path[1]; - d.Y = path[2]; - break; - case 'A': - path = ['C'].concat(a2c.apply(0, [d.x, d.y].concat(path.slice(1)))); - break; - case 'S': - if (pcom === 'C' || pcom === 'S') { - // In "S" case we have to take into account, if the previous command is C/S. - nx = d.x * 2 - d.bx; // And reflect the previous - ny = d.y * 2 - d.by; // command's control point relative to the current point. - } - else { - // or some else or nothing - nx = d.x; - ny = d.y; - } - path = ['C', nx, ny].concat(path.slice(1)); - break; - case 'T': - if (pcom === 'Q' || pcom === 'T') { - // In "T" case we have to take into account, if the previous command is Q/T. - d.qx = d.x * 2 - d.qx; // And make a reflection similar - d.qy = d.y * 2 - d.qy; // to case "S". - } - else { - // or something else or nothing - d.qx = d.x; - d.qy = d.y; - } - path = ['C'].concat(q2c(d.x, d.y, d.qx, d.qy, path[1], path[2])); - break; - case 'Q': - d.qx = path[1]; - d.qy = path[2]; - path = ['C'].concat(q2c(d.x, d.y, path[1], path[2], path[3], path[4])); - break; - case 'L': - path = ['C'].concat(l2c(d.x, d.y, path[1], path[2])); - break; - case 'H': - path = ['C'].concat(l2c(d.x, d.y, path[1], d.y)); - break; - case 'V': - path = ['C'].concat(l2c(d.x, d.y, d.x, path[1])); - break; - case 'Z': - path = ['C'].concat(l2c(d.x, d.y, d.X, d.Y)); - break; - default: - break; - } - return path; - }; - var fixArc = function (pp, i) { - if (pp[i].length > 7) { - pp[i].shift(); - var pi = pp[i]; - while (pi.length) { - pcoms1[i] = 'A'; // if created multiple C:s, their original seg is saved - p2 && (pcoms2[i] = 'A'); // the same as above - pp.splice(i++, 0, ['C'].concat(pi.splice(0, 6))); - } - pp.splice(i, 1); - ii = Math.max(p.length, (p2 && p2.length) || 0); - } - }; - var fixM = function (path1, path2, a1, a2, i) { - if (path1 && path2 && path1[i][0] === 'M' && path2[i][0] !== 'M') { - path2.splice(i, 0, ['M', a2.x, a2.y]); - a1.bx = 0; - a1.by = 0; - a1.x = path1[i][1]; - a1.y = path1[i][2]; - ii = Math.max(p.length, (p2 && p2.length) || 0); - } - }; - ii = Math.max(p.length, (p2 && p2.length) || 0); - for (var i = 0; i < ii; i++) { - p[i] && (pfirst = p[i][0]); // save current path command - if (pfirst !== 'C') { - // C is not saved yet, because it may be result of conversion - pcoms1[i] = pfirst; // Save current path command - i && (pcom = pcoms1[i - 1]); // Get previous path command pcom - } - p[i] = processPath(p[i], attrs, pcom); // Previous path command is inputted to processPath - if (pcoms1[i] !== 'A' && pfirst === 'C') - pcoms1[i] = 'C'; // A is the only command - // which may produce multiple C:s - // so we have to make sure that C is also C in original path - fixArc(p, i); // fixArc adds also the right amount of A:s to pcoms1 - if (p2) { - // the same procedures is done to p2 - p2[i] && (pfirst = p2[i][0]); - if (pfirst !== 'C') { - pcoms2[i] = pfirst; - i && (pcom = pcoms2[i - 1]); - } - p2[i] = processPath(p2[i], attrs2, pcom); - if (pcoms2[i] !== 'A' && pfirst === 'C') { - pcoms2[i] = 'C'; - } - fixArc(p2, i); - } - fixM(p, p2, attrs, attrs2, i); - fixM(p2, p, attrs2, attrs, i); - var seg = p[i]; - var seg2 = p2 && p2[i]; - var seglen = seg.length; - var seg2len = p2 && seg2.length; - attrs.x = seg[seglen - 2]; - attrs.y = seg[seglen - 1]; - attrs.bx = parseFloat(seg[seglen - 4]) || attrs.x; - attrs.by = parseFloat(seg[seglen - 3]) || attrs.y; - attrs2.bx = p2 && (parseFloat(seg2[seg2len - 4]) || attrs2.x); - attrs2.by = p2 && (parseFloat(seg2[seg2len - 3]) || attrs2.y); - attrs2.x = p2 && seg2[seg2len - 2]; - attrs2.y = p2 && seg2[seg2len - 1]; - } - return p2 ? [p, p2] : p; -}; -var p2s = /,?([a-z]),?/gi; -var parsePathArray = function (path) { - return path.join(',').replace(p2s, '$1'); -}; -var base3 = function (t, p1, p2, p3, p4) { - var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4; - var t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3; - return t * t2 - 3 * p1 + 3 * p2; -}; -var bezlen = function (x1, y1, x2, y2, x3, y3, x4, y4, z) { - if (z === null) { - z = 1; - } - z = z > 1 ? 1 : z < 0 ? 0 : z; - var z2 = z / 2; - var n = 12; - var Tvalues = [ - -0.1252, - 0.1252, - -0.3678, - 0.3678, - -0.5873, - 0.5873, - -0.7699, - 0.7699, - -0.9041, - 0.9041, - -0.9816, - 0.9816, - ]; - var Cvalues = [0.2491, 0.2491, 0.2335, 0.2335, 0.2032, 0.2032, 0.1601, 0.1601, 0.1069, 0.1069, 0.0472, 0.0472]; - var sum = 0; - for (var i = 0; i < n; i++) { - var ct = z2 * Tvalues[i] + z2; - var xbase = base3(ct, x1, x2, x3, x4); - var ybase = base3(ct, y1, y2, y3, y4); - var comb = xbase * xbase + ybase * ybase; - sum += Cvalues[i] * Math.sqrt(comb); - } - return z2 * sum; -}; -var curveDim = function (x0, y0, x1, y1, x2, y2, x3, y3) { - var tvalues = []; - var bounds = [[], []]; - var a; - var b; - var c; - var t; - for (var i = 0; i < 2; ++i) { - if (i === 0) { - b = 6 * x0 - 12 * x1 + 6 * x2; - a = -3 * x0 + 9 * x1 - 9 * x2 + 3 * x3; - c = 3 * x1 - 3 * x0; - } - else { - b = 6 * y0 - 12 * y1 + 6 * y2; - a = -3 * y0 + 9 * y1 - 9 * y2 + 3 * y3; - c = 3 * y1 - 3 * y0; - } - if (Math.abs(a) < 1e-12) { - if (Math.abs(b) < 1e-12) { - continue; - } - t = -c / b; - if (t > 0 && t < 1) { - tvalues.push(t); - } - continue; - } - var b2ac = b * b - 4 * c * a; - var sqrtb2ac = Math.sqrt(b2ac); - if (b2ac < 0) { - continue; - } - var t1 = (-b + sqrtb2ac) / (2 * a); - if (t1 > 0 && t1 < 1) { - tvalues.push(t1); - } - var t2 = (-b - sqrtb2ac) / (2 * a); - if (t2 > 0 && t2 < 1) { - tvalues.push(t2); - } - } - var j = tvalues.length; - var jlen = j; - var mt; - while (j--) { - t = tvalues[j]; - mt = 1 - t; - bounds[0][j] = mt * mt * mt * x0 + 3 * mt * mt * t * x1 + 3 * mt * t * t * x2 + t * t * t * x3; - bounds[1][j] = mt * mt * mt * y0 + 3 * mt * mt * t * y1 + 3 * mt * t * t * y2 + t * t * t * y3; - } - bounds[0][jlen] = x0; - bounds[1][jlen] = y0; - bounds[0][jlen + 1] = x3; - bounds[1][jlen + 1] = y3; - bounds[0].length = bounds[1].length = jlen + 2; - return { - min: { - x: Math.min.apply(0, bounds[0]), - y: Math.min.apply(0, bounds[1]), - }, - max: { - x: Math.max.apply(0, bounds[0]), - y: Math.max.apply(0, bounds[1]), - }, - }; -}; -var intersect = function (x1, y1, x2, y2, x3, y3, x4, y4) { - if (Math.max(x1, x2) < Math.min(x3, x4) || - Math.min(x1, x2) > Math.max(x3, x4) || - Math.max(y1, y2) < Math.min(y3, y4) || - Math.min(y1, y2) > Math.max(y3, y4)) { - return; - } - var nx = (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4); - var ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4); - var denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4); - if (!denominator) { - return; - } - var px = nx / denominator; - var py = ny / denominator; - var px2 = +px.toFixed(2); - var py2 = +py.toFixed(2); - if (px2 < +Math.min(x1, x2).toFixed(2) || - px2 > +Math.max(x1, x2).toFixed(2) || - px2 < +Math.min(x3, x4).toFixed(2) || - px2 > +Math.max(x3, x4).toFixed(2) || - py2 < +Math.min(y1, y2).toFixed(2) || - py2 > +Math.max(y1, y2).toFixed(2) || - py2 < +Math.min(y3, y4).toFixed(2) || - py2 > +Math.max(y3, y4).toFixed(2)) { - return; - } - return { - x: px, - y: py, - }; -}; -var isPointInsideBBox = function (bbox, x, y) { - return x >= bbox.x && x <= bbox.x + bbox.width && y >= bbox.y && y <= bbox.y + bbox.height; -}; -var rectPath = function (x, y, w, h, r) { - if (r) { - return [ - ['M', +x + +r, y], - ['l', w - r * 2, 0], - ['a', r, r, 0, 0, 1, r, r], - ['l', 0, h - r * 2], - ['a', r, r, 0, 0, 1, -r, r], - ['l', r * 2 - w, 0], - ['a', r, r, 0, 0, 1, -r, -r], - ['l', 0, r * 2 - h], - ['a', r, r, 0, 0, 1, r, -r], - ['z'], - ]; - } - var res = [['M', x, y], ['l', w, 0], ['l', 0, h], ['l', -w, 0], ['z']]; - // @ts-ignore - res.parsePathArray = parsePathArray; - return res; -}; -var box = function (x, y, width, height) { - if (x === null) { - x = y = width = height = 0; - } - if (y === null) { - y = x.y; - width = x.width; - height = x.height; - x = x.x; - } - return { - x: x, - y: y, - width: width, - w: width, - height: height, - h: height, - x2: x + width, - y2: y + height, - cx: x + width / 2, - cy: y + height / 2, - r1: Math.min(width, height) / 2, - r2: Math.max(width, height) / 2, - r0: Math.sqrt(width * width + height * height) / 2, - path: rectPath(x, y, width, height), - vb: [x, y, width, height].join(' '), - }; -}; -var isBBoxIntersect = function (bbox1, bbox2) { - bbox1 = box(bbox1); - bbox2 = box(bbox2); - return (isPointInsideBBox(bbox2, bbox1.x, bbox1.y) || - isPointInsideBBox(bbox2, bbox1.x2, bbox1.y) || - isPointInsideBBox(bbox2, bbox1.x, bbox1.y2) || - isPointInsideBBox(bbox2, bbox1.x2, bbox1.y2) || - isPointInsideBBox(bbox1, bbox2.x, bbox2.y) || - isPointInsideBBox(bbox1, bbox2.x2, bbox2.y) || - isPointInsideBBox(bbox1, bbox2.x, bbox2.y2) || - isPointInsideBBox(bbox1, bbox2.x2, bbox2.y2) || - (((bbox1.x < bbox2.x2 && bbox1.x > bbox2.x) || (bbox2.x < bbox1.x2 && bbox2.x > bbox1.x)) && - ((bbox1.y < bbox2.y2 && bbox1.y > bbox2.y) || (bbox2.y < bbox1.y2 && bbox2.y > bbox1.y)))); -}; -var bezierBBox = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) { - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isArray"])(p1x)) { - p1x = [p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y]; - } - var bbox = curveDim.apply(null, p1x); - return box(bbox.min.x, bbox.min.y, bbox.max.x - bbox.min.x, bbox.max.y - bbox.min.y); -}; -var findDotsAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) { - var t1 = 1 - t; - var t13 = Math.pow(t1, 3); - var t12 = Math.pow(t1, 2); - var t2 = t * t; - var t3 = t2 * t; - var x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x; - var y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y; - var mx = p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x); - var my = p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y); - var nx = c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x); - var ny = c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y); - var ax = t1 * p1x + t * c1x; - var ay = t1 * p1y + t * c1y; - var cx = t1 * c2x + t * p2x; - var cy = t1 * c2y + t * p2y; - var alpha = 90 - (Math.atan2(mx - nx, my - ny) * 180) / Math.PI; - // (mx > nx || my < ny) && (alpha += 180); - return { - x: x, - y: y, - m: { - x: mx, - y: my, - }, - n: { - x: nx, - y: ny, - }, - start: { - x: ax, - y: ay, - }, - end: { - x: cx, - y: cy, - }, - alpha: alpha, - }; -}; -var interHelper = function (bez1, bez2, justCount) { - var bbox1 = bezierBBox(bez1); - var bbox2 = bezierBBox(bez2); - if (!isBBoxIntersect(bbox1, bbox2)) { - return justCount ? 0 : []; - } - var l1 = bezlen.apply(0, bez1); - var l2 = bezlen.apply(0, bez2); - var n1 = ~~(l1 / 8); - var n2 = ~~(l2 / 8); - var dots1 = []; - var dots2 = []; - var xy = {}; - var res = justCount ? 0 : []; - for (var i = 0; i < n1 + 1; i++) { - var d = findDotsAtSegment.apply(0, bez1.concat(i / n1)); - dots1.push({ - x: d.x, - y: d.y, - t: i / n1, - }); - } - for (var i = 0; i < n2 + 1; i++) { - var d = findDotsAtSegment.apply(0, bez2.concat(i / n2)); - dots2.push({ - x: d.x, - y: d.y, - t: i / n2, - }); - } - for (var i = 0; i < n1; i++) { - for (var j = 0; j < n2; j++) { - var di = dots1[i]; - var di1 = dots1[i + 1]; - var dj = dots2[j]; - var dj1 = dots2[j + 1]; - var ci = Math.abs(di1.x - di.x) < 0.001 ? 'y' : 'x'; - var cj = Math.abs(dj1.x - dj.x) < 0.001 ? 'y' : 'x'; - var is = intersect(di.x, di.y, di1.x, di1.y, dj.x, dj.y, dj1.x, dj1.y); - if (is) { - if (xy[is.x.toFixed(4)] === is.y.toFixed(4)) { - continue; - } - xy[is.x.toFixed(4)] = is.y.toFixed(4); - var t1 = di.t + Math.abs((is[ci] - di[ci]) / (di1[ci] - di[ci])) * (di1.t - di.t); - var t2 = dj.t + Math.abs((is[cj] - dj[cj]) / (dj1[cj] - dj[cj])) * (dj1.t - dj.t); - if (t1 >= 0 && t1 <= 1 && t2 >= 0 && t2 <= 1) { - if (justCount) { - // @ts-ignore - res += 1; - } - else { - // @ts-ignore - res.push({ - x: is.x, - y: is.y, - t1: t1, - t2: t2, - }); - } - } - } - } - } - return res; -}; -var interPathHelper = function (path1, path2, justCount) { - path1 = pathToCurve(path1); - path2 = pathToCurve(path2); - var x1; - var y1; - var x2; - var y2; - var x1m; - var y1m; - var x2m; - var y2m; - var bez1; - var bez2; - var res = justCount ? 0 : []; - for (var i = 0, ii = path1.length; i < ii; i++) { - var pi = path1[i]; - if (pi[0] === 'M') { - x1 = x1m = pi[1]; - y1 = y1m = pi[2]; - } - else { - if (pi[0] === 'C') { - bez1 = [x1, y1].concat(pi.slice(1)); - x1 = bez1[6]; - y1 = bez1[7]; - } - else { - bez1 = [x1, y1, x1, y1, x1m, y1m, x1m, y1m]; - x1 = x1m; - y1 = y1m; - } - for (var j = 0, jj = path2.length; j < jj; j++) { - var pj = path2[j]; - if (pj[0] === 'M') { - x2 = x2m = pj[1]; - y2 = y2m = pj[2]; - } - else { - if (pj[0] === 'C') { - bez2 = [x2, y2].concat(pj.slice(1)); - x2 = bez2[6]; - y2 = bez2[7]; - } - else { - bez2 = [x2, y2, x2, y2, x2m, y2m, x2m, y2m]; - x2 = x2m; - y2 = y2m; - } - var intr = interHelper(bez1, bez2, justCount); - if (justCount) { - // @ts-ignore - res += intr; - } - else { - // @ts-ignore - for (var k = 0, kk = intr.length; k < kk; k++) { - intr[k].segment1 = i; - intr[k].segment2 = j; - intr[k].bez1 = bez1; - intr[k].bez2 = bez2; - } - // @ts-ignore - res = res.concat(intr); - } - } - } - } - } - return res; -}; -var intersection = function (path1, path2) { - return interPathHelper(path1, path2); -}; -function decasteljau(points, t) { - var left = []; - var right = []; - function recurse(points, t) { - if (points.length === 1) { - left.push(points[0]); - right.push(points[0]); - } - else { - var middlePoints = []; - for (var i = 0; i < points.length - 1; i++) { - if (i === 0) { - left.push(points[0]); - } - if (i === points.length - 2) { - right.push(points[i + 1]); - } - middlePoints[i] = [ - (1 - t) * points[i][0] + t * points[i + 1][0], - (1 - t) * points[i][1] + t * points[i + 1][1], - ]; - } - recurse(middlePoints, t); - } - } - if (points.length) { - recurse(points, t); - } - return { left: left, right: right.reverse() }; -} -function splitCurve(start, end, count) { - var points = [[start[1], start[2]]]; - count = count || 2; - var segments = []; - if (end[0] === 'A') { - points.push(end[6]); - points.push(end[7]); - } - else if (end[0] === 'C') { - points.push([end[1], end[2]]); - points.push([end[3], end[4]]); - points.push([end[5], end[6]]); - } - else if (end[0] === 'S' || end[0] === 'Q') { - points.push([end[1], end[2]]); - points.push([end[3], end[4]]); - } - else { - points.push([end[1], end[2]]); - } - var leftSegments = points; - var t = 1 / count; - for (var i = 0; i < count - 1; i++) { - var rt = t / (1 - t * i); - var split = decasteljau(leftSegments, rt); - segments.push(split.left); - leftSegments = split.right; - } - segments.push(leftSegments); - var result = segments.map(function (segment) { - var cmd = []; - if (segment.length === 4) { - cmd.push('C'); - cmd = cmd.concat(segment[2]); - } - if (segment.length >= 3) { - if (segment.length === 3) { - cmd.push('Q'); - } - cmd = cmd.concat(segment[1]); - } - if (segment.length === 2) { - cmd.push('L'); - } - cmd = cmd.concat(segment[segment.length - 1]); - return cmd; - }); - return result; -} -var splitSegment = function (start, end, count) { - if (count === 1) { - return [[].concat(start)]; - } - var segments = []; - if (end[0] === 'L' || end[0] === 'C' || end[0] === 'Q') { - segments = segments.concat(splitCurve(start, end, count)); - } - else { - var temp = [].concat(start); - if (temp[0] === 'M') { - temp[0] = 'L'; - } - for (var i = 0; i <= count - 1; i++) { - segments.push(temp); - } - } - return segments; -}; -var fillPath = function (source, target) { - if (source.length === 1) { - return source; - } - var sourceLen = source.length - 1; - var targetLen = target.length - 1; - var ratio = sourceLen / targetLen; - var segmentsToFill = []; - if (source.length === 1 && source[0][0] === 'M') { - for (var i = 0; i < targetLen - sourceLen; i++) { - source.push(source[0]); - } - return source; - } - for (var i = 0; i < targetLen; i++) { - var index = Math.floor(ratio * i); - segmentsToFill[index] = (segmentsToFill[index] || 0) + 1; - } - var filled = segmentsToFill.reduce(function (filled, count, i) { - if (i === sourceLen) { - return filled.concat(source[sourceLen]); - } - return filled.concat(splitSegment(source[i], source[i + 1], count)); - }, []); - filled.unshift(source[0]); - if (target[targetLen] === 'Z' || target[targetLen] === 'z') { - filled.push('Z'); - } - return filled; -}; -var isEqual = function (obj1, obj2) { - if (obj1.length !== obj2.length) { - return false; - } - var result = true; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(obj1, function (item, i) { - if (item !== obj2[i]) { - result = false; - return false; - } - }); - return result; -}; -function getMinDiff(del, add, modify) { - var type = null; - var min = modify; - if (add < min) { - min = add; - type = 'add'; - } - if (del < min) { - min = del; - type = 'del'; - } - return { - type: type, - min: min, - }; -} -/* - * https://en.wikipedia.org/wiki/Levenshtein_distance - * 计算两条path的编辑距离 - */ -var levenshteinDistance = function (source, target) { - var sourceLen = source.length; - var targetLen = target.length; - var sourceSegment; - var targetSegment; - var temp = 0; - if (sourceLen === 0 || targetLen === 0) { - return null; - } - var dist = []; - for (var i = 0; i <= sourceLen; i++) { - dist[i] = []; - dist[i][0] = { min: i }; - } - for (var j = 0; j <= targetLen; j++) { - dist[0][j] = { min: j }; - } - for (var i = 1; i <= sourceLen; i++) { - sourceSegment = source[i - 1]; - for (var j = 1; j <= targetLen; j++) { - targetSegment = target[j - 1]; - if (isEqual(sourceSegment, targetSegment)) { - temp = 0; - } - else { - temp = 1; - } - var del = dist[i - 1][j].min + 1; - var add = dist[i][j - 1].min + 1; - var modify = dist[i - 1][j - 1].min + temp; - dist[i][j] = getMinDiff(del, add, modify); - } - } - return dist; -}; -var fillPathByDiff = function (source, target) { - var diffMatrix = levenshteinDistance(source, target); - var sourceLen = source.length; - var targetLen = target.length; - var changes = []; - var index = 1; - var minPos = 1; - // 如果source和target不是完全不相等 - if (diffMatrix[sourceLen][targetLen] !== sourceLen) { - // 获取从source到target所需改动 - for (var i = 1; i <= sourceLen; i++) { - var min = diffMatrix[i][i].min; - minPos = i; - for (var j = index; j <= targetLen; j++) { - if (diffMatrix[i][j].min < min) { - min = diffMatrix[i][j].min; - minPos = j; - } - } - index = minPos; - if (diffMatrix[i][index].type) { - changes.push({ index: i - 1, type: diffMatrix[i][index].type }); - } - } - // 对source进行增删path - for (var i = changes.length - 1; i >= 0; i--) { - index = changes[i].index; - if (changes[i].type === 'add') { - source.splice(index, 0, [].concat(source[index])); - } - else { - source.splice(index, 1); - } - } - } - // source尾部补齐 - sourceLen = source.length; - var diff = targetLen - sourceLen; - if (sourceLen < targetLen) { - for (var i = 0; i < diff; i++) { - if (source[sourceLen - 1][0] === 'z' || source[sourceLen - 1][0] === 'Z') { - source.splice(sourceLen - 2, 0, source[sourceLen - 2]); - } - else { - source.push(source[sourceLen - 1]); - } - sourceLen += 1; - } - } - return source; -}; -// 将两个点均分成count个点 -function _splitPoints(points, former, count) { - var result = [].concat(points); - var index; - var t = 1 / (count + 1); - var formerEnd = _getSegmentPoints(former)[0]; - for (var i = 1; i <= count; i++) { - t *= i; - index = Math.floor(points.length * t); - if (index === 0) { - result.unshift([formerEnd[0] * t + points[index][0] * (1 - t), formerEnd[1] * t + points[index][1] * (1 - t)]); - } - else { - result.splice(index, 0, [ - formerEnd[0] * t + points[index][0] * (1 - t), - formerEnd[1] * t + points[index][1] * (1 - t), - ]); - } - } - return result; -} -/* - * 抽取pathSegment中的关键点 - * M,L,A,Q,H,V一个端点 - * Q, S抽取一个端点,一个控制点 - * C抽取一个端点,两个控制点 - */ -function _getSegmentPoints(segment) { - var points = []; - switch (segment[0]) { - case 'M': - points.push([segment[1], segment[2]]); - break; - case 'L': - points.push([segment[1], segment[2]]); - break; - case 'A': - points.push([segment[6], segment[7]]); - break; - case 'Q': - points.push([segment[3], segment[4]]); - points.push([segment[1], segment[2]]); - break; - case 'T': - points.push([segment[1], segment[2]]); - break; - case 'C': - points.push([segment[5], segment[6]]); - points.push([segment[1], segment[2]]); - points.push([segment[3], segment[4]]); - break; - case 'S': - points.push([segment[3], segment[4]]); - points.push([segment[1], segment[2]]); - break; - case 'H': - points.push([segment[1], segment[1]]); - break; - case 'V': - points.push([segment[1], segment[1]]); - break; - default: - } - return points; -} -var formatPath = function (fromPath, toPath) { - if (fromPath.length <= 1) { - return fromPath; - } - var points; - for (var i = 0; i < toPath.length; i++) { - if (fromPath[i][0] !== toPath[i][0]) { - // 获取fromPath的pathSegment的端点,根据toPath的指令对其改造 - points = _getSegmentPoints(fromPath[i]); - switch (toPath[i][0]) { - case 'M': - fromPath[i] = ['M'].concat(points[0]); - break; - case 'L': - fromPath[i] = ['L'].concat(points[0]); - break; - case 'A': - fromPath[i] = [].concat(toPath[i]); - fromPath[i][6] = points[0][0]; - fromPath[i][7] = points[0][1]; - break; - case 'Q': - if (points.length < 2) { - if (i > 0) { - points = _splitPoints(points, fromPath[i - 1], 1); - } - else { - fromPath[i] = toPath[i]; - break; - } - } - fromPath[i] = ['Q'].concat(points.reduce(function (arr, i) { - return arr.concat(i); - }, [])); - break; - case 'T': - fromPath[i] = ['T'].concat(points[0]); - break; - case 'C': - if (points.length < 3) { - if (i > 0) { - points = _splitPoints(points, fromPath[i - 1], 2); - } - else { - fromPath[i] = toPath[i]; - break; - } - } - fromPath[i] = ['C'].concat(points.reduce(function (arr, i) { - return arr.concat(i); - }, [])); - break; - case 'S': - if (points.length < 2) { - if (i > 0) { - points = _splitPoints(points, fromPath[i - 1], 1); - } - else { - fromPath[i] = toPath[i]; - break; - } - } - fromPath[i] = ['S'].concat(points.reduce(function (arr, i) { - return arr.concat(i); - }, [])); - break; - default: - fromPath[i] = toPath[i]; - } - } - } - return fromPath; -}; - -//# sourceMappingURL=path.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g-base/esm/util/util.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/g-base/esm/util/util.js ***! - \****************************************************/ -/*! exports provided: removeFromArray, isBrowser, isNil, isFunction, isString, isObject, isArray, mix, each, upperFirst */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeFromArray", function() { return removeFromArray; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBrowser", function() { return isBrowser; }); -/* harmony import */ var _antv_util_lib_is_nil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util/lib/is-nil */ "./node_modules/@antv/util/lib/is-nil.js"); -/* harmony import */ var _antv_util_lib_is_nil__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_antv_util_lib_is_nil__WEBPACK_IMPORTED_MODULE_0__); -/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, "isNil", function() { return _antv_util_lib_is_nil__WEBPACK_IMPORTED_MODULE_0___default.a; }); -/* harmony import */ var _antv_util_lib_is_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util/lib/is-function */ "./node_modules/@antv/util/lib/is-function.js"); -/* harmony import */ var _antv_util_lib_is_function__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_antv_util_lib_is_function__WEBPACK_IMPORTED_MODULE_1__); -/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, "isFunction", function() { return _antv_util_lib_is_function__WEBPACK_IMPORTED_MODULE_1___default.a; }); -/* harmony import */ var _antv_util_lib_is_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util/lib/is-string */ "./node_modules/@antv/util/lib/is-string.js"); -/* harmony import */ var _antv_util_lib_is_string__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_antv_util_lib_is_string__WEBPACK_IMPORTED_MODULE_2__); -/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, "isString", function() { return _antv_util_lib_is_string__WEBPACK_IMPORTED_MODULE_2___default.a; }); -/* harmony import */ var _antv_util_lib_is_object__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @antv/util/lib/is-object */ "./node_modules/@antv/util/lib/is-object.js"); -/* harmony import */ var _antv_util_lib_is_object__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_antv_util_lib_is_object__WEBPACK_IMPORTED_MODULE_3__); -/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return _antv_util_lib_is_object__WEBPACK_IMPORTED_MODULE_3___default.a; }); -/* harmony import */ var _antv_util_lib_is_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @antv/util/lib/is-array */ "./node_modules/@antv/util/lib/is-array.js"); -/* harmony import */ var _antv_util_lib_is_array__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_antv_util_lib_is_array__WEBPACK_IMPORTED_MODULE_4__); -/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return _antv_util_lib_is_array__WEBPACK_IMPORTED_MODULE_4___default.a; }); -/* harmony import */ var _antv_util_lib_mix__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @antv/util/lib/mix */ "./node_modules/@antv/util/lib/mix.js"); -/* harmony import */ var _antv_util_lib_mix__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_antv_util_lib_mix__WEBPACK_IMPORTED_MODULE_5__); -/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, "mix", function() { return _antv_util_lib_mix__WEBPACK_IMPORTED_MODULE_5___default.a; }); -/* harmony import */ var _antv_util_lib_each__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @antv/util/lib/each */ "./node_modules/@antv/util/lib/each.js"); -/* harmony import */ var _antv_util_lib_each__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_antv_util_lib_each__WEBPACK_IMPORTED_MODULE_6__); -/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, "each", function() { return _antv_util_lib_each__WEBPACK_IMPORTED_MODULE_6___default.a; }); -/* harmony import */ var _antv_util_lib_upper_first__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @antv/util/lib/upper-first */ "./node_modules/@antv/util/lib/upper-first.js"); -/* harmony import */ var _antv_util_lib_upper_first__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_antv_util_lib_upper_first__WEBPACK_IMPORTED_MODULE_7__); -/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, "upperFirst", function() { return _antv_util_lib_upper_first__WEBPACK_IMPORTED_MODULE_7___default.a; }); -function removeFromArray(arr, obj) { - var index = arr.indexOf(obj); - if (index !== -1) { - arr.splice(index, 1); - } -} -var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined'; - - - - - - - - -//# sourceMappingURL=util.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g-base/lib/event/graph-event.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/g-base/lib/event/graph-event.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var GraphEvent = /** @class */ (function () { - function GraphEvent(type, event) { - /** - * 是否允许冒泡 - * @type {boolean} - */ - this.bubbles = true; - /** - * 触发对象 - * @type {object} - */ - this.target = null; - /** - * 监听对象 - * @type {object} - */ - this.currentTarget = null; - /** - * 委托对象 - * @type {object} - */ - this.delegateTarget = null; - /** - * 委托事件监听对象的代理对象,即 ev.delegateObject = ev.currentTarget.get('delegateObject') - * @type {object} - */ - this.delegateObject = null; - /** - * 是否阻止了原生事件 - * @type {boolean} - */ - this.defaultPrevented = false; - /** - * 是否阻止传播(向上冒泡) - * @type {boolean} - */ - this.propagationStopped = false; - /** - * 触发事件的图形 - * @type {IShape} - */ - this.shape = null; - /** - * 开始触发事件的图形 - * @type {IShape} - */ - this.fromShape = null; - /** - * 事件结束时的触发图形 - * @type {IShape} - */ - this.toShape = null; - // 触发事件的路径 - this.propagationPath = []; - this.type = type; - this.name = type; - this.originalEvent = event; - this.timeStamp = event.timeStamp; - } - /** - * 阻止浏览器默认的行为 - */ - GraphEvent.prototype.preventDefault = function () { - this.defaultPrevented = true; - if (this.originalEvent.preventDefault) { - this.originalEvent.preventDefault(); - } - }; - /** - * 阻止冒泡 - */ - GraphEvent.prototype.stopPropagation = function () { - this.propagationStopped = true; - }; - GraphEvent.prototype.toString = function () { - var type = this.type; - return "[Event (type=" + type + ")]"; - }; - GraphEvent.prototype.save = function () { }; - GraphEvent.prototype.restore = function () { }; - return GraphEvent; -}()); -exports.default = GraphEvent; -//# sourceMappingURL=graph-event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g-base/package.json": -/*!************************************************!*\ - !*** ./node_modules/@antv/g-base/package.json ***! - \************************************************/ -/*! exports provided: __npminstall_done, _from, _id, _inBundle, _integrity, _location, _phantomChildren, _requested, _requiredBy, _resolved, _shasum, _spec, _where, author, bugs, bundleDependencies, dependencies, deprecated, description, devDependencies, files, gitHead, homepage, keywords, license, main, module, name, publishConfig, repository, scripts, types, version, default */ -/***/ (function(module) { - -module.exports = JSON.parse("{\"__npminstall_done\":false,\"_from\":\"@antv/g-base@~0.4.0\",\"_id\":\"@antv/g-base@0.4.0\",\"_inBundle\":false,\"_integrity\":\"sha1-n9hc6rMnotwYSsEuzT+rFCKzph8=\",\"_location\":\"/@antv/g-base\",\"_phantomChildren\":{},\"_requested\":{\"type\":\"range\",\"registry\":true,\"raw\":\"@antv/g-base@~0.4.0\",\"name\":\"@antv/g-base\",\"escapedName\":\"@antv%2fg-base\",\"scope\":\"@antv\",\"rawSpec\":\"~0.4.0\",\"saveSpec\":null,\"fetchSpec\":\"~0.4.0\"},\"_requiredBy\":[\"/@antv/component\",\"/@antv/g-canvas\",\"/@antv/g-svg\",\"/@antv/g2\",\"/@antv/g2plot\"],\"_resolved\":\"https://registry.npm.taobao.org/@antv/g-base/download/@antv/g-base-0.4.0.tgz\",\"_shasum\":\"9fd85ceab327a2dc184ac12ecd3fab1422b3a61f\",\"_spec\":\"@antv/g-base@~0.4.0\",\"_where\":\"E:\\\\docker\\\\php\\\\miss-meijiu\\\\packages\\\\smallruraldog\\\\laravel-vue-admin\\\\node_modules\\\\@antv\\\\g2plot\",\"author\":{\"name\":\"https://github.com/orgs/antvis/people\"},\"bugs\":{\"url\":\"https://github.com/antvis/util/issues\"},\"bundleDependencies\":false,\"dependencies\":{\"@antv/event-emitter\":\"^0.1.1\",\"@antv/g-math\":\"^0.1.1\",\"@antv/matrix-util\":\"^2.0.4\",\"@antv/path-util\":\"~2.0.5\",\"@antv/util\":\"~2.0.0\",\"@types/d3-timer\":\"^1.0.9\",\"d3-ease\":\"^1.0.5\",\"d3-interpolate\":\"^1.3.2\",\"d3-timer\":\"^1.0.9\"},\"deprecated\":false,\"description\":\"A common util collection for antv projects\",\"devDependencies\":{\"@antv/gl-matrix\":\"~2.7.1\",\"@antv/torch\":\"^1.0.0\",\"less\":\"^3.9.0\",\"npm-run-all\":\"^4.1.5\",\"tsc-watch\":\"^4.0.0\"},\"files\":[\"package.json\",\"esm\",\"lib\",\"LICENSE\",\"README.md\"],\"gitHead\":\"95487b1e5ded41f5db351a622adf12659f564d8b\",\"homepage\":\"https://github.com/antvis/util#readme\",\"keywords\":[\"util\",\"antv\",\"g\"],\"license\":\"ISC\",\"main\":\"lib/index.js\",\"module\":\"esm/index.js\",\"name\":\"@antv/g-base\",\"publishConfig\":{\"access\":\"public\"},\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/antvis/util.git\"},\"scripts\":{\"build\":\"npm run clean && run-p build:*\",\"build:cjs\":\"tsc -p tsconfig.json --target ES5 --module commonjs --outDir lib\",\"build:esm\":\"tsc -p tsconfig.json --target ES5 --module ESNext --outDir esm\",\"clean\":\"rm -rf esm lib\",\"coverage\":\"npm run coverage-generator && npm run coverage-viewer\",\"coverage-generator\":\"torch --coverage --compile --source-pattern src/*.js,src/**/*.js --opts tests/mocha.opts\",\"coverage-viewer\":\"torch-coverage\",\"test\":\"torch --renderer --compile --opts tests/mocha.opts\",\"test-live\":\"torch --compile --interactive --opts tests/mocha.opts\",\"tsc\":\"tsc --noEmit\",\"typecheck\":\"tsc --noEmit\",\"watch:cjs\":\"tsc-watch -p tsconfig.json --target ES5 --module commonjs --outDir lib --compiler typescript/bin/tsc\"},\"types\":\"lib/index.d.ts\",\"version\":\"0.4.0\"}"); - -/***/ }), - -/***/ "./node_modules/@antv/g-canvas/dist/g.min.js": -/*!***************************************************!*\ - !*** ./node_modules/@antv/g-canvas/dist/g.min.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -!function(t,n){ true?module.exports=n():undefined}(window,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return t[r].call(a.exports,a,a.exports,e),a.l=!0,a.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var a in t)e.d(r,a,function(n){return t[n]}.bind(null,a));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=48)}([function(t,n,e){"use strict";e.r(n),e.d(n,"__extends",(function(){return a})),e.d(n,"__assign",(function(){return i})),e.d(n,"__rest",(function(){return o})),e.d(n,"__decorate",(function(){return u})),e.d(n,"__param",(function(){return s})),e.d(n,"__metadata",(function(){return c})),e.d(n,"__awaiter",(function(){return f})),e.d(n,"__generator",(function(){return l})),e.d(n,"__exportStar",(function(){return h})),e.d(n,"__values",(function(){return p})),e.d(n,"__read",(function(){return d})),e.d(n,"__spread",(function(){return v})),e.d(n,"__spreadArrays",(function(){return g})),e.d(n,"__await",(function(){return y})),e.d(n,"__asyncGenerator",(function(){return m})),e.d(n,"__asyncDelegator",(function(){return M})),e.d(n,"__asyncValues",(function(){return x})),e.d(n,"__makeTemplateObject",(function(){return b})),e.d(n,"__importStar",(function(){return _})),e.d(n,"__importDefault",(function(){return w})),e.d(n,"__classPrivateFieldGet",(function(){return P})),e.d(n,"__classPrivateFieldSet",(function(){return A})); -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ -var r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(t,n)};function a(t,n){function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}var i=function(){return(i=Object.assign||function(t){for(var n,e=1,r=arguments.length;e=0;u--)(a=t[u])&&(o=(i<3?a(o):i>3?a(n,e,o):a(n,e))||o);return i>3&&o&&Object.defineProperty(n,e,o),o}function s(t,n){return function(e,r){n(e,r,t)}}function c(t,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,n)}function f(t,n,e,r){return new(e||(e=Promise))((function(a,i){function o(t){try{s(r.next(t))}catch(t){i(t)}}function u(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var n;t.done?a(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(o,u)}s((r=r.apply(t,n||[])).next())}))}function l(t,n){var e,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;o;)try{if(e=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,a,i=e.call(t),o=[];try{for(;(void 0===n||n-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(t){a={error:t}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(a)throw a.error}}return o}function v(){for(var t=[],n=0;n1||u(t,n)}))})}function u(t,n){try{(e=a[t](n)).value instanceof y?Promise.resolve(e.value.v).then(s,c):f(i[0][2],e)}catch(t){f(i[0][3],t)}var e}function s(t){u("next",t)}function c(t){u("throw",t)}function f(t,n){t(n),i.shift(),i.length&&u(i[0][0],i[0][1])}}function M(t){var n,e;return n={},r("next"),r("throw",(function(t){throw t})),r("return"),n[Symbol.iterator]=function(){return this},n;function r(r,a){n[r]=t[r]?function(n){return(e=!e)?{value:y(t[r](n)),done:"return"===r}:a?a(n):n}:a}}function x(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,e=t[Symbol.asyncIterator];return e?e.call(t):(t=p(t),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(e){n[e]=t[e]&&function(n){return new Promise((function(r,a){(function(t,n,e,r){Promise.resolve(r).then((function(n){t({value:n,done:e})}),n)})(r,a,(n=t[e](n)).done,n.value)}))}}}function b(t,n){return Object.defineProperty?Object.defineProperty(t,"raw",{value:n}):t.raw=n,t}function _(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n.default=t,n}function w(t){return t&&t.__esModule?t:{default:t}}function P(t,n){if(!n.has(t))throw new TypeError("attempted to get private field on non-instance");return n.get(t)}function A(t,n,e){if(!n.has(t))throw new TypeError("attempted to set private field on non-instance");return n.set(t,e),e}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sub=n.mul=void 0,n.create=function(){var t=new r.ARRAY_TYPE(9);r.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0);return t[0]=1,t[4]=1,t[8]=1,t},n.fromMat4=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t},n.clone=function(t){var n=new r.ARRAY_TYPE(9);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n},n.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},n.fromValues=function(t,n,e,a,i,o,u,s,c){var f=new r.ARRAY_TYPE(9);return f[0]=t,f[1]=n,f[2]=e,f[3]=a,f[4]=i,f[5]=o,f[6]=u,f[7]=s,f[8]=c,f},n.set=function(t,n,e,r,a,i,o,u,s,c){return t[0]=n,t[1]=e,t[2]=r,t[3]=a,t[4]=i,t[5]=o,t[6]=u,t[7]=s,t[8]=c,t},n.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},n.transpose=function(t,n){if(t===n){var e=n[1],r=n[2],a=n[5];t[1]=n[3],t[2]=n[6],t[3]=e,t[5]=n[7],t[6]=r,t[7]=a}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t},n.invert=function(t,n){var e=n[0],r=n[1],a=n[2],i=n[3],o=n[4],u=n[5],s=n[6],c=n[7],f=n[8],l=f*o-u*c,h=-f*i+u*s,p=c*i-o*s,d=e*l+r*h+a*p;if(!d)return null;return d=1/d,t[0]=l*d,t[1]=(-f*r+a*c)*d,t[2]=(u*r-a*o)*d,t[3]=h*d,t[4]=(f*e-a*s)*d,t[5]=(-u*e+a*i)*d,t[6]=p*d,t[7]=(-c*e+r*s)*d,t[8]=(o*e-r*i)*d,t},n.adjoint=function(t,n){var e=n[0],r=n[1],a=n[2],i=n[3],o=n[4],u=n[5],s=n[6],c=n[7],f=n[8];return t[0]=o*f-u*c,t[1]=a*c-r*f,t[2]=r*u-a*o,t[3]=u*s-i*f,t[4]=e*f-a*s,t[5]=a*i-e*u,t[6]=i*c-o*s,t[7]=r*s-e*c,t[8]=e*o-r*i,t},n.determinant=function(t){var n=t[0],e=t[1],r=t[2],a=t[3],i=t[4],o=t[5],u=t[6],s=t[7],c=t[8];return n*(c*i-o*s)+e*(-c*a+o*u)+r*(s*a-i*u)},n.multiply=a,n.translate=function(t,n,e){var r=n[0],a=n[1],i=n[2],o=n[3],u=n[4],s=n[5],c=n[6],f=n[7],l=n[8],h=e[0],p=e[1];return t[0]=r,t[1]=a,t[2]=i,t[3]=o,t[4]=u,t[5]=s,t[6]=h*r+p*o+c,t[7]=h*a+p*u+f,t[8]=h*i+p*s+l,t},n.rotate=function(t,n,e){var r=n[0],a=n[1],i=n[2],o=n[3],u=n[4],s=n[5],c=n[6],f=n[7],l=n[8],h=Math.sin(e),p=Math.cos(e);return t[0]=p*r+h*o,t[1]=p*a+h*u,t[2]=p*i+h*s,t[3]=p*o-h*r,t[4]=p*u-h*a,t[5]=p*s-h*i,t[6]=c,t[7]=f,t[8]=l,t},n.scale=function(t,n,e){var r=e[0],a=e[1];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=a*n[3],t[4]=a*n[4],t[5]=a*n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},n.fromTranslation=function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},n.fromRotation=function(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=-e,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},n.fromScaling=function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},n.fromMat2d=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},n.fromQuat=function(t,n){var e=n[0],r=n[1],a=n[2],i=n[3],o=e+e,u=r+r,s=a+a,c=e*o,f=r*o,l=r*u,h=a*o,p=a*u,d=a*s,v=i*o,g=i*u,y=i*s;return t[0]=1-l-d,t[3]=f-y,t[6]=h+g,t[1]=f+y,t[4]=1-c-d,t[7]=p-v,t[2]=h-g,t[5]=p+v,t[8]=1-c-l,t},n.normalFromMat4=function(t,n){var e=n[0],r=n[1],a=n[2],i=n[3],o=n[4],u=n[5],s=n[6],c=n[7],f=n[8],l=n[9],h=n[10],p=n[11],d=n[12],v=n[13],g=n[14],y=n[15],m=e*u-r*o,M=e*s-a*o,x=e*c-i*o,b=r*s-a*u,_=r*c-i*u,w=a*c-i*s,P=f*v-l*d,A=f*g-h*d,O=f*y-p*d,S=l*g-h*v,C=l*y-p*v,E=h*y-p*g,j=m*E-M*C+x*S+b*O-_*A+w*P;if(!j)return null;return j=1/j,t[0]=(u*E-s*C+c*S)*j,t[1]=(s*O-o*E-c*A)*j,t[2]=(o*C-u*O+c*P)*j,t[3]=(a*C-r*E-i*S)*j,t[4]=(e*E-a*O+i*A)*j,t[5]=(r*O-e*C-i*P)*j,t[6]=(v*w-g*_+y*b)*j,t[7]=(g*x-d*w-y*M)*j,t[8]=(d*_-v*x+y*m)*j,t},n.projection=function(t,n,e){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/e,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},n.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},n.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},n.add=function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t},n.subtract=i,n.multiplyScalar=function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t},n.multiplyScalarAndAdd=function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t},n.exactEquals=function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},n.equals=function(t,n){var e=t[0],a=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=t[6],f=t[7],l=t[8],h=n[0],p=n[1],d=n[2],v=n[3],g=n[4],y=n[5],m=n[6],M=n[7],x=n[8];return Math.abs(e-h)<=r.EPSILON*Math.max(1,Math.abs(e),Math.abs(h))&&Math.abs(a-p)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(p))&&Math.abs(i-d)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(o-v)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(u-g)<=r.EPSILON*Math.max(1,Math.abs(u),Math.abs(g))&&Math.abs(s-y)<=r.EPSILON*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(c-m)<=r.EPSILON*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(f-M)<=r.EPSILON*Math.max(1,Math.abs(f),Math.abs(M))&&Math.abs(l-x)<=r.EPSILON*Math.max(1,Math.abs(l),Math.abs(x))};var r=function(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n.default=t,n}(e(23));function a(t,n,e){var r=n[0],a=n[1],i=n[2],o=n[3],u=n[4],s=n[5],c=n[6],f=n[7],l=n[8],h=e[0],p=e[1],d=e[2],v=e[3],g=e[4],y=e[5],m=e[6],M=e[7],x=e[8];return t[0]=h*r+p*o+d*c,t[1]=h*a+p*u+d*f,t[2]=h*i+p*s+d*l,t[3]=v*r+g*o+y*c,t[4]=v*a+g*u+y*f,t[5]=v*i+g*s+y*l,t[6]=m*r+M*o+x*c,t[7]=m*a+M*u+x*f,t[8]=m*i+M*s+x*l,t}function i(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t}n.mul=a,n.sub=i},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getPixelRatio=function(){return window?window.devicePixelRatio:1},n.distance=function(t,n,e,r){var a=t-e,i=n-r;return Math.sqrt(a*a+i*i)},n.inBox=function(t,n,e,r,a,i){return a>=t&&a<=t+e&&i>=n&&i<=n+r};var r=null;n.getOffScreenContext=function(){if(!r){var t=document.createElement("canvas");t.width=1,t.height=1,r=t.getContext("2d")}return r},n.intersectRect=function(t,n){return!(n.minX>t.maxX||n.maxXt.maxY||n.maxY0&&(i.isNil(a)||1===a||(t.globalAlpha=a),this.stroke(t)),this.afterDrawPath(t)},n.prototype.createPath=function(t){},n.prototype.afterDrawPath=function(t){},n.prototype.isInShape=function(t,n){var e=this.isStroke(),r=this.isFill(),a=this.getHitLineWidth();return this.isInStrokeOrPath(t,n,e,r,a)},n.prototype.isInStrokeOrPath=function(t,n,e,r,a){return!1},n.prototype.getHitLineWidth=function(){if(!this.isStroke())return 0;var t=this.attrs;return t.lineWidth+t.lineAppendWidth},n}(a.AbstractShape);n.default=f},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.forEach=n.sqrLen=n.sqrDist=n.dist=n.div=n.mul=n.sub=n.len=void 0,n.create=a,n.clone=function(t){var n=new r.ARRAY_TYPE(2);return n[0]=t[0],n[1]=t[1],n},n.fromValues=function(t,n){var e=new r.ARRAY_TYPE(2);return e[0]=t,e[1]=n,e},n.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t},n.set=function(t,n,e){return t[0]=n,t[1]=e,t},n.add=function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t},n.subtract=i,n.multiply=o,n.divide=u,n.ceil=function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t},n.floor=function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t},n.min=function(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t},n.max=function(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t},n.round=function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t},n.scale=function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t},n.scaleAndAdd=function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t},n.distance=s,n.squaredDistance=c,n.length=f,n.squaredLength=l,n.negate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t},n.inverse=function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t},n.normalize=function(t,n){var e=n[0],r=n[1],a=e*e+r*r;a>0&&(a=1/Math.sqrt(a),t[0]=n[0]*a,t[1]=n[1]*a);return t},n.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]},n.cross=function(t,n,e){var r=n[0]*e[1]-n[1]*e[0];return t[0]=t[1]=0,t[2]=r,t},n.lerp=function(t,n,e,r){var a=n[0],i=n[1];return t[0]=a+r*(e[0]-a),t[1]=i+r*(e[1]-i),t},n.random=function(t,n){n=n||1;var e=2*r.RANDOM()*Math.PI;return t[0]=Math.cos(e)*n,t[1]=Math.sin(e)*n,t},n.transformMat2=function(t,n,e){var r=n[0],a=n[1];return t[0]=e[0]*r+e[2]*a,t[1]=e[1]*r+e[3]*a,t},n.transformMat2d=function(t,n,e){var r=n[0],a=n[1];return t[0]=e[0]*r+e[2]*a+e[4],t[1]=e[1]*r+e[3]*a+e[5],t},n.transformMat3=function(t,n,e){var r=n[0],a=n[1];return t[0]=e[0]*r+e[3]*a+e[6],t[1]=e[1]*r+e[4]*a+e[7],t},n.transformMat4=function(t,n,e){var r=n[0],a=n[1];return t[0]=e[0]*r+e[4]*a+e[12],t[1]=e[1]*r+e[5]*a+e[13],t},n.rotate=function(t,n,e,r){var a=n[0]-e[0],i=n[1]-e[1],o=Math.sin(r),u=Math.cos(r);return t[0]=a*u-i*o+e[0],t[1]=a*o+i*u+e[1],t},n.angle=function(t,n){var e=t[0],r=t[1],a=n[0],i=n[1],o=e*e+r*r;o>0&&(o=1/Math.sqrt(o));var u=a*a+i*i;u>0&&(u=1/Math.sqrt(u));var s=(e*a+r*i)*o*u;return s>1?0:s<-1?Math.PI:Math.acos(s)},n.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},n.exactEquals=function(t,n){return t[0]===n[0]&&t[1]===n[1]},n.equals=function(t,n){var e=t[0],a=t[1],i=n[0],o=n[1];return Math.abs(e-i)<=r.EPSILON*Math.max(1,Math.abs(e),Math.abs(i))&&Math.abs(a-o)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(o))};var r=function(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n.default=t,n}(e(23));function a(){var t=new r.ARRAY_TYPE(2);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function i(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t}function o(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t}function u(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t}function s(t,n){var e=n[0]-t[0],r=n[1]-t[1];return Math.sqrt(e*e+r*r)}function c(t,n){var e=n[0]-t[0],r=n[1]-t[1];return e*e+r*r}function f(t){var n=t[0],e=t[1];return Math.sqrt(n*n+e*e)}function l(t){var n=t[0],e=t[1];return n*n+e*e}var h;n.len=f,n.sub=i,n.mul=o,n.div=u,n.dist=s,n.sqrDist=c,n.sqrLen=l,n.forEach=(h=a(),function(t,n,e,r,a,i){var o=void 0,u=void 0;for(n||(n=2),e||(e=0),u=r?Math.min(r*n+e,t.length):t.length,o=e;o(e-t)*(e-t)+(a-n)*(a-n)?r.distance(e,a,i,o):this.pointToLine(t,n,e,a,i,o)},pointToLine:function(t,n,e,r,i,o){var u=[e-t,r-n];if(a.exactEquals(u,[0,0]))return Math.sqrt((i-t)*(i-t)+(o-n)*(o-n));var s=[-u[1],u[0]];a.normalize(s,s);var c=[i-t,o-n];return Math.abs(a.dot(c,s))},tangentAngle:function(t,n,e,r){return Math.atan2(r-n,e-t)}}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(3);n.Base=r.default;var a=e(78);n.Circle=a.default;var i=e(79);n.Ellipse=i.default;var o=e(80);n.Image=o.default;var u=e(81);n.Line=u.default;var s=e(82);n.Marker=s.default;var c=e(84);n.Path=c.default;var f=e(90);n.Polygon=f.default;var l=e(91);n.Polyline=l.default;var h=e(94);n.Rect=h.default;var p=e(97);n.Text=p.default},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(20);n.default=function(t){return Array.isArray?Array.isArray(t):r.default(t,"Array")}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(18),a=e(32),i=e(57),o=e(2),u=e(16),s={fill:"fillStyle",stroke:"strokeStyle",opacity:"globalAlpha"};function c(t){var n;if(t.destroyed)n=t._cacheCanvasBBox;else{var e=t.get("cacheCanvasBBox"),r=t.getCanvasBBox();n=o.mergeRegion(e,r)}return n}n.applyAttrsToContext=function(t,n){var e=n.attr();for(var i in e){var o=e[i],u=s[i]?s[i]:i;"matrix"===u&&o?t.transform(o[0],o[1],o[3],o[4],o[6],o[7]):"lineDash"===u&&t.setLineDash?r.isArray(o)&&t.setLineDash(o):("strokeStyle"===u||"fillStyle"===u?o=a.parseStyle(t,n,o):"globalAlpha"===u&&(o*=t.globalAlpha),t[u]=o)}},n.drawChildren=function(t,n,e){for(var r=0;r_?b:_,C=b>_?1:b/_,E=b>_?_/b:1;n.translate(M,x),n.rotate(A),n.scale(C,E),n.arc(0,0,S,w,P,1-O),n.scale(1/C,1/E),n.rotate(-A),n.translate(-M,-x)}break;case"Z":n.closePath()}if("Z"===d)c=f;else{var j=p.length;c=[p[j-2],p[j-1]]}}},n.refreshElement=function(t,n){var e=t.get("canvas");e&&("remove"===n&&(t._cacheCanvasBBox=t.get("cacheCanvasBBox")),t.get("hasChanged")||(e.refreshElement(t,n,e),e.get("autoDraw")&&e.draw(),t.set("hasChanged",!0)))},n.getRefreshRegion=c,n.getMergedRegion=function(t){if(!t.length)return null;var n=[],e=[],a=[],i=[];return r.each(t,(function(t){var r=c(t);r&&(n.push(r.minX),e.push(r.minY),a.push(r.maxX),i.push(r.maxY))})),{minX:Math.min.apply(null,n),minY:Math.min.apply(null,e),maxX:Math.max.apply(null,a),maxY:Math.max.apply(null,i)}}},function(t,n,e){"use strict";e.r(n),e.d(n,"version",(function(){return De})),e.d(n,"Event",(function(){return st})),e.d(n,"Base",(function(){return St})),e.d(n,"AbstractCanvas",(function(){return Be})),e.d(n,"AbstractGroup",(function(){return Re})),e.d(n,"AbstractShape",(function(){return Ye})),e.d(n,"PathUtil",(function(){return r}));var r={};e.r(r),e.d(r,"catmullRomToBezier",(function(){return I})),e.d(r,"fillPath",(function(){return nt})),e.d(r,"fillPathByDiff",(function(){return at})),e.d(r,"formatPath",(function(){return ut})),e.d(r,"intersection",(function(){return J})),e.d(r,"parsePathArray",(function(){return L})),e.d(r,"parsePathString",(function(){return T})),e.d(r,"pathToAbsolute",(function(){return R})),e.d(r,"pathToCurve",(function(){return N})),e.d(r,"rectPath",(function(){return V}));var a={};e.r(a),e.d(a,"easeLinear",(function(){return un})),e.d(a,"easeQuad",(function(){return fn})),e.d(a,"easeQuadIn",(function(){return sn})),e.d(a,"easeQuadOut",(function(){return cn})),e.d(a,"easeQuadInOut",(function(){return fn})),e.d(a,"easeCubic",(function(){return pn})),e.d(a,"easeCubicIn",(function(){return ln})),e.d(a,"easeCubicOut",(function(){return hn})),e.d(a,"easeCubicInOut",(function(){return pn})),e.d(a,"easePoly",(function(){return gn})),e.d(a,"easePolyIn",(function(){return dn})),e.d(a,"easePolyOut",(function(){return vn})),e.d(a,"easePolyInOut",(function(){return gn})),e.d(a,"easeSin",(function(){return bn})),e.d(a,"easeSinIn",(function(){return Mn})),e.d(a,"easeSinOut",(function(){return xn})),e.d(a,"easeSinInOut",(function(){return bn})),e.d(a,"easeExp",(function(){return Pn})),e.d(a,"easeExpIn",(function(){return _n})),e.d(a,"easeExpOut",(function(){return wn})),e.d(a,"easeExpInOut",(function(){return Pn})),e.d(a,"easeCircle",(function(){return Sn})),e.d(a,"easeCircleIn",(function(){return An})),e.d(a,"easeCircleOut",(function(){return On})),e.d(a,"easeCircleInOut",(function(){return Sn})),e.d(a,"easeBounce",(function(){return jn})),e.d(a,"easeBounceIn",(function(){return En})),e.d(a,"easeBounceOut",(function(){return jn})),e.d(a,"easeBounceInOut",(function(){return kn})),e.d(a,"easeBack",(function(){return Bn})),e.d(a,"easeBackIn",(function(){return Tn})),e.d(a,"easeBackOut",(function(){return In})),e.d(a,"easeBackInOut",(function(){return Bn})),e.d(a,"easeElastic",(function(){return Dn})),e.d(a,"easeElasticIn",(function(){return Yn})),e.d(a,"easeElasticOut",(function(){return Dn})),e.d(a,"easeElasticInOut",(function(){return qn}));var i=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},o={}.toString,u=function(t,n){return o.call(t)==="[object "+n+"]"},s=function(t){return Array.isArray?Array.isArray(t):u(t,"Array")},c=function(t){var n=typeof t;return null!==t&&"object"===n||"function"===n};var f=function(t,n){if(t)if(s(t))for(var e=0,r=t.length;ee?e:t},y=function(t){return u(t,"Number")};Number.isInteger&&Number.isInteger;Math.PI,parseInt,Math.PI,Object.values;var m=function(t){return h(t)?"":t.toString()};var M=function(t){var n=m(t);return n.charAt(0).toUpperCase()+n.substring(1)};Object.prototype;function x(t,n){for(var e in n)n.hasOwnProperty(e)&&"constructor"!==e&&void 0!==n[e]&&(t[e]=n[e])}function b(t,n,e,r){return n&&x(t,n),e&&x(t,e),r&&x(t,r),t}var _=function(t){if("object"!=typeof t||null===t)return t;var n;if(s(t)){n=[];for(var e=0,r=t.length;e2&&(e.push([a].concat(o.splice(0,2))),u="l",a="m"===a?"l":"L"),"o"===u&&1===o.length&&e.push([a,o[0]]),"r"===u)e.push([a].concat(o));else for(;o.length>=n[u]&&(e.push([a].concat(o.splice(0,n[u]))),n[u]););return t})),e},I=function(t,n){for(var e=[],r=0,a=t.length;a-2*!n>r;r+=2){var i=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];n?r?a-4===r?i[3]={x:+t[0],y:+t[1]}:a-2===r&&(i[2]={x:+t[0],y:+t[1]},i[3]={x:+t[2],y:+t[3]}):i[0]={x:+t[a-2],y:+t[a-1]}:a-4===r?i[3]=i[2]:r||(i[0]={x:+t[r],y:+t[r+1]}),e.push(["C",(-i[0].x+6*i[1].x+i[2].x)/6,(-i[0].y+6*i[1].y+i[2].y)/6,(i[1].x+6*i[2].x-i[3].x)/6,(i[1].y+6*i[2].y-i[3].y)/6,i[2].x,i[2].y])}return e},B=function(t,n,e,r,a){var i=[];if(null===a&&null===r&&(r=e),t=+t,n=+n,e=+e,r=+r,null!==a){var o=Math.PI/180,u=t+e*Math.cos(-r*o),s=t+e*Math.cos(-a*o);i=[["M",u,n+e*Math.sin(-r*o)],["A",e,e,0,+(a-r>180),0,s,n+e*Math.sin(-a*o)]]}else i=[["M",t,n],["m",0,-r],["a",e,r,0,1,1,0,2*r],["a",e,r,0,1,1,0,-2*r],["z"]];return i},R=function(t){if(!(t=T(t))||!t.length)return[["M",0,0]];var n,e,r=[],a=0,i=0,o=0,u=0,s=0;"M"===t[0][0]&&(o=a=+t[0][1],u=i=+t[0][2],s++,r[0]=["M",a,i]);for(var c=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),f=void 0,l=void 0,h=s,p=t.length;h1&&(e*=b=Math.sqrt(b),r*=b);var _=e*e,w=r*r,P=(i===o?-1:1)*Math.sqrt(Math.abs((_*w-_*x*x-w*M*M)/(_*x*x+w*M*M)));p=P*e*x/r+(t+u)/2,d=P*-r*M/e+(n+s)/2,l=Math.asin(((n-d)/r).toFixed(9)),h=Math.asin(((s-d)/r).toFixed(9)),l=th&&(l-=2*Math.PI),!o&&h>l&&(h-=2*Math.PI)}var A=h-l;if(Math.abs(A)>v){var O=h,S=u,C=s;h=l+v*(o&&h>l?1:-1),u=p+e*Math.cos(h),s=d+r*Math.sin(h),y=q(u,s,e,r,a,0,o,S,C,[h,O,p,d])}A=h-l;var E=Math.cos(l),j=Math.sin(l),k=Math.cos(h),T=Math.sin(h),I=Math.tan(A/4),B=4/3*e*I,R=4/3*r*I,Y=[t,n],D=[t+B*j,n-R*E],N=[u+B*T,s-R*k],F=[u,s];if(D[0]=2*Y[0]-D[0],D[1]=2*Y[1]-D[1],c)return[D,N,F].concat(y);for(var L=[],X=0,z=(y=[D,N,F].concat(y).join().split(",")).length;X7){t[n].shift();for(var i=t[n];i.length;)u[n]="A",a&&(s[n]="A"),t.splice(n++,0,["C"].concat(i.splice(0,6)));t.splice(n,1),e=Math.max(r.length,a&&a.length||0)}},p=function(t,n,i,o,u){t&&n&&"M"===t[u][0]&&"M"!==n[u][0]&&(n.splice(u,0,["M",o.x,o.y]),i.bx=0,i.by=0,i.x=t[u][1],i.y=t[u][2],e=Math.max(r.length,a&&a.length||0))};e=Math.max(r.length,a&&a.length||0);for(var d=0;d1?1:s<0?0:s)/2,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],l=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],h=0,p=0;p<12;p++){var d=c*f[p]+c,v=X(d,t,e,a,o),g=X(d,n,r,i,u),y=v*v+g*g;h+=l[p]*Math.sqrt(y)}return c*h},H=function(t,n,e,r,a,i,o,u){for(var s,c,f,l,h=[],p=[[],[]],d=0;d<2;++d)if(0===d?(c=6*t-12*e+6*a,s=-3*t+9*e-9*a+3*o,f=3*e-3*t):(c=6*n-12*r+6*i,s=-3*n+9*r-9*i+3*u,f=3*r-3*n),Math.abs(s)<1e-12){if(Math.abs(c)<1e-12)continue;(l=-f/c)>0&&l<1&&h.push(l)}else{var v=c*c-4*f*s,g=Math.sqrt(v);if(!(v<0)){var y=(-c+g)/(2*s);y>0&&y<1&&h.push(y);var m=(-c-g)/(2*s);m>0&&m<1&&h.push(m)}}for(var M,x=h.length,b=x;x--;)M=1-(l=h[x]),p[0][x]=M*M*M*t+3*M*M*l*e+3*M*l*l*a+l*l*l*o,p[1][x]=M*M*M*n+3*M*M*l*r+3*M*l*l*i+l*l*l*u;return p[0][b]=t,p[1][b]=n,p[0][b+1]=o,p[1][b+1]=u,p[0].length=p[1].length=b+2,{min:{x:Math.min.apply(0,p[0]),y:Math.min.apply(0,p[1])},max:{x:Math.max.apply(0,p[0]),y:Math.max.apply(0,p[1])}}},Q=function(t,n,e,r,a,i,o,u){if(!(Math.max(t,e)Math.max(a,o)||Math.max(n,r)Math.max(i,u))){var s=(t-e)*(i-u)-(n-r)*(a-o);if(s){var c=((t*r-n*e)*(a-o)-(t-e)*(a*u-i*o))/s,f=((t*r-n*e)*(i-u)-(n-r)*(a*u-i*o))/s,l=+c.toFixed(2),h=+f.toFixed(2);if(!(l<+Math.min(t,e).toFixed(2)||l>+Math.max(t,e).toFixed(2)||l<+Math.min(a,o).toFixed(2)||l>+Math.max(a,o).toFixed(2)||h<+Math.min(n,r).toFixed(2)||h>+Math.max(n,r).toFixed(2)||h<+Math.min(i,u).toFixed(2)||h>+Math.max(i,u).toFixed(2)))return{x:c,y:f}}}},G=function(t,n,e){return n>=t.x&&n<=t.x+t.width&&e>=t.y&&e<=t.y+t.height},V=function(t,n,e,r,a){if(a)return[["M",+t+ +a,n],["l",e-2*a,0],["a",a,a,0,0,1,a,a],["l",0,r-2*a],["a",a,a,0,0,1,-a,a],["l",2*a-e,0],["a",a,a,0,0,1,-a,-a],["l",0,2*a-r],["a",a,a,0,0,1,a,-a],["z"]];var i=[["M",t,n],["l",e,0],["l",0,r],["l",-e,0],["z"]];return i.parsePathArray=L,i},Z=function(t,n,e,r){return null===t&&(t=n=e=r=0),null===n&&(n=t.y,e=t.width,r=t.height,t=t.x),{x:t,y:n,width:e,w:e,height:r,h:r,x2:t+e,y2:n+r,cx:t+e/2,cy:n+r/2,r1:Math.min(e,r)/2,r2:Math.max(e,r)/2,r0:Math.sqrt(e*e+r*r)/2,path:V(t,n,e,r),vb:[t,n,e,r].join(" ")}},W=function(t,n,e,r,a,i,o,u){s(t)||(t=[t,n,e,r,a,i,o,u]);var c=H.apply(null,t);return Z(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)},U=function(t,n,e,r,a,i,o,u,s){var c=1-s,f=Math.pow(c,3),l=Math.pow(c,2),h=s*s,p=h*s,d=t+2*s*(e-t)+h*(a-2*e+t),v=n+2*s*(r-n)+h*(i-2*r+n),g=e+2*s*(a-e)+h*(o-2*a+e),y=r+2*s*(i-r)+h*(u-2*i+r);return{x:f*t+3*l*s*e+3*c*s*s*a+p*o,y:f*n+3*l*s*r+3*c*s*s*i+p*u,m:{x:d,y:v},n:{x:g,y:y},start:{x:c*t+s*e,y:c*n+s*r},end:{x:c*a+s*o,y:c*i+s*u},alpha:90-180*Math.atan2(d-g,v-y)/Math.PI}},$=function(t,n,e){if(!function(t,n){return t=Z(t),n=Z(n),G(n,t.x,t.y)||G(n,t.x2,t.y)||G(n,t.x,t.y2)||G(n,t.x2,t.y2)||G(t,n.x,n.y)||G(t,n.x2,n.y)||G(t,n.x,n.y2)||G(t,n.x2,n.y2)||(t.xn.x||n.xt.x)&&(t.yn.y||n.yt.y)}(W(t),W(n)))return e?0:[];for(var r=~~(z.apply(0,t)/8),a=~~(z.apply(0,n)/8),i=[],o=[],u={},s=e?0:[],c=0;c=0&&M<=1&&x>=0&&x<=1&&(e?s+=1:s.push({x:m.x,y:m.y,t1:M,t2:x}))}}return s},J=function(t,n){return function(t,n,e){var r,a,i,o,u,s,c,f,l,h;t=N(t),n=N(n);for(var p=e?0:[],d=0,v=t.length;d=3&&(3===t.length&&n.push("Q"),n=n.concat(t[1])),2===t.length&&n.push("L"),n=n.concat(t[t.length-1])}))}(t,n,e));else{var a=[].concat(t);"M"===a[0]&&(a[0]="L");for(var i=0;i<=e-1;i++)r.push(a)}return r},nt=function(t,n){if(1===t.length)return t;var e=t.length-1,r=n.length-1,a=e/r,i=[];if(1===t.length&&"M"===t[0][0]){for(var o=0;o=0;s--)o=i[s].index,"add"===i[s].type?t.splice(o,0,[].concat(t[o])):t.splice(o,1)}var l=a-(r=t.length);if(r0)){t[r]=n[r];break}e=it(e,t[r-1],1)}t[r]=["Q"].concat(e.reduce((function(t,n){return t.concat(n)}),[]));break;case"T":t[r]=["T"].concat(e[0]);break;case"C":if(e.length<3){if(!(r>0)){t[r]=n[r];break}e=it(e,t[r-1],2)}t[r]=["C"].concat(e.reduce((function(t,n){return t.concat(n)}),[]));break;case"S":if(e.length<2){if(!(r>0)){t[r]=n[r];break}e=it(e,t[r-1],1)}t[r]=["S"].concat(e.reduce((function(t,n){return t.concat(n)}),[]));break;default:t[r]=n[r]}return t},st=function(){function t(t,n){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=n,this.timeStamp=n.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}(),ct=function(t,n){return(ct=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(t,n)};function ft(t,n){function e(){this.constructor=t}ct(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}var lt=e(45),ht=e.n(lt),pt=(e(11),e(19)),dt=e.n(pt),vt=e(12),gt=e.n(vt),yt=e(13),mt=e.n(yt),Mt=(e(8),e(21)),xt=e.n(Mt),bt=e(14),_t=e.n(bt),wt=e(22),Pt=e.n(wt);function At(t,n){var e=t.indexOf(n);-1!==e&&t.splice(e,1)}var Ot="undefined"!=typeof window&&void 0!==window.document,St=function(t){function n(n){var e=t.call(this)||this;e.destroyed=!1;var r=e.getDefaultCfg();return e.cfg=xt()(r,n),e}return ft(n,t),n.prototype.getDefaultCfg=function(){return{}},n.prototype.get=function(t){return this.cfg[t]},n.prototype.set=function(t,n){this.cfg[t]=n},n.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},n}(ht.a),Ct=e(1);Ct.translate=function(t,n,e){var r=new Array(9);return Ct.fromTranslation(r,e),Ct.multiply(t,r,n)},Ct.rotate=function(t,n,e){var r=new Array(9);return Ct.fromRotation(r,e),Ct.multiply(t,r,n)},Ct.scale=function(t,n,e){var r=new Array(9);return Ct.fromScaling(r,e),Ct.multiply(t,r,n)},Ct.transform=function(t,n){for(var e=[].concat(t),r=0,a=n.length;r=0;return e?a?2*Math.PI-r:r:a?r:2*Math.PI-r},jt.vertical=function(t,n,e){return e?(t[0]=n[1],t[1]=-1*n[0]):(t[0]=-1*n[1],t[1]=n[0]),t};e(46);var kt=function(t,n){var e=t?w(t):[1,0,0,0,1,0,0,0,1];return f(n,(function(t){switch(t[0]){case"t":Et.translate(e,e,[t[1],t[2]]);break;case"s":Et.scale(e,e,[t[1],t[2]]);break;case"r":Et.rotate(e,e,t[1]);break;case"m":Et.multiply(e,e,t[1]);break;default:return!1}})),e};function Tt(t,n){var e=[],r=t[0],a=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=t[6],f=t[7],l=t[8],h=n[0],p=n[1],d=n[2],v=n[3],g=n[4],y=n[5],m=n[6],M=n[7],x=n[8];return e[0]=h*r+p*o+d*c,e[1]=h*a+p*u+d*f,e[2]=h*i+p*s+d*l,e[3]=v*r+g*o+y*c,e[4]=v*a+g*u+y*f,e[5]=v*i+g*s+y*l,e[6]=m*r+M*o+x*c,e[7]=m*a+M*u+x*f,e[8]=m*i+M*s+x*l,e}function It(t,n){var e=[],r=n[0],a=n[1];return e[0]=t[0]*r+t[3]*a+t[6],e[1]=t[1]*r+t[4]*a+t[7],e}var Bt=["zIndex","capture","visible","type"],Rt=["repeat"];function Yt(t,n){var e={},r=n.attrs;for(var a in t)e[a]=r[a];return e}function Dt(t,n){var e={},r=n.attr();return f(t,(function(t,n){-1!==Rt.indexOf(n)||A(r[n],t)||(e[n]=t)})),e}function qt(t,n){if(n.onFrame)return t;var e=n.startTime,r=n.delay,a=n.duration,i=Object.prototype.hasOwnProperty;return f(t,(function(t){e+rt.delay&&f(n.toAttrs,(function(n,e){i.call(t.toAttrs,e)&&(delete t.toAttrs[e],delete t.fromAttrs[e])}))})),t}var Nt=function(t){function n(n){var e=t.call(this,n)||this;e.attrs={};var r=e.getDefaultAttrs();return b(r,n.attrs),e.attrs=r,e.initAttrs(r),e.initAnimate(),e}return ft(n,t),n.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},n.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},n.prototype.onCanvasChange=function(t){},n.prototype.initAttrs=function(t){},n.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},n.prototype.isGroup=function(){return!1},n.prototype.getParent=function(){return this.get("parent")},n.prototype.getCanvas=function(){return this.get("canvas")},n.prototype.attr=function(){for(var t,n=[],e=0;e0?r=qt(r,b):e.addAnimator(this),r.push(b),this.set("animations",r),this.set("_pause",{isPaused:!1})},n.prototype.stopAnimate=function(t){var n=this;void 0===t&&(t=!0);var e=this.get("animations");f(e,(function(e){t&&(e.onFrame?n.attr(e.onFrame(1)):n.attr(e.toAttrs)),e.callback&&e.callback()})),this.set("animating",!1),this.set("animations",[])},n.prototype.pauseAnimate=function(){var t=this.get("timeline"),n=this.get("animations");return f(n,(function(t){t.pauseCallback&&t.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:t.getTime()}),this},n.prototype.resumeAnimate=function(){var t=this.get("timeline").getTime(),n=this.get("animations"),e=this.get("_pause").pauseTime;return f(n,(function(n){n.startTime=n.startTime+(t-e),n._paused=!1,n._pauseTime=null,n.resumeCallback&&n.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",n),this},n.prototype.emitDelegation=function(t,n){for(var e=n.propagationPath,r=this.getEvents(),a=0;a0)}));return o.length>0?(_t()(o,(function(t){var n=t.getBBox();a.push(n.minX,n.maxX),i.push(n.minY,n.maxY)})),t=Math.min.apply(null,a),n=Math.max.apply(null,a),e=Math.min.apply(null,i),r=Math.max.apply(null,i)):(t=0,n=0,e=0,r=0),{x:t,y:e,minX:t,minY:e,maxX:n,maxY:r,width:n-t,height:r-e}},n.prototype.getCanvasBBox=function(){var t=1/0,n=-1/0,e=1/0,r=-1/0,a=[],i=[],o=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));return o.length>0?(_t()(o,(function(t){var n=t.getCanvasBBox();a.push(n.minX,n.maxX),i.push(n.minY,n.maxY)})),t=Math.min.apply(null,a),n=Math.max.apply(null,a),e=Math.min.apply(null,i),r=Math.max.apply(null,i)):(t=0,n=0,e=0,r=0),{x:t,y:e,minX:t,minY:e,maxX:n,maxY:r,width:n-t,height:r-e}},n.prototype.getDefaultCfg=function(){var n=t.prototype.getDefaultCfg.call(this);return n.children=[],n},n.prototype.onAttrChange=function(n,e,r){if(t.prototype.onAttrChange.call(this,n,e,r),"matrix"===n){var a=this.getTotalMatrix();this._applyChildrenMarix(a)}},n.prototype.applyMatrix=function(n){var e=this.getTotalMatrix();t.prototype.applyMatrix.call(this,n);var r=this.getTotalMatrix();r!==e&&this._applyChildrenMarix(r)},n.prototype._applyChildrenMarix=function(t){var n=this.getChildren();_t()(n,(function(n){n.applyMatrix(t)}))},n.prototype.addShape=function(){for(var t=[],n=0;n=0;i--){var o=t[i];if(Lt(o)&&(o.isGroup()?a=o.getShape(n,e,r):o.isHit(n,e)&&(a=o)),a)break}return a},n.prototype.add=function(t){var n=this.getCanvas(),e=this.getChildren(),r=this.get("timeline"),a=t.getParent();a&&function(t,n,e){void 0===e&&(e=!0),e?n.destroy():(n.set("parent",null),n.set("canvas",null)),At(t.getChildren(),n)}(a,t,!1),t.set("parent",this),n&&function t(n,e){if(n.set("canvas",e),n.isGroup()){var r=n.get("children");r.length&&r.forEach((function(n){t(n,e)}))}}(t,n),r&&function t(n,e){if(n.set("timeline",e),n.isGroup()){var r=n.get("children");r.length&&r.forEach((function(n){t(n,e)}))}}(t,r),e.push(t),function(t){t.isGroup()?(t.isEntityGroup()||t.get("children").length)&&t.onCanvasChange("add"):t.onCanvasChange("add")}(t),this._applyElementMatrix(t)},n.prototype._applyElementMatrix=function(t){var n=this.getTotalMatrix();n&&t.applyMatrix(n)},n.prototype.getChildren=function(){return this.get("children")},n.prototype.sort=function(){var t,n=this.getChildren();_t()(n,(function(t,n){return t._INDEX=n,t})),n.sort((t=function(t,n){return t.get("zIndex")-n.get("zIndex")},function(n,e){var r=t(n,e);return 0===r?n._INDEX-e._INDEX:r})),this.onCanvasChange("sort")},n.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),n=t.length-1;n>=0;n--)t[n].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},n.prototype.destroy=function(){this.get("destroyed")||(this.clear(),t.prototype.destroy.call(this))},n.prototype.getFirst=function(){return this.getChildByIndex(0)},n.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},n.prototype.getChildByIndex=function(t){return this.getChildren()[t]},n.prototype.getCount=function(){return this.getChildren().length},n.prototype.contain=function(t){return this.getChildren().indexOf(t)>-1},n.prototype.removeChild=function(t,n){void 0===n&&(n=!0),this.contain(t)&&t.remove(n)},n.prototype.findAll=function(t){var n=[],e=this.getChildren();return _t()(e,(function(e){t(e)&&n.push(e),e.isGroup()&&(n=n.concat(e.findAll(t)))})),n},n.prototype.find=function(t){var n=null,e=this.getChildren();return _t()(e,(function(e){if(t(e)?n=e:e.isGroup()&&(n=e.find(t)),n)return!1})),n},n.prototype.findById=function(t){return this.find((function(n){return n.get("id")===t}))},n.prototype.findByClassName=function(t){return this.find((function(n){return n.get("className")===t}))},n.prototype.findAllByName=function(t){return this.findAll((function(n){return n.get("name")===t}))},n}(Nt),Qt=0,Gt=0,Vt=0,Zt=0,Wt=0,Ut=0,$t="object"==typeof performance&&performance.now?performance:Date,Jt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Kt(){return Wt||(Jt(tn),Wt=$t.now()+Ut)}function tn(){Wt=0}function nn(){this._call=this._time=this._next=null}function en(t,n,e){var r=new nn;return r.restart(t,n,e),r}function rn(){Wt=(Zt=$t.now())+Ut,Qt=Gt=0;try{!function(){Kt(),++Qt;for(var t,n=Xt;n;)(t=Wt-n._time)>=0&&n._call.call(null,t),n=n._next;--Qt}()}finally{Qt=0,function(){var t,n,e=Xt,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Xt=n);zt=t,on(r)}(),Wt=0}}function an(){var t=$t.now(),n=t-Zt;n>1e3&&(Ut-=n,Zt=t)}function on(t){Qt||(Gt&&(Gt=clearTimeout(Gt)),t-Wt>24?(t<1/0&&(Gt=setTimeout(rn,t-$t.now()-Ut)),Vt&&(Vt=clearInterval(Vt))):(Vt||(Zt=$t.now(),Vt=setInterval(an,1e3)),Qt=1,Jt(rn)))}function un(t){return+t}function sn(t){return t*t}function cn(t){return t*(2-t)}function fn(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function ln(t){return t*t*t}function hn(t){return--t*t*t+1}function pn(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}nn.prototype=en.prototype={constructor:nn,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Kt():+e)+(null==n?0:+n),this._next||zt===this||(zt?zt._next=this:Xt=this,zt=this),this._call=t,this._time=e,on()},stop:function(){this._call&&(this._call=null,this._time=1/0,on())}};var dn=function t(n){function e(t){return Math.pow(t,n)}return n=+n,e.exponent=t,e}(3),vn=function t(n){function e(t){return 1-Math.pow(1-t,n)}return n=+n,e.exponent=t,e}(3),gn=function t(n){function e(t){return((t*=2)<=1?Math.pow(t,n):2-Math.pow(2-t,n))/2}return n=+n,e.exponent=t,e}(3),yn=Math.PI,mn=yn/2;function Mn(t){return 1-Math.cos(t*mn)}function xn(t){return Math.sin(t*mn)}function bn(t){return(1-Math.cos(yn*t))/2}function _n(t){return Math.pow(2,10*t-10)}function wn(t){return 1-Math.pow(2,-10*t)}function Pn(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function An(t){return 1-Math.sqrt(1-t*t)}function On(t){return Math.sqrt(1- --t*t)}function Sn(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Cn=7.5625;function En(t){return 1-jn(1-t)}function jn(t){return(t=+t)<4/11?Cn*t*t:t<8/11?Cn*(t-=6/11)*t+3/4:t<10/11?Cn*(t-=9/11)*t+15/16:Cn*(t-=21/22)*t+63/64}function kn(t){return((t*=2)<=1?1-jn(1-t):jn(t-1)+1)/2}var Tn=function t(n){function e(t){return t*t*((n+1)*t-n)}return n=+n,e.overshoot=t,e}(1.70158),In=function t(n){function e(t){return--t*t*((n+1)*t+n)+1}return n=+n,e.overshoot=t,e}(1.70158),Bn=function t(n){function e(t){return((t*=2)<1?t*t*((n+1)*t-n):(t-=2)*t*((n+1)*t+n)+2)/2}return n=+n,e.overshoot=t,e}(1.70158),Rn=2*Math.PI,Yn=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=Rn);function a(t){return n*Math.pow(2,10*--t)*Math.sin((r-t)/e)}return a.amplitude=function(n){return t(n,e*Rn)},a.period=function(e){return t(n,e)},a}(1,.3),Dn=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=Rn);function a(t){return 1-n*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/e)}return a.amplitude=function(n){return t(n,e*Rn)},a.period=function(e){return t(n,e)},a}(1,.3),qn=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=Rn);function a(t){return((t=2*t-1)<0?n*Math.pow(2,10*t)*Math.sin((r-t)/e):2-n*Math.pow(2,-10*t)*Math.sin((r+t)/e))/2}return a.amplitude=function(n){return t(n,e*Rn)},a.period=function(e){return t(n,e)},a}(1,.3),Nn=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t};function Fn(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function Ln(){}var Xn="\\s*([+-]?\\d+)\\s*",zn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Hn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qn=/^#([0-9a-f]{3,8})$/,Gn=new RegExp("^rgb\\("+[Xn,Xn,Xn]+"\\)$"),Vn=new RegExp("^rgb\\("+[Hn,Hn,Hn]+"\\)$"),Zn=new RegExp("^rgba\\("+[Xn,Xn,Xn,zn]+"\\)$"),Wn=new RegExp("^rgba\\("+[Hn,Hn,Hn,zn]+"\\)$"),Un=new RegExp("^hsl\\("+[zn,Hn,Hn]+"\\)$"),$n=new RegExp("^hsla\\("+[zn,Hn,Hn,zn]+"\\)$"),Jn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Kn(){return this.rgb().formatHex()}function te(){return this.rgb().formatRgb()}function ne(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=Qn.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?ee(n):3===e?new oe(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?new oe(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?new oe(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=Gn.exec(t))?new oe(n[1],n[2],n[3],1):(n=Vn.exec(t))?new oe(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Zn.exec(t))?re(n[1],n[2],n[3],n[4]):(n=Wn.exec(t))?re(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Un.exec(t))?fe(n[1],n[2]/100,n[3]/100,1):(n=$n.exec(t))?fe(n[1],n[2]/100,n[3]/100,n[4]):Jn.hasOwnProperty(t)?ee(Jn[t]):"transparent"===t?new oe(NaN,NaN,NaN,0):null}function ee(t){return new oe(t>>16&255,t>>8&255,255&t,1)}function re(t,n,e,r){return r<=0&&(t=n=e=NaN),new oe(t,n,e,r)}function ae(t){return t instanceof Ln||(t=ne(t)),t?new oe((t=t.rgb()).r,t.g,t.b,t.opacity):new oe}function ie(t,n,e,r){return 1===arguments.length?ae(t):new oe(t,n,e,null==r?1:r)}function oe(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function ue(){return"#"+ce(this.r)+ce(this.g)+ce(this.b)}function se(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function ce(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function fe(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new he(t,n,e,r)}function le(t){if(t instanceof he)return new he(t.h,t.s,t.l,t.opacity);if(t instanceof Ln||(t=ne(t)),!t)return new he;if(t instanceof he)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,a=Math.min(n,e,r),i=Math.max(n,e,r),o=NaN,u=i-a,s=(i+a)/2;return u?(o=n===i?(e-r)/u+6*(e0&&s<1?0:o,new he(o,u,s,t.opacity)}function he(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function pe(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function de(t,n,e,r,a){var i=t*t,o=i*t;return((1-3*t+3*i-o)*n+(4-6*i+3*o)*e+(1+3*t+3*i-3*o)*r+o*a)/6}Nn(Ln,ne,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Kn,formatHex:Kn,formatHsl:function(){return le(this).formatHsl()},formatRgb:te,toString:te}),Nn(oe,ie,Fn(Ln,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new oe(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new oe(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ue,formatHex:ue,formatRgb:se,toString:se})),Nn(he,(function(t,n,e,r){return 1===arguments.length?le(t):new he(t,n,e,null==r?1:r)}),Fn(Ln,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new he(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new he(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,a=2*e-r;return new oe(pe(t>=240?t-240:t+120,a,r),pe(t,a,r),pe(t<120?t+240:t-120,a,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var ve=function(t){return function(){return t}};function ge(t,n){return function(e){return t+e*n}}function ye(t){return 1==(t=+t)?me:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):ve(isNaN(n)?e:n)}}function me(t,n){var e=n-t;return e?ge(t,e):ve(isNaN(t)?n:t)}var Me=function t(n){var e=ye(n);function r(t,n){var r=e((t=ie(t)).r,(n=ie(n)).r),a=e(t.g,n.g),i=e(t.b,n.b),o=me(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=a(n),t.b=i(n),t.opacity=o(n),t+""}}return r.gamma=t,r}(1);function xe(t){return function(n){var e,r,a=n.length,i=new Array(a),o=new Array(a),u=new Array(a);for(e=0;e=1?(e=1,n-1):Math.floor(e*n),a=t[r],i=t[r+1],o=r>0?t[r-1]:2*a-i,u=ri&&(a=n.slice(i,a),u[o]?u[o]+=a:u[++o]=a),(e=e[0])===(r=r[0])?u[o]?u[o]+=r:u[++o]=r:(u[++o]=null,s.push({i:o,x:Ae(e,r)})),i=Ce.lastIndex;return ip.length?(h=T(i[f]),p=T(a[f]),p=at(p,h),p=ut(p,h),n.fromAttrs.path=p,n.toAttrs.path=h):n.pathFormatted||(h=T(i[f]),p=T(a[f]),p=ut(p,h),n.fromAttrs.path=p,n.toAttrs.path=h,n.pathFormatted=!0),r[f]=[];for(var d=0;d0){for(var i=r.animators.length-1;i>=0;i--)if((t=r.animators[i]).destroyed)r.removeAnimator(i);else{if(!t.isAnimatePaused())for(var o=(n=t.get("animations")).length-1;o>=0;o--)e=n[o],Te(t,e,a)&&(n.splice(o,1),!1,e.callback&&e.callback());0===n.length&&r.removeAnimator(i)}r.canvas.get("autoDraw")||r.canvas.draw()}}))},t.prototype.addAnimator=function(t){this.animators.push(t)},t.prototype.removeAnimator=function(t){this.animators.splice(t,1)},t.prototype.isAnimating=function(){return!!this.animators.length},t.prototype.stop=function(){this.timer&&this.timer.stop()},t.prototype.stopAllAnimations=function(t){void 0===t&&(t=!0),this.animators.forEach((function(n){n.stopAnimate(t)})),this.animators=[],this.canvas.draw()},t.prototype.getTime=function(){return this.current},t}(),Be=function(t){function n(n){var e=t.call(this,n)||this;return e.initContainer(),e.initDom(),e.initEvents(),e.initTimeline(),e}return ft(n,t),n.prototype.getDefaultCfg=function(){var n=t.prototype.getDefaultCfg.call(this);return n.cursor="default",n},n.prototype.initContainer=function(){var t=this.get("container");gt()(t)&&(t=document.getElementById(t),this.set("container",t))},n.prototype.initDom=function(){var t=this.createDom();this.set("el",t),this.get("container").appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},n.prototype.initEvents=function(){},n.prototype.initTimeline=function(){var t=new Ie(this);this.set("timeline",t)},n.prototype.setDOMSize=function(t,n){var e=this.get("el");Ot&&(e.style.width=t+"px",e.style.height=n+"px")},n.prototype.changeSize=function(t,n){this.setDOMSize(t,n),this.set("width",t),this.set("height",n),this.onCanvasChange("changeSize")},n.prototype.getRenderer=function(){return this.get("renderer")},n.prototype.getCursor=function(){return this.get("cursor")},n.prototype.setCursor=function(t){this.set("cursor",t);var n=this.get("el");Ot&&n&&(n.style.cursor=t)},n.prototype.getPointByClient=function(t,n){var e=this.get("el").getBoundingClientRect();return{x:t-e.left,y:n-e.top}},n.prototype.getClientByPoint=function(t,n){var e=this.get("el").getBoundingClientRect();return{x:t+e.left,y:n+e.top}},n.prototype.draw=function(){},n.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},n.prototype.clearEvents=function(){},n.prototype.isCanvas=function(){return!0},n.prototype.getParent=function(){return null},n.prototype.destroy=function(){var n=this.get("timeline");this.get("destroyed")||(this.clear(),n&&n.stop(),this.clearEvents(),this.removeDom(),t.prototype.destroy.call(this))},n}(Ht),Re=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return ft(n,t),n.prototype.isGroup=function(){return!0},n.prototype.isEntityGroup=function(){return!1},n.prototype.clone=function(){for(var n=t.prototype.clone.call(this),e=this.getChildren(),r=0;r=t&&e.minY<=n&&e.maxY>=n},n.prototype.afterAttrsChange=function(n){t.prototype.afterAttrsChange.call(this,n),this.clearCacheBBox()},n.prototype.getBBox=function(){var t=this.get("bbox");return t||(t=this.calculateBBox(),this.set("bbox",t)),t},n.prototype.getCanvasBBox=function(){var t=this.get("canvasBox");return t||(t=this.calculateCanvasBBox(),this.set("canvasBox",t)),t},n.prototype.applyMatrix=function(n){t.prototype.applyMatrix.call(this,n),this.set("canvasBox",null)},n.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),n=this.getTotalMatrix(),e=t.minX,r=t.minY,a=t.maxX,i=t.maxY;if(n){var o=It(n,[t.minX,t.minY]),u=It(n,[t.maxX,t.minY]),s=It(n,[t.minX,t.maxY]),c=It(n,[t.maxX,t.maxY]);e=Math.min(o[0],u[0],s[0],c[0]),a=Math.max(o[0],u[0],s[0],c[0]),r=Math.min(o[1],u[1],s[1],c[1]),i=Math.max(o[1],u[1],s[1],c[1])}var f=this.attrs;if(f.shadowColor){var l=f.shadowBlur,h=void 0===l?0:l,p=f.shadowOffsetX,d=void 0===p?0:p,v=f.shadowOffsetY,g=void 0===v?0:v,y=e-h+d,m=a+h+d,M=r-h+g,x=i+h+g;e=Math.min(e,y),a=Math.max(a,m),r=Math.min(r,M),i=Math.max(i,x)}return{x:e,y:r,minX:e,minY:r,maxX:a,maxY:i,width:a-e,height:i-r}},n.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBox",null)},n.prototype.isClipShape=function(){return this.get("isClipShape")},n.prototype.isInShape=function(t,n){return!1},n.prototype.isOnlyHitBox=function(){return!1},n.prototype.isHit=function(t,n){var e=this.get("startArrowShape"),r=this.get("endArrowShape"),a=[t,n,1],i=(a=this.invertFromMatrix(a))[0],o=a[1],u=this._isInBBox(i,o);if(this.isOnlyHitBox())return u;if(u&&!this.isClipped(i,o)){if(this.isInShape(i,o))return!0;if(e&&e.isHit(i,o))return!0;if(r&&r.isHit(i,o))return!0}return!1},n}(Nt),De=e(49).version},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function(t){return null==t}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(20);n.default=function(t){return r.default(t,"String")}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t){var n=typeof t;return null!==t&&"object"===n||"function"===n}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(8),a=e(13);n.default=function(t,n){if(t)if(r.default(t))for(var e=0,i=t.length;e=s-h&&o<=c+h&&u>=f-h&&u<=l+h&&r.default.pointToLine(t,n,e,a,o,u)<=i/2}},function(t,n,e){"use strict";e.r(n),e.d(n,"contains",(function(){return a})),e.d(n,"includes",(function(){return a})),e.d(n,"difference",(function(){return l})),e.d(n,"find",(function(){return m})),e.d(n,"findIndex",(function(){return M})),e.d(n,"firstValue",(function(){return x})),e.d(n,"flatten",(function(){return b})),e.d(n,"flattenDeep",(function(){return w})),e.d(n,"getRange",(function(){return P})),e.d(n,"pull",(function(){return C})),e.d(n,"pullAt",(function(){return j})),e.d(n,"reduce",(function(){return k})),e.d(n,"remove",(function(){return T})),e.d(n,"sortBy",(function(){return B})),e.d(n,"union",(function(){return Y})),e.d(n,"uniq",(function(){return R})),e.d(n,"valuesOfKey",(function(){return D})),e.d(n,"head",(function(){return q})),e.d(n,"last",(function(){return N})),e.d(n,"startsWith",(function(){return F})),e.d(n,"endsWith",(function(){return L})),e.d(n,"filter",(function(){return f})),e.d(n,"every",(function(){return X})),e.d(n,"some",(function(){return z})),e.d(n,"group",(function(){return V})),e.d(n,"groupBy",(function(){return Q})),e.d(n,"groupToMap",(function(){return G})),e.d(n,"getWrapBehavior",(function(){return Z})),e.d(n,"wrapBehavior",(function(){return W})),e.d(n,"number2color",(function(){return $})),e.d(n,"parseRadius",(function(){return J})),e.d(n,"clamp",(function(){return K})),e.d(n,"fixedBase",(function(){return tt})),e.d(n,"isDecimal",(function(){return et})),e.d(n,"isEven",(function(){return rt})),e.d(n,"isInteger",(function(){return at})),e.d(n,"isNegative",(function(){return it})),e.d(n,"isNumberEqual",(function(){return ot})),e.d(n,"isOdd",(function(){return ut})),e.d(n,"isPositive",(function(){return st})),e.d(n,"maxBy",(function(){return ct})),e.d(n,"minBy",(function(){return ft})),e.d(n,"mod",(function(){return lt})),e.d(n,"toDegree",(function(){return pt})),e.d(n,"toInteger",(function(){return dt})),e.d(n,"toRadian",(function(){return gt})),e.d(n,"forIn",(function(){return yt})),e.d(n,"has",(function(){return mt})),e.d(n,"hasKey",(function(){return Mt})),e.d(n,"hasValue",(function(){return bt})),e.d(n,"keys",(function(){return d})),e.d(n,"isMatch",(function(){return v})),e.d(n,"values",(function(){return xt})),e.d(n,"lowerCase",(function(){return wt})),e.d(n,"lowerFirst",(function(){return Pt})),e.d(n,"substitute",(function(){return At})),e.d(n,"upperCase",(function(){return Ot})),e.d(n,"upperFirst",(function(){return St})),e.d(n,"getType",(function(){return Et})),e.d(n,"isArguments",(function(){return jt})),e.d(n,"isArray",(function(){return u})),e.d(n,"isArrayLike",(function(){return r})),e.d(n,"isBoolean",(function(){return kt})),e.d(n,"isDate",(function(){return Tt})),e.d(n,"isError",(function(){return It})),e.d(n,"isFunction",(function(){return h})),e.d(n,"isFinite",(function(){return Bt})),e.d(n,"isNil",(function(){return p})),e.d(n,"isNull",(function(){return Rt})),e.d(n,"isNumber",(function(){return nt})),e.d(n,"isObject",(function(){return s})),e.d(n,"isObjectLike",(function(){return g})),e.d(n,"isPlainObject",(function(){return y})),e.d(n,"isPrototype",(function(){return Dt})),e.d(n,"isRegExp",(function(){return qt})),e.d(n,"isString",(function(){return I})),e.d(n,"isType",(function(){return o})),e.d(n,"isUndefined",(function(){return Nt})),e.d(n,"isElement",(function(){return Ft})),e.d(n,"requestAnimationFrame",(function(){return Lt})),e.d(n,"clearAnimationFrame",(function(){return Xt})),e.d(n,"augment",(function(){return Qt})),e.d(n,"clone",(function(){return Vt})),e.d(n,"debounce",(function(){return Zt})),e.d(n,"memoize",(function(){return Wt})),e.d(n,"deepMix",(function(){return $t})),e.d(n,"each",(function(){return c})),e.d(n,"extend",(function(){return Jt})),e.d(n,"indexOf",(function(){return Kt})),e.d(n,"isEmpty",(function(){return nn})),e.d(n,"isEqual",(function(){return rn})),e.d(n,"isEqualWith",(function(){return an})),e.d(n,"map",(function(){return on})),e.d(n,"mapValues",(function(){return sn})),e.d(n,"mix",(function(){return Ht})),e.d(n,"assign",(function(){return Ht})),e.d(n,"get",(function(){return cn})),e.d(n,"set",(function(){return fn})),e.d(n,"pick",(function(){return hn})),e.d(n,"throttle",(function(){return pn})),e.d(n,"toArray",(function(){return dn})),e.d(n,"toString",(function(){return _t})),e.d(n,"uniqueId",(function(){return gn})),e.d(n,"noop",(function(){return yn})),e.d(n,"identity",(function(){return mn})),e.d(n,"size",(function(){return Mn})),e.d(n,"Cache",(function(){return xn}));var r=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},a=function(t,n){return!!r(t)&&t.indexOf(n)>-1},i={}.toString,o=function(t,n){return i.call(t)==="[object "+n+"]"},u=function(t){return Array.isArray?Array.isArray(t):o(t,"Array")},s=function(t){var n=typeof t;return null!==t&&"object"===n||"function"===n};var c=function(t,n){if(t)if(u(t))for(var e=0,r=t.length;e-1;)O.call(t,i,1);return t},E=Array.prototype.splice,j=function(t,n){if(!r(t))return[];for(var e=t?n.length:0,a=e-1;e--;){var i=void 0,o=n[e];e!==a&&o===i||(i=o,E.call(t,o,1))}return t},k=function(t,n,e){if(!u(t)&&!y(t))return t;var r=e;return c(t,(function(t,e){r=n(r,t,e)})),r},T=function(t,n){var e=[];if(!r(t))return e;for(var a=-1,i=[],o=t.length;++an[a])return 1;if(t[a]e?e:t},tt=function(t,n){var e=n.toString(),r=e.indexOf(".");if(-1===r)return Math.round(t);var a=e.substr(r+1).length;return a>20&&(a=20),parseFloat(t.toFixed(a))},nt=function(t){return o(t,"Number")},et=function(t){return nt(t)&&t%1!=0},rt=function(t){return nt(t)&&t%2==0},at=Number.isInteger?Number.isInteger:function(t){return nt(t)&&t%1==0},it=function(t){return nt(t)&&t<0};function ot(t,n,e){return void 0===e&&(e=1e-5),Math.abs(t-n)0},ct=function(t,n){if(u(t)){var e,r,a=t[0];return e=h(n)?n(t[0]):t[0][n],c(t,(function(t){(r=h(n)?n(t):t[n])>e&&(a=t,e=r)})),a}},ft=function(t,n){if(u(t)){var e,r,a=t[0];return e=h(n)?n(t[0]):t[0][n],c(t,(function(t){(r=h(n)?n(t):t[n])n?(r&&(clearTimeout(r),r=null),u=c,o=t.apply(a,i),r||(a=i=null)):r||!1===e.trailing||(r=setTimeout(s,f)),o};return c.cancel=function(){clearTimeout(r),u=0,r=a=i=null},c},dn=function(t){return r(t)?Array.prototype.slice.call(t):[]},vn={},gn=function(t){return vn[t=t||"g"]?vn[t]+=1:vn[t]=1,t+vn[t]},yn=function(){},mn=function(t){return t};function Mn(t){return p(t)?0:r(t)?t.length:Object.keys(t).length}var xn=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,n){var e=this.map[t];return void 0===e?n:e},t.prototype.set=function(t,n){this.map[t]=n},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}()},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(20);n.default=function(t){return r.default(t,"Function")}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={}.toString;n.default=function(t,n){return r.call(t)==="[object "+n+"]"}},function(t,n,e){"use strict";function r(t,n){for(var e in n)n.hasOwnProperty(e)&&"constructor"!==e&&void 0!==n[e]&&(t[e]=n[e])}Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n,e,a){return n&&r(t,n),e&&r(t,e),a&&r(t,a),t}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(50);n.default=function(t){var n=r.default(t);return n.charAt(0).toUpperCase()+n.substring(1)}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.setMatrixArrayType=function(t){n.ARRAY_TYPE=t},n.toRadian=function(t){return t*a},n.equals=function(t,n){return Math.abs(t-n)<=r*Math.max(1,Math.abs(t),Math.abs(n))};var r=n.EPSILON=1e-6;n.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,n.RANDOM=Math.random;var a=Math.PI/180},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={}.toString;n.default=function(t,n){return r.call(t)==="[object "+n+"]"}},function(t,n,e){"use strict";function r(t,n){return t&&n?{minX:Math.min(t.minX,n.minX),minY:Math.min(t.minY,n.minY),maxX:Math.max(t.maxX,n.maxX),maxY:Math.max(t.maxY,n.maxY)}:t||n}Object.defineProperty(n,"__esModule",{value:!0}),n.mergeBBox=r,n.mergeArrowBBox=function(t,n){var e=t.get("startArrowShape"),a=t.get("endArrowShape");return e&&(n=r(n,e.getCanvasBBox())),a&&(n=r(n,a.getCanvasBBox())),n}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(5),a=e(6),i=e(36);function o(t,n,e,r,a){var i=1-a;return i*i*i*t+3*n*a*i*i+3*e*a*a*i+r*a*a*a}function u(t,n,e,r,a){var i=1-a;return 3*(i*i*(n-t)+2*i*a*(e-n)+a*a*(r-e))}function s(t,n,e,a){var i,o,u,s=-3*t+9*n-9*e+3*a,c=6*t-12*n+6*e,f=3*n-3*t,l=[];if(r.isNumberEqual(s,0))r.isNumberEqual(c,0)||(i=-f/c)>=0&&i<=1&&l.push(i);else{var h=c*c-4*s*f;r.isNumberEqual(h,0)?l.push(-c/(2*s)):h>0&&(o=(-c-(u=Math.sqrt(h)))/(2*s),(i=(-c+u)/(2*s))>=0&&i<=1&&l.push(i),o>=0&&o<=1&&l.push(o))}return l}function c(t,n,e,r,i,u,s,c,f){var l=o(t,e,i,s,f),h=o(n,r,u,c,f),p=a.default.pointAt(t,n,e,r,f),d=a.default.pointAt(e,r,i,u,f),v=a.default.pointAt(i,u,s,c,f),g=a.default.pointAt(p.x,p.y,d.x,d.y,f),y=a.default.pointAt(d.x,d.y,v.x,v.y,f);return[[t,n,p.x,p.y,g.x,g.y,l,h],[l,h,y.x,y.y,v.x,v.y,s,c]]}n.default={extrema:s,box:function(t,n,e,a,i,u,c,f){for(var l=[t,c],h=[n,f],p=s(t,e,i,c),d=s(n,a,u,f),v=0;v=0&&u<.5*Math.PI?(r={x:f.minX,y:f.minY},i={x:f.maxX,y:f.maxY}):.5*Math.PI<=u&&u1?n*a+i(n,e)*(a-1):n},n.getLineSpaceing=i,n.getTextWidth=function(t,n){var e=a.getOffScreenContext(),i=0;if(r.isNil(t)||""===t)return i;if(e.save(),e.font=n,r.isString(t)&&t.includes("\n")){var o=t.split("\n");r.each(o,(function(t){var n=e.measureText(t).width;i=0?[i]:[]}function s(t,n,e,r){return 2*(1-r)*(n-t)+2*r*(e-n)}function c(t,n,e,a,i,u,s){var c=o(t,e,i,s),f=o(n,a,u,s),l=r.default.pointAt(t,n,e,a,s),h=r.default.pointAt(e,a,i,u,s);return[[t,n,l.x,l.y,c,f],[c,f,h.x,h.y,i,u]]}n.default={box:function(t,n,e,r,i,s){var c=u(t,e,i)[0],f=u(n,r,s)[0],l=[t,i],h=[n,s];return void 0!==c&&l.push(o(t,e,i,c)),void 0!==f&&h.push(o(n,r,s,f)),a.getBBoxByArray(l,h)},length:function(t,n,e,r,i,o){return function t(n,e,r,i,o,u,s){if(0===s)return(a.distance(n,e,r,i)+a.distance(r,i,o,u)+a.distance(n,e,o,u))/2;var f=c(n,e,r,i,o,u,.5),l=f[0],h=f[1];return l.push(s-1),h.push(s-1),t.apply(null,l)+t.apply(null,h)}(t,n,e,r,i,o,3)},nearestPoint:function(t,n,e,r,a,u,s,c){return i.nearestPoint([t,e,a],[n,r,u],s,c,o)},pointDistance:function(t,n,e,r,i,o,u,s){var c=this.nearestPoint(t,n,e,r,i,o,u,s);return a.distance(c.x,c.y,u,s)},interpolationAt:o,pointAt:function(t,n,e,r,a,i,u){return{x:o(t,e,a,u),y:o(n,r,i,u)}},divide:function(t,n,e,r,a,i,o){return c(t,n,e,r,a,i,o)},tangentAngle:function(t,n,e,r,i,o,u){var c=s(t,e,i,u),f=s(n,r,o,u),l=Math.atan2(f,c);return a.piMod(l)}}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(5);n.nearestPoint=function(t,n,e,a,i){for(var o,u=.005,s=1/0,c=[e,a],f=0;f<=20;f++){var l=.05*f,h=[i.apply(null,t.concat([l])),i.apply(null,n.concat([l]))];(g=r.distance(c[0],c[1],h[0],h[1]))=0&&g1&&(e*=Math.sqrt(m),i*=Math.sqrt(m));var M=e*e*(y*y)+i*i*(g*g),x=M?Math.sqrt((e*e*(i*i)-M)/M):1;f===l&&(x*=-1),isNaN(x)&&(x=0);var b=i?x*e*y/i:0,_=e?x*-i*g/e:0,w=(h+d)/2+Math.cos(c)*b-Math.sin(c)*_,P=(p+v)/2+Math.sin(c)*b+Math.cos(c)*_,A=[(g-b)/e,(y-_)/i],O=[(-1*g-b)/e,(-1*y-_)/i],S=u([1,0],A),C=u(A,O);return o(A,O)<=-1&&(C=Math.PI),o(A,O)>=1&&(C=0),0===l&&C>0&&(C-=2*Math.PI),1===l&&C<0&&(C+=2*Math.PI),{cx:w,cy:P,rx:s(t,[d,v])?0:e,ry:s(t,[d,v])?0:i,startAngle:S,endAngle:S+C,xRotation:c,arcFlag:f,sweepFlag:l}}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(83),a=/[a-z]/;function i(t,n){return[n[0]+(n[0]-t[0]),n[1]+(n[1]-t[1])]}n.default=function(t){var n=r.default(t);if(!n||!n.length)return[["M",0,0]];for(var e=!1,o=0;o=0){e=!0;break}}if(!e)return n;var s=[],c=0,f=0,l=0,h=0,p=0,d=n[0];"M"!==d[0]&&"m"!==d[0]||(l=c=+d[1],h=f=+d[2],p++,s[0]=["M",c,f]),o=p;for(var v=n.length;o1&&(e*=Math.sqrt(m),i*=Math.sqrt(m));var M=e*e*(y*y)+i*i*(g*g),x=M?Math.sqrt((e*e*(i*i)-M)/M):1;f===l&&(x*=-1),isNaN(x)&&(x=0);var b=i?x*e*y/i:0,_=e?x*-i*g/e:0,w=(h+d)/2+Math.cos(c)*b-Math.sin(c)*_,P=(p+v)/2+Math.sin(c)*b+Math.cos(c)*_,A=[(g-b)/e,(y-_)/i],O=[(-1*g-b)/e,(-1*y-_)/i],S=u([1,0],A),C=u(A,O);return o(A,O)<=-1&&(C=Math.PI),o(A,O)>=1&&(C=0),0===l&&C>0&&(C-=2*Math.PI),1===l&&C<0&&(C+=2*Math.PI),{cx:w,cy:P,rx:s(t,[d,v])?0:e,ry:s(t,[d,v])?0:i,startAngle:S,endAngle:S+C,xRotation:c,arcFlag:f,sweepFlag:l}}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(2);n.default=function(t,n,e){var a=r.getOffScreenContext();return t.createPath(a),a.isPointInPath(n,e)}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});function r(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function a(t,n,e){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])&&Math.min(t[0],n[0])<=e[0]&&e[0]<=Math.max(t[0],n[0])&&Math.min(t[1],n[1])<=e[1]&&e[1]<=Math.max(t[1],n[1])}n.default=function(t,n,e){var i=!1,o=t.length;if(o<=2)return!1;for(var u=0;u0!=r(c[1]-e)>0&&r(n-(e-s[1])*(s[0]-c[0])/(s[1]-c[1])-s[0])<0&&(i=!i)}return i}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(2);n.default=function(t,n,e,a,i,o,u,s){var c=(Math.atan2(s-n,u-t)+2*Math.PI)%(2*Math.PI);if(ci)return!1;var f={x:t+e*Math.cos(c),y:n+e*Math.sin(c)};return r.distance(f.x,f.y,u,s)<=o/2}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.setMatrixArrayType=function(t){n.ARRAY_TYPE=t},n.toRadian=function(t){return t*a},n.equals=function(t,n){return Math.abs(t-n)<=r*Math.max(1,Math.abs(t),Math.abs(n))};var r=n.EPSILON=1e-6;n.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,n.RANDOM=Math.random;var a=Math.PI/180},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(17);n.default=function(t,n,e,a,i){var o=t.length;if(o<2)return!1;for(var u=0;u1?0:a<-1?Math.PI:Math.acos(a)},n.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},n.exactEquals=function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]},n.equals=function(t,n){var e=t[0],a=t[1],i=t[2],o=n[0],u=n[1],s=n[2];return Math.abs(e-o)<=r.EPSILON*Math.max(1,Math.abs(e),Math.abs(o))&&Math.abs(a-u)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(u))&&Math.abs(i-s)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))};var r=function(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n.default=t,n}(e(23));function a(){var t=new r.ARRAY_TYPE(3);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function i(t){var n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function o(t,n,e){var a=new r.ARRAY_TYPE(3);return a[0]=t,a[1]=n,a[2]=e,a}function u(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function s(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function c(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function f(t,n){var e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2];return Math.sqrt(e*e+r*r+a*a)}function l(t,n){var e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2];return e*e+r*r+a*a}function h(t){var n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function p(t,n){var e=n[0],r=n[1],a=n[2],i=e*e+r*r+a*a;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i),t}function d(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}var v;n.sub=u,n.mul=s,n.div=c,n.dist=f,n.sqrDist=l,n.len=i,n.sqrLen=h,n.forEach=(v=a(),function(t,n,e,r,a,i){var o=void 0,u=void 0;for(n||(n=3),e||(e=0),u=r?Math.min(r*n+e,t.length):t.length,o=e;o1&&(e*=Math.sqrt(g),a*=Math.sqrt(g));var y=e*e*(v*v)+a*a*(d*d),m=y?Math.sqrt((e*e*(a*a)-y)/y):1;s===c&&(m*=-1),isNaN(m)&&(m=0);var M=a?m*e*v/a:0,x=e?m*-a*d/e:0,b=(f+h)/2+Math.cos(u)*M-Math.sin(u)*x,_=(l+p)/2+Math.sin(u)*M+Math.cos(u)*x,w=[(d-M)/e,(v-x)/a],P=[(-1*d-M)/e,(-1*v-x)/a],A=o([1,0],w),O=o(w,P);return i(w,P)<=-1&&(O=Math.PI),i(w,P)>=1&&(O=0),0===c&&O>0&&(O-=2*Math.PI),1===c&&O<0&&(O+=2*Math.PI),{cx:b,cy:_,rx:r.isSamePoint(t,[h,p])?0:e,ry:r.isSamePoint(t,[h,p])?0:a,startAngle:A,endAngle:A+O,xRotation:u,arcFlag:s,sweepFlag:c}}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(59);n.getBBoxMethod=r.getMethod;var a=e(60),i=e(61),o=e(62),u=e(63),s=e(64),c=e(66),f=e(76),l=e(77);r.register("rect",a.default),r.register("image",a.default),r.register("circle",i.default),r.register("marker",i.default),r.register("polyline",o.default),r.register("polygon",u.default),r.register("text",s.default),r.register("path",c.default),r.register("line",f.default),r.register("ellipse",l.default)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=new Map;n.register=function(t,n){r.set(t,n)},n.getMethod=function(t){return r.get(t)}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t){var n=t.attr();return{x:n.x,y:n.y,width:n.width,height:n.height}}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t){var n=t.attr(),e=n.x,r=n.y,a=n.r;return{x:e-a,y:r-a,width:2*a,height:2*a}}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(5),a=e(25);n.default=function(t){for(var n=t.attr().points,e=[],i=[],o=0;oMath.PI/2?Math.PI-f:f,l=l>Math.PI/2?Math.PI-l:l,{xExtra:Math.cos(c/2-f)*(n/2*(1/Math.sin(c/2)))-n/2||0,yExtra:Math.cos(l-c/2)*(n/2*(1/Math.sin(c/2)))-n/2||0}}n.default=function(t){var n=t.attr(),e=n.path,u=n.stroke?n.lineWidth:0,f=function(t,n){for(var e=[],o=[],u=[],s=0;s0&&(a=1/Math.sqrt(a),t[0]=n[0]*a,t[1]=n[1]*a);return t},n.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]},n.cross=function(t,n,e){var r=n[0]*e[1]-n[1]*e[0];return t[0]=t[1]=0,t[2]=r,t},n.lerp=function(t,n,e,r){var a=n[0],i=n[1];return t[0]=a+r*(e[0]-a),t[1]=i+r*(e[1]-i),t},n.random=function(t,n){n=n||1;var e=2*r.RANDOM()*Math.PI;return t[0]=Math.cos(e)*n,t[1]=Math.sin(e)*n,t},n.transformMat2=function(t,n,e){var r=n[0],a=n[1];return t[0]=e[0]*r+e[2]*a,t[1]=e[1]*r+e[3]*a,t},n.transformMat2d=function(t,n,e){var r=n[0],a=n[1];return t[0]=e[0]*r+e[2]*a+e[4],t[1]=e[1]*r+e[3]*a+e[5],t},n.transformMat3=function(t,n,e){var r=n[0],a=n[1];return t[0]=e[0]*r+e[3]*a+e[6],t[1]=e[1]*r+e[4]*a+e[7],t},n.transformMat4=function(t,n,e){var r=n[0],a=n[1];return t[0]=e[0]*r+e[4]*a+e[12],t[1]=e[1]*r+e[5]*a+e[13],t},n.rotate=function(t,n,e,r){var a=n[0]-e[0],i=n[1]-e[1],o=Math.sin(r),u=Math.cos(r);return t[0]=a*u-i*o+e[0],t[1]=a*o+i*u+e[1],t},n.angle=function(t,n){var e=t[0],r=t[1],a=n[0],i=n[1],o=e*e+r*r;o>0&&(o=1/Math.sqrt(o));var u=a*a+i*i;u>0&&(u=1/Math.sqrt(u));var s=(e*a+r*i)*o*u;return s>1?0:s<-1?Math.PI:Math.acos(s)},n.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},n.exactEquals=function(t,n){return t[0]===n[0]&&t[1]===n[1]},n.equals=function(t,n){var e=t[0],a=t[1],i=n[0],o=n[1];return Math.abs(e-i)<=r.EPSILON*Math.max(1,Math.abs(e),Math.abs(i))&&Math.abs(a-o)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(o))};var r=function(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n.default=t,n}(e(68));function a(){var t=new r.ARRAY_TYPE(2);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function i(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t}function o(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t}function u(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t}function s(t,n){var e=n[0]-t[0],r=n[1]-t[1];return Math.sqrt(e*e+r*r)}function c(t,n){var e=n[0]-t[0],r=n[1]-t[1];return e*e+r*r}function f(t){var n=t[0],e=t[1];return Math.sqrt(n*n+e*e)}function l(t){var n=t[0],e=t[1];return n*n+e*e}var h;n.len=f,n.sub=i,n.mul=o,n.div=u,n.dist=s,n.sqrDist=c,n.sqrLen=l,n.forEach=(h=a(),function(t,n,e,r,a,i){var o=void 0,u=void 0;for(n||(n=2),e||(e=0),u=r?Math.min(r*n+e,t.length):t.length,o=e;ol&&(l=v)}var g=function(t,n,e){return Math.atan(n/(t*Math.tan(e)))}(e,r,a),y=1/0,m=-1/0,M=[u,s];for(p=2*-Math.PI;p<=2*Math.PI;p+=Math.PI){var x=g+p;um&&(m=b)}return{x:f,y:y,width:l-f,height:m-y}},length:function(t,n,e,r,a,i,o){},nearestPoint:function(t,n,e,r,i,o,c,f,l){var h=s(f-t,l-n,-i),p=h[0],d=h[1],v=a.default.nearestPoint(0,0,e,r,p,d),g=function(t,n,e,r){return(Math.atan2(r*t,e*n)+2*Math.PI)%(2*Math.PI)}(e,r,v.x,v.y);gc&&(v=u(e,r,c));var y=s(v.x,v.y,i);return{x:y[0]+t,y:y[1]+n}},pointDistance:function(t,n,e,a,i,o,u,s,c){var f=this.nearestPoint(t,n,e,a,s,c);return r.distance(f.x,f.y,s,c)},pointAt:function(t,n,e,r,a,u,s,c){var f=(s-u)*c+u;return{x:i(t,0,e,r,a,f),y:o(0,n,e,r,a,f)}},tangentAngle:function(t,n,e,a,i,o,u,s){var c=(u-o)*s+o,f=function(t,n,e,r,a,i,o,u){return-1*e*Math.cos(a)*Math.sin(u)-r*Math.sin(a)*Math.cos(u)}(0,0,e,a,i,0,0,c),l=function(t,n,e,r,a,i,o,u){return-1*e*Math.sin(a)*Math.sin(u)+r*Math.cos(a)*Math.cos(u)}(0,0,e,a,i,0,0,c);return r.piMod(Math.atan2(l,f))}}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(5);function a(t,n){var e=Math.abs(t);return n>0?e:-1*e}n.default={box:function(t,n,e,r){return{x:t-e,y:n-r,width:2*e,height:2*r}},length:function(t,n,e,r){return Math.PI*(3*(e+r)-Math.sqrt((3*e+r)*(e+3*r)))},nearestPoint:function(t,n,e,r,i,o){var u=e,s=r;if(0===u||0===s)return{x:t,y:n};for(var c,f,l=i-t,h=o-n,p=Math.abs(l),d=Math.abs(h),v=u*u,g=s*s,y=Math.PI/4,m=0;m<4;m++){c=u*Math.cos(y),f=s*Math.sin(y);var M=(v-g)*Math.pow(Math.cos(y),3)/u,x=(g-v)*Math.pow(Math.sin(y),3)/s,b=c-M,_=f-x,w=p-M,P=d-x,A=Math.hypot(_,b),O=Math.hypot(P,w);y+=A*Math.asin((b*P-_*w)/(A*O))/Math.sqrt(v+g-c*c-f*f),y=Math.min(Math.PI/2,Math.max(0,y))}return{x:t+a(c,l),y:n+a(f,h)}},pointDistance:function(t,n,e,a,i,o){var u=this.nearestPoint(t,n,e,a,i,o);return r.distance(u.x,u.y,i,o)},pointAt:function(t,n,e,r,a){var i=2*Math.PI*a;return{x:t+e*Math.cos(i),y:n+r*Math.sin(i)}},tangentAngle:function(t,n,e,a,i){var o=2*Math.PI*i,u=Math.atan2(a*Math.cos(o),-e*Math.sin(o));return r.piMod(u)}}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(37),a=e(37),i=e(74);function o(t,n){return{x:n.x+(n.x-t.x),y:n.y+(n.y-t.y)}}n.default=function(t){for(var n=[],e=null,u=null,s=null,c=0,f=(t=i.default(t)).length,l=0;l1){var a=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=a}r.default(t,(function(n,e){isNaN(n)||(t[e]=+n)})),n[e]=t})),n):void 0}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function(t,n,e){return void 0===e&&(e=1e-5),Math.abs(t-n)=c-f&&l<=c+f)},n.prototype.createPath=function(t){var n=this.attr(),e=n.x,r=n.y,a=n.r;t.beginPath(),t.arc(e,r,a,0,2*Math.PI,!1),t.closePath()},n}(a.default);n.default=o},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(0);function a(t,n,e,r){return t/(e*e)+n/(r*r)}var i=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n.prototype.getDefaultAttrs=function(){var n=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},n),{x:0,y:0,rx:0,ry:0})},n.prototype.isInStrokeOrPath=function(t,n,e,r,i){var o=this.attr(),u=i/2,s=o.x,c=o.y,f=o.rx,l=o.ry,h=(t-s)*(t-s),p=(n-c)*(n-c);return r&&e?a(h,p,f+u,l+u)<=1:r?a(h,p,f,l)<=1:!!e&&(a(h,p,f-u,l-u)>=1&&a(h,p,f+u,l+u)<=1)},n.prototype.createPath=function(t){var n=this.attr(),e=n.x,r=n.y,a=n.rx,i=n.ry;if(t.beginPath(),t.ellipse)t.ellipse(e,r,a,i,0,0,2*Math.PI,!1);else{var o=a>i?a:i,u=a>i?1:a/i,s=a>i?i/a:1;t.save(),t.translate(e,r),t.scale(u,s),t.arc(0,0,o,0,2*Math.PI),t.restore(),t.closePath()}},n}(e(3).default);n.default=i},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(0),a=e(3),i=e(2);function o(t){return t instanceof HTMLElement&&i.isString(t.nodeName)&&"CANVAS"===t.nodeName.toUpperCase()}var u=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n.prototype.getDefaultAttrs=function(){var n=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},n),{x:0,y:0,width:0,height:0})},n.prototype.initAttrs=function(t){this._setImage(t.img)},n.prototype.isStroke=function(){return!1},n.prototype.isOnlyHitBox=function(){return!0},n.prototype._afterLoading=function(){if(!0===this.get("toDraw")){var t=this.get("canvas");t?t.draw():this.createPath(this.get("context"))}},n.prototype._setImage=function(t){var n=this,e=this.attrs;if(i.isString(t)){var r=new Image;r.onload=function(){if(n.destroyed)return!1;n.attr("img",r),n.set("loading",!1),n._afterLoading();var t=n.get("callback");t&&t.call(n)},r.src=t,r.crossOrigin="Anonymous",this.set("loading",!0)}else t instanceof Image?(e.width||(e.width=t.width),e.height||(e.height=t.height)):o(t)&&(e.width||(e.width=Number(t.getAttribute("width"))),e.height||(e.height,Number(t.getAttribute("height"))))},n.prototype.onAttrChange=function(n,e,r){t.prototype.onAttrChange.call(this,n,e,r),"img"===n&&this._setImage(e)},n.prototype.createPath=function(t){if(this.get("loading"))return this.set("toDraw",!0),void this.set("context",t);var n=this.attr(),e=n.x,r=n.y,a=n.width,u=n.height,s=n.sx,c=n.sy,f=n.swidth,l=n.sheight,h=n.img;(h instanceof Image||o(h))&&(i.isNil(s)||i.isNil(c)||i.isNil(f)||i.isNil(l)?t.drawImage(h,e,r,a,u):t.drawImage(h,s,c,f,l,e,r,a,u))},n}(a.default);n.default=u},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(0),a=e(6),i=e(3),o=e(17),u=e(16),s=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n.prototype.getDefaultAttrs=function(){var n=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},n),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},n.prototype.initAttrs=function(t){this.setArrow()},n.prototype.onAttrChange=function(n,e,r){t.prototype.onAttrChange.call(this,n,e,r),this.setArrow()},n.prototype.setArrow=function(){var t=this.attr(),n=t.x1,e=t.y1,r=t.x2,a=t.y2,i=t.startArrow,o=t.endArrow;i&&u.addStartArrow(this,t,r,a,n,e),o&&u.addEndArrow(this,t,n,e,r,a)},n.prototype.isInStrokeOrPath=function(t,n,e,r,a){if(!e||!a)return!1;var i=this.attr(),u=i.x1,s=i.y1,c=i.x2,f=i.y2;return o.default(u,s,c,f,a,t,n)},n.prototype.createPath=function(t){var n=this.attr(),e=n.x1,r=n.y1,a=n.x2,i=n.y2,o=n.startArrow,s=n.endArrow,c={dx:0,dy:0},f={dx:0,dy:0};o&&o.d&&(c=u.getShortenOffset(e,r,a,i,n.startArrow.d)),s&&s.d&&(f=u.getShortenOffset(e,r,a,i,n.endArrow.d)),t.beginPath(),t.moveTo(e+c.dx,r+c.dy),t.lineTo(a-f.dx,i-f.dy)},n.prototype.afterDrawPath=function(t){var n=this.get("startArrowShape"),e=this.get("endArrowShape");n&&n.draw(t),e&&e.draw(t)},n.prototype.getTotalLength=function(){var t=this.attr(),n=t.x1,e=t.y1,r=t.x2,i=t.y2;return a.default.length(n,e,r,i)},n.prototype.getPoint=function(t){var n=this.attr(),e=n.x1,r=n.y1,i=n.x2,o=n.y2;return a.default.pointAt(e,r,i,o,t)},n}(i.default);n.default=s},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(0),a=e(18),i=e(38),o=e(3),u=e(2),s=e(9),c={circle:function(t,n,e){return[["M",t-e,n],["A",e,e,0,1,0,t+e,n],["A",e,e,0,1,0,t-e,n]]},square:function(t,n,e){return[["M",t-e,n-e],["L",t+e,n-e],["L",t+e,n+e],["L",t-e,n+e],["Z"]]},diamond:function(t,n,e){return[["M",t-e,n],["L",t,n-e],["L",t+e,n],["L",t,n+e],["Z"]]},triangle:function(t,n,e){var r=e*Math.sin(1/3*Math.PI);return[["M",t-e,n+r],["L",t,n-r],["L",t+e,n+r],["Z"]]},"triangle-down":function(t,n,e){var r=e*Math.sin(1/3*Math.PI);return[["M",t-e,n-r],["L",t+e,n-r],["L",t,n+r],["Z"]]}},f=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n.prototype.initAttrs=function(t){this._resetParamsCache()},n.prototype._resetParamsCache=function(){this.set("paramsCache",{})},n.prototype.onAttrChange=function(n,e,r){t.prototype.onAttrChange.call(this,n,e,r),-1!==["symbol","x","y","r","radius"].indexOf(n)&&this._resetParamsCache()},n.prototype.isOnlyHitBox=function(){return!0},n.prototype._getR=function(t){return a.isNil(t.r)?t.radius:t.r},n.prototype._getPath=function(){var t,e,r=this.attr(),a=r.x,o=r.y,s=r.symbol||"circle",c=this._getR(r);return u.isFunction(s)?(e=(t=s)(a,o,c),e=i.default(e)):e=(t=n.Symbols[s])(a,o,c),t?e:(console.warn(s+" marker is not supported."),null)},n.prototype.createPath=function(t){var n=this._getPath(),e=this.get("paramsCache");s.drawPath(this,t,{path:n},e)},n.Symbols=c,n}(o.default);n.default=f},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(15),a="\t\n\v\f\r   ᠎              \u2028\u2029",i=new RegExp("([a-z])["+a+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+a+"]*,?["+a+"]*)+)","ig"),o=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+a+"]*,?["+a+"]*","ig");n.default=function(t){if(!t)return null;if(r.default(t))return t;var n={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},e=[];return String(t).replace(i,(function(t,r,a){var i=[],u=r.toLowerCase();if(a.replace(o,(function(t,n){n&&i.push(+n)})),"m"===u&&i.length>2&&(e.push([r].concat(i.splice(0,2))),u="l",r="m"===r?"l":"L"),"o"===u&&1===i.length&&e.push([r,i[0]]),"r"===u)e.push([r].concat(i));else for(;i.length>=n[u]&&(e.push([r].concat(i.splice(0,n[u]))),n[u]););return""})),e}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(0),a=e(26),i=e(18),o=e(3),u=e(38),s=e(85),c=e(9),f=e(40),l=e(41),h=e(87),p=e(16);function d(t,n,e){for(var r=!1,a=0;a=r[0]&&t<=r[1]&&(n=(t-r[0])/(r[1]-r[0]),e=a)}));var u=o[e];if(i.isNil(u)||i.isNil(e))return null;var s=u.length,c=o[e+1];return a.default.pointAt(u[s-2],u[s-1],c[1],c[2],c[3],c[4],c[5],c[6],n)},n.prototype._calculateCurve=function(){var t=this.attr().path;this.set("curve",h.default.pathToCurve(t))},n.prototype._setTcache=function(){var t,n,e,r,o=0,u=0,s=[],c=this.get("curve");c&&(i.each(c,(function(t,n){e=c[n+1],r=t.length,e&&(o+=a.default.length(t[r-2],t[r-1],e[1],e[2],e[3],e[4],e[5],e[6])||0)})),this.set("totalLength",o),0!==o?(i.each(c,(function(i,f){e=c[f+1],r=i.length,e&&((t=[])[0]=u/o,n=a.default.length(i[r-2],i[r-1],e[1],e[2],e[3],e[4],e[5],e[6]),u+=n||0,t[1]=u/o,s.push(t))})),this.set("tCache",s)):this.set("tCache",[]))},n.prototype.getStartTangent=function(){var t,n=this.getSegments();if(n.length>1){var e=n[0].currentPoint,r=n[1].currentPoint,a=n[1].startTangent;t=[],a?(t.push([e[0]-a[0],e[1]-a[1]]),t.push([e[0],e[1]])):(t.push([r[0],r[1]]),t.push([e[0],e[1]]))}return t},n.prototype.getEndTangent=function(){var t,n=this.getSegments(),e=n.length;if(e>1){var r=n[e-2].currentPoint,a=n[e-1].currentPoint,i=n[e-1].endTangent;t=[],i?(t.push([a[0]-i[0],a[1]-i[1]]),t.push([a[0],a[1]])):(t.push([r[0],r[1]]),t.push([a[0],a[1]]))}return t},n}(o.default);n.default=v},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(39),a=e(39),i=e(86);function o(t,n){return{x:n.x+(n.x-t.x),y:n.y+(n.y-t.y)}}n.default=function(t){for(var n=[],e=null,u=null,s=null,c=0,f=(t=i.default(t)).length,l=0;l1){var a=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=a}r.default(t,(function(n,e){isNaN(n)||(t[e]=+n)})),n[e]=t})),n):void 0}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(0),a=e(10),i=e(35),o=e(26),u=e(2),s=e(17),c=e(42),f=e(88),l=e(89);n.default=r.__assign({hasArc:function(t){for(var n=!1,e=t.length,r=0;r0&&r.push(a),{polygons:e,polylines:r}},isPointInStroke:function(t,n,e,r){for(var a=!1,h=n/2,p=0;pw?_:w,j=_>w?1:_/w,k=_>w?w/_:1;f.translate(C,C,[-x,-b]),f.rotate(C,C,-O),f.scale(C,C,[1/j,1/k]),l.transformMat3(S,S,C),a=c.default(0,0,E,P,A,n,S[0],S[1])}if(a)break}}return a}},a.PathUtil)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sub=n.mul=void 0,n.create=function(){var t=new r.ARRAY_TYPE(9);r.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0);return t[0]=1,t[4]=1,t[8]=1,t},n.fromMat4=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t},n.clone=function(t){var n=new r.ARRAY_TYPE(9);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n},n.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},n.fromValues=function(t,n,e,a,i,o,u,s,c){var f=new r.ARRAY_TYPE(9);return f[0]=t,f[1]=n,f[2]=e,f[3]=a,f[4]=i,f[5]=o,f[6]=u,f[7]=s,f[8]=c,f},n.set=function(t,n,e,r,a,i,o,u,s,c){return t[0]=n,t[1]=e,t[2]=r,t[3]=a,t[4]=i,t[5]=o,t[6]=u,t[7]=s,t[8]=c,t},n.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},n.transpose=function(t,n){if(t===n){var e=n[1],r=n[2],a=n[5];t[1]=n[3],t[2]=n[6],t[3]=e,t[5]=n[7],t[6]=r,t[7]=a}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t},n.invert=function(t,n){var e=n[0],r=n[1],a=n[2],i=n[3],o=n[4],u=n[5],s=n[6],c=n[7],f=n[8],l=f*o-u*c,h=-f*i+u*s,p=c*i-o*s,d=e*l+r*h+a*p;if(!d)return null;return d=1/d,t[0]=l*d,t[1]=(-f*r+a*c)*d,t[2]=(u*r-a*o)*d,t[3]=h*d,t[4]=(f*e-a*s)*d,t[5]=(-u*e+a*i)*d,t[6]=p*d,t[7]=(-c*e+r*s)*d,t[8]=(o*e-r*i)*d,t},n.adjoint=function(t,n){var e=n[0],r=n[1],a=n[2],i=n[3],o=n[4],u=n[5],s=n[6],c=n[7],f=n[8];return t[0]=o*f-u*c,t[1]=a*c-r*f,t[2]=r*u-a*o,t[3]=u*s-i*f,t[4]=e*f-a*s,t[5]=a*i-e*u,t[6]=i*c-o*s,t[7]=r*s-e*c,t[8]=e*o-r*i,t},n.determinant=function(t){var n=t[0],e=t[1],r=t[2],a=t[3],i=t[4],o=t[5],u=t[6],s=t[7],c=t[8];return n*(c*i-o*s)+e*(-c*a+o*u)+r*(s*a-i*u)},n.multiply=a,n.translate=function(t,n,e){var r=n[0],a=n[1],i=n[2],o=n[3],u=n[4],s=n[5],c=n[6],f=n[7],l=n[8],h=e[0],p=e[1];return t[0]=r,t[1]=a,t[2]=i,t[3]=o,t[4]=u,t[5]=s,t[6]=h*r+p*o+c,t[7]=h*a+p*u+f,t[8]=h*i+p*s+l,t},n.rotate=function(t,n,e){var r=n[0],a=n[1],i=n[2],o=n[3],u=n[4],s=n[5],c=n[6],f=n[7],l=n[8],h=Math.sin(e),p=Math.cos(e);return t[0]=p*r+h*o,t[1]=p*a+h*u,t[2]=p*i+h*s,t[3]=p*o-h*r,t[4]=p*u-h*a,t[5]=p*s-h*i,t[6]=c,t[7]=f,t[8]=l,t},n.scale=function(t,n,e){var r=e[0],a=e[1];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=a*n[3],t[4]=a*n[4],t[5]=a*n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},n.fromTranslation=function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},n.fromRotation=function(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=-e,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},n.fromScaling=function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},n.fromMat2d=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},n.fromQuat=function(t,n){var e=n[0],r=n[1],a=n[2],i=n[3],o=e+e,u=r+r,s=a+a,c=e*o,f=r*o,l=r*u,h=a*o,p=a*u,d=a*s,v=i*o,g=i*u,y=i*s;return t[0]=1-l-d,t[3]=f-y,t[6]=h+g,t[1]=f+y,t[4]=1-c-d,t[7]=p-v,t[2]=h-g,t[5]=p+v,t[8]=1-c-l,t},n.normalFromMat4=function(t,n){var e=n[0],r=n[1],a=n[2],i=n[3],o=n[4],u=n[5],s=n[6],c=n[7],f=n[8],l=n[9],h=n[10],p=n[11],d=n[12],v=n[13],g=n[14],y=n[15],m=e*u-r*o,M=e*s-a*o,x=e*c-i*o,b=r*s-a*u,_=r*c-i*u,w=a*c-i*s,P=f*v-l*d,A=f*g-h*d,O=f*y-p*d,S=l*g-h*v,C=l*y-p*v,E=h*y-p*g,j=m*E-M*C+x*S+b*O-_*A+w*P;if(!j)return null;return j=1/j,t[0]=(u*E-s*C+c*S)*j,t[1]=(s*O-o*E-c*A)*j,t[2]=(o*C-u*O+c*P)*j,t[3]=(a*C-r*E-i*S)*j,t[4]=(e*E-a*O+i*A)*j,t[5]=(r*O-e*C-i*P)*j,t[6]=(v*w-g*_+y*b)*j,t[7]=(g*x-d*w-y*M)*j,t[8]=(d*_-v*x+y*m)*j,t},n.projection=function(t,n,e){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/e,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},n.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},n.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},n.add=function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t},n.subtract=i,n.multiplyScalar=function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t},n.multiplyScalarAndAdd=function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t},n.exactEquals=function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},n.equals=function(t,n){var e=t[0],a=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=t[6],f=t[7],l=t[8],h=n[0],p=n[1],d=n[2],v=n[3],g=n[4],y=n[5],m=n[6],M=n[7],x=n[8];return Math.abs(e-h)<=r.EPSILON*Math.max(1,Math.abs(e),Math.abs(h))&&Math.abs(a-p)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(p))&&Math.abs(i-d)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(o-v)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(u-g)<=r.EPSILON*Math.max(1,Math.abs(u),Math.abs(g))&&Math.abs(s-y)<=r.EPSILON*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(c-m)<=r.EPSILON*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(f-M)<=r.EPSILON*Math.max(1,Math.abs(f),Math.abs(M))&&Math.abs(l-x)<=r.EPSILON*Math.max(1,Math.abs(l),Math.abs(x))};var r=function(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n.default=t,n}(e(43));function a(t,n,e){var r=n[0],a=n[1],i=n[2],o=n[3],u=n[4],s=n[5],c=n[6],f=n[7],l=n[8],h=e[0],p=e[1],d=e[2],v=e[3],g=e[4],y=e[5],m=e[6],M=e[7],x=e[8];return t[0]=h*r+p*o+d*c,t[1]=h*a+p*u+d*f,t[2]=h*i+p*s+d*l,t[3]=v*r+g*o+y*c,t[4]=v*a+g*u+y*f,t[5]=v*i+g*s+y*l,t[6]=m*r+M*o+x*c,t[7]=m*a+M*u+x*f,t[8]=m*i+M*s+x*l,t}function i(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t}n.mul=a,n.sub=i},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.forEach=n.sqrLen=n.len=n.sqrDist=n.dist=n.div=n.mul=n.sub=void 0,n.create=a,n.clone=function(t){var n=new r.ARRAY_TYPE(3);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n},n.length=i,n.fromValues=o,n.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t},n.set=function(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t},n.add=function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t},n.subtract=u,n.multiply=s,n.divide=c,n.ceil=function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t},n.floor=function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t},n.min=function(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t},n.max=function(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t},n.round=function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t},n.scale=function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t},n.scaleAndAdd=function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t},n.distance=f,n.squaredDistance=l,n.squaredLength=h,n.negate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t},n.inverse=function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t},n.normalize=p,n.dot=d,n.cross=function(t,n,e){var r=n[0],a=n[1],i=n[2],o=e[0],u=e[1],s=e[2];return t[0]=a*s-i*u,t[1]=i*o-r*s,t[2]=r*u-a*o,t},n.lerp=function(t,n,e,r){var a=n[0],i=n[1],o=n[2];return t[0]=a+r*(e[0]-a),t[1]=i+r*(e[1]-i),t[2]=o+r*(e[2]-o),t},n.hermite=function(t,n,e,r,a,i){var o=i*i,u=o*(2*i-3)+1,s=o*(i-2)+i,c=o*(i-1),f=o*(3-2*i);return t[0]=n[0]*u+e[0]*s+r[0]*c+a[0]*f,t[1]=n[1]*u+e[1]*s+r[1]*c+a[1]*f,t[2]=n[2]*u+e[2]*s+r[2]*c+a[2]*f,t},n.bezier=function(t,n,e,r,a,i){var o=1-i,u=o*o,s=i*i,c=u*o,f=3*i*u,l=3*s*o,h=s*i;return t[0]=n[0]*c+e[0]*f+r[0]*l+a[0]*h,t[1]=n[1]*c+e[1]*f+r[1]*l+a[1]*h,t[2]=n[2]*c+e[2]*f+r[2]*l+a[2]*h,t},n.random=function(t,n){n=n||1;var e=2*r.RANDOM()*Math.PI,a=2*r.RANDOM()-1,i=Math.sqrt(1-a*a)*n;return t[0]=Math.cos(e)*i,t[1]=Math.sin(e)*i,t[2]=a*n,t},n.transformMat4=function(t,n,e){var r=n[0],a=n[1],i=n[2],o=e[3]*r+e[7]*a+e[11]*i+e[15];return o=o||1,t[0]=(e[0]*r+e[4]*a+e[8]*i+e[12])/o,t[1]=(e[1]*r+e[5]*a+e[9]*i+e[13])/o,t[2]=(e[2]*r+e[6]*a+e[10]*i+e[14])/o,t},n.transformMat3=function(t,n,e){var r=n[0],a=n[1],i=n[2];return t[0]=r*e[0]+a*e[3]+i*e[6],t[1]=r*e[1]+a*e[4]+i*e[7],t[2]=r*e[2]+a*e[5]+i*e[8],t},n.transformQuat=function(t,n,e){var r=e[0],a=e[1],i=e[2],o=e[3],u=n[0],s=n[1],c=n[2],f=a*c-i*s,l=i*u-r*c,h=r*s-a*u,p=a*h-i*l,d=i*f-r*h,v=r*l-a*f,g=2*o;return f*=g,l*=g,h*=g,p*=2,d*=2,v*=2,t[0]=u+f+p,t[1]=s+l+d,t[2]=c+h+v,t},n.rotateX=function(t,n,e,r){var a=[],i=[];return a[0]=n[0]-e[0],a[1]=n[1]-e[1],a[2]=n[2]-e[2],i[0]=a[0],i[1]=a[1]*Math.cos(r)-a[2]*Math.sin(r),i[2]=a[1]*Math.sin(r)+a[2]*Math.cos(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},n.rotateY=function(t,n,e,r){var a=[],i=[];return a[0]=n[0]-e[0],a[1]=n[1]-e[1],a[2]=n[2]-e[2],i[0]=a[2]*Math.sin(r)+a[0]*Math.cos(r),i[1]=a[1],i[2]=a[2]*Math.cos(r)-a[0]*Math.sin(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},n.rotateZ=function(t,n,e,r){var a=[],i=[];return a[0]=n[0]-e[0],a[1]=n[1]-e[1],a[2]=n[2]-e[2],i[0]=a[0]*Math.cos(r)-a[1]*Math.sin(r),i[1]=a[0]*Math.sin(r)+a[1]*Math.cos(r),i[2]=a[2],t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},n.angle=function(t,n){var e=o(t[0],t[1],t[2]),r=o(n[0],n[1],n[2]);p(e,e),p(r,r);var a=d(e,r);return a>1?0:a<-1?Math.PI:Math.acos(a)},n.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},n.exactEquals=function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]},n.equals=function(t,n){var e=t[0],a=t[1],i=t[2],o=n[0],u=n[1],s=n[2];return Math.abs(e-o)<=r.EPSILON*Math.max(1,Math.abs(e),Math.abs(o))&&Math.abs(a-u)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(u))&&Math.abs(i-s)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))};var r=function(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n.default=t,n}(e(43));function a(){var t=new r.ARRAY_TYPE(3);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function i(t){var n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function o(t,n,e){var a=new r.ARRAY_TYPE(3);return a[0]=t,a[1]=n,a[2]=e,a}function u(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function s(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function c(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function f(t,n){var e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2];return Math.sqrt(e*e+r*r+a*a)}function l(t,n){var e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2];return e*e+r*r+a*a}function h(t){var n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function p(t,n){var e=n[0],r=n[1],a=n[2],i=e*e+r*r+a*a;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i),t}function d(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}var v;n.sub=u,n.mul=s,n.div=c,n.dist=f,n.sqrDist=l,n.len=i,n.sqrLen=h,n.forEach=(v=a(),function(t,n,e,r,a,i){var o=void 0,u=void 0;for(n||(n=3),e||(e=0),u=r?Math.min(r*n+e,t.length):t.length,o=e;o=r[0]&&t<=r[1]&&(n=(t-r[0])/(r[1]-r[0]),e=a)})),a.default.pointAt(r[e][0],r[e][1],r[e+1][0],r[e+1][1],n)},n.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var n=this.getTotalLength();if(!(n<=0)){var e,r,i=0,u=[];o.each(t,(function(o,s){t[s+1]&&((e=[])[0]=i/n,r=a.default.length(o[0],o[1],t[s+1][0],t[s+1][1]),i+=r,e[1]=i/n,u.push(e))})),this.set("tCache",u)}}},n.prototype.getStartTangent=function(){var t=this.attr().points,n=[];return n.push([t[1][0],t[1][1]]),n.push([t[0][0],t[0][1]]),n},n.prototype.getEndTangent=function(){var t=this.attr().points,n=t.length-1,e=[];return e.push([t[n-1][0],t[n-1][1]]),e.push([t[n][0],t[n][1]]),e},n}(u.default);n.default=f},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(93),a=e(5);n.default={box:function(t){for(var n=[],e=[],r=0;r1||n<0||t.length<2)return null;var e=i(t),a=e.segments,o=e.totalLength;if(0===o)return{x:t[0][0],y:t[0][1]};for(var u=0,s=null,c=0;c=u&&n<=u+p){var d=(n-u)/p;s=r.default.pointAt(l[0],l[1],h[0],h[1],d);break}u+=p}return s},n.angleAtSegments=function(t,n){if(n>1||n<0||t.length<2)return 0;for(var e=i(t),r=e.segments,a=e.totalLength,o=0,u=0,s=0;s=o&&n<=o+h){u=Math.atan2(l[1]-f[1],l[0]-f[0]);break}o+=h}return u},n.distanceAtSegment=function(t,n,e){for(var a=1/0,i=0;i0&&(i.isNil(a)||1===a||(t.globalAlpha=r),this.stroke(t)),this.isFill()&&(i.isNil(o)||1===o?this.fill(t):(t.globalAlpha=o,this.fill(t),t.globalAlpha=r)),this.afterDrawPath(t)},n.prototype.fill=function(t){this._drawText(t,!0)},n.prototype.stroke=function(t){this._drawText(t,!1)},n}(a.default);n.default=u},function(t){t.exports=JSON.parse('{"name":"@antv/g-canvas","version":"0.4.2","description":"A canvas library which providing 2d","main":"lib/index.js","module":"esm/index.js","browser":"dist/g.min.js","types":"lib/index.d.ts","files":["package.json","esm","lib","dist","LICENSE","README.md"],"scripts":{"build":"npm run clean && run-p build:*","build:esm":"tsc -p tsconfig.json --target ES5 --module ESNext --outDir esm","build:cjs":"tsc -p tsconfig.json --target ES5 --module commonjs --outDir lib","build:umd":"webpack --config webpack.config.js --mode production","clean":"rm -rf esm lib dist","coverage":"npm run coverage-generator && npm run coverage-viewer","coverage-generator":"torch --coverage --compile --source-pattern src/*.js,src/**/*.js --opts tests/mocha.opts","coverage-viewer":"torch-coverage","test":"torch --renderer --compile --opts tests/mocha.opts","test-live":"torch --compile --interactive --opts tests/mocha.opts","tsc":"tsc --noEmit","typecheck":"tsc --noEmit","dist":"webpack --config webpack.config.js --mode production"},"repository":{"type":"git","url":"git+https://github.com/antvis/g.git"},"keywords":["util","antv","g"],"publishConfig":{"access":"public"},"author":"https://github.com/orgs/antvis/people","license":"ISC","bugs":{"url":"https://github.com/antvis/g/issues"},"devDependencies":{"@antv/torch":"^1.0.0","less":"^3.9.0","npm-run-all":"^4.1.5","webpack":"^4.26.1","webpack-cli":"^3.1.2"},"homepage":"https://github.com/antvis/g#readme","dependencies":{"@antv/g-base":"^0.4.0","@antv/g-math":"^0.1.1","@antv/gl-matrix":"~2.7.1","@antv/path-util":"~2.0.5","@antv/util":"~2.0.0"},"__npminstall_done":false}')},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),e(0).__exportStar(e(100),n)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),e(0).__exportStar(e(102),n)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(0),a=e(10),i=e(104),o=e(7),u=e(27),s=e(9),c=e(2),f=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n.prototype.getDefaultCfg=function(){var n=t.prototype.getDefaultCfg.call(this);return n.renderer="canvas",n.autoDraw=!0,n.localRefresh=!0,n.refreshElements=[],n},n.prototype.onCanvasChange=function(t){"attr"!==t&&"sort"!==t&&"changeSize"!==t||(this.set("refreshElements",[this]),this.draw())},n.prototype.getShapeBase=function(){return o},n.prototype.getGroupBase=function(){return u.default},n.prototype.getPixelRatio=function(){return this.get("pixelRatio")||c.getPixelRatio()},n.prototype.getViewRange=function(){var t=this.get("el");return{minX:0,minY:0,maxX:t.width,maxY:t.height}},n.prototype.initEvents=function(){var t=new i.default({canvas:this});t.init(),this.set("eventController",t)},n.prototype.createDom=function(){var t=document.createElement("canvas"),n=t.getContext("2d");return this.set("context",n),t},n.prototype.setDOMSize=function(n,e){t.prototype.setDOMSize.call(this,n,e);var r=this.get("context"),a=this.get("el"),i=this.getPixelRatio();a.width=i*n,a.height=i*e,i>1&&r.scale(i,i)},n.prototype.clear=function(){t.prototype.clear.call(this),this._clearFrame();var n=this.get("context"),e=this.get("el");n.clearRect(0,0,e.width,e.height)},n.prototype._getRefreshRegion=function(){var t,n=this.get("refreshElements");if(n.length&&n[0]===this)t=this.getViewRange();else{(t=s.getMergedRegion(n))&&(t.minX=Math.floor(t.minX-.5),t.minY=Math.floor(t.minY-.5),t.maxX=Math.ceil(t.maxX+.5),t.maxY=Math.ceil(t.maxY+.5))}return t},n.prototype.refreshElement=function(t){this.get("refreshElements").push(t)},n.prototype._clearFrame=function(){var t=this.get("drawFrame");t&&(c.clearAnimationFrame(t),this.set("drawFrame",null),this.set("refreshElements",[]))},n.prototype.draw=function(){var t=this.get("drawFrame");this.get("autoDraw")&&t||this._startDraw()},n.prototype._drawAll=function(){var t=this.get("context"),n=this.get("el"),e=this.getChildren();t.clearRect(0,0,n.width,n.height),s.applyAttrsToContext(t,this),s.drawChildren(t,e),this.set("refreshElements",[])},n.prototype._drawRegion=function(){var t=this.get("context"),n=this.getChildren(),e=this._getRefreshRegion();e&&(t.clearRect(e.minX,e.minY,e.maxX-e.minX,e.maxY-e.minY),t.save(),t.beginPath(),t.rect(e.minX,e.minY,e.maxX-e.minX,e.maxY-e.minY),t.clip(),s.applyAttrsToContext(t,this),s.drawChildren(t,n,e),t.restore()),this.set("refreshElements",[])},n.prototype._startDraw=function(){var t=this,n=this.get("drawFrame");n||(n=c.requestAnimationFrame((function(){t.get("localRefresh")?t._drawRegion():t._drawAll(),t.set("drawFrame",null)})),this.set("drawFrame",n))},n.prototype.skipDraw=function(){},n.prototype.destroy=function(){this.get("eventController").destroy(),t.prototype.destroy.call(this)},n}(a.AbstractCanvas);n.default=f},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(105),a=e(34),i=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function o(t,n,e){e.name=n,e.target=t,e.currentTarget=t,e.delegateTarget=t,t.emit(n,e)}function u(t,n,e){if(e.bubbles){var r=void 0,a=!1;if("mouseenter"===n||"dragenter"===n?(r=e.fromShape,a=!0):"mouseleave"!==n&&"dragleave"!==n||(a=!0,r=e.toShape),t.isCanvas()&&a)return;if(r&&function(t,n){if(t.isCanvas())return!0;for(var e=n.getParent(),r=!1;e;){if(e===t){r=!0;break}e=e.getParent()}return r}(t,r))return void(e.bubbles=!1);e.name=n,e.currentTarget=t,e.delegateTarget=t,t.emit(n,e)}}var s=function(){function t(t){var n=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(t){var e=t.type;n._triggerEvent(e,t)},this._onDocumentMove=function(t){if(n.canvas.get("el")!==t.target&&(n.dragging||n.currentShape)){var e=n._getPointInfo(t);n.dragging&&n._emitEvent("drag",t,e,n.draggingShape)}},this._onDocumentMouseUp=function(t){if(n.canvas.get("el")!==t.target&&n.dragging){var e=n._getPointInfo(t);n.draggingShape&&n._emitEvent("drop",t,e,null),n._emitEvent("dragend",t,e,n.draggingShape),n._afterDrag(n.draggingShape,e,t)}},this.canvas=t.canvas}return t.prototype.init=function(){this._bindEvents()},t.prototype._bindEvents=function(){var t=this,n=this.canvas.get("el");a.each(i,(function(e){n.addEventListener(e,t._eventCallback)})),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._clearEvents=function(){var t=this,n=this.canvas.get("el");a.each(i,(function(e){n.removeEventListener(e,t._eventCallback)})),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._getEventObj=function(t,n,e,a,i,o){var u=new r.default(t,n);return u.fromShape=i,u.toShape=o,u.x=e.x,u.y=e.y,u.clientX=e.clientX,u.clientY=e.clientY,u.propagationPath.push(a),u},t.prototype._getShape=function(t,n){return this.canvas.getShape(t.x,t.y,n)},t.prototype._getPointInfo=function(t){var n,e,r=this.canvas,a=(e=n=t,n.touches&&(e="touchend"===n.type?n.changedTouches[0]:n.touches[0]),{clientX:e.clientX,clientY:e.clientY}),i=r.getPointByClient(a.clientX,a.clientY);return{x:i.x,y:i.y,clientX:a.clientX,clientY:a.clientY}},t.prototype._triggerEvent=function(t,n){var e=this._getPointInfo(n),r=this._getShape(e,n),a=this["_on"+t],i=!1;if(a)a.call(this,e,r,n);else{var o=this.currentShape;"mouseenter"===t||"dragenter"===t||"mouseover"===t?(this._emitEvent(t,n,e,null,null,r),r&&this._emitEvent(t,n,e,r,null,r),"mouseenter"===t&&this.draggingShape&&this._emitEvent("dragenter",n,e,null)):"mouseleave"===t||"dragleave"===t||"mouseout"===t?(i=!0,o&&this._emitEvent(t,n,e,o,o,null),this._emitEvent(t,n,e,null,o,null),"mouseleave"===t&&this.draggingShape&&this._emitEvent("dragleave",n,e,null)):this._emitEvent(t,n,e,r,null,null)}if(i||(this.currentShape=r),r&&!r.get("destroyed")){var u=this.canvas;u.get("el").style.cursor=r.attr("cursor")||u.get("cursor")}},t.prototype._onmousedown=function(t,n,e){0===e.button&&(this.mousedownShape=n,this.mousedownPoint=t,this.mousedownTimeStamp=e.timeStamp),this._emitEvent("mousedown",e,t,n,null,null)},t.prototype._emitMouseoverEvents=function(t,n,e,r){var a=this.canvas.get("el");e!==r&&(e&&(this._emitEvent("mouseout",t,n,e,e,r),this._emitEvent("mouseleave",t,n,e,e,r),r&&!r.get("destroyed")||(a.style.cursor=this.canvas.get("cursor"))),r&&(this._emitEvent("mouseover",t,n,r,e,r),this._emitEvent("mouseenter",t,n,r,e,r)))},t.prototype._emitDragoverEvents=function(t,n,e,r,a){r?(r!==e&&(e&&this._emitEvent("dragleave",t,n,e,e,r),this._emitEvent("dragenter",t,n,r,e,r)),a||this._emitEvent("dragover",t,n,r)):e&&this._emitEvent("dragleave",t,n,e,e,r),a&&this._emitEvent("dragover",t,n,r)},t.prototype._afterDrag=function(t,n,e){t&&(t.set("capture",!0),this.draggingShape=null),this.dragging=!1;var r=this._getShape(n,e);r!==t&&this._emitMouseoverEvents(e,n,t,r),this.currentShape=r},t.prototype._onmouseup=function(t,n,e){if(0===e.button){var r=this.draggingShape;this.dragging?(r&&this._emitEvent("drop",e,t,n),this._emitEvent("dragend",e,t,r),this._afterDrag(r,t,e)):(this._emitEvent("mouseup",e,t,n),n===this.mousedownShape&&this._emitEvent("click",e,t,n),this.mousedownShape=null,this.mousedownPoint=null)}},t.prototype._ondragover=function(t,n,e){e.preventDefault();var r=this.currentShape;this._emitDragoverEvents(e,t,r,n,!0)},t.prototype._onmousemove=function(t,n,e){var r=this.canvas,a=this.currentShape,i=this.draggingShape;if(this.dragging)i&&this._emitDragoverEvents(e,t,a,n,!1),this._emitEvent("drag",e,t,i);else{var o=this.mousedownPoint;if(o){var u=this.mousedownShape,s=e.timeStamp-this.mousedownTimeStamp,c=o.clientX-t.clientX,f=o.clientY-t.clientY;s>120||c*c+f*f>40?u&&u.get("draggable")?((i=this.mousedownShape).set("capture",!1),this.draggingShape=i,this.dragging=!0,this._emitEvent("dragstart",e,t,i),this.mousedownShape=null,this.mousedownPoint=null):!u&&r.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",e,t,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(e,t,a,n),this._emitEvent("mousemove",e,t,n)):(this._emitMouseoverEvents(e,t,a,n),this._emitEvent("mousemove",e,t,n))}else this._emitMouseoverEvents(e,t,a,n),this._emitEvent("mousemove",e,t,n)}},t.prototype._emitEvent=function(t,n,e,r,a,i){var s=this._getEventObj(t,n,e,r,a,i);if(r){s.shape=r,o(r,t,s);for(var c=r.getParent();c;)c.emitDelegation(t,s),s.propagationStopped||u(c,t,s),s.propagationPath.push(c),c=c.getParent()}else{o(this.canvas,t,s)}},t.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},t}();n.default=s},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,n){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=n,this.timeStamp=n.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}();n.default=r}])})); -//# sourceMappingURL=g.min.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g-svg/dist/g.min.js": -/*!************************************************!*\ - !*** ./node_modules/@antv/g-svg/dist/g.min.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -!function(t,e){ true?module.exports=e():undefined}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=31)}([function(t,e,n){"use strict";n.r(e);var r=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},i=function(t,e){return!!r(t)&&t.indexOf(e)>-1},a={}.toString,o=function(t,e){return a.call(t)==="[object "+e+"]"},u=function(t){return Array.isArray?Array.isArray(t):o(t,"Array")},s=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e};var c=function(t,e){if(t)if(u(t))for(var n=0,r=t.length;n-1;)S.call(t,a,1);return t},T=Array.prototype.splice,E=function(t,e){if(!r(t))return[];for(var n=t?e.length:0,i=n-1;n--;){var a=void 0,o=e[n];n!==i&&o===a||(a=o,T.call(t,o,1))}return t},k=function(t,e,n){if(!u(t)&&!y(t))return t;var r=n;return c(t,(function(t,n){r=e(r,t,n)})),r},j=function(t,e){var n=[];if(!r(t))return n;for(var i=-1,a=[],o=t.length;++ie[i])return 1;if(t[i]n?n:t},tt=function(t,e){var n=e.toString(),r=n.indexOf(".");if(-1===r)return Math.round(t);var i=n.substr(r+1).length;return i>20&&(i=20),parseFloat(t.toFixed(i))},et=function(t){return o(t,"Number")},nt=function(t){return et(t)&&t%1!=0},rt=function(t){return et(t)&&t%2==0},it=Number.isInteger?Number.isInteger:function(t){return et(t)&&t%1==0},at=function(t){return et(t)&&t<0};function ot(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)0},ct=function(t,e){if(u(t)){var n,r,i=t[0];return n=h(e)?e(t[0]):t[0][e],c(t,(function(t){(r=h(e)?e(t):t[e])>n&&(i=t,n=r)})),i}},lt=function(t,e){if(u(t)){var n,r,i=t[0];return n=h(e)?e(t[0]):t[0][e],c(t,(function(t){(r=h(e)?e(t):t[e])e?(r&&(clearTimeout(r),r=null),u=c,o=t.apply(i,a),r||(i=a=null)):r||!1===n.trailing||(r=setTimeout(s,l)),o};return c.cancel=function(){clearTimeout(r),u=0,r=i=a=null},c},pe=function(t){return r(t)?Array.prototype.slice.call(t):[]},de={},ve=function(t){return de[t=t||"g"]?de[t]+=1:de[t]=1,t+de[t]},ge=function(){},ye=function(t){return t};function me(t){return p(t)?0:r(t)?t.length:Object.keys(t).length}var Me=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}();n.d(e,"contains",(function(){return i})),n.d(e,"includes",(function(){return i})),n.d(e,"difference",(function(){return f})),n.d(e,"find",(function(){return m})),n.d(e,"findIndex",(function(){return M})),n.d(e,"firstValue",(function(){return b})),n.d(e,"flatten",(function(){return x})),n.d(e,"flattenDeep",(function(){return w})),n.d(e,"getRange",(function(){return A})),n.d(e,"pull",(function(){return C})),n.d(e,"pullAt",(function(){return E})),n.d(e,"reduce",(function(){return k})),n.d(e,"remove",(function(){return j})),n.d(e,"sortBy",(function(){return B})),n.d(e,"union",(function(){return D})),n.d(e,"uniq",(function(){return N})),n.d(e,"valuesOfKey",(function(){return R})),n.d(e,"head",(function(){return L})),n.d(e,"last",(function(){return q})),n.d(e,"startsWith",(function(){return F})),n.d(e,"endsWith",(function(){return Y})),n.d(e,"filter",(function(){return l})),n.d(e,"every",(function(){return G})),n.d(e,"some",(function(){return X})),n.d(e,"group",(function(){return H})),n.d(e,"groupBy",(function(){return W})),n.d(e,"groupToMap",(function(){return z})),n.d(e,"getWrapBehavior",(function(){return Q})),n.d(e,"wrapBehavior",(function(){return U})),n.d(e,"number2color",(function(){return Z})),n.d(e,"parseRadius",(function(){return K})),n.d(e,"clamp",(function(){return J})),n.d(e,"fixedBase",(function(){return tt})),n.d(e,"isDecimal",(function(){return nt})),n.d(e,"isEven",(function(){return rt})),n.d(e,"isInteger",(function(){return it})),n.d(e,"isNegative",(function(){return at})),n.d(e,"isNumberEqual",(function(){return ot})),n.d(e,"isOdd",(function(){return ut})),n.d(e,"isPositive",(function(){return st})),n.d(e,"maxBy",(function(){return ct})),n.d(e,"minBy",(function(){return lt})),n.d(e,"mod",(function(){return ft})),n.d(e,"toDegree",(function(){return pt})),n.d(e,"toInteger",(function(){return dt})),n.d(e,"toRadian",(function(){return gt})),n.d(e,"forIn",(function(){return yt})),n.d(e,"has",(function(){return mt})),n.d(e,"hasKey",(function(){return Mt})),n.d(e,"hasValue",(function(){return xt})),n.d(e,"keys",(function(){return d})),n.d(e,"isMatch",(function(){return v})),n.d(e,"values",(function(){return bt})),n.d(e,"lowerCase",(function(){return wt})),n.d(e,"lowerFirst",(function(){return At})),n.d(e,"substitute",(function(){return Pt})),n.d(e,"upperCase",(function(){return St})),n.d(e,"upperFirst",(function(){return Ot})),n.d(e,"getType",(function(){return Tt})),n.d(e,"isArguments",(function(){return Et})),n.d(e,"isArray",(function(){return u})),n.d(e,"isArrayLike",(function(){return r})),n.d(e,"isBoolean",(function(){return kt})),n.d(e,"isDate",(function(){return jt})),n.d(e,"isError",(function(){return It})),n.d(e,"isFunction",(function(){return h})),n.d(e,"isFinite",(function(){return Bt})),n.d(e,"isNil",(function(){return p})),n.d(e,"isNull",(function(){return Nt})),n.d(e,"isNumber",(function(){return et})),n.d(e,"isObject",(function(){return s})),n.d(e,"isObjectLike",(function(){return g})),n.d(e,"isPlainObject",(function(){return y})),n.d(e,"isPrototype",(function(){return Rt})),n.d(e,"isRegExp",(function(){return Lt})),n.d(e,"isString",(function(){return I})),n.d(e,"isType",(function(){return o})),n.d(e,"isUndefined",(function(){return qt})),n.d(e,"isElement",(function(){return Ft})),n.d(e,"requestAnimationFrame",(function(){return Yt})),n.d(e,"clearAnimationFrame",(function(){return Gt})),n.d(e,"augment",(function(){return Wt})),n.d(e,"clone",(function(){return Ht})),n.d(e,"debounce",(function(){return Qt})),n.d(e,"memoize",(function(){return Ut})),n.d(e,"deepMix",(function(){return Zt})),n.d(e,"each",(function(){return c})),n.d(e,"extend",(function(){return Kt})),n.d(e,"indexOf",(function(){return Jt})),n.d(e,"isEmpty",(function(){return ee})),n.d(e,"isEqual",(function(){return re})),n.d(e,"isEqualWith",(function(){return ie})),n.d(e,"map",(function(){return ae})),n.d(e,"mapValues",(function(){return ue})),n.d(e,"mix",(function(){return Vt})),n.d(e,"assign",(function(){return Vt})),n.d(e,"get",(function(){return se})),n.d(e,"set",(function(){return ce})),n.d(e,"pick",(function(){return fe})),n.d(e,"throttle",(function(){return he})),n.d(e,"toArray",(function(){return pe})),n.d(e,"toString",(function(){return _t})),n.d(e,"uniqueId",(function(){return ve})),n.d(e,"noop",(function(){return ge})),n.d(e,"identity",(function(){return ye})),n.d(e,"size",(function(){return me})),n.d(e,"Cache",(function(){return Me}))},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",(function(){return i})),n.d(e,"__assign",(function(){return a})),n.d(e,"__rest",(function(){return o})),n.d(e,"__decorate",(function(){return u})),n.d(e,"__param",(function(){return s})),n.d(e,"__metadata",(function(){return c})),n.d(e,"__awaiter",(function(){return l})),n.d(e,"__generator",(function(){return f})),n.d(e,"__exportStar",(function(){return h})),n.d(e,"__values",(function(){return p})),n.d(e,"__read",(function(){return d})),n.d(e,"__spread",(function(){return v})),n.d(e,"__spreadArrays",(function(){return g})),n.d(e,"__await",(function(){return y})),n.d(e,"__asyncGenerator",(function(){return m})),n.d(e,"__asyncDelegator",(function(){return M})),n.d(e,"__asyncValues",(function(){return b})),n.d(e,"__makeTemplateObject",(function(){return x})),n.d(e,"__importStar",(function(){return _})),n.d(e,"__importDefault",(function(){return w})),n.d(e,"__classPrivateFieldGet",(function(){return A})),n.d(e,"__classPrivateFieldSet",(function(){return P})); -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ -var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var a=function(){return(a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;u--)(i=t[u])&&(o=(a<3?i(o):a>3?i(e,n,o):i(e,n))||o);return a>3&&o&&Object.defineProperty(e,n,o),o}function s(t,e){return function(n,r){e(n,r,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))((function(i,a){function o(t){try{s(r.next(t))}catch(t){a(t)}}function u(t){try{s(r.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}s((r=r.apply(t,e||[])).next())}))}function f(t,e){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function v(){for(var t=[],e=0;e1||u(t,e)}))})}function u(t,e){try{(n=i[t](e)).value instanceof y?Promise.resolve(n.value.v).then(s,c):l(a[0][2],n)}catch(t){l(a[0][3],t)}var n}function s(t){u("next",t)}function c(t){u("throw",t)}function l(t,e){t(e),a.shift(),a.length&&u(a[0][0],a[0][1])}}function M(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:y(t[r](e)),done:"return"===r}:i?i(e):e}:i}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=p(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,i){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,i,(e=t[n](e)).done,e.value)}))}}}function x(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function _(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function w(t){return t&&t.__esModule?t:{default:t}}function A(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function P(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sub=e.mul=void 0,e.create=function(){var t=new r.ARRAY_TYPE(9);r.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0);return t[0]=1,t[4]=1,t[8]=1,t},e.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},e.clone=function(t){var e=new r.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromValues=function(t,e,n,i,a,o,u,s,c){var l=new r.ARRAY_TYPE(9);return l[0]=t,l[1]=e,l[2]=n,l[3]=i,l[4]=a,l[5]=o,l[6]=u,l[7]=s,l[8]=c,l},e.set=function(t,e,n,r,i,a,o,u,s,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=u,t[7]=s,t[8]=c,t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.transpose=function(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},e.invert=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],u=e[5],s=e[6],c=e[7],l=e[8],f=l*o-u*c,h=-l*a+u*s,p=c*a-o*s,d=n*f+r*h+i*p;if(!d)return null;return d=1/d,t[0]=f*d,t[1]=(-l*r+i*c)*d,t[2]=(u*r-i*o)*d,t[3]=h*d,t[4]=(l*n-i*s)*d,t[5]=(-u*n+i*a)*d,t[6]=p*d,t[7]=(-c*n+r*s)*d,t[8]=(o*n-r*a)*d,t},e.adjoint=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],u=e[5],s=e[6],c=e[7],l=e[8];return t[0]=o*l-u*c,t[1]=i*c-r*l,t[2]=r*u-i*o,t[3]=u*s-a*l,t[4]=n*l-i*s,t[5]=i*a-n*u,t[6]=a*c-o*s,t[7]=r*s-n*c,t[8]=n*o-r*a,t},e.determinant=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],u=t[6],s=t[7],c=t[8];return e*(c*a-o*s)+n*(-c*i+o*u)+r*(s*i-a*u)},e.multiply=i,e.translate=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],u=e[4],s=e[5],c=e[6],l=e[7],f=e[8],h=n[0],p=n[1];return t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=u,t[5]=s,t[6]=h*r+p*o+c,t[7]=h*i+p*u+l,t[8]=h*a+p*s+f,t},e.rotate=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],u=e[4],s=e[5],c=e[6],l=e[7],f=e[8],h=Math.sin(n),p=Math.cos(n);return t[0]=p*r+h*o,t[1]=p*i+h*u,t[2]=p*a+h*s,t[3]=p*o-h*r,t[4]=p*u-h*i,t[5]=p*s-h*a,t[6]=c,t[7]=l,t[8]=f,t},e.scale=function(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},e.fromRotation=function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat2d=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},e.fromQuat=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n+n,u=r+r,s=i+i,c=n*o,l=r*o,f=r*u,h=i*o,p=i*u,d=i*s,v=a*o,g=a*u,y=a*s;return t[0]=1-f-d,t[3]=l-y,t[6]=h+g,t[1]=l+y,t[4]=1-c-d,t[7]=p-v,t[2]=h-g,t[5]=p+v,t[8]=1-c-f,t},e.normalFromMat4=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],u=e[5],s=e[6],c=e[7],l=e[8],f=e[9],h=e[10],p=e[11],d=e[12],v=e[13],g=e[14],y=e[15],m=n*u-r*o,M=n*s-i*o,b=n*c-a*o,x=r*s-i*u,_=r*c-a*u,w=i*c-a*s,A=l*v-f*d,P=l*g-h*d,S=l*y-p*d,O=f*g-h*v,C=f*y-p*v,T=h*y-p*g,E=m*T-M*C+b*O+x*S-_*P+w*A;if(!E)return null;return E=1/E,t[0]=(u*T-s*C+c*O)*E,t[1]=(s*S-o*T-c*P)*E,t[2]=(o*C-u*S+c*A)*E,t[3]=(i*C-r*T-a*O)*E,t[4]=(n*T-i*S+a*P)*E,t[5]=(r*S-n*C-a*A)*E,t[6]=(v*w-g*_+y*x)*E,t[7]=(g*b-d*w-y*M)*E,t[8]=(d*_-v*b+y*m)*E,t},e.projection=function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},e.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},e.subtract=a,e.multiplyScalar=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},e.multiplyScalarAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},e.equals=function(t,e){var n=t[0],i=t[1],a=t[2],o=t[3],u=t[4],s=t[5],c=t[6],l=t[7],f=t[8],h=e[0],p=e[1],d=e[2],v=e[3],g=e[4],y=e[5],m=e[6],M=e[7],b=e[8];return Math.abs(n-h)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(i-p)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(a-d)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(o-v)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(u-g)<=r.EPSILON*Math.max(1,Math.abs(u),Math.abs(g))&&Math.abs(s-y)<=r.EPSILON*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(c-m)<=r.EPSILON*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(l-M)<=r.EPSILON*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(f-b)<=r.EPSILON*Math.max(1,Math.abs(f),Math.abs(b))};var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(21));function i(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],u=e[4],s=e[5],c=e[6],l=e[7],f=e[8],h=n[0],p=n[1],d=n[2],v=n[3],g=n[4],y=n[5],m=n[6],M=n[7],b=n[8];return t[0]=h*r+p*o+d*c,t[1]=h*i+p*u+d*l,t[2]=h*a+p*s+d*f,t[3]=v*r+g*o+y*c,t[4]=v*i+g*u+y*l,t[5]=v*a+g*s+y*f,t[6]=m*r+M*o+b*c,t[7]=m*i+M*u+b*l,t[8]=m*a+M*s+b*f,t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}e.mul=i,e.sub=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHAPE_TO_TAGS={rect:"path",circle:"circle",line:"line",path:"path",marker:"path",text:"text",polyline:"polyline",polygon:"polygon",image:"image",ellipse:"ellipse",dom:"foreignObject"},e.SVG_ATTR_MAP={opacity:"opacity",fillStyle:"fill",fill:"fill",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",x:"x",y:"y",r:"r",rx:"rx",ry:"ry",width:"width",height:"height",x1:"x1",x2:"x2",y1:"y1",y2:"y2",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",startArrow:"marker-start",endArrow:"marker-end",path:"d",class:"class",id:"id",style:"style",preserveAspectRatio:"preserveAspectRatio"},e.EVENTS=["click","mousedown","mouseup","dblclick","contextmenu","mouseenter","mouseleave","mouseover","mouseout","mousemove","wheel"]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(16),a=n(8),o=n(15),u=n(22),s=n(3),c=n(10),l=n(23),f=n(34),h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="svg",e.canFill=!1,e.canStroke=!1,e}return r.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},e),{lineWidth:1,lineAppendWidth:0,strokeOpacity:1,fillOpacity:1})},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e);var n=this.get("canvas");if(n&&n.get("autoDraw")){var r=n.get("context");this.draw(r,e)}},e.prototype.getShapeBase=function(){return c},e.prototype.getGroupBase=function(){return l.default},e.prototype.onCanvasChange=function(t){u.refreshElement(this,t)},e.prototype.calculateBBox=function(){var t=this.get("el"),e=null;if(t)e=t.getBBox();else{var n=f.getBBoxMethod(this.get("type"));n&&(e=n(this))}if(e){var r=e.x,i=e.y,a=e.width,o=e.height,u=this.getHitLineWidth(),s=u/2,c=r-s,l=i-s;return{x:c,y:l,minX:c,minY:l,maxX:r+a+s,maxY:i+o+s,width:a+u,height:o+u}}return{x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0}},e.prototype.isFill=function(){var t=this.attr(),e=t.fill,n=t.fillStyle;return(e||n||this.isClipShape())&&this.canFill},e.prototype.isStroke=function(){var t=this.attr(),e=t.stroke,n=t.strokeStyle;return(e||n)&&this.canStroke},e.prototype.draw=function(t,e){var n=this.get("el");this.get("destroyed")?n&&n.parentNode.removeChild(n):(n||o.createDom(this),a.setClip(this,t),this.createPath(t,e),this.shadow(t,e),this.strokeAndFill(t,e),this.transform(e))},e.prototype.createPath=function(t,e){},e.prototype.strokeAndFill=function(t,e){var n=e||this.attr(),r=n.fill,i=n.fillStyle,a=n.stroke,o=n.strokeStyle,u=n.fillOpacity,c=n.strokeOpacity,l=n.lineWidth,f=this.get("el");this.canFill&&(e?"fill"in n?this._setColor(t,"fill",r):"fillStyle"in n&&this._setColor(t,"fill",i):this._setColor(t,"fill",r||i),u&&f.setAttribute(s.SVG_ATTR_MAP.fillOpacity,u)),this.canStroke&&l>0&&(e?"stroke"in n?this._setColor(t,"stroke",a):"strokeStyle"in n&&this._setColor(t,"stroke",o):this._setColor(t,"stroke",a||o),c&&f.setAttribute(s.SVG_ATTR_MAP.strokeOpacity,c),l&&f.setAttribute(s.SVG_ATTR_MAP.lineWidth,l))},e.prototype._setColor=function(t,e,n){var r=this.get("el");if(n)if(n=n.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(n))(i=t.find("gradient",n))||(i=t.addGradient(n)),r.setAttribute(s.SVG_ATTR_MAP[e],"url(#"+i+")");else if(/^[p,P]{1}[\s]*\(/.test(n)){var i;(i=t.find("pattern",n))||(i=t.addPattern(n)),r.setAttribute(s.SVG_ATTR_MAP[e],"url(#"+i+")")}else r.setAttribute(s.SVG_ATTR_MAP[e],n);else r.setAttribute(s.SVG_ATTR_MAP[e],"none")},e.prototype.shadow=function(t,e){var n=this.attr(),r=e||n,i=r.shadowOffsetX,o=r.shadowOffsetY,u=r.shadowBlur,s=r.shadowColor;(i||o||u||s)&&a.setShadow(this,t)},e.prototype.transform=function(t){var e=this.attr();(t||e).matrix&&a.setTransform(this)},e.prototype.isInShape=function(t,e){return this.isPointInPath(t,e)},e.prototype.isPointInPath=function(t,e){var n=this.get("el"),r=this.get("canvas").get("el").getBoundingClientRect(),i=t+r.left,a=e+r.top,o=document.elementFromPoint(i,a);return!(!o||!o.isEqualNode(n))},e.prototype.getHitLineWidth=function(){var t=this.attrs,e=t.lineWidth,n=t.lineAppendWidth;return this.isStroke()?e+n:0},e}(i.AbstractShape);e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.sqrDist=e.dist=e.div=e.mul=e.sub=e.len=void 0,e.create=i,e.clone=function(t){var e=new r.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},e.fromValues=function(t,e){var n=new r.ARRAY_TYPE(2);return n[0]=t,n[1]=e,n},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.set=function(t,e,n){return t[0]=e,t[1]=n,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},e.subtract=a,e.multiply=o,e.divide=u,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},e.scaleAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t},e.distance=s,e.squaredDistance=c,e.length=l,e.squaredLength=f,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},e.normalize=function(t,e){var n=e[0],r=e[1],i=n*n+r*r;i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i);return t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},e.lerp=function(t,e,n,r){var i=e[0],a=e[1];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t},e.random=function(t,e){e=e||1;var n=2*r.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.transformMat2=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t},e.transformMat2d=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t},e.transformMat3=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t},e.transformMat4=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t},e.rotate=function(t,e,n,r){var i=e[0]-n[0],a=e[1]-n[1],o=Math.sin(r),u=Math.cos(r);return t[0]=i*u-a*o+n[0],t[1]=i*o+a*u+n[1],t},e.angle=function(t,e){var n=t[0],r=t[1],i=e[0],a=e[1],o=n*n+r*r;o>0&&(o=1/Math.sqrt(o));var u=i*i+a*a;u>0&&(u=1/Math.sqrt(u));var s=(n*i+r*a)*o*u;return s>1?0:s<-1?Math.PI:Math.acos(s)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],i=t[1],a=e[0],o=e[1];return Math.abs(n-a)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-o)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(o))};var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(21));function i(){var t=new r.ARRAY_TYPE(2);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function o(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function u(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function s(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}function c(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function l(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function f(t){var e=t[0],n=t[1];return e*e+n*n}var h;e.len=l,e.sub=a,e.mul=o,e.div=u,e.dist=s,e.sqrDist=c,e.sqrLen=f,e.forEach=(h=i(),function(t,e,n,r,i,a){var o=void 0,u=void 0;for(e||(e=2),n||(n=0),u=r?Math.min(r*e+n,t.length):t.length,o=n;o(n-t)*(n-t)+(i-e)*(i-e)?r.distance(n,i,a,o):this.pointToLine(t,e,n,i,a,o)},pointToLine:function(t,e,n,r,a,o){var u=[n-t,r-e];if(i.exactEquals(u,[0,0]))return Math.sqrt((a-t)*(a-t)+(o-e)*(o-e));var s=[-u[1],u[0]];i.normalize(s,s);var c=[a-t,o-e];return Math.abs(i.dot(c,s))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4);e.Base=r.default;var i=n(57);e.Circle=i.default;var a=n(58);e.Dom=a.default;var o=n(59);e.Ellipse=o.default;var u=n(60);e.Image=u.default;var s=n(61);e.Line=s.default;var c=n(62);e.Marker=c.default;var l=n(64);e.Path=l.default;var f=n(65);e.Polygon=f.default;var h=n(66);e.Polyline=h.default;var p=n(69);e.Rect=p.default;var d=n(71);e.Text=d.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){return null==t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(18);e.default=function(t){return r.default(t,"String")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7),i=n(13);e.default=function(t,e){if(t)if(r.default(t))for(var n=0,a=t.length;nn?n:t},y=function(t){return u(t,"Number")};Number.isInteger&&Number.isInteger;Math.PI,parseInt,Math.PI,Object.values;var m=function(t){return h(t)?"":t.toString()};var M=function(t){var e=m(t);return e.charAt(0).toUpperCase()+e.substring(1)};Object.prototype;function b(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function x(t,e,n,r){return e&&b(t,e),n&&b(t,n),r&&b(t,r),t}var _=function(t){if("object"!=typeof t||null===t)return t;var e;if(s(t)){e=[];for(var n=0,r=t.length;n2&&(n.push([i].concat(o.splice(0,2))),u="l",i="m"===i?"l":"L"),"o"===u&&1===o.length&&n.push([i,o[0]]),"r"===u)n.push([i].concat(o));else for(;o.length>=e[u]&&(n.push([i].concat(o.splice(0,e[u]))),e[u]););return t})),n},I=function(t,e){for(var n=[],r=0,i=t.length;i-2*!e>r;r+=2){var a=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?i-4===r?a[3]={x:+t[0],y:+t[1]}:i-2===r&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[i-2],y:+t[i-1]}:i-4===r?a[3]=a[2]:r||(a[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return n},B=function(t,e,n,r,i){var a=[];if(null===i&&null===r&&(r=n),t=+t,e=+e,n=+n,r=+r,null!==i){var o=Math.PI/180,u=t+n*Math.cos(-r*o),s=t+n*Math.cos(-i*o);a=[["M",u,e+n*Math.sin(-r*o)],["A",n,n,0,+(i-r>180),0,s,e+n*Math.sin(-i*o)]]}else a=[["M",t,e],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]];return a},N=function(t){if(!(t=j(t))||!t.length)return[["M",0,0]];var e,n,r=[],i=0,a=0,o=0,u=0,s=0;"M"===t[0][0]&&(o=i=+t[0][1],u=a=+t[0][2],s++,r[0]=["M",i,a]);for(var c=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),l=void 0,f=void 0,h=s,p=t.length;h1&&(n*=x=Math.sqrt(x),r*=x);var _=n*n,w=r*r,A=(a===o?-1:1)*Math.sqrt(Math.abs((_*w-_*b*b-w*M*M)/(_*b*b+w*M*M)));p=A*n*b/r+(t+u)/2,d=A*-r*M/n+(e+s)/2,f=Math.asin(((e-d)/r).toFixed(9)),h=Math.asin(((s-d)/r).toFixed(9)),f=th&&(f-=2*Math.PI),!o&&h>f&&(h-=2*Math.PI)}var P=h-f;if(Math.abs(P)>v){var S=h,O=u,C=s;h=f+v*(o&&h>f?1:-1),u=p+n*Math.cos(h),s=d+r*Math.sin(h),y=L(u,s,n,r,i,0,o,O,C,[h,S,p,d])}P=h-f;var T=Math.cos(f),E=Math.sin(f),k=Math.cos(h),j=Math.sin(h),I=Math.tan(P/4),B=4/3*n*I,N=4/3*r*I,D=[t,e],R=[t+B*E,e-N*T],q=[u+B*j,s-N*k],F=[u,s];if(R[0]=2*D[0]-R[0],R[1]=2*D[1]-R[1],c)return[R,q,F].concat(y);for(var Y=[],G=0,X=(y=[R,q,F].concat(y).join().split(",")).length;G7){t[e].shift();for(var a=t[e];a.length;)u[e]="A",i&&(s[e]="A"),t.splice(e++,0,["C"].concat(a.splice(0,6)));t.splice(e,1),n=Math.max(r.length,i&&i.length||0)}},p=function(t,e,a,o,u){t&&e&&"M"===t[u][0]&&"M"!==e[u][0]&&(e.splice(u,0,["M",o.x,o.y]),a.bx=0,a.by=0,a.x=t[u][1],a.y=t[u][2],n=Math.max(r.length,i&&i.length||0))};n=Math.max(r.length,i&&i.length||0);for(var d=0;d1?1:s<0?0:s)/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],f=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],h=0,p=0;p<12;p++){var d=c*l[p]+c,v=G(d,t,n,i,o),g=G(d,e,r,a,u),y=v*v+g*g;h+=f[p]*Math.sqrt(y)}return c*h},V=function(t,e,n,r,i,a,o,u){for(var s,c,l,f,h=[],p=[[],[]],d=0;d<2;++d)if(0===d?(c=6*t-12*n+6*i,s=-3*t+9*n-9*i+3*o,l=3*n-3*t):(c=6*e-12*r+6*a,s=-3*e+9*r-9*a+3*u,l=3*r-3*e),Math.abs(s)<1e-12){if(Math.abs(c)<1e-12)continue;(f=-l/c)>0&&f<1&&h.push(f)}else{var v=c*c-4*l*s,g=Math.sqrt(v);if(!(v<0)){var y=(-c+g)/(2*s);y>0&&y<1&&h.push(y);var m=(-c-g)/(2*s);m>0&&m<1&&h.push(m)}}for(var M,b=h.length,x=b;b--;)M=1-(f=h[b]),p[0][b]=M*M*M*t+3*M*M*f*n+3*M*f*f*i+f*f*f*o,p[1][b]=M*M*M*e+3*M*M*f*r+3*M*f*f*a+f*f*f*u;return p[0][x]=t,p[1][x]=e,p[0][x+1]=o,p[1][x+1]=u,p[0].length=p[1].length=x+2,{min:{x:Math.min.apply(0,p[0]),y:Math.min.apply(0,p[1])},max:{x:Math.max.apply(0,p[0]),y:Math.max.apply(0,p[1])}}},W=function(t,e,n,r,i,a,o,u){if(!(Math.max(t,n)Math.max(i,o)||Math.max(e,r)Math.max(a,u))){var s=(t-n)*(a-u)-(e-r)*(i-o);if(s){var c=((t*r-e*n)*(i-o)-(t-n)*(i*u-a*o))/s,l=((t*r-e*n)*(a-u)-(e-r)*(i*u-a*o))/s,f=+c.toFixed(2),h=+l.toFixed(2);if(!(f<+Math.min(t,n).toFixed(2)||f>+Math.max(t,n).toFixed(2)||f<+Math.min(i,o).toFixed(2)||f>+Math.max(i,o).toFixed(2)||h<+Math.min(e,r).toFixed(2)||h>+Math.max(e,r).toFixed(2)||h<+Math.min(a,u).toFixed(2)||h>+Math.max(a,u).toFixed(2)))return{x:c,y:l}}}},z=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},H=function(t,e,n,r,i){if(i)return[["M",+t+ +i,e],["l",n-2*i,0],["a",i,i,0,0,1,i,i],["l",0,r-2*i],["a",i,i,0,0,1,-i,i],["l",2*i-n,0],["a",i,i,0,0,1,-i,-i],["l",0,2*i-r],["a",i,i,0,0,1,i,-i],["z"]];var a=[["M",t,e],["l",n,0],["l",0,r],["l",-n,0],["z"]];return a.parsePathArray=Y,a},Q=function(t,e,n,r){return null===t&&(t=e=n=r=0),null===e&&(e=t.y,n=t.width,r=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:r,h:r,x2:t+n,y2:e+r,cx:t+n/2,cy:e+r/2,r1:Math.min(n,r)/2,r2:Math.max(n,r)/2,r0:Math.sqrt(n*n+r*r)/2,path:H(t,e,n,r),vb:[t,e,n,r].join(" ")}},U=function(t,e,n,r,i,a,o,u){s(t)||(t=[t,e,n,r,i,a,o,u]);var c=V.apply(null,t);return Q(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)},$=function(t,e,n,r,i,a,o,u,s){var c=1-s,l=Math.pow(c,3),f=Math.pow(c,2),h=s*s,p=h*s,d=t+2*s*(n-t)+h*(i-2*n+t),v=e+2*s*(r-e)+h*(a-2*r+e),g=n+2*s*(i-n)+h*(o-2*i+n),y=r+2*s*(a-r)+h*(u-2*a+r);return{x:l*t+3*f*s*n+3*c*s*s*i+p*o,y:l*e+3*f*s*r+3*c*s*s*a+p*u,m:{x:d,y:v},n:{x:g,y:y},start:{x:c*t+s*n,y:c*e+s*r},end:{x:c*i+s*o,y:c*a+s*u},alpha:90-180*Math.atan2(d-g,v-y)/Math.PI}},Z=function(t,e,n){if(!function(t,e){return t=Q(t),e=Q(e),z(e,t.x,t.y)||z(e,t.x2,t.y)||z(e,t.x,t.y2)||z(e,t.x2,t.y2)||z(t,e.x,e.y)||z(t,e.x2,e.y)||z(t,e.x,e.y2)||z(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(U(t),U(e)))return n?0:[];for(var r=~~(X.apply(0,t)/8),i=~~(X.apply(0,e)/8),a=[],o=[],u={},s=n?0:[],c=0;c=0&&M<=1&&b>=0&&b<=1&&(n?s+=1:s.push({x:m.x,y:m.y,t1:M,t2:b}))}}return s},K=function(t,e){return function(t,e,n){var r,i,a,o,u,s,c,l,f,h;t=q(t),e=q(e);for(var p=n?0:[],d=0,v=t.length;d=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e=e.concat(t[t.length-1])}))}(t,e,n));else{var i=[].concat(t);"M"===i[0]&&(i[0]="L");for(var a=0;a<=n-1;a++)r.push(i)}return r},et=function(t,e){if(1===t.length)return t;var n=t.length-1,r=e.length-1,i=n/r,a=[];if(1===t.length&&"M"===t[0][0]){for(var o=0;o=0;s--)o=a[s].index,"add"===a[s].type?t.splice(o,0,[].concat(t[o])):t.splice(o,1)}var f=i-(r=t.length);if(r0)){t[r]=e[r];break}n=at(n,t[r-1],1)}t[r]=["Q"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[r]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(r>0)){t[r]=e[r];break}n=at(n,t[r-1],2)}t[r]=["C"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(n.length<2){if(!(r>0)){t[r]=e[r];break}n=at(n,t[r-1],1)}t[r]=["S"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[r]=e[r]}return t},st=function(){function t(t,e){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}(),ct=function(t,e){return(ct=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function lt(t,e){function n(){this.constructor=t}ct(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ft=n(28),ht=n.n(ft),pt=(n(11),n(17)),dt=n.n(pt),vt=n(12),gt=n.n(vt),yt=n(13),mt=n.n(yt),Mt=(n(7),n(19)),bt=n.n(Mt),xt=n(14),_t=n.n(xt),wt=n(20),At=n.n(wt);function Pt(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}var St="undefined"!=typeof window&&void 0!==window.document,Ot=function(t){function e(e){var n=t.call(this)||this;n.destroyed=!1;var r=n.getDefaultCfg();return n.cfg=bt()(r,e),n}return lt(e,t),e.prototype.getDefaultCfg=function(){return{}},e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){this.cfg[t]=e},e.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},e}(ht.a),Ct=n(2);Ct.translate=function(t,e,n){var r=new Array(9);return Ct.fromTranslation(r,n),Ct.multiply(t,r,e)},Ct.rotate=function(t,e,n){var r=new Array(9);return Ct.fromRotation(r,n),Ct.multiply(t,r,e)},Ct.scale=function(t,e,n){var r=new Array(9);return Ct.fromScaling(r,n),Ct.multiply(t,r,e)},Ct.transform=function(t,e){for(var n=[].concat(t),r=0,i=e.length;r=0;return n?i?2*Math.PI-r:r:i?r:2*Math.PI-r},Et.vertical=function(t,e,n){return n?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t};n(29);var kt=function(t,e){var n=t?w(t):[1,0,0,0,1,0,0,0,1];return l(e,(function(t){switch(t[0]){case"t":Tt.translate(n,n,[t[1],t[2]]);break;case"s":Tt.scale(n,n,[t[1],t[2]]);break;case"r":Tt.rotate(n,n,t[1]);break;case"m":Tt.multiply(n,n,t[1]);break;default:return!1}})),n};function jt(t,e){var n=[],r=t[0],i=t[1],a=t[2],o=t[3],u=t[4],s=t[5],c=t[6],l=t[7],f=t[8],h=e[0],p=e[1],d=e[2],v=e[3],g=e[4],y=e[5],m=e[6],M=e[7],b=e[8];return n[0]=h*r+p*o+d*c,n[1]=h*i+p*u+d*l,n[2]=h*a+p*s+d*f,n[3]=v*r+g*o+y*c,n[4]=v*i+g*u+y*l,n[5]=v*a+g*s+y*f,n[6]=m*r+M*o+b*c,n[7]=m*i+M*u+b*l,n[8]=m*a+M*s+b*f,n}function It(t,e){var n=[],r=e[0],i=e[1];return n[0]=t[0]*r+t[3]*i+t[6],n[1]=t[1]*r+t[4]*i+t[7],n}var Bt=["zIndex","capture","visible","type"],Nt=["repeat"];function Dt(t,e){var n={},r=e.attrs;for(var i in t)n[i]=r[i];return n}function Rt(t,e){var n={},r=e.attr();return l(t,(function(t,e){-1!==Nt.indexOf(e)||P(r[e],t)||(n[e]=t)})),n}function Lt(t,e){if(e.onFrame)return t;var n=e.startTime,r=e.delay,i=e.duration,a=Object.prototype.hasOwnProperty;return l(t,(function(t){n+rt.delay&&l(e.toAttrs,(function(e,n){a.call(t.toAttrs,n)&&(delete t.toAttrs[n],delete t.fromAttrs[n])}))})),t}var qt=function(t){function e(e){var n=t.call(this,e)||this;n.attrs={};var r=n.getDefaultAttrs();return x(r,e.attrs),n.attrs=r,n.initAttrs(r),n.initAnimate(),n}return lt(e,t),e.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},e.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},e.prototype.onCanvasChange=function(t){},e.prototype.initAttrs=function(t){},e.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},e.prototype.isGroup=function(){return!1},e.prototype.getParent=function(){return this.get("parent")},e.prototype.getCanvas=function(){return this.get("canvas")},e.prototype.attr=function(){for(var t,e=[],n=0;n0?r=Lt(r,x):n.addAnimator(this),r.push(x),this.set("animations",r),this.set("_pause",{isPaused:!1})},e.prototype.stopAnimate=function(t){var e=this;void 0===t&&(t=!0);var n=this.get("animations");l(n,(function(n){t&&(n.onFrame?e.attr(n.onFrame(1)):e.attr(n.toAttrs)),n.callback&&n.callback()})),this.set("animating",!1),this.set("animations",[])},e.prototype.pauseAnimate=function(){var t=this.get("timeline"),e=this.get("animations");return l(e,(function(t){t.pauseCallback&&t.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:t.getTime()}),this},e.prototype.resumeAnimate=function(){var t=this.get("timeline").getTime(),e=this.get("animations"),n=this.get("_pause").pauseTime;return l(e,(function(e){e.startTime=e.startTime+(t-n),e._paused=!1,e._pauseTime=null,e.resumeCallback&&e.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",e),this},e.prototype.emitDelegation=function(t,e){for(var n=e.propagationPath,r=this.getEvents(),i=0;i0)}));return o.length>0?(_t()(o,(function(t){var e=t.getBBox();i.push(e.minX,e.maxX),a.push(e.minY,e.maxY)})),t=Math.min.apply(null,i),e=Math.max.apply(null,i),n=Math.min.apply(null,a),r=Math.max.apply(null,a)):(t=0,e=0,n=0,r=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:r,width:e-t,height:r-n}},e.prototype.getCanvasBBox=function(){var t=1/0,e=-1/0,n=1/0,r=-1/0,i=[],a=[],o=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));return o.length>0?(_t()(o,(function(t){var e=t.getCanvasBBox();i.push(e.minX,e.maxX),a.push(e.minY,e.maxY)})),t=Math.min.apply(null,i),e=Math.max.apply(null,i),n=Math.min.apply(null,a),r=Math.max.apply(null,a)):(t=0,e=0,n=0,r=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:r,width:e-t,height:r-n}},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.children=[],e},e.prototype.onAttrChange=function(e,n,r){if(t.prototype.onAttrChange.call(this,e,n,r),"matrix"===e){var i=this.getTotalMatrix();this._applyChildrenMarix(i)}},e.prototype.applyMatrix=function(e){var n=this.getTotalMatrix();t.prototype.applyMatrix.call(this,e);var r=this.getTotalMatrix();r!==n&&this._applyChildrenMarix(r)},e.prototype._applyChildrenMarix=function(t){var e=this.getChildren();_t()(e,(function(e){e.applyMatrix(t)}))},e.prototype.addShape=function(){for(var t=[],e=0;e=0;a--){var o=t[a];if(Yt(o)&&(o.isGroup()?i=o.getShape(e,n,r):o.isHit(e,n)&&(i=o)),i)break}return i},e.prototype.add=function(t){var e=this.getCanvas(),n=this.getChildren(),r=this.get("timeline"),i=t.getParent();i&&function(t,e,n){void 0===n&&(n=!0),n?e.destroy():(e.set("parent",null),e.set("canvas",null)),Pt(t.getChildren(),e)}(i,t,!1),t.set("parent",this),e&&function t(e,n){if(e.set("canvas",n),e.isGroup()){var r=e.get("children");r.length&&r.forEach((function(e){t(e,n)}))}}(t,e),r&&function t(e,n){if(e.set("timeline",n),e.isGroup()){var r=e.get("children");r.length&&r.forEach((function(e){t(e,n)}))}}(t,r),n.push(t),function(t){t.isGroup()?(t.isEntityGroup()||t.get("children").length)&&t.onCanvasChange("add"):t.onCanvasChange("add")}(t),this._applyElementMatrix(t)},e.prototype._applyElementMatrix=function(t){var e=this.getTotalMatrix();e&&t.applyMatrix(e)},e.prototype.getChildren=function(){return this.get("children")},e.prototype.sort=function(){var t,e=this.getChildren();_t()(e,(function(t,e){return t._INDEX=e,t})),e.sort((t=function(t,e){return t.get("zIndex")-e.get("zIndex")},function(e,n){var r=t(e,n);return 0===r?e._INDEX-n._INDEX:r})),this.onCanvasChange("sort")},e.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),e=t.length-1;e>=0;e--)t[e].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},e.prototype.destroy=function(){this.get("destroyed")||(this.clear(),t.prototype.destroy.call(this))},e.prototype.getFirst=function(){return this.getChildByIndex(0)},e.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},e.prototype.getChildByIndex=function(t){return this.getChildren()[t]},e.prototype.getCount=function(){return this.getChildren().length},e.prototype.contain=function(t){return this.getChildren().indexOf(t)>-1},e.prototype.removeChild=function(t,e){void 0===e&&(e=!0),this.contain(t)&&t.remove(e)},e.prototype.findAll=function(t){var e=[],n=this.getChildren();return _t()(n,(function(n){t(n)&&e.push(n),n.isGroup()&&(e=e.concat(n.findAll(t)))})),e},e.prototype.find=function(t){var e=null,n=this.getChildren();return _t()(n,(function(n){if(t(n)?e=n:n.isGroup()&&(e=n.find(t)),e)return!1})),e},e.prototype.findById=function(t){return this.find((function(e){return e.get("id")===t}))},e.prototype.findByClassName=function(t){return this.find((function(e){return e.get("className")===t}))},e.prototype.findAllByName=function(t){return this.findAll((function(e){return e.get("name")===t}))},e}(qt),Wt=0,zt=0,Ht=0,Qt=0,Ut=0,$t=0,Zt="object"==typeof performance&&performance.now?performance:Date,Kt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Jt(){return Ut||(Kt(te),Ut=Zt.now()+$t)}function te(){Ut=0}function ee(){this._call=this._time=this._next=null}function ne(t,e,n){var r=new ee;return r.restart(t,e,n),r}function re(){Ut=(Qt=Zt.now())+$t,Wt=zt=0;try{!function(){Jt(),++Wt;for(var t,e=Gt;e;)(t=Ut-e._time)>=0&&e._call.call(null,t),e=e._next;--Wt}()}finally{Wt=0,function(){var t,e,n=Gt,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Gt=e);Xt=t,ae(r)}(),Ut=0}}function ie(){var t=Zt.now(),e=t-Qt;e>1e3&&($t-=e,Qt=t)}function ae(t){Wt||(zt&&(zt=clearTimeout(zt)),t-Ut>24?(t<1/0&&(zt=setTimeout(re,t-Zt.now()-$t)),Ht&&(Ht=clearInterval(Ht))):(Ht||(Qt=Zt.now(),Ht=setInterval(ie,1e3)),Wt=1,Kt(re)))}function oe(t){return+t}function ue(t){return t*t}function se(t){return t*(2-t)}function ce(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function le(t){return t*t*t}function fe(t){return--t*t*t+1}function he(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}ee.prototype=ne.prototype={constructor:ee,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Jt():+n)+(null==e?0:+e),this._next||Xt===this||(Xt?Xt._next=this:Gt=this,Xt=this),this._call=t,this._time=n,ae()},stop:function(){this._call&&(this._call=null,this._time=1/0,ae())}};var pe=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),de=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),ve=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),ge=Math.PI,ye=ge/2;function me(t){return 1-Math.cos(t*ye)}function Me(t){return Math.sin(t*ye)}function be(t){return(1-Math.cos(ge*t))/2}function xe(t){return Math.pow(2,10*t-10)}function _e(t){return 1-Math.pow(2,-10*t)}function we(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function Ae(t){return 1-Math.sqrt(1-t*t)}function Pe(t){return Math.sqrt(1- --t*t)}function Se(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Oe=7.5625;function Ce(t){return 1-Te(1-t)}function Te(t){return(t=+t)<4/11?Oe*t*t:t<8/11?Oe*(t-=6/11)*t+.75:t<10/11?Oe*(t-=9/11)*t+.9375:Oe*(t-=21/22)*t+63/64}function Ee(t){return((t*=2)<=1?1-Te(1-t):Te(t-1)+1)/2}var ke=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),je=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),Ie=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),Be=2*Math.PI,Ne=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Be);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Be)},i.period=function(n){return t(e,n)},i}(1,.3),De=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Be);function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*Be)},i.period=function(n){return t(e,n)},i}(1,.3),Re=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Be);function i(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*Be)},i.period=function(n){return t(e,n)},i}(1,.3),Le=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function qe(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Fe(){}var Ye="\\s*([+-]?\\d+)\\s*",Ge="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ve=/^#([0-9a-f]{3,8})$/,We=new RegExp("^rgb\\("+[Ye,Ye,Ye]+"\\)$"),ze=new RegExp("^rgb\\("+[Xe,Xe,Xe]+"\\)$"),He=new RegExp("^rgba\\("+[Ye,Ye,Ye,Ge]+"\\)$"),Qe=new RegExp("^rgba\\("+[Xe,Xe,Xe,Ge]+"\\)$"),Ue=new RegExp("^hsl\\("+[Ge,Xe,Xe]+"\\)$"),$e=new RegExp("^hsla\\("+[Ge,Xe,Xe,Ge]+"\\)$"),Ze={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ke(){return this.rgb().formatHex()}function Je(){return this.rgb().formatRgb()}function tn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ve.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?en(e):3===n?new on(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new on(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new on(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=We.exec(t))?new on(e[1],e[2],e[3],1):(e=ze.exec(t))?new on(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=He.exec(t))?nn(e[1],e[2],e[3],e[4]):(e=Qe.exec(t))?nn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ue.exec(t))?ln(e[1],e[2]/100,e[3]/100,1):(e=$e.exec(t))?ln(e[1],e[2]/100,e[3]/100,e[4]):Ze.hasOwnProperty(t)?en(Ze[t]):"transparent"===t?new on(NaN,NaN,NaN,0):null}function en(t){return new on(t>>16&255,t>>8&255,255&t,1)}function nn(t,e,n,r){return r<=0&&(t=e=n=NaN),new on(t,e,n,r)}function rn(t){return t instanceof Fe||(t=tn(t)),t?new on((t=t.rgb()).r,t.g,t.b,t.opacity):new on}function an(t,e,n,r){return 1===arguments.length?rn(t):new on(t,e,n,null==r?1:r)}function on(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function un(){return"#"+cn(this.r)+cn(this.g)+cn(this.b)}function sn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function cn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function ln(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new hn(t,e,n,r)}function fn(t){if(t instanceof hn)return new hn(t.h,t.s,t.l,t.opacity);if(t instanceof Fe||(t=tn(t)),!t)return new hn;if(t instanceof hn)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,u=a-i,s=(a+i)/2;return u?(o=e===a?(n-r)/u+6*(n0&&s<1?0:o,new hn(o,u,s,t.opacity)}function hn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function pn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function dn(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}Le(Fe,tn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Ke,formatHex:Ke,formatHsl:function(){return fn(this).formatHsl()},formatRgb:Je,toString:Je}),Le(on,an,qe(Fe,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new on(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new on(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:un,formatHex:un,formatRgb:sn,toString:sn})),Le(hn,(function(t,e,n,r){return 1===arguments.length?fn(t):new hn(t,e,n,null==r?1:r)}),qe(Fe,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new hn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new hn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new on(pn(t>=240?t-240:t+120,i,r),pn(t,i,r),pn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var vn=function(t){return function(){return t}};function gn(t,e){return function(n){return t+n*e}}function yn(t){return 1==(t=+t)?mn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):vn(isNaN(e)?n:e)}}function mn(t,e){var n=e-t;return n?gn(t,n):vn(isNaN(t)?e:t)}var Mn=function t(e){var n=yn(e);function r(t,e){var r=n((t=an(t)).r,(e=an(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=mn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function bn(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),u=new Array(i);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,u=ra&&(i=e.slice(a,i),u[o]?u[o]+=i:u[++o]=i),(n=n[0])===(r=r[0])?u[o]?u[o]+=r:u[++o]=r:(u[++o]=null,s.push({i:o,x:Pn(n,r)})),a=Cn.lastIndex;return ap.length?(h=j(a[l]),p=j(i[l]),p=it(p,h),p=ut(p,h),e.fromAttrs.path=p,e.toAttrs.path=h):e.pathFormatted||(h=j(a[l]),p=j(i[l]),p=ut(p,h),e.fromAttrs.path=p,e.toAttrs.path=h,e.pathFormatted=!0),r[l]=[];for(var d=0;d0){for(var a=r.animators.length-1;a>=0;a--)if((t=r.animators[a]).destroyed)r.removeAnimator(a);else{if(!t.isAnimatePaused())for(var o=(e=t.get("animations")).length-1;o>=0;o--)n=e[o],jn(t,n,i)&&(e.splice(o,1),!1,n.callback&&n.callback());0===e.length&&r.removeAnimator(a)}r.canvas.get("autoDraw")||r.canvas.draw()}}))},t.prototype.addAnimator=function(t){this.animators.push(t)},t.prototype.removeAnimator=function(t){this.animators.splice(t,1)},t.prototype.isAnimating=function(){return!!this.animators.length},t.prototype.stop=function(){this.timer&&this.timer.stop()},t.prototype.stopAllAnimations=function(t){void 0===t&&(t=!0),this.animators.forEach((function(e){e.stopAnimate(t)})),this.animators=[],this.canvas.draw()},t.prototype.getTime=function(){return this.current},t}(),Bn=function(t){function e(e){var n=t.call(this,e)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}return lt(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.cursor="default",e},e.prototype.initContainer=function(){var t=this.get("container");gt()(t)&&(t=document.getElementById(t),this.set("container",t))},e.prototype.initDom=function(){var t=this.createDom();this.set("el",t),this.get("container").appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},e.prototype.initEvents=function(){},e.prototype.initTimeline=function(){var t=new In(this);this.set("timeline",t)},e.prototype.setDOMSize=function(t,e){var n=this.get("el");St&&(n.style.width=t+"px",n.style.height=e+"px")},e.prototype.changeSize=function(t,e){this.setDOMSize(t,e),this.set("width",t),this.set("height",e),this.onCanvasChange("changeSize")},e.prototype.getRenderer=function(){return this.get("renderer")},e.prototype.getCursor=function(){return this.get("cursor")},e.prototype.setCursor=function(t){this.set("cursor",t);var e=this.get("el");St&&e&&(e.style.cursor=t)},e.prototype.getPointByClient=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t-n.left,y:e-n.top}},e.prototype.getClientByPoint=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t+n.left,y:e+n.top}},e.prototype.draw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},e.prototype.clearEvents=function(){},e.prototype.isCanvas=function(){return!0},e.prototype.getParent=function(){return null},e.prototype.destroy=function(){var e=this.get("timeline");this.get("destroyed")||(this.clear(),e&&e.stop(),this.clearEvents(),this.removeDom(),t.prototype.destroy.call(this))},e}(Vt),Nn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),e.prototype.isGroup=function(){return!0},e.prototype.isEntityGroup=function(){return!1},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=this.getChildren(),r=0;r=t&&n.minY<=e&&n.maxY>=e},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e),this.clearCacheBBox()},e.prototype.getBBox=function(){var t=this.get("bbox");return t||(t=this.calculateBBox(),this.set("bbox",t)),t},e.prototype.getCanvasBBox=function(){var t=this.get("canvasBox");return t||(t=this.calculateCanvasBBox(),this.set("canvasBox",t)),t},e.prototype.applyMatrix=function(e){t.prototype.applyMatrix.call(this,e),this.set("canvasBox",null)},e.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),e=this.getTotalMatrix(),n=t.minX,r=t.minY,i=t.maxX,a=t.maxY;if(e){var o=It(e,[t.minX,t.minY]),u=It(e,[t.maxX,t.minY]),s=It(e,[t.minX,t.maxY]),c=It(e,[t.maxX,t.maxY]);n=Math.min(o[0],u[0],s[0],c[0]),i=Math.max(o[0],u[0],s[0],c[0]),r=Math.min(o[1],u[1],s[1],c[1]),a=Math.max(o[1],u[1],s[1],c[1])}var l=this.attrs;if(l.shadowColor){var f=l.shadowBlur,h=void 0===f?0:f,p=l.shadowOffsetX,d=void 0===p?0:p,v=l.shadowOffsetY,g=void 0===v?0:v,y=n-h+d,m=i+h+d,M=r-h+g,b=a+h+g;n=Math.min(n,y),i=Math.max(i,m),r=Math.min(r,M),a=Math.max(a,b)}return{x:n,y:r,minX:n,minY:r,maxX:i,maxY:a,width:i-n,height:a-r}},e.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBox",null)},e.prototype.isClipShape=function(){return this.get("isClipShape")},e.prototype.isInShape=function(t,e){return!1},e.prototype.isOnlyHitBox=function(){return!1},e.prototype.isHit=function(t,e){var n=this.get("startArrowShape"),r=this.get("endArrowShape"),i=[t,e,1],a=(i=this.invertFromMatrix(i))[0],o=i[1],u=this._isInBBox(a,o);if(this.isOnlyHitBox())return u;if(u&&!this.isClipped(a,o)){if(this.isInShape(a,o))return!0;if(n&&n.isHit(a,o))return!0;if(r&&r.isHit(a,o))return!0}return!1},e}(qt);n.d(e,"version",(function(){return Rn})),n.d(e,"Event",(function(){return st})),n.d(e,"Base",(function(){return Ot})),n.d(e,"AbstractCanvas",(function(){return Bn})),n.d(e,"AbstractGroup",(function(){return Nn})),n.d(e,"AbstractShape",(function(){return Dn})),n.d(e,"PathUtil",(function(){return r}));var Rn=n(32).version},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(18);e.default=function(t){return r.default(t,"Function")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={}.toString;e.default=function(t,e){return r.call(t)==="[object "+e+"]"}},function(t,e,n){"use strict";function r(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n,i){return e&&r(t,e),n&&r(t,n),i&&r(t,i),t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(33);e.default=function(t){var e=r.default(t);return e.charAt(0).toUpperCase()+e.substring(1)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=function(t){e.ARRAY_TYPE=t},e.toRadian=function(t){return t*i},e.equals=function(t,e){return Math.abs(t-e)<=r*Math.max(1,Math.abs(t),Math.abs(e))};var r=e.EPSILON=1e-6;e.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,e.RANDOM=Math.random;var i=Math.PI/180},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),i=n(15);e.drawChildren=function(t,e){e.forEach((function(e){e.draw(t)}))},e.refreshElement=function(t,e){var n=t.get("canvas");if(n&&n.get("autoDraw")){var a=n.get("context"),o=t.getParent(),u=o?o.getChildren():[n],s=t.get("el");if("remove"===e)if(t.get("isClipShape")){var c=s&&s.parentNode,l=c&&c.parentNode;c&&l&&l.removeChild(c)}else s&&s.parentNode&&s.parentNode.removeChild(s);else if("show"===e)s.setAttribute("visibility","visible");else if("hide"===e)s.setAttribute("visibility","hidden");else if("zIndex"===e)i.moveTo(s,u.indexOf(t));else if("sort"===e){var f=t.get("children");f&&f.length&&i.sortDom(t,(function(t,e){return f.indexOf(t)-f.indexOf(e)?1:0}))}else"clear"===e?s&&(s.innerHTML=""):"matrix"===e?r.setTransform(t):"clip"===e?r.setClip(t,a):"attr"===e||"add"===e&&t.draw(a)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(16),a=n(0),o=n(10),u=n(22),s=n(8),c=n(3),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.isEntityGroup=function(){return!0},e.prototype.createDom=function(){var t=document.createElementNS("http://www.w3.org/2000/svg","g");this.set("el",t);var e=this.getParent();if(e){var n=e.get("el");n?n.appendChild(t):(n=e.createDom(),e.set("el",n),n.appendChild(t))}return t},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e);var n=this.get("canvas");if(n&&n.get("autoDraw")){var r=n.get("context");this.createPath(r,e)}},e.prototype.onCanvasChange=function(t){u.refreshElement(this,t)},e.prototype.getShapeBase=function(){return o},e.prototype.getGroupBase=function(){return e},e.prototype.draw=function(t){var e=this.getChildren(),n=this.get("el");this.get("destroyed")?n&&n.parentNode.removeChild(n):(n||this.createDom(),s.setClip(this,t),this.createPath(t),e.length&&u.drawChildren(t,e))},e.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");a.each(e||n,(function(t,e){c.SVG_ATTR_MAP[e]&&r.setAttribute(c.SVG_ATTR_MAP[e],t)})),s.setTransform(this)},e}(i.AbstractGroup);e.default=l},function(t,e,n){"use strict";function r(t,e){return t&&e?{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}:t||e}Object.defineProperty(e,"__esModule",{value:!0}),e.mergeBBox=r,e.mergeArrowBBox=function(t,e){var n=t.get("startArrowShape"),i=t.get("endArrowShape");return n&&(e=r(e,n.getCanvasBBox())),i&&(e=r(e,i.getCanvasBBox())),e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeFromArray=function(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)},e.isBrowser="undefined"!=typeof window&&void 0!==window.document;var r=n(11);e.isNil=r.default;var i=n(17);e.isFunction=i.default;var a=n(12);e.isString=a.default;var o=n(13);e.isObject=o.default;var u=n(7);e.isArray=u.default;var s=n(19);e.mix=s.default;var c=n(14);e.each=c.default;var l=n(20);e.upperFirst=l.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6);e.nearestPoint=function(t,e,n,i,a){for(var o,u=.005,s=1/0,c=[n,i],l=0;l<=20;l++){var f=.05*l,h=[a.apply(null,t.concat([f])),a.apply(null,e.concat([f]))];(g=r.distance(c[0],c[1],h[0],h[1]))=0&&g1&&(n*=Math.sqrt(m),a*=Math.sqrt(m));var M=n*n*(y*y)+a*a*(g*g),b=M?Math.sqrt((n*n*(a*a)-M)/M):1;l===f&&(b*=-1),isNaN(b)&&(b=0);var x=a?b*n*y/a:0,_=n?b*-a*g/n:0,w=(h+d)/2+Math.cos(c)*x-Math.sin(c)*_,A=(p+v)/2+Math.sin(c)*x+Math.cos(c)*_,P=[(g-x)/n,(y-_)/a],S=[(-1*g-x)/n,(-1*y-_)/a],O=u([1,0],P),C=u(P,S);return o(P,S)<=-1&&(C=Math.PI),o(P,S)>=1&&(C=0),0===f&&C>0&&(C-=2*Math.PI),1===f&&C<0&&(C+=2*Math.PI),{cx:w,cy:A,rx:s(t,[d,v])?0:n,ry:s(t,[d,v])?0:a,startAngle:O,endAngle:O+C,xRotation:c,arcFlag:l,sweepFlag:f}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this._events={}}return t.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},t.prototype.once=function(t,e){return this.on(t,e,!0),this},t.prototype.emit=function(t){for(var e=this,n=[],r=1;r1?0:i<-1?Math.PI:Math.acos(i)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.equals=function(t,e){var n=t[0],i=t[1],a=t[2],o=e[0],u=e[1],s=e[2];return Math.abs(n-o)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-u)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(a-s)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(s))};var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(21));function i(){var t=new r.ARRAY_TYPE(3);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function a(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function o(t,e,n){var i=new r.ARRAY_TYPE(3);return i[0]=t,i[1]=e,i[2]=n,i}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function s(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function c(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function l(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)}function f(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function h(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function p(t,e){var n=e[0],r=e[1],i=e[2],a=n*n+r*r+i*i;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}function d(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}var v;e.sub=u,e.mul=s,e.div=c,e.dist=l,e.sqrDist=f,e.len=a,e.sqrLen=h,e.forEach=(v=i(),function(t,e,n,r,i,a){var o=void 0,u=void 0;for(e||(e=3),n||(n=0),u=r?Math.min(r*e+n,t.length):t.length,o=n;o1?e*i+a(e,n)*(i-1):e},e.getLineSpaceing=a,e.getTextWidth=function(t,e){var n=i.getOffScreenContext(),a=0;if(r.isNil(t)||""===t)return a;if(n.save(),n.font=e,r.isString(t)&&t.includes("\n")){var o=t.split("\n");r.each(o,(function(t){var e=n.measureText(t).width;aMath.PI/2?Math.PI-l:l,f=f>Math.PI/2?Math.PI-f:f,{xExtra:Math.cos(c/2-l)*(e/2*(1/Math.sin(c/2)))-e/2||0,yExtra:Math.cos(f-c/2)*(e/2*(1/Math.sin(c/2)))-e/2||0}}e.default=function(t){var e=t.attr(),n=e.path,u=e.stroke?e.lineWidth:0,l=function(t,e){for(var n=[],o=[],u=[],s=0;s=0?[a]:[]}function s(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function c(t,e,n,i,a,u,s){var c=o(t,n,a,s),l=o(e,i,u,s),f=r.default.pointAt(t,e,n,i,s),h=r.default.pointAt(n,i,a,u,s);return[[t,e,f.x,f.y,c,l],[c,l,h.x,h.y,a,u]]}e.default={box:function(t,e,n,r,a,s){var c=u(t,n,a)[0],l=u(e,r,s)[0],f=[t,a],h=[e,s];return void 0!==c&&f.push(o(t,n,a,c)),void 0!==l&&h.push(o(e,r,s,l)),i.getBBoxByArray(f,h)},length:function(t,e,n,r,a,o){return function t(e,n,r,a,o,u,s){if(0===s)return(i.distance(e,n,r,a)+i.distance(r,a,o,u)+i.distance(e,n,o,u))/2;var l=c(e,n,r,a,o,u,.5),f=l[0],h=l[1];return f.push(s-1),h.push(s-1),t.apply(null,f)+t.apply(null,h)}(t,e,n,r,a,o,3)},nearestPoint:function(t,e,n,r,i,u,s,c){return a.nearestPoint([t,n,i],[e,r,u],s,c,o)},pointDistance:function(t,e,n,r,a,o,u,s){var c=this.nearestPoint(t,e,n,r,a,o,u,s);return i.distance(c.x,c.y,u,s)},interpolationAt:o,pointAt:function(t,e,n,r,i,a,u){return{x:o(t,n,i,u),y:o(e,r,a,u)}},divide:function(t,e,n,r,i,a,o){return c(t,e,n,r,i,a,o)},tangentAngle:function(t,e,n,r,a,o,u){var c=s(t,n,a,u),l=s(e,r,o,u),f=Math.atan2(l,c);return i.piMod(f)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.sqrDist=e.dist=e.div=e.mul=e.sub=e.len=void 0,e.create=i,e.clone=function(t){var e=new r.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},e.fromValues=function(t,e){var n=new r.ARRAY_TYPE(2);return n[0]=t,n[1]=e,n},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.set=function(t,e,n){return t[0]=e,t[1]=n,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},e.subtract=a,e.multiply=o,e.divide=u,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},e.scaleAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t},e.distance=s,e.squaredDistance=c,e.length=l,e.squaredLength=f,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},e.normalize=function(t,e){var n=e[0],r=e[1],i=n*n+r*r;i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i);return t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},e.lerp=function(t,e,n,r){var i=e[0],a=e[1];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t},e.random=function(t,e){e=e||1;var n=2*r.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.transformMat2=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t},e.transformMat2d=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t},e.transformMat3=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t},e.transformMat4=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t},e.rotate=function(t,e,n,r){var i=e[0]-n[0],a=e[1]-n[1],o=Math.sin(r),u=Math.cos(r);return t[0]=i*u-a*o+n[0],t[1]=i*o+a*u+n[1],t},e.angle=function(t,e){var n=t[0],r=t[1],i=e[0],a=e[1],o=n*n+r*r;o>0&&(o=1/Math.sqrt(o));var u=i*i+a*a;u>0&&(u=1/Math.sqrt(u));var s=(n*i+r*a)*o*u;return s>1?0:s<-1?Math.PI:Math.acos(s)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],i=t[1],a=e[0],o=e[1];return Math.abs(n-a)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-o)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(o))};var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(46));function i(){var t=new r.ARRAY_TYPE(2);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function o(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function u(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function s(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}function c(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function l(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function f(t){var e=t[0],n=t[1];return e*e+n*n}var h;e.len=l,e.sub=a,e.mul=o,e.div=u,e.dist=s,e.sqrDist=c,e.sqrLen=f,e.forEach=(h=i(),function(t,e,n,r,i,a){var o=void 0,u=void 0;for(e||(e=2),n||(n=0),u=r?Math.min(r*e+n,t.length):t.length,o=n;o=0&&a<=1&&f.push(a);else{var h=c*c-4*s*l;r.isNumberEqual(h,0)?f.push(-c/(2*s)):h>0&&(o=(-c-(u=Math.sqrt(h)))/(2*s),(a=(-c+u)/(2*s))>=0&&a<=1&&f.push(a),o>=0&&o<=1&&f.push(o))}return f}function c(t,e,n,r,a,u,s,c,l){var f=o(t,n,a,s,l),h=o(e,r,u,c,l),p=i.default.pointAt(t,e,n,r,l),d=i.default.pointAt(n,r,a,u,l),v=i.default.pointAt(a,u,s,c,l),g=i.default.pointAt(p.x,p.y,d.x,d.y,l),y=i.default.pointAt(d.x,d.y,v.x,v.y,l);return[[t,e,p.x,p.y,g.x,g.y,f,h],[f,h,y.x,y.y,v.x,v.y,s,c]]}e.default={extrema:s,box:function(t,e,n,i,a,u,c,l){for(var f=[t,c],h=[e,l],p=s(t,n,a,c),d=s(e,i,u,l),v=0;vf&&(f=v)}var g=function(t,e,n){return Math.atan(e/(t*Math.tan(n)))}(n,r,i),y=1/0,m=-1/0,M=[u,s];for(p=2*-Math.PI;p<=2*Math.PI;p+=Math.PI){var b=g+p;um&&(m=x)}return{x:l,y:y,width:f-l,height:m-y}},length:function(t,e,n,r,i,a,o){},nearestPoint:function(t,e,n,r,a,o,c,l,f){var h=s(l-t,f-e,-a),p=h[0],d=h[1],v=i.default.nearestPoint(0,0,n,r,p,d),g=function(t,e,n,r){return(Math.atan2(r*t,n*e)+2*Math.PI)%(2*Math.PI)}(n,r,v.x,v.y);gc&&(v=u(n,r,c));var y=s(v.x,v.y,a);return{x:y[0]+t,y:y[1]+e}},pointDistance:function(t,e,n,i,a,o,u,s,c){var l=this.nearestPoint(t,e,n,i,s,c);return r.distance(l.x,l.y,s,c)},pointAt:function(t,e,n,r,i,u,s,c){var l=(s-u)*c+u;return{x:a(t,0,n,r,i,l),y:o(0,e,n,r,i,l)}},tangentAngle:function(t,e,n,i,a,o,u,s){var c=(u-o)*s+o,l=function(t,e,n,r,i,a,o,u){return-1*n*Math.cos(i)*Math.sin(u)-r*Math.sin(i)*Math.cos(u)}(0,0,n,i,a,0,0,c),f=function(t,e,n,r,i,a,o,u){return-1*n*Math.sin(i)*Math.sin(u)+r*Math.cos(i)*Math.cos(u)}(0,0,n,i,a,0,0,c);return r.piMod(Math.atan2(f,l))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6);function i(t,e){var n=Math.abs(t);return e>0?n:-1*n}e.default={box:function(t,e,n,r){return{x:t-n,y:e-r,width:2*n,height:2*r}},length:function(t,e,n,r){return Math.PI*(3*(n+r)-Math.sqrt((3*n+r)*(n+3*r)))},nearestPoint:function(t,e,n,r,a,o){var u=n,s=r;if(0===u||0===s)return{x:t,y:e};for(var c,l,f=a-t,h=o-e,p=Math.abs(f),d=Math.abs(h),v=u*u,g=s*s,y=Math.PI/4,m=0;m<4;m++){c=u*Math.cos(y),l=s*Math.sin(y);var M=(v-g)*Math.pow(Math.cos(y),3)/u,b=(g-v)*Math.pow(Math.sin(y),3)/s,x=c-M,_=l-b,w=p-M,A=d-b,P=Math.hypot(_,x),S=Math.hypot(A,w);y+=P*Math.asin((x*A-_*w)/(P*S))/Math.sqrt(v+g-c*c-l*l),y=Math.min(Math.PI/2,Math.max(0,y))}return{x:t+i(c,f),y:e+i(l,h)}},pointDistance:function(t,e,n,i,a,o){var u=this.nearestPoint(t,e,n,i,a,o);return r.distance(u.x,u.y,a,o)},pointAt:function(t,e,n,r,i){var a=2*Math.PI*i;return{x:t+n*Math.cos(a),y:e+r*Math.sin(a)}},tangentAngle:function(t,e,n,i,a){var o=2*Math.PI*a,u=Math.atan2(i*Math.cos(o),-n*Math.sin(o));return r.piMod(u)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(27),i=n(27),a=n(53);function o(t,e){return{x:e.x+(e.x-t.x),y:e.y+(e.y-t.y)}}e.default=function(t){for(var e=[],n=null,u=null,s=null,c=0,l=(t=a.default(t)).length,f=0;f1){var i=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=i}r.default(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)=2?r.setAttribute("points",t.map((function(t){return t[0]+","+t[1]})).join(" ")):a.SVG_ATTR_MAP[e]&&r.setAttribute(a.SVG_ATTR_MAP[e],t)}))},e}(n(4).default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(9),a=n(67),o=n(0),u=n(3),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="polyline",e.canFill=!0,e.canStroke=!0,e}return r.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},e),{startArrow:!1,endArrow:!1})},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),-1!==["points"].indexOf(e)&&this._resetCache()},e.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},e.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");o.each(e||n,(function(t,e){"points"===e&&o.isArray(t)&&t.length>=2?r.setAttribute("points",t.map((function(t){return t[0]+","+t[1]})).join(" ")):u.SVG_ATTR_MAP[e]&&r.setAttribute(u.SVG_ATTR_MAP[e],t)}))},e.prototype.getTotalLength=function(){var t=this.attr().points,e=this.get("totalLength");return o.isNil(e)?(this.set("totalLength",a.default.length(t)),this.get("totalLength")):e},e.prototype.getPoint=function(t){var e,n,r=this.attr().points,a=this.get("tCache");return a||(this._setTcache(),a=this.get("tCache")),o.each(a,(function(r,i){t>=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)})),i.default.pointAt(r[n][0],r[n][1],r[n+1][0],r[n+1][1],e)},e.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var e=this.getTotalLength();if(!(e<=0)){var n,r,a=0,u=[];o.each(t,(function(o,s){t[s+1]&&((n=[])[0]=a/e,r=i.default.length(o[0],o[1],t[s+1][0],t[s+1][1]),a+=r,n[1]=a/e,u.push(n))})),this.set("tCache",u)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.attr().points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(n(4).default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(68),i=n(6);e.default={box:function(t){for(var e=[],n=[],r=0;r1||e<0||t.length<2)return null;var n=a(t),i=n.segments,o=n.totalLength;if(0===o)return{x:t[0][0],y:t[0][1]};for(var u=0,s=null,c=0;c=u&&e<=u+p){var d=(e-u)/p;s=r.default.pointAt(f[0],f[1],h[0],h[1],d);break}u+=p}return s},e.angleAtSegments=function(t,e){if(e>1||e<0||t.length<2)return 0;for(var n=a(t),r=n.segments,i=n.totalLength,o=0,u=0,s=0;s=o&&e<=o+h){u=Math.atan2(f[1]-l[1],f[0]-l[0]);break}o+=h}return u},e.distanceAtSegment=function(t,e,n){for(var i=1/0,a=0;a1){var i=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=i}r.each(e,(function(t,n){isNaN(t)||(e[n]=+t)})),t[n]=e})),t):void 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(72),o=n(8),u=n(3),s=n(4),c={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"baseline",hanging:"hanging"},l={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",hanging:"hanging"},f={left:"left",start:"left",center:"middle",right:"end",end:"end"},h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="text",e.canFill=!0,e.canStroke=!0,e}return r.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},e),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},e.prototype.createPath=function(t,e){var n=this,r=this.attr(),a=this.get("el");this._setFont(),i.each(e||r,(function(t,e){"text"===e?n._setText(""+t):"matrix"===e&&t?o.setTransform(n):u.SVG_ATTR_MAP[e]&&a.setAttribute(u.SVG_ATTR_MAP[e],t)})),a.setAttribute("paint-order","stroke"),a.setAttribute("style","stroke-linecap:butt; stroke-linejoin:miter;")},e.prototype._setFont=function(){var t=this.get("el"),e=this.attr(),n=e.fontSize,r=e.textBaseline,i=e.textAlign,o=a.detect();o&&"firefox"===o.name?t.setAttribute("dominant-baseline",l[r]||"alphabetic"):t.setAttribute("alignment-baseline",c[r]||"baseline"),t.setAttribute("text-anchor",f[i]||"left"),n&&+n<12&&(this.attr("matrix",[1,0,0,0,1,0,0,0,1]),this.transform())},e.prototype._setText=function(t){var e=this.get("el"),n=this.attr(),r=n.x,a=n.textBaseline,o=void 0===a?"bottom":a;if(t)if(~t.indexOf("\n")){var u=t.split("\n"),s=u.length-1,c="";i.each(u,(function(t,e){0===e?"alphabetic"===o?c+=''+t+"":"top"===o?c+=''+t+"":"middle"===o?c+=''+t+"":"bottom"===o?c+=''+t+"":"hanging"===o&&(c+=''+t+""):c+=''+t+""})),e.innerHTML=c}else e.innerHTML=t;else e.innerHTML=""},e}(s.default);e.default=h},function(t,e,n){"use strict";(function(t){var n=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e1)for(var n=1;n120||c*c+l*l>40?u&&u.get("draggable")?((a=this.mousedownShape).set("capture",!1),this.draggingShape=a,this.dragging=!0,this._emitEvent("dragstart",n,t,a),this.mousedownShape=null,this.mousedownPoint=null):!u&&r.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",n,t,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(n,t,i,e),this._emitEvent("mousemove",n,t,e)):(this._emitMouseoverEvents(n,t,i,e),this._emitEvent("mousemove",n,t,e))}else this._emitMouseoverEvents(n,t,i,e),this._emitEvent("mousemove",n,t,e)}},t.prototype._emitEvent=function(t,e,n,r,i,a){var s=this._getEventObj(t,e,n,r,i,a);if(r){s.shape=r,o(r,t,s);for(var c=r.getParent();c;)c.emitDelegation(t,s),s.propagationStopped||u(c,t,s),s.propagationPath.push(c),c=c.getParent()}else{o(this.canvas,t,s)}},t.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},t}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(83),a=n(84),o=n(85),u=n(86),s=n(87),c=function(){function t(t){var e=document.createElementNS("http://www.w3.org/2000/svg","defs"),n=r.uniqueId("defs_");e.id=n,t.appendChild(e),this.children=[],this.defaultArrow={},this.el=e,this.canvas=t}return t.prototype.find=function(t,e){for(var n=this.children,r=null,i=0;i'})),n}var s=function(){function t(t){this.cfg={};var e,n,o,s,c,l,f,h=null,p=r.uniqueId("gradient_");return"l"===t.toLowerCase()[0]?function(t,e){var n,a,o=i.exec(t),s=r.mod(r.toRadian(parseFloat(o[1])),2*Math.PI),c=o[2];s>=0&&s<.5*Math.PI?(n={x:0,y:0},a={x:1,y:1}):.5*Math.PI<=s&&s';e.innerHTML=n},t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=function(){function t(t,e){this.cfg={};var n=document.createElementNS("http://www.w3.org/2000/svg","marker"),i=r.uniqueId("marker_");n.setAttribute("id",i);var a=document.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("stroke",t.stroke||"none"),a.setAttribute("fill",t.fill||"none"),n.appendChild(a),n.setAttribute("overflow","visible"),n.setAttribute("orient","auto-start-reverse"),this.el=n,this.child=a,this.id=i;var o=t["marker-start"===e?"startArrow":"endArrow"];return this.stroke=t.stroke||"#000",!0===o?this._setDefaultPath(e,a):(this.cfg=o,this._setMarker(t.lineWidth,a)),this}return t.prototype.match=function(){return!1},t.prototype._setDefaultPath=function(t,e){var n=this.el;e.setAttribute("d","M0,0 L"+10*Math.cos(Math.PI/6)+",5 L0,10"),n.setAttribute("refX",""+10*Math.cos(Math.PI/6)),n.setAttribute("refY","5")},t.prototype._setMarker=function(t,e){var n=this.el,i=this.cfg.path,a=this.cfg.d;r.isArray(i)&&(i=i.map((function(t){return t.join(" ")})).join("")),e.setAttribute("d",i),n.appendChild(e),a&&n.setAttribute("refX",""+a/t)},t.prototype.update=function(t){var e=this.child;e.attr?e.attr("fill",t):e.setAttribute("fill",t)},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=function(){function t(t){this.type="clip",this.cfg={};var e=document.createElementNS("http://www.w3.org/2000/svg","clipPath");this.el=e,this.id=r.uniqueId("clip_"),e.id=this.id;var n=t.cfg.el;return e.appendChild(n),this.cfg=t,this}return t.prototype.match=function(){return!1},t.prototype.remove=function(){var t=this.el;t.parentNode.removeChild(t)},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,a=function(){function t(t){this.cfg={};var e=document.createElementNS("http://www.w3.org/2000/svg","pattern");e.setAttribute("patternUnits","userSpaceOnUse");var n=document.createElementNS("http://www.w3.org/2000/svg","image");e.appendChild(n);var a=r.uniqueId("pattern_");e.id=a,this.el=e,this.id=a,this.cfg=t;var o=i.exec(t)[2];n.setAttribute("href",o);var u=new Image;function s(){e.setAttribute("width",""+u.width),e.setAttribute("height",""+u.height)}return o.match(/^data:/i)||(u.crossOrigin="Anonymous"),u.src=o,u.complete?s():(u.onload=s,u.src=u.src),this}return t.prototype.match=function(t,e){return this.cfg===e},t}();e.default=a}])})); -//# sourceMappingURL=g.min.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2/dist/g2.min.js": -/*!**********************************************!*\ - !*** ./node_modules/@antv/g2/dist/g2.min.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -!function(t,e){ true?module.exports=e():undefined}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=93)}([function(t,e,n){"use strict";n.r(e),n.d(e,"contains",(function(){return i})),n.d(e,"includes",(function(){return i})),n.d(e,"difference",(function(){return h})),n.d(e,"find",(function(){return m})),n.d(e,"findIndex",(function(){return x})),n.d(e,"firstValue",(function(){return b})),n.d(e,"flatten",(function(){return M})),n.d(e,"flattenDeep",(function(){return w})),n.d(e,"getRange",(function(){return C})),n.d(e,"pull",(function(){return S})),n.d(e,"pullAt",(function(){return I})),n.d(e,"reduce",(function(){return T})),n.d(e,"remove",(function(){return k})),n.d(e,"sortBy",(function(){return L})),n.d(e,"union",(function(){return D})),n.d(e,"uniq",(function(){return B})),n.d(e,"valuesOfKey",(function(){return F})),n.d(e,"head",(function(){return R})),n.d(e,"last",(function(){return N})),n.d(e,"startsWith",(function(){return Y})),n.d(e,"endsWith",(function(){return G})),n.d(e,"filter",(function(){return l})),n.d(e,"every",(function(){return X})),n.d(e,"some",(function(){return V})),n.d(e,"group",(function(){return W})),n.d(e,"groupBy",(function(){return z})),n.d(e,"groupToMap",(function(){return H})),n.d(e,"getWrapBehavior",(function(){return U})),n.d(e,"wrapBehavior",(function(){return Z})),n.d(e,"number2color",(function(){return $})),n.d(e,"parseRadius",(function(){return K})),n.d(e,"clamp",(function(){return J})),n.d(e,"fixedBase",(function(){return tt})),n.d(e,"isDecimal",(function(){return nt})),n.d(e,"isEven",(function(){return rt})),n.d(e,"isInteger",(function(){return it})),n.d(e,"isNegative",(function(){return at})),n.d(e,"isNumberEqual",(function(){return ot})),n.d(e,"isOdd",(function(){return st})),n.d(e,"isPositive",(function(){return ut})),n.d(e,"maxBy",(function(){return ct})),n.d(e,"minBy",(function(){return lt})),n.d(e,"mod",(function(){return ht})),n.d(e,"toDegree",(function(){return pt})),n.d(e,"toInteger",(function(){return dt})),n.d(e,"toRadian",(function(){return vt})),n.d(e,"forIn",(function(){return yt})),n.d(e,"has",(function(){return mt})),n.d(e,"hasKey",(function(){return xt})),n.d(e,"hasValue",(function(){return Mt})),n.d(e,"keys",(function(){return d})),n.d(e,"isMatch",(function(){return g})),n.d(e,"values",(function(){return bt})),n.d(e,"lowerCase",(function(){return wt})),n.d(e,"lowerFirst",(function(){return Ct})),n.d(e,"substitute",(function(){return Ot})),n.d(e,"upperCase",(function(){return At})),n.d(e,"upperFirst",(function(){return Pt})),n.d(e,"getType",(function(){return Et})),n.d(e,"isArguments",(function(){return It})),n.d(e,"isArray",(function(){return s})),n.d(e,"isArrayLike",(function(){return r})),n.d(e,"isBoolean",(function(){return Tt})),n.d(e,"isDate",(function(){return kt})),n.d(e,"isError",(function(){return jt})),n.d(e,"isFunction",(function(){return f})),n.d(e,"isFinite",(function(){return Lt})),n.d(e,"isNil",(function(){return p})),n.d(e,"isNull",(function(){return Bt})),n.d(e,"isNumber",(function(){return et})),n.d(e,"isObject",(function(){return u})),n.d(e,"isObjectLike",(function(){return v})),n.d(e,"isPlainObject",(function(){return y})),n.d(e,"isPrototype",(function(){return Ft})),n.d(e,"isRegExp",(function(){return Rt})),n.d(e,"isString",(function(){return j})),n.d(e,"isType",(function(){return o})),n.d(e,"isUndefined",(function(){return Nt})),n.d(e,"isElement",(function(){return Yt})),n.d(e,"requestAnimationFrame",(function(){return Gt})),n.d(e,"clearAnimationFrame",(function(){return Xt})),n.d(e,"augment",(function(){return zt})),n.d(e,"clone",(function(){return Wt})),n.d(e,"debounce",(function(){return Ut})),n.d(e,"memoize",(function(){return Zt})),n.d(e,"deepMix",(function(){return $t})),n.d(e,"each",(function(){return c})),n.d(e,"extend",(function(){return Kt})),n.d(e,"indexOf",(function(){return Jt})),n.d(e,"isEmpty",(function(){return ee})),n.d(e,"isEqual",(function(){return re})),n.d(e,"isEqualWith",(function(){return ie})),n.d(e,"map",(function(){return ae})),n.d(e,"mapValues",(function(){return se})),n.d(e,"mix",(function(){return qt})),n.d(e,"assign",(function(){return qt})),n.d(e,"get",(function(){return ue})),n.d(e,"set",(function(){return ce})),n.d(e,"pick",(function(){return he})),n.d(e,"throttle",(function(){return fe})),n.d(e,"toArray",(function(){return pe})),n.d(e,"toString",(function(){return _t})),n.d(e,"uniqueId",(function(){return ge})),n.d(e,"noop",(function(){return ve})),n.d(e,"identity",(function(){return ye})),n.d(e,"size",(function(){return me})),n.d(e,"Cache",(function(){return xe}));var r=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},i=function(t,e){return!!r(t)&&t.indexOf(e)>-1},a={}.toString,o=function(t,e){return a.call(t)==="[object "+e+"]"},s=function(t){return Array.isArray?Array.isArray(t):o(t,"Array")},u=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e};var c=function(t,e){if(t)if(s(t))for(var n=0,r=t.length;n-1;)A.call(t,a,1);return t},E=Array.prototype.splice,I=function(t,e){if(!r(t))return[];for(var n=t?e.length:0,i=n-1;n--;){var a=void 0,o=e[n];n!==i&&o===a||(a=o,E.call(t,o,1))}return t},T=function(t,e,n){if(!s(t)&&!y(t))return t;var r=n;return c(t,(function(t,n){r=e(r,t,n)})),r},k=function(t,e){var n=[];if(!r(t))return n;for(var i=-1,a=[],o=t.length;++ie[i])return 1;if(t[i]n?n:t},tt=function(t,e){var n=e.toString(),r=n.indexOf(".");if(-1===r)return Math.round(t);var i=n.substr(r+1).length;return i>20&&(i=20),parseFloat(t.toFixed(i))},et=function(t){return o(t,"Number")},nt=function(t){return et(t)&&t%1!=0},rt=function(t){return et(t)&&t%2==0},it=Number.isInteger?Number.isInteger:function(t){return et(t)&&t%1==0},at=function(t){return et(t)&&t<0};function ot(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)0},ct=function(t,e){if(s(t)){var n,r,i=t[0];return n=f(e)?e(t[0]):t[0][e],c(t,(function(t){(r=f(e)?e(t):t[e])>n&&(i=t,n=r)})),i}},lt=function(t,e){if(s(t)){var n,r,i=t[0];return n=f(e)?e(t[0]):t[0][e],c(t,(function(t){(r=f(e)?e(t):t[e])e?(r&&(clearTimeout(r),r=null),s=c,o=t.apply(i,a),r||(i=a=null)):r||!1===n.trailing||(r=setTimeout(u,l)),o};return c.cancel=function(){clearTimeout(r),s=0,r=i=a=null},c},pe=function(t){return r(t)?Array.prototype.slice.call(t):[]},de={},ge=function(t){return de[t=t||"g"]?de[t]+=1:de[t]=1,t+de[t]},ve=function(){},ye=function(t){return t};function me(t){return p(t)?0:r(t)?t.length:Object.keys(t).length}var xe=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}()},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",(function(){return i})),n.d(e,"__assign",(function(){return a})),n.d(e,"__rest",(function(){return o})),n.d(e,"__decorate",(function(){return s})),n.d(e,"__param",(function(){return u})),n.d(e,"__metadata",(function(){return c})),n.d(e,"__awaiter",(function(){return l})),n.d(e,"__generator",(function(){return h})),n.d(e,"__exportStar",(function(){return f})),n.d(e,"__values",(function(){return p})),n.d(e,"__read",(function(){return d})),n.d(e,"__spread",(function(){return g})),n.d(e,"__spreadArrays",(function(){return v})),n.d(e,"__await",(function(){return y})),n.d(e,"__asyncGenerator",(function(){return m})),n.d(e,"__asyncDelegator",(function(){return x})),n.d(e,"__asyncValues",(function(){return b})),n.d(e,"__makeTemplateObject",(function(){return M})),n.d(e,"__importStar",(function(){return _})),n.d(e,"__importDefault",(function(){return w})),n.d(e,"__classPrivateFieldGet",(function(){return C})),n.d(e,"__classPrivateFieldSet",(function(){return O})); -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ -var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var a=function(){return(a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(i=t[s])&&(o=(a<3?i(o):a>3?i(e,n,o):i(e,n))||o);return a>3&&o&&Object.defineProperty(e,n,o),o}function u(t,e){return function(n,r){e(n,r,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))((function(i,a){function o(t){try{u(r.next(t))}catch(t){a(t)}}function s(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}u((r=r.apply(t,e||[])).next())}))}function h(t,e){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function g(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{(n=i[t](e)).value instanceof y?Promise.resolve(n.value.v).then(u,c):l(a[0][2],n)}catch(t){l(a[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),a.shift(),a.length&&s(a[0][0],a[0][1])}}function x(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:y(t[r](e)),done:"return"===r}:i?i(e):e}:i}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=p(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,i){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,i,(e=t[n](e)).done,e.value)}))}}}function M(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function _(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function w(t){return t&&t.__esModule?t:{default:t}}function C(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function O(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}},function(t,e,n){"use strict";n.r(e),n.d(e,"mat3",(function(){return i})),n.d(e,"vec2",(function(){return s})),n.d(e,"vec3",(function(){return u})),n.d(e,"transform",(function(){return c}));var r=n(9);r.translate=function(t,e,n){var i=new Array(9);return r.fromTranslation(i,n),r.multiply(t,i,e)},r.rotate=function(t,e,n){var i=new Array(9);return r.fromRotation(i,n),r.multiply(t,i,e)},r.scale=function(t,e,n){var i=new Array(9);return r.fromScaling(i,n),r.multiply(t,i,e)},r.transform=function(t,e){for(var n=[].concat(t),i=0,a=e.length;i=0;return n?i?2*Math.PI-r:r:i?r:2*Math.PI-r},a.vertical=function(t,e,n){return n?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t};var s=a,u=n(90),c=function(t,e){var n=t?Object(o.clone)(t):[1,0,0,0,1,0,0,0,1];return Object(o.each)(e,(function(t){switch(t[0]){case"t":i.translate(n,n,[t[1],t[2]]);break;case"s":i.scale(n,n,[t[1],t[2]]);break;case"r":i.rotate(n,n,t[1]);break;case"m":i.multiply(n,n,t[1]);break;default:return!1}})),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.FORE="fore",t.MID="mid",t.BG="bg"}(e.LAYER||(e.LAYER={})),function(t){t.TOP="top",t.TOP_LEFT="top-left",t.TOP_RIGHT="top-right",t.RIGHT="right",t.RIGHT_TOP="right-top",t.RIGHT_BOTTOM="right-bottom",t.LEFT="left",t.LEFT_TOP="left-top",t.LEFT_BOTTOM="left-bottom",t.BOTTOM="bottom",t.BOTTOM_LEFT="bottom-left",t.BOTTOM_RIGHT="bottom-right",t.NONE="none"}(e.DIRECTION||(e.DIRECTION={})),function(t){t.AXIS="axis",t.GRID="grid",t.LEGEND="legend",t.TOOLTIP="tooltip",t.ANNOTATION="annotation",t.OTHER="other"}(e.COMPONENT_TYPE||(e.COMPONENT_TYPE={})),e.GROUP_Z_INDEX={FORE:3,MID:2,BG:1},function(t){t.BEFORE_RENDER="beforerender",t.AFTER_RENDER="afterrender",t.BEFORE_PAINT="beforepaint",t.AFTER_PAINT="afterpaint",t.BEFORE_CHANGE_DATA="beforechangedata",t.AFTER_CHANGE_DATA="afterchangedata",t.BEFORE_CLEAR="beforeclear",t.AFTER_CLEAR="afterclear",t.BEFORE_DESTROY="beforedestroy"}(e.VIEW_LIFE_CIRCLE||(e.VIEW_LIFE_CIRCLE={})),function(t){t.MOUSE_ENTER="plot:mouseenter",t.MOUSE_DOWN="plot:mousedown",t.MOUSE_MOVE="plot:mousemove",t.MOUSE_UP="plot:mouseup",t.MOUSE_LEAVE="plot:mouseleave",t.TOUCH_START="plot:touchstart",t.TOUCH_MOVE="plot:touchmove",t.TOUCH_END="plot:touchend",t.TOUCH_CANCEL="plot:touchcancel",t.CLICK="plot:click",t.DBLCLICK="plot:dblclick",t.CONTEXTMENU="plot:contextmenu"}(e.PLOT_EVENTS||(e.PLOT_EVENTS={})),e.GROUP_ATTRS=["color","shape","size"],e.FIELD_ORIGIN="_origin",e.MIN_CHART_WIDTH=100,e.MIN_CHART_HEIGHT=100,e.COMPONENT_MAX_VIEW_PERCENTAGE=.25},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(64),a=n(0),o=n(25),s={coordinate:null,defaultShapeType:null,theme:null,getShapePoints:function(t,e){var n=this.getShape(t);return n.getPoints?n.getPoints(e):this.getDefaultPoints(e)},getShape:function(t){var e=this[t]||this[this.defaultShapeType];return e.coordinate=this.coordinate,e},getDefaultPoints:function(){return[]},getMarker:function(t,e){var n=this.getShape(t);if(!n.getMarker){var r=this.defaultShapeType;n=this.getShape(r)}var i=this.theme,o=a.get(i,[t,"default"],{}),s=n.getMarker(e);return a.deepMix({},o,s)},drawShape:function(t,e,n){return this.getShape(t).draw(e,n)}},u={coordinate:null,parsePath:function(t){var e=this.coordinate,n=i.parsePathString(t);return n=e.isPolar?o.convertPolarPath(e,n):o.convertNormalPath(e,n)},parsePoint:function(t){return this.coordinate.convert(t)},parsePoints:function(t){var e=this.coordinate;return t.map((function(t){return e.convert(t)}))},draw:function(t,e){}},c={};e.registerShapeFactory=function(t,e){var n=a.upperFirst(t),i=r.__assign(r.__assign(r.__assign({},s),e),{geometryType:t});return c[n]=i,i},e.registerShape=function(t,e,n){var i=a.upperFirst(t),o=c[i],s=r.__assign(r.__assign({},u),n);return o[e]=s,s},e.getShapeFactory=function(t){var e=a.upperFirst(t);return c[e]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(25),o=n(26),s=r.__importDefault(n(114));function u(t,e){var n=t.event.target.getCanvasBBox();return n.width>=e||n.height>=e?n:null}function c(t){var e=t.geometries,n=[];return i.each(e,(function(t){var e=t.elements;n=n.concat(e)})),t.views&&t.views.length&&i.each(t.views,(function(t){n=n.concat(c(t))})),n}function l(t,e){var n=t.getModel().data;return i.isArray(n)?n[0][e]:n[e]}function h(t,e){return!(e.minX>t.maxX||e.maxXt.maxY||e.maxY=e||r.height>=e?n.attr("path"):null}(t,e);if(!n)return;return d(t.view,n)}var r=u(t,e);return r?f(t.view,r):null},e.getSiblingMaskElements=function(t,e,n){var r=u(t,n);if(!r)return null;var i=t.view,a=g(i,e,{x:r.x,y:r.y}),o=g(i,e,{x:r.maxX,y:r.maxY});return f(e,{minX:a.x,minY:a.y,maxX:o.x,maxY:o.y})},e.getElements=c,e.getElementsByField=function(t,e,n){return c(t).filter((function(t){return l(t,e)===n}))},e.getElementsByState=function(t,e){var n=t.geometries,r=[];return i.each(n,(function(t){var n=t.getElementsBy((function(t){return t.hasState(e)}));r=r.concat(n)})),r},e.getElementValue=l,e.intersectRect=h,e.getIntersectElements=f,e.getElementsByPath=d,e.getComponents=function(t){return i.map(t.getComponents(),(function(t){return t.component}))},e.distance=function(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)},e.getSpline=function(t,e){if(t.length<=2)return a.getLinePath(t,!1);var n=t[0],r=[];i.each(t,(function(t){r.push(t.x),r.push(t.y)}));var o=a.catmullRom2bezier(r,e,null);return o.unshift(["M",n.x,n.y]),o},e.isInBox=function(t,e){return t.x<=e.x&&t.maxX>=e.x&&t.y<=e.y&&t.maxY>e.y},e.getSilbings=function(t){var e=t.parent,n=null;return e&&(n=e.views.filter((function(e){return e!==t}))),n},e.getSiblingPoint=g,e.isInRecords=function(t,e,n,r){var a=!1;return i.each(t,(function(t){if(t[n]===e[n]&&t[r]===e[r])return a=!0,!1})),a},e.getScaleByField=function t(e,n){var r=e.getScaleByField(n);return!r&&e.views&&i.each(e.views,(function(e){if(r=t(e,n))return!1})),r}},function(t,e,n){"use strict";function r(t,e,n){if(t){if("function"==typeof t.addEventListener)return t.addEventListener(e,n,!1),{remove:function(){t.removeEventListener(e,n,!1)}};if("function"==typeof t.attachEvent)return t.attachEvent("on"+e,n),{remove:function(){t.detachEvent("on"+e,n)}}}}var i,a,o,s;function u(t){i||(i=document.createElement("table"),a=document.createElement("tr"),o=/^\s*<(\w+|!)[^>]*>/,s={tr:document.createElement("tbody"),tbody:i,thead:i,tfoot:i,td:a,th:a,"*":document.createElement("div")});var e=o.test(t)&&RegExp.$1;e&&e in s||(e="*");var n=s[e];t=t.replace(/(^\s*)|(\s*$)/g,""),n.innerHTML=""+t;var r=n.childNodes[0];return n.removeChild(r),r}function c(t,e,n){var r;try{r=window.getComputedStyle?window.getComputedStyle(t,null)[e]:t.style[e]}catch(t){}finally{r=void 0===r?n:r}return r}function l(t,e){var n=c(t,"height",e);return"auto"===n&&(n=t.offsetHeight),parseFloat(n)}function h(t,e){var n=l(t,e),r=parseFloat(c(t,"borderTopWidth"))||0,i=parseFloat(c(t,"paddingTop"))||0,a=parseFloat(c(t,"paddingBottom"))||0;return n+r+(parseFloat(c(t,"borderBottomWidth"))||0)+i+a+(parseFloat(c(t,"marginTop"))||0)+(parseFloat(c(t,"marginBottom"))||0)}function f(t,e){var n=c(t,"width",e);return"auto"===n&&(n=t.offsetWidth),parseFloat(n)}function p(t,e){var n=f(t,e),r=parseFloat(c(t,"borderLeftWidth"))||0,i=parseFloat(c(t,"paddingLeft"))||0,a=parseFloat(c(t,"paddingRight"))||0,o=parseFloat(c(t,"borderRightWidth"))||0,s=parseFloat(c(t,"marginRight"))||0;return n+r+o+i+a+(parseFloat(c(t,"marginLeft"))||0)+s}function d(){return window.devicePixelRatio?window.devicePixelRatio:2}function g(t,e){if(t)for(var n in e)e.hasOwnProperty(n)&&(t.style[n]=e[n]);return t}n.r(e),n.d(e,"addEventListener",(function(){return r})),n.d(e,"createDom",(function(){return u})),n.d(e,"getHeight",(function(){return l})),n.d(e,"getOuterHeight",(function(){return h})),n.d(e,"getOuterWidth",(function(){return p})),n.d(e,"getRatio",(function(){return d})),n.d(e,"getStyle",(function(){return c})),n.d(e,"getWidth",(function(){return f})),n.d(e,"modifyCSS",(function(){return g}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0);e.getStyle=function(t,e,n,a){void 0===a&&(a="");var o=t.style,s=t.defaultStyle,u=t.color,c=t.size,l=r.__assign(r.__assign({},s),o);return u&&(e&&(i.get(o,"stroke")||(l.stroke=u)),n&&(i.get(o,"fill")||(l.fill=u))),a&&i.isNil(i.get(o,a))&&!i.isNil(c)&&(l[a]=c),l}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=function(){function t(t,e){this.context=t,this.cfg=e,t.addAction(this)}return t.prototype.applyCfg=function(t){r.assign(this,t)},t.prototype.init=function(){this.applyCfg(this.cfg)},t.prototype.destroy=function(){this.context.removeAction(this),this.context=null},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sub=e.mul=void 0,e.create=function(){var t=new r.ARRAY_TYPE(9);r.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0);return t[0]=1,t[4]=1,t[8]=1,t},e.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},e.clone=function(t){var e=new r.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromValues=function(t,e,n,i,a,o,s,u,c){var l=new r.ARRAY_TYPE(9);return l[0]=t,l[1]=e,l[2]=n,l[3]=i,l[4]=a,l[5]=o,l[6]=s,l[7]=u,l[8]=c,l},e.set=function(t,e,n,r,i,a,o,s,u,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=u,t[8]=c,t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.transpose=function(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},e.invert=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=l*o-s*c,f=-l*a+s*u,p=c*a-o*u,d=n*h+r*f+i*p;if(!d)return null;return d=1/d,t[0]=h*d,t[1]=(-l*r+i*c)*d,t[2]=(s*r-i*o)*d,t[3]=f*d,t[4]=(l*n-i*u)*d,t[5]=(-s*n+i*a)*d,t[6]=p*d,t[7]=(-c*n+r*u)*d,t[8]=(o*n-r*a)*d,t},e.adjoint=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],l=e[8];return t[0]=o*l-s*c,t[1]=i*c-r*l,t[2]=r*s-i*o,t[3]=s*u-a*l,t[4]=n*l-i*u,t[5]=i*a-n*s,t[6]=a*c-o*u,t[7]=r*u-n*c,t[8]=n*o-r*a,t},e.determinant=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],u=t[7],c=t[8];return e*(c*a-o*u)+n*(-c*i+o*s)+r*(u*i-a*s)},e.multiply=i,e.translate=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1];return t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=u,t[6]=f*r+p*o+c,t[7]=f*i+p*s+l,t[8]=f*a+p*u+h,t},e.rotate=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=Math.sin(n),p=Math.cos(n);return t[0]=p*r+f*o,t[1]=p*i+f*s,t[2]=p*a+f*u,t[3]=p*o-f*r,t[4]=p*s-f*i,t[5]=p*u-f*a,t[6]=c,t[7]=l,t[8]=h,t},e.scale=function(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},e.fromRotation=function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat2d=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},e.fromQuat=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n+n,s=r+r,u=i+i,c=n*o,l=r*o,h=r*s,f=i*o,p=i*s,d=i*u,g=a*o,v=a*s,y=a*u;return t[0]=1-h-d,t[3]=l-y,t[6]=f+v,t[1]=l+y,t[4]=1-c-d,t[7]=p-g,t[2]=f-v,t[5]=p+g,t[8]=1-c-h,t},e.normalFromMat4=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],g=e[13],v=e[14],y=e[15],m=n*s-r*o,x=n*u-i*o,b=n*c-a*o,M=r*u-i*s,_=r*c-a*s,w=i*c-a*u,C=l*g-h*d,O=l*v-f*d,A=l*y-p*d,P=h*v-f*g,S=h*y-p*g,E=f*y-p*v,I=m*E-x*S+b*P+M*A-_*O+w*C;if(!I)return null;return I=1/I,t[0]=(s*E-u*S+c*P)*I,t[1]=(u*A-o*E-c*O)*I,t[2]=(o*S-s*A+c*C)*I,t[3]=(i*S-r*E-a*P)*I,t[4]=(n*E-i*A+a*O)*I,t[5]=(r*A-n*S-a*C)*I,t[6]=(g*w-v*_+y*M)*I,t[7]=(v*b-d*w-y*x)*I,t[8]=(d*_-g*b+y*m)*I,t},e.projection=function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},e.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},e.subtract=a,e.multiplyScalar=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},e.multiplyScalarAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},e.equals=function(t,e){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],f=e[0],p=e[1],d=e[2],g=e[3],v=e[4],y=e[5],m=e[6],x=e[7],b=e[8];return Math.abs(n-f)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(f))&&Math.abs(i-p)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(a-d)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(o-g)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(g))&&Math.abs(s-v)<=r.EPSILON*Math.max(1,Math.abs(s),Math.abs(v))&&Math.abs(u-y)<=r.EPSILON*Math.max(1,Math.abs(u),Math.abs(y))&&Math.abs(c-m)<=r.EPSILON*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(l-x)<=r.EPSILON*Math.max(1,Math.abs(l),Math.abs(x))&&Math.abs(h-b)<=r.EPSILON*Math.max(1,Math.abs(h),Math.abs(b))};var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(42));function i(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1],d=n[2],g=n[3],v=n[4],y=n[5],m=n[6],x=n[7],b=n[8];return t[0]=f*r+p*o+d*c,t[1]=f*i+p*s+d*l,t[2]=f*a+p*u+d*h,t[3]=g*r+v*o+y*c,t[4]=g*i+v*s+y*l,t[5]=g*a+v*u+y*h,t[6]=m*r+x*o+b*c,t[7]=m*i+x*s+b*l,t[8]=m*a+x*u+b*h,t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}e.mul=i,e.sub=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0);function i(t,e,n,r){return{x:t+n*Math.cos(r),y:e+n*Math.sin(r)}}e.polarToCartesian=i,e.getSectorPath=function(t,e,n,r,a,o){void 0===o&&(o=0);var s=i(t,e,n,r),u=i(t,e,n,a),c=i(t,e,o,r),l=i(t,e,o,a);if(a-r==2*Math.PI){var h=i(t,e,n,r+Math.PI),f=i(t,e,o,r+Math.PI),p=[["M",s.x,s.y],["A",n,n,0,1,1,h.x,h.y],["A",n,n,0,1,1,u.x,u.y],["M",c.x,c.y]];return o&&(p.push(["A",o,o,0,1,0,f.x,f.y]),p.push(["A",o,o,0,1,0,l.x,l.y])),p.push(["M",s.x,s.y]),p.push(["Z"]),p}var d=a-r<=Math.PI?0:1,g=[["M",s.x,s.y],["A",n,n,0,d,1,u.x,u.y],["L",l.x,l.y]];return o&&g.push(["A",o,o,0,d,0,c.x,c.y]),g.push(["L",s.x,s.y]),g.push(["Z"]),g},e.getArcPath=function(t,e,n,a,o){var s=i(t,e,n,a),u=i(t,e,n,o);if(r.isNumberEqual(o-a,2*Math.PI)){var c=i(t,e,n,a+Math.PI);return[["M",s.x,s.y],["A",n,n,0,1,1,c.x,c.y],["A",n,n,0,1,1,s.x,s.y],["A",n,n,0,1,0,c.x,c.y],["A",n,n,0,1,0,s.x,s.y],["Z"]]}var l=o-a<=Math.PI?0:1;return[["M",s.x,s.y],["A",n,n,0,l,1,u.x,u.y]]},e.getAngle=function(t,e){var n,i,a=function(t){if(r.isEmpty(t))return null;var e=t[0].x,n=t[0].x,i=t[0].y,a=t[0].y;return r.each(t,(function(t){e=e>t.x?t.x:e,n=nt.y?t.y:i,a=a0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i);return t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},e.lerp=function(t,e,n,r){var i=e[0],a=e[1];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t},e.random=function(t,e){e=e||1;var n=2*r.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.transformMat2=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t},e.transformMat2d=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t},e.transformMat3=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t},e.transformMat4=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t},e.rotate=function(t,e,n,r){var i=e[0]-n[0],a=e[1]-n[1],o=Math.sin(r),s=Math.cos(r);return t[0]=i*s-a*o+n[0],t[1]=i*o+a*s+n[1],t},e.angle=function(t,e){var n=t[0],r=t[1],i=e[0],a=e[1],o=n*n+r*r;o>0&&(o=1/Math.sqrt(o));var s=i*i+a*a;s>0&&(s=1/Math.sqrt(s));var u=(n*i+r*a)*o*s;return u>1?0:u<-1?Math.PI:Math.acos(u)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],i=t[1],a=e[0],o=e[1];return Math.abs(n-a)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-o)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(o))};var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(42));function i(){var t=new r.ARRAY_TYPE(2);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function o(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function s(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function u(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}function c(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function l(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function h(t){var e=t[0],n=t[1];return e*e+n*n}var f;e.len=l,e.sub=a,e.mul=o,e.div=s,e.dist=u,e.sqrDist=c,e.sqrLen=h,e.forEach=(f=i(),function(t,e,n,r,i,a){var o=void 0,s=void 0;for(e||(e=2),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,o=n;o=0?e:n<=0?n:0},e.prototype.createAttrOption=function(t,e,n){if(o.isNil(e)||o.isObject(e))o.isObject(e)&&o.isEqual(Object.keys(e),["values"])?o.set(this.attributeOption,t,{fields:e.values}):o.set(this.attributeOption,t,e);else{var r={};o.isNumber(e)?r.values=[e]:r.fields=g.parseFields(e),n&&(o.isFunction(n)?r.callback=n:r.values=n),o.set(this.attributeOption,t,r)}},e.prototype.initAttributes=function(){var t=this,e=this.attributes,n=this.attributeOption,i=this.theme,s=this.shapeType;o.each(n,(function(n,u){if(n){var c=r.__assign({},n),l=c.callback,h=c.values,f=c.fields,p=void 0===f?[]:f,d=o.map(p,(function(e){return t.scales[e]}));c.scales=d,"position"!==u&&1===d.length&&"identity"===d[0].type?c.values=d[0].values:l||h||("size"===u?c.values=i.sizes:"shape"===u?c.values=i.shapes[s]||[]:"color"===u&&(d.length?c.values=d[0].values.length<=10?i.colors10:i.colors20:c.values=i.colors10));var g=a.getAttribute(u);e[u]=new g(c)}}))},e.prototype.processData=function(t){var e=this,n=this.groupData(t);n=o.map(n,(function(t){var n=e.saveOrigin(t);return e.numeric(n),n}));var r=this.adjustData(n);return this.beforeMappingData=r,r},e.prototype.adjustData=function(t){var e=this,n=this.adjustOption,a=t;if(n){var s=this.getXScale(),u=this.getYScale(),c=s.field,l=u?u.field:null;n.forEach((function(t){var n=r.__assign({xField:c,yField:l},t),h=t.type;if("dodge"===h){var f=[];if(s.isCategory||"identity"===s.type)f.push("x");else{if(u)throw new Error("dodge is not support linear attribute, please use category attribute!");f.push("y")}n.adjustNames=f,n.dodgeRatio=e.theme.columnWidthRatio}else if("stack"===h){var p=e.coordinate;if(!u){n.height=p.getHeight();var d=e.getDefaultValue("size")||3;n.size=d}!p.isTransposed&&o.isNil(n.reverseOrder)&&(n.reverseOrder=!0)}var g=new(i.getAdjust(h))(n);a=g.process(a),e.adjusts[h]=g}))}return a},e.prototype.groupData=function(t){for(var e=this.getGroupScales(),n=this.scaleDefs,r={},i=[],a=0,s=e;aa&&(a=h)}var f=this.scaleDefs,p={};it.max&&!o.get(f,[r,"max"])&&(p.max=a),t.change(p)},e.prototype.beforeMapping=function(t){var e=this,n=t;if(this.sortable){var r=this.getXScale(),i=r.field;o.each(n,(function(t){t.sort((function(t,e){return r.translate(t[i])-r.translate(e[i])}))}))}return this.generatePoints&&(o.each(n,(function(t){e.generateShapePoints(t)})),n.reduce((function(t,e){return t[0].nextPoints=e[0].points,e}),n[0])),n},e.prototype.afterMapping=function(t){this.sortable||this.sort(t),this.dataArray=t},e.prototype.generateShapePoints=function(t){for(var e=this.getShapeFactory(),n=this.getAttribute("shape"),r=0,i=t;r1)for(var p=0;pthis.max?NaN:this.values[r]},e.prototype.getText=function(e){for(var n=[],r=1;r1?t-1:t}},e}(u),h={},f=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,p="[^\\s]+",d=/\[([^]*?)\]/gm,g=function(){};function v(t,e){for(var n=[],r=0,i=t.length;r3?0:(t-t%10!=10)*t%10]}};var w={D:function(t){return t.getDate()},DD:function(t){return m(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return t.getDay()},dd:function(t){return m(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return t.getMonth()+1},MM:function(t){return m(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return m(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return m(t.getFullYear(),4)},h:function(t){return t.getHours()%12||12},hh:function(t){return m(t.getHours()%12||12)},H:function(t){return t.getHours()},HH:function(t){return m(t.getHours())},m:function(t){return t.getMinutes()},mm:function(t){return m(t.getMinutes())},s:function(t){return t.getSeconds()},ss:function(t){return m(t.getSeconds())},S:function(t){return Math.round(t.getMilliseconds()/100)},SS:function(t){return m(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return m(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+m(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)}},C={D:["\\d\\d?",function(t,e){t.day=e}],Do:["\\d\\d?"+p,function(t,e){t.day=parseInt(e,10)}],M:["\\d\\d?",function(t,e){t.month=e-1}],YY:["\\d\\d?",function(t,e){var n=+(""+(new Date).getFullYear()).substr(0,2);t.year=""+(e>68?n-1:n)+e}],h:["\\d\\d?",function(t,e){t.hour=e}],m:["\\d\\d?",function(t,e){t.minute=e}],s:["\\d\\d?",function(t,e){t.second=e}],YYYY:["\\d{4}",function(t,e){t.year=e}],S:["\\d",function(t,e){t.millisecond=100*e}],SS:["\\d{2}",function(t,e){t.millisecond=10*e}],SSS:["\\d{3}",function(t,e){t.millisecond=e}],d:["\\d\\d?",g],ddd:[p,g],MMM:[p,y("monthNamesShort")],MMMM:[p,y("monthNames")],a:[p,function(t,e,n){var r=e.toLowerCase();r===n.amPm[0]?t.isPm=!1:r===n.amPm[1]&&(t.isPm=!0)}],ZZ:["[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z",function(t,e){var n,r=(e+"").match(/([+-]|\d\d)/gi);r&&(n=60*r[1]+parseInt(r[2],10),t.timezoneOffset="+"===r[0]?n:-n)}]};C.dd=C.d,C.dddd=C.ddd,C.DD=C.D,C.mm=C.m,C.hh=C.H=C.HH=C.h,C.MM=C.M,C.ss=C.s,C.A=C.a,h.masks={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},h.format=function(t,e,n){var r=n||h.i18n;if("number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date in fecha.format");e=h.masks[e]||e||h.masks.default;var i=[];return(e=(e=e.replace(d,(function(t,e){return i.push(e),"@@@"}))).replace(f,(function(e){return e in w?w[e](t,r):e.slice(1,e.length-1)}))).replace(/@@@/g,(function(){return i.shift()}))},h.parse=function(t,e,n){var r=n||h.i18n;if("string"!=typeof e)throw new Error("Invalid format in fecha.parse");if(e=h.masks[e]||e,t.length>1e3)return null;var i={},a=[],o=[];e=e.replace(d,(function(t,e){return o.push(e),"@@@"}));var s,u=(s=e,s.replace(/[|\\{()[^$+*?.-]/g,"\\$&")).replace(f,(function(t){if(C[t]){var e=C[t];return a.push(e[1]),"("+e[0]+")"}return t}));u=u.replace(/@@@/g,(function(){return o.shift()}));var c=t.match(new RegExp(u,"i"));if(!c)return null;for(var l=1;l0?new Date(t).getTime():new Date(t.replace(/-/gi,"/")).getTime()),Object(i.isDate)(t)&&(t=t.getTime()),t}var S=36e5,E=24*S,I=31*E,T=[["HH:mm:ss",1e3],["HH:mm:ss",1e4],["HH:mm:ss",3e4],["HH:mm",6e4],["HH:mm",6e5],["HH:mm",18e5],["HH",S],["HH",6*S],["HH",12*S],["YYYY-MM-DD",E],["YYYY-MM-DD",4*E],["YYYY-WW",7*E],["YYYY-MM",I],["YYYY-MM",4*I],["YYYY-MM",6*I],["YYYY",380*E]];function k(t,e,n){var r,a=(r=function(t){return t[1]},function(t,e,n,a){for(var o=Object(i.isNil)(n)?0:n,s=Object(i.isNil)(a)?t.length:a;o>>1;r(t[u])>e?s=u:o=u+1}return o})(T,(e-t)/n)-1,o=T[a];return a<0?o=T[0]:a>=T.length&&(o=Object(i.last)(T)),o}var j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(c.__extends)(e,t),e.prototype.translate=function(t){t=P(t);var e=this.values.indexOf(t);return-1===e&&(e=Object(i.isNumber)(t)&&t-1){var r=this.values[n],i=this.formatter;return r=i?i(r,e):A(r,this.mask)}return t},e.prototype.initCfg=function(){this.tickMethod="time-cat",this.mask="YYYY-MM-DD",this.tickCount=7},e.prototype.setDomain=function(){var e=this.values;Object(i.each)(e,(function(t,n){e[n]=P(t)})),e.sort((function(t,e){return t-e})),t.prototype.setDomain.call(this)},e}(l),L=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isContinuous=!0,e}return Object(c.__extends)(e,t),e.prototype.scale=function(t){if(Object(i.isNil)(t))return NaN;var e=this.rangeMin(),n=this.rangeMax();return this.max===this.min?e:e+this.getScalePercent(t)*(n-e)},e.prototype.init=function(){t.prototype.init.call(this);var e=this.ticks,n=Object(i.head)(e),r=Object(i.last)(e);nthis.max&&(this.max=r),Object(i.isNil)(this.minLimit)||(this.min=n),Object(i.isNil)(this.maxLimit)||(this.max=r)},e.prototype.setDomain=function(){var t=Object(i.getRange)(this.values),e=t.min,n=t.max;Object(i.isNil)(this.min)&&(this.min=e),Object(i.isNil)(this.max)&&(this.max=n),this.min>this.max&&(this.min=e,this.max=n)},e.prototype.calculateTicks=function(){var e=this,n=t.prototype.calculateTicks.call(this);return this.nice||(n=Object(i.filter)(n,(function(t){return t>=e.min&&t<=e.max}))),n},e.prototype.getScalePercent=function(t){var e=this.max,n=this.min;return(t-n)/(e-n)},e.prototype.getInvertPercent=function(t){return(t-this.rangeMin())/(this.rangeMax()-this.rangeMin())},e}(u),B=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="linear",e.isLinear=!0,e}return Object(c.__extends)(e,t),e.prototype.invert=function(t){var e=this.getInvertPercent(t);return this.min+e*(this.max-this.min)},e.prototype.initCfg=function(){this.tickMethod="wilkinson-extended",this.nice=!1},e}(L);function D(t,e){var n=Math.E;return e>=0?Math.pow(n,Math.log(e)/t):-1*Math.pow(n,Math.log(-e)/t)}function F(t,e){return 1===t?1:Math.log(e)/Math.log(t)}function R(t,e,n){Object(i.isNil)(n)&&(n=Math.max.apply(null,t));var r=n;return Object(i.each)(t,(function(t){t>0&&t1&&(r=1),r}var N=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e}return Object(c.__extends)(e,t),e.prototype.invert=function(t){var e,n=this.base,r=F(n,this.max),i=this.rangeMin(),a=this.rangeMax()-i,o=this.positiveMin;if(o){if(0===t)return 0;var s=1/(r-(e=F(n,o/n)))*a;if(t=0?1:-1;return Math.pow(a,n)*o},e.prototype.initCfg=function(){this.tickMethod="pow",this.exponent=2,this.tickCount=5,this.nice=!0},e.prototype.getScalePercent=function(t){var e=this.max,n=this.min;if(e===n)return 0;var r=this.exponent;return(D(r,t)-D(r,n))/(D(r,e)-D(r,n))},e}(L),G=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="time",e}return Object(c.__extends)(e,t),e.prototype.getText=function(t,e){var n=this.translate(t),r=this.formatter;return r?r(n,e):A(n,this.mask)},e.prototype.scale=function(e){var n=e;return(Object(i.isString)(n)||Object(i.isDate)(n))&&(n=this.translate(n)),t.prototype.scale.call(this,n)},e.prototype.translate=function(t){return P(t)},e.prototype.initCfg=function(){this.tickMethod="time-pretty",this.mask="YYYY-MM-DD",this.tickCount=7,this.nice=!1},e.prototype.setDomain=function(){var t=this.values,e=this.getConfig("min"),n=this.getConfig("max");if(Object(i.isNil)(e)&&Object(i.isNumber)(e)||(this.min=this.translate(this.min)),Object(i.isNil)(n)&&Object(i.isNumber)(n)||(this.max=this.translate(this.max)),t&&t.length){var r=[],a=1/0,o=a,s=0;Object(i.each)(t,(function(t){var e=P(t);if(isNaN(e))throw new TypeError("Invalid Time: "+t+" in time scale!");a>e?(o=a,a=e):o>e&&(o=e),s1&&(this.minTickInterval=o-a),Object(i.isNil)(e)&&(this.min=a),Object(i.isNil)(n)&&(this.max=s)}},e}(B),X=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="quantize",e}return Object(c.__extends)(e,t),e.prototype.invert=function(t){var e=this.ticks,n=e.length,r=this.getInvertPercent(t),a=Math.floor(r*(n-1));if(a>=n-1)return Object(i.last)(e);if(a<0)return Object(i.head)(e);var o=e[a],s=a/(n-1);return o+(r-s)/((a+1)/(n-1)-s)*(e[a+1]-o)},e.prototype.initCfg=function(){this.tickMethod="r-pretty",this.tickCount=5,this.nice=!0},e.prototype.calculateTicks=function(){var e=t.prototype.calculateTicks.call(this);return this.nice||(Object(i.last)(e)!==this.max&&e.push(this.max),Object(i.head)(e)!==this.min&&e.unshift(this.min)),e},e.prototype.getScalePercent=function(t){var e=this.ticks;if(tObject(i.last)(e))return 1;var n=0;return Object(i.each)(e,(function(e,r){if(!(t>=e))return!1;n=r})),n/(e.length-1)},e}(L),V=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="quantile",e}return Object(c.__extends)(e,t),e.prototype.initCfg=function(){this.tickMethod="quantile",this.tickCount=5,this.nice=!0},e}(X),q={};function z(t){return q[t]}function H(t,e){if(z(t))throw new Error("type '"+t+"' existed.");q[t]=e}var W=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="identity",e.isIdentity=!0,e}return Object(c.__extends)(e,t),e.prototype.calculateTicks=function(){return this.values},e.prototype.scale=function(t){return this.values[0]!==t&&Object(i.isNumber)(t)?t:this.range[0]},e.prototype.invert=function(t){var e=this.range;return te[1]?NaN:this.values[0]},e}(u),U=[1,5,2,2.5,4,3],Z=100*Number.EPSILON;function Q(t,e,n,r,a,o){var s=Object(i.size)(e),u=Object(i.indexOf)(e,t),c=0,l=function(t,e){return(t%e+e)%e}(r,o);return(l=0&&(c=1),1-u/(s-1)-n+c}function $(t,e,n){var r=Object(i.size)(e);return 1-Object(i.indexOf)(e,t)/(r-1)-n+1}function K(t,e,n,r,i,a){var o=(t-1)/(a-i),s=(e-1)/(Math.max(a,r)-Math.min(n,i));return 2-Math.max(o/s,s/o)}function J(t,e){return t>=e?2-(t-1)/(e-1):1}function tt(t,e,n,r){var i=e-t;return 1-.5*(Math.pow(e-r,2)+Math.pow(t-n,2))/Math.pow(.1*i,2)}function et(t,e,n){var r=e-t;if(n>r){var i=(n-r)/2;return 1-Math.pow(i,2)/Math.pow(.1*r,2)}return 1}function nt(t,e,n,r,a,o){if(void 0===n&&(n=5),void 0===r&&(r=!0),void 0===a&&(a=U),void 0===o&&(o=[.25,.2,.5,.05]),t===e||1===n)return{min:t,max:e,ticks:[t]};for(var s={score:-2,lmin:0,lmax:0,lstep:0},u=1;u<1/0;){for(var c=0,l=a;cb)v+=1;else{for(var M=x;M<=b;M+=1){var _=M*(y/u),w=_+y*(p-1),C=y,O=Q(h,a,u,_,w,C),A=tt(t,e,_,w),P=K(p,n,t,e,_,w),S=o[0]*O+o[1]*A+o[2]*P+1*o[3];S>s.score&&(!r||_<=t&&w>=e)&&(s.lmin=_,s.lmax=w,s.lstep=C,s.score=S)}v+=1}}p+=1}}u+=1}for(var E=Number.isInteger(s.lstep)?0:Math.ceil(Math.abs(Math.log10(s.lstep))),I=[],T=s.lmin;T<=s.lmax;T+=s.lstep)I.push(T);var k=E?Object(i.map)(I,(function(t){return Number.parseFloat(t.toFixed(E))})):I;return{min:Math.min(t,Object(i.head)(k)),max:Math.max(e,Object(i.last)(k)),ticks:k}}function rt(t){var e=t.values,n=t.tickInterval,r=t.tickCount,a=e;if(Object(i.isNumber)(n))return Object(i.filter)(a,(function(t,e){return e%n==0}));var o=t.min,s=t.max;if(Object(i.isNil)(o)&&(o=0),Object(i.isNil)(s)&&(s=e.length-1),Object(i.isNumber)(r)&&r=o&&t<=s})).map((function(t){return e[t]}))}return e.slice(o,s+1)}var it=Math.sqrt(50),at=Math.sqrt(10),ot=Math.sqrt(2),st=function(){function t(){this._domain=[0,1]}return t.prototype.domain=function(t){return t?(this._domain=Array.from(t,Number),this):this._domain.slice()},t.prototype.nice=function(t){var e,n;void 0===t&&(t=5);var r,i=this._domain.slice(),a=0,o=this._domain.length-1,s=this._domain[a],u=this._domain[o];return u0?r=ut(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,t):r<0&&(r=ut(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,t)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(u/r)*r,this.domain(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(u*r)/r,this.domain(i)),this},t.prototype.ticks=function(t){return void 0===t&&(t=5),function(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];(r=e0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s=0?(a>=it?10:a>=at?5:a>=ot?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=it?10:a>=at?5:a>=ot?2:1)}function ct(t,e,n){return("ceil"===n?Math.ceil(t/e):"floor"===n?Math.floor(t/e):Math.round(t/e))*e}function lt(t,e,n){var r=ct(t,n,"floor"),a=ct(e,n,"ceil");r=Object(i.fixedBase)(r,n),a=Object(i.fixedBase)(a,n);for(var o=[],s=r;s<=a;s+=n){var u=Object(i.fixedBase)(s,n);o.push(u)}return{min:r,max:a,ticks:o}}function ht(t,e,n){var r,a=t.minLimit,o=t.maxLimit,s=t.min,u=t.max,c=t.tickCount,l=void 0===c?5:c,h=Object(i.isNil)(a)?Object(i.isNil)(e)?s:e:a,f=Object(i.isNil)(o)?Object(i.isNil)(n)?u:n:o;if(h>f&&(f=(r=[h,f])[0],h=r[1]),l<=2)return[h,f];for(var p=(f-h)/(l-1),d=[],g=0;g1&&(i*=Math.ceil(o)),r&&i31536e6)for(var u=dt(n),c=Math.ceil(i/31536e6),l=s;l<=u+c;l+=c)o.push(gt(l));else if(i>I){var h=Math.ceil(i/I),f=vt(e),p=function(t,e){var n=dt(t),r=dt(e),i=vt(t);return 12*(r-n)+(vt(e)-i)%12}(e,n);for(l=0;l<=p+h;l+=h)o.push(yt(s,l+f))}else if(i>E){var d=(x=new Date(e)).getFullYear(),g=x.getMonth(),v=x.getDate(),y=Math.ceil(i/E),m=function(t,e){return Math.ceil((e-t)/E)}(e,n);for(l=0;lS){d=(x=new Date(e)).getFullYear(),g=x.getMonth(),y=x.getDate();var x,b=x.getHours(),M=Math.ceil(i/S),_=function(t,e){return Math.ceil((e-t)/S)}(e,n);for(l=0;l<=_+M;l+=M)o.push(new Date(d,g,y,b+l).getTime())}else if(i>6e4){var w=function(t,e){return Math.ceil((e-t)/6e4)}(e,n),C=Math.ceil(i/6e4);for(l=0;l<=w+C;l+=C)o.push(e+6e4*l)}else{var O=i;O<1e3&&(O=1e3);var A=1e3*Math.floor(e/1e3),P=Math.ceil((n-e)/1e3),T=Math.ceil(O/1e3);for(l=0;l0)e=Math.floor(F(n,i));else{var u=R(o,n,a);e=Math.floor(F(n,u))}for(var c=s-e,l=Math.ceil(c/r),h=[],f=e;f=0?1:-1;return Math.pow(t,e)*n}))})),s("quantile",(function(t){var e=t.tickCount,n=t.values;if(!n||!n.length)return[];for(var r=n.slice().sort((function(t,e){return t-e})),i=[],a=0;a=r&&t<=i},e.padEnd=function(t,e,n){if(r.isString(t))return t.padEnd(e,n);if(r.isArray(t)){var i=t.length;if(i=s[l]?1:0,p=h>Math.PI?1:0,d=n.convert(u),g=a.getDistanceToCenter(n,d);if(g>=.5)if(h===2*Math.PI){var v={x:(u.x+s.x)/2,y:(u.y+s.y)/2},y=n.convert(v);c.push(["A",g,g,0,p,f,y.x,y.y]),c.push(["A",g,g,0,p,f,d.x,d.y])}else c.push(["A",g,g,0,p,f,d.x,d.y]);return c}(n,r,t)):u.push(o(i,t));break;case"z":default:u.push(i)}})),function(t){i.each(t,(function(e,n){if("a"===e[0].toLowerCase()){var r=t[n-1],i=t[n+1];i&&"a"===i[0].toLowerCase()?r&&"l"===r[0].toLowerCase()&&(r[0]="M"):r&&"a"===r[0].toLowerCase()&&i&&"l"===i[0].toLowerCase()&&(i[0]="M")}}))}(u),u}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(3),a=n(44),o=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x=t,this.y=e,this.height=r,this.width=n}return t.fromRange=function(e,n,r,i){return new t(e,n,r-e,i-n)},Object.defineProperty(t.prototype,"minX",{get:function(){return this.x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxX",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minY",{get:function(){return this.y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxY",{get:function(){return this.y+this.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tl",{get:function(){return{x:this.x,y:this.y}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tr",{get:function(){return{x:this.maxX,y:this.y}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bl",{get:function(){return{x:this.x,y:this.maxY}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"br",{get:function(){return{x:this.maxX,y:this.maxY}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return{x:this.x+this.width/2,y:this.minY}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return{x:this.maxX,y:this.y+this.height/2}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return{x:this.x+this.width/2,y:this.maxY}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return{x:this.minX,y:this.y+this.height/2}},enumerable:!0,configurable:!0}),t.prototype.isEqual=function(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.add=function(){for(var t=[],e=0;e1?1:Number(e),r=t.length-1,i=Math.floor(r*n),a=r*n-i,o=t[i],s=i===r?o:t[i+1];return c([u(o,s,a,0),u(o,s,a,1),u(o,s,a,2)])}(n,t)}},toRGB:Object(r.memoize)(p),toCSSGradient:function(t){if(/^[r,R,L,l]{1}[\s]*\(/.test(t)){var e,n=void 0;if("l"===t[0]){var i=+(u=a.exec(t))[1]+90;n=u[2],e="linear-gradient("+i+"deg, "}else if("r"===t[0]){var u;e="radial-gradient(",n=(u=o.exec(t))[4]}var c=n.match(s);return Object(r.each)(c,(function(t,n){var r=t.split(":");e+=r[1]+" "+100*r[0]+"%",n!==c.length-1&&(e+=", ")})),e+=")"}return t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(17),a=/^(?:(?!0000)[0-9]{4}([-/.]+)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-/.]+)0?2\2(?:29))(\s+([01]|([01][0-9]|2[0-3])):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9]))?$/;e.createScaleByField=function(t,e,n){var o=e||[];if(r.isNumber(t)||r.isNil(r.firstValue(o,t))&&r.isEmpty(n))return new(i.getScale("identity"))({field:t.toString(),values:[t]});var s=r.get(n,"type",function(t,e){var n="linear",i=r.firstValue(e,t);return r.isArray(i)&&(i=i[0]),a.test(i)?n="time":r.isString(i)&&(n="cat"),n}(t,o)),u={field:t,values:r.valuesOfKey(o,t)};return r.mix(u,n),new(i.getScale(s))(u)},e.syncScale=function(t,e){if("identity"!==t.type&&"identity"!==e.type){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);t.change(n)}},e.getName=function(t){return t.alias||t.field}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){return null==t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(3),o=n(18),s=n(10),u=r.__importDefault(n(129));var c=function(){function t(t){this.geometry=t}return t.prototype.getLabelItems=function(t){var e=this,n=[],a=this.getLabelCfgs(t);return i.each(t,(function(t,o){var s=a[o];if(s){var u=i.isArray(s.content)?s.content:[s.content];s.content=u;var c=u.length;i.each(u,(function(a,o){if(i.isNil(a)||""===a)n.push(null);else{var u=r.__assign(r.__assign({},s),e.getLabelPoint(s,t,o));u.textAlign||(u.textAlign=e.getLabelAlign(u,o,c)),u.offset<=0&&(u.labelLine=null),n.push(u)}}))}else n.push(null)})),n},t.prototype.render=function(t,e){void 0===e&&(e=!1);var n=this.getLabelItems(t),r=this.getLabelsRenderer(),i=this.getGeometryShapes();r.render(n,i,e)},t.prototype.clear=function(){var t=this.labelsRenderer;t&&t.clear()},t.prototype.destroy=function(){var t=this.labelsRenderer;t&&t.destroy(),this.labelsRenderer=null},t.prototype.getCoordinate=function(){return this.geometry.coordinate},t.prototype.getDefaultLabelCfg=function(){return i.get(this.geometry.theme,"labels",{})},t.prototype.setLabelPosition=function(t,e,n,r){},t.prototype.getDefaultOffset=function(t){var e=this.getCoordinate(),n=this.getOffsetVector(t);return e.isTransposed?n[0]:n[1]},t.prototype.getLabelOffset=function(t,e,n){var r=this.getDefaultOffset(t.offset),i=this.getCoordinate().isTransposed,a=i?"x":"y",o=i?1:-1,s={x:0,y:0};return s[a]=e>0||1===n?r*o:r*o*-1,s},t.prototype.getLabelPoint=function(t,e,n){var r=this.getCoordinate(),a=t.content.length;function o(e,n){var r,a,o=e;return i.isArray(o)&&(1===t.content.length?o.length<=2?o=o[e.length-1]:(r=o,a=0,i.each(r,(function(t){a+=t})),o=a/r.length):o=o[n]),o}var u={content:t.content[n],x:0,y:0,start:{x:0,y:0},color:"#fff"};if(e&&"polygon"===this.geometry.type){var c=s.getPolygonCentroid(e.x,e.y);u.x=c[0],u.y=c[1]}else u.x=o(e.x,n),u.y=o(e.y,n);var l=i.isArray(e.shape)?e.shape[0]:e.shape;if("funnel"===l||"pyramid"===l){var h=i.get(e,"nextPoints"),f=i.get(e,"points");if(h){var p=r.convert(f[1]),d=r.convert(h[1]);u.x=(p.x+d.x)/2,u.y=(p.y+d.y)/2}else if("pyramid"===l){p=r.convert(f[1]),d=r.convert(f[2]);u.x=(p.x+d.x)/2,u.y=(p.y+d.y)/2}}t.position&&this.setLabelPosition(u,e,n,t.position);var g=this.getLabelOffset(t,n,a);return u.start={x:u.x,y:u.y},u.x+=g.x,u.y+=g.y,u.color=e.color,u},t.prototype.getLabelAlign=function(t,e,n){var r="center";if(this.getCoordinate().isTransposed){var i=this.getDefaultOffset(t.offset);r=i<0?"right":0===i?"center":"left",n>1&&0===e&&("right"===r?r="left":"left"===r&&(r="right"))}return r},t.prototype.getLabelId=function(t){var e=this.geometry,n=e.type,r=e.getXScale(),i=e.getYScale(),o=t[a.FIELD_ORIGIN],s=e.getElementId(t);return"line"===n||"area"===n?s+=" "+o[r.field]:"path"===n&&(s+=" "+o[r.field]+"-"+o[i.field]),s},t.prototype.getLabelsRenderer=function(){var t=this.geometry,e=t.labelsContainer,n=t.labelOption,r=t.canvasRegion,a=t.animateOption,s=this.geometry.coordinate,c=this.labelsRenderer;return c||(c=new u.default({container:e,layout:i.get(n,["cfg","layout"],{type:this.defaultLayout})}),this.labelsRenderer=c),c.region=r,c.animate=!!a&&o.getDefaultAnimateCfg("label",s),c},t.prototype.getLabelCfgs=function(t){var e=this,n=this.geometry,o=this.getDefaultLabelCfg(),s=n.type,u=n.theme,c=n.labelOption,l=n.scales,h=n.coordinate,f=c,p=f.fields,d=f.callback,g=f.cfg,v=p.map((function(t){return l[t]})),y=[];return i.each(t,(function(t,n){var c,l=t[a.FIELD_ORIGIN],f=e.getLabelText(l,v);if(d){var m=p.map((function(t){return l[t]}));if(c=d.apply(void 0,m),i.isNil(c))return void y.push(null)}var x=r.__assign(r.__assign({id:e.getLabelId(t),data:l,mappingData:t,coordinate:h},g),c),b=x.content;i.isFunction(b)?x.content=b(l,t,n):i.isUndefined(b)&&(x.content=f[0]),i.isFunction(x.position)&&(x.position=x.position(l,t,n)),x="polygon"===s||x.offset<0&&!["line","point","path"].includes(s)?i.deepMix({},o,u.innerLabels,x):i.deepMix({},o,u.labels,x),y.push(x)})),y},t.prototype.getLabelText=function(t,e){var n=[];return i.each(e,(function(e){var r=t[e.field];r=i.isArray(r)?r.map((function(t){return e.getText(t)})):e.getText(r),i.isNil(r)||""===r?n.push(null):n.push(r)})),n},t.prototype.getOffsetVector=function(t){void 0===t&&(t=0);var e=this.getCoordinate();return e.isTransposed?e.applyMatrix(t,0):e.applyMatrix(0,t)},t.prototype.getGeometryShapes=function(){var t=this.geometry,e={};return i.each(t.elementsMap,(function(t,n){e[n]=t.shape})),i.each(t.getOffscreenGroup().getChildren(),(function(n){var r=t.getElementId(n.get("origin").mappingData);e[r]=n})),e},t}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(49),a=n(7),o=n(25);e.getShapeAttrs=function(t,e,n,s,u){var c=a.getStyle(t,e,!e,"lineWidth"),l=t.connectNulls,h=t.isInCircle,f=t.points,p=i.getPathPoints(f,l),d=[];return r.each(p,(function(t){d=d.concat(function(t,e,n,i,a){var s=[],u=[];r.each(t,(function(t){s.push(t[1]),u.push(t[0])})),u=u.reverse();var c=[];return r.each([s,u],(function(t,r){var s=[],u=i.parsePoints(t),l=u[0];e&&u.push({x:l.x,y:l.y}),s=n?o.getSplinePath(u,!1,a):o.getLinePath(u,!1),r>0&&(s[0][0]="L"),c=c.concat(s)})),c.push(["Z"]),c}(t,h,n,s,u))})),c.path=d,c},e.getConstraint=function(t){var e=t.start,n=t.end;return[[e.x,n.y],[n.x,e.y]]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=r.__importDefault(n(8)),o=n(5),s=n(5),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="",e.ignoreItemStates=[],e}return r.__extends(e,t),e.prototype.getTriggerListInfo=function(){var t=s.getDelegationObject(this.context),e=null;return s.isList(t)&&(e={item:t.item,list:t.component}),e},e.prototype.getAllowComponents=function(){var t=this,e=this.context.view,n=o.getComponents(e),r=[];return i.each(n,(function(e){e.isList()&&t.allowSetStateByElement(e)&&r.push(e)})),r},e.prototype.hasState=function(t,e){return t.hasState(e,this.stateName)},e.prototype.clearAllComponentsState=function(){var t=this,e=this.getAllowComponents();i.each(e,(function(e){e.clearItemsState(t.stateName)}))},e.prototype.allowSetStateByElement=function(t){var e=t.get("field");if(!e)return!1;if(this.cfg&&this.cfg.componentNames){var n=t.get("name");if(-1===this.cfg.componentNames.indexOf(n))return!1}var r=this.context.view,i=s.getScaleByField(r,e);return i&&i.isCategory},e.prototype.allowSetStateByItem=function(t,e){var n=this.ignoreItemStates;return!n.length||0===n.filter((function(n){return e.hasState(t,n)})).length},e.prototype.setStateByElement=function(t,e,n){var r=t.get("field"),i=this.context.view,a=s.getScaleByField(i,r),o=s.getElementValue(e,r),u=a.getText(o);this.setItemsState(t,u,n)},e.prototype.setStateEnable=function(t){var e=this,n=s.getCurrentElement(this.context);if(n){var r=this.getAllowComponents();i.each(r,(function(r){e.setStateByElement(r,n,t)}))}else{var a=s.getDelegationObject(this.context);if(s.isList(a)){var o=a.item,u=a.component;this.allowSetStateByElement(u)&&this.allowSetStateByItem(o,u)&&this.setItemState(u,o,t)}}},e.prototype.setItemsState=function(t,e,n){var r=this,a=t.getItems();i.each(a,(function(i){i.name===e&&r.setItemState(t,i,n)}))},e.prototype.setItemState=function(t,e,n){t.setItemState(e,this.stateName,n)},e.prototype.setState=function(){this.setStateEnable(!0)},e.prototype.reset=function(){this.setStateEnable(!1)},e.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var e=t.list,n=t.item,r=this.hasState(e,n);this.setItemState(e,n,!r)}},e.prototype.clear=function(){var t=this.getTriggerListInfo();t?t.list.clearItemsState(this.stateName):this.clearAllComponentsState()},e}(a.default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(94);e.Chart=r.default;var i=n(66);e.View=i.default,e.registerGeometry=i.registerGeometry;var a=n(74);e.Event=a.default;var o=n(73);e.registerComponentController=o.registerComponentController},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=function(t){function e(e){var n=t.call(this)||this;n.destroyed=!1;var r=e.visible,i=void 0===r||r;return n.visible=i,n}return r.__extends(e,t),e.prototype.show=function(){this.visible||(this.visible=!0,this.changeVisible(!0))},e.prototype.hide=function(){this.visible&&(this.visible=!1,this.changeVisible(!1))},e.prototype.destroy=function(){this.off(),this.destroyed=!0},e.prototype.changeVisible=function(t){this.visible!==t&&(this.visible=t)},e}(r.__importDefault(n(59)).default);e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(16);e.Facet=i.Facet;var a={};e.getFacet=function(t){return a[r.lowerCase(t)]},e.registerFacet=function(t,e){a[r.lowerCase(t)]=e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(3),a=n(30);function o(t){var e,n;switch(t){case i.DIRECTION.TOP:e={x:0,y:1},n={x:1,y:1};break;case i.DIRECTION.RIGHT:e={x:1,y:0},n={x:1,y:1};break;case i.DIRECTION.BOTTOM:e={x:0,y:0},n={x:1,y:0};break;case i.DIRECTION.LEFT:e={x:0,y:0},n={x:0,y:1};break;default:e=n={x:0,y:0}}return{start:e,end:n}}function s(t){var e,n;return t.isTransposed?(e={x:0,y:0},n={x:1,y:0}):(e={x:0,y:0},n={x:0,y:1}),{start:e,end:n}}function u(t){var e=t.start,n=t.end;return e.x===n.x}e.getLineAxisRelativeRegion=o,e.getCircleAxisRelativeRegion=s,e.getAxisRegion=function(t,e){var n={start:{x:0,y:0},end:{x:0,y:0}};t.isRect?n=o(e):t.isPolar&&(n=s(t));var r=n.start,i=n.end;return{start:t.convert(r),end:t.convert(i)}},e.getAxisFactor=function(t,e){return t.isRect?t.isTransposed?[i.DIRECTION.RIGHT,i.DIRECTION.BOTTOM].includes(e)?1:-1:[i.DIRECTION.BOTTOM,i.DIRECTION.RIGHT].includes(e)?-1:1:t.isPolar&&t.x.start<0?-1:1},e.isVertical=u,e.getAxisFactorByRegion=function(t,e){var n=t.start,r=t.end;return u(t)?(n.y-r.y)*(e.x-n.x)>0?1:-1:(r.x-n.x)*(n.y-e.y)>0?-1:1},e.getAxisThemeCfg=function(t,e){return r.get(t,["components","axis",e],{})},e.getCircleAxisCenterRadius=function(t){var e=t.startAngle,n=t.endAngle;return{center:t.circleCenter,radius:t.polarRadius,startAngle:e,endAngle:n}},e.getAxisOption=function(t,e){return r.isBoolean(t)?!1!==t&&{}:r.get(t,[e])},e.getAxisDirection=function(t,e){return r.get(t,"position",e)},e.getAxisTitleText=function(t,e){return r.get(e,["title","text"],a.getName(t))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(40);e.default=function(t){return r.default(t,"Function")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={}.toString;e.default=function(t,e){return r.call(t)==="[object "+e+"]"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=function(t){e.ARRAY_TYPE=t},e.toRadian=function(t){return t*i},e.equals=function(t,e){return Math.abs(t-e)<=r*Math.max(1,Math.abs(t),Math.abs(e))};var r=e.EPSILON=1e-6;e.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,e.RANDOM=Math.random;var i=Math.PI/180},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=r.__importDefault(n(111)),o={};function s(t){return o[i.lowerCase(t)]}e.getInteraction=s,e.registerInteraction=function(t,e){o[i.lowerCase(t)]=e},e.createInteraction=function(t,e,n){var r=s(t);if(!r)return null;if(i.isPlainObject(r)){var o=i.mix(i.clone(r),n);return new a.default(e,o)}return new r(e,n)};var u=n(70);e.Interaction=u.default;var c=n(45);e.Action=c.Action,e.registerAction=c.registerAction,e.getActionClass=c.getActionClass},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0);e.isAutoPadding=function(t){return!i.isNumber(t)&&!i.isArray(t)},e.parsePadding=function(t){void 0===t&&(t=0);var e=i.isArray(t)?t:[t];switch(e.length){case 0:e=[0,0,0,0];break;case 1:e=new Array(4).fill(e[0]);break;case 2:e=r.__spreadArrays(e,e);break;case 3:e=r.__spreadArrays(e,[e[1]]);break;default:e=e.slice(0,4)}return e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8);e.Action=r.default;var i=n(69);e.createAction=i.createAction,e.registerAction=i.registerAction,e.getActionClass=i.getActionClass},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={},i={};e.getGeometryLabel=function(t){return r[t.toLowerCase()]},e.registerGeometryLabel=function(t,e){r[t.toLowerCase()]=e},e.getGeometryLabelLayout=function(t){return i[t.toLowerCase()]},e.registerGeometryLabelLayout=function(t,e){i[t.toLowerCase()]=e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(2);e.transform=i.transform,e.translate=function(t,e,n){var i=r.transform(t.getMatrix(),[["t",e,n]]);t.setMatrix(i)},e.rotate=function(t,e){var n=t.attr(),i=n.x,a=n.y,o=r.transform(t.getMatrix(),[["t",-i,-a],["r",e],["t",i,a]]);t.setMatrix(o)},e.getIdentityMatrix=function(){return[1,0,0,0,1,0,0,0,1]},e.zoom=function(t,e){var n=t.getBBox(),i=(n.minX+n.maxX)/2,a=(n.minY+n.maxY)/2;t.applyToMatrix([i,a,1]);var o=r.transform(t.getMatrix(),[["t",-i,-a],["s",e,e],["t",i,a]]);t.setMatrix(o)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(3),o=r.__importDefault(n(14)),s=r.__importDefault(n(76));n(78);var u=n(77),c=function(t){function e(e){var n=t.call(this,e)||this;n.type="path",n.shapeType="line";var r=e.connectNulls,i=void 0!==r&&r;return n.connectNulls=i,n}return r.__extends(e,t),e.prototype.createElements=function(t,e,n){void 0===n&&(n=!1);var r=this,a=r.lastElementsMap,o=r.elementsMap,c=r.elements,l=r.theme,h=r.container,f=this.getElementId(t),p=this.getShapeInfo(t),d=a[f];if(d){var g=d.getModel();u.isModelChange(g,p)&&d.update(p),delete a[f]}else{var v=this.getShapeFactory();(d=new s.default({theme:i.get(l,["geometries",this.shapeType],{}),shapeFactory:v,container:h,offscreenGroup:this.getOffscreenGroup()})).geometry=this,d.draw(p,n)}return c.push(d),o[f]=d,c},e.prototype.getPoints=function(t){return t.map((function(t){return{x:t.x,y:t.y}}))},e.prototype.getShapeInfo=function(t){var e=this.getDrawCfg(t[0]);return r.__assign(r.__assign({},e),{mappingData:t,data:this.getData(t),isStack:!!this.getAdjust("stack"),points:this.getPoints(t),connectNulls:this.connectNulls})},e.prototype.getData=function(t){return t.map((function(t){return t[a.FIELD_ORIGIN]}))},e}(o.default);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0);function i(t){return r.isNil(t)||isNaN(t)}function a(t){if(r.isArray(t))return i(t[1].y);var e=t.y;return r.isArray(e)?i(e[0]):i(e)}e.getPathPoints=function(t,e){if(!t.length)return[];if(e)return[r.filter(t,(function(t){return!a(t)}))];var n=[],i=[];return t.forEach((function(t){a(t)?i.length&&(n.push(i),i=[]):i.push(t)})),i.length&&n.push(i),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0);e.splitPoints=function(t){var e=t.x;return(r.isArray(t.y)?t.y:[t.y]).map((function(t,n){return{x:r.isArray(e)?e[n]:e,y:t}}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(28),a=n(7);e.SHAPES=["circle","square","bowtie","diamond","hexagon","triangle","triangle-down"],e.HOLLOW_SHAPES=["cross","tick","plus","hyphen","line"],e.drawPoints=function(t,e,n,o,s){var u=a.getStyle(e,s,!s,"r"),c=t.parsePoints(e.points);if(c.length>1){for(var l=n.addGroup(),h=0,f=c;h2&&(n.push([i].concat(o.splice(0,2))),s="l",i="m"===i?"l":"L"),"o"===s&&1===o.length&&n.push([i,o[0]]),"r"===s)n.push([i].concat(o));else for(;o.length>=e[s]&&(n.push([i].concat(o.splice(0,e[s]))),e[s]););return t})),n},l=function(t,e){for(var n=[],r=0,i=t.length;i-2*!e>r;r+=2){var a=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?i-4===r?a[3]={x:+t[0],y:+t[1]}:i-2===r&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[i-2],y:+t[i-1]}:i-4===r?a[3]=a[2]:r||(a[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return n},h=function(t,e,n,r,i){var a=[];if(null===i&&null===r&&(r=n),t=+t,e=+e,n=+n,r=+r,null!==i){var o=Math.PI/180,s=t+n*Math.cos(-r*o),u=t+n*Math.cos(-i*o);a=[["M",s,e+n*Math.sin(-r*o)],["A",n,n,0,+(i-r>180),0,u,e+n*Math.sin(-i*o)]]}else a=[["M",t,e],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]];return a},f=function(t){if(!(t=c(t))||!t.length)return[["M",0,0]];var e,n,r=[],i=0,a=0,o=0,s=0,u=0;"M"===t[0][0]&&(o=i=+t[0][1],s=a=+t[0][2],u++,r[0]=["M",i,a]);for(var f=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),p=void 0,d=void 0,g=u,v=t.length;g1&&(n*=_=Math.sqrt(_),r*=_);var w=n*n,C=r*r,O=(a===o?-1:1)*Math.sqrt(Math.abs((w*C-w*M*M-C*b*b)/(w*M*M+C*b*b)));p=O*n*M/r+(t+s)/2,d=O*-r*b/n+(e+u)/2,h=Math.asin(((e-d)/r).toFixed(9)),f=Math.asin(((u-d)/r).toFixed(9)),h=tf&&(h-=2*Math.PI),!o&&f>h&&(f-=2*Math.PI)}var A=f-h;if(Math.abs(A)>v){var P=f,S=s,E=u;f=h+v*(o&&f>h?1:-1),s=p+n*Math.cos(f),u=d+r*Math.sin(f),m=g(s,u,n,r,i,0,o,S,E,[f,P,p,d])}A=f-h;var I=Math.cos(h),T=Math.sin(h),k=Math.cos(f),j=Math.sin(f),L=Math.tan(A/4),B=4/3*n*L,D=4/3*r*L,F=[t,e],R=[t+B*T,e-D*I],N=[s+B*j,u-D*k],Y=[s,u];if(R[0]=2*F[0]-R[0],R[1]=2*F[1]-R[1],c)return[R,N,Y].concat(m);for(var G=[],X=0,V=(m=[R,N,Y].concat(m).join().split(",")).length;X7){t[e].shift();for(var a=t[e];a.length;)s[e]="A",i&&(u[e]="A"),t.splice(e++,0,["C"].concat(a.splice(0,6)));t.splice(e,1),n=Math.max(r.length,i&&i.length||0)}},y=function(t,e,a,o,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",o.x,o.y]),a.bx=0,a.by=0,a.x=t[s][1],a.y=t[s][2],n=Math.max(r.length,i&&i.length||0))};n=Math.max(r.length,i&&i.length||0);for(var m=0;m1?1:u<0?0:u)/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,p=0;p<12;p++){var d=c*l[p]+c,g=x(d,t,n,i,o),v=x(d,e,r,a,s),y=g*g+v*v;f+=h[p]*Math.sqrt(y)}return c*f},M=function(t,e,n,r,i,a,o,s){for(var u,c,l,h,f=[],p=[[],[]],d=0;d<2;++d)if(0===d?(c=6*t-12*n+6*i,u=-3*t+9*n-9*i+3*o,l=3*n-3*t):(c=6*e-12*r+6*a,u=-3*e+9*r-9*a+3*s,l=3*r-3*e),Math.abs(u)<1e-12){if(Math.abs(c)<1e-12)continue;(h=-l/c)>0&&h<1&&f.push(h)}else{var g=c*c-4*l*u,v=Math.sqrt(g);if(!(g<0)){var y=(-c+v)/(2*u);y>0&&y<1&&f.push(y);var m=(-c-v)/(2*u);m>0&&m<1&&f.push(m)}}for(var x,b=f.length,M=b;b--;)x=1-(h=f[b]),p[0][b]=x*x*x*t+3*x*x*h*n+3*x*h*h*i+h*h*h*o,p[1][b]=x*x*x*e+3*x*x*h*r+3*x*h*h*a+h*h*h*s;return p[0][M]=t,p[1][M]=e,p[0][M+1]=o,p[1][M+1]=s,p[0].length=p[1].length=M+2,{min:{x:Math.min.apply(0,p[0]),y:Math.min.apply(0,p[1])},max:{x:Math.max.apply(0,p[0]),y:Math.max.apply(0,p[1])}}},_=function(t,e,n,r,i,a,o,s){if(!(Math.max(t,n)Math.max(i,o)||Math.max(e,r)Math.max(a,s))){var u=(t-n)*(a-s)-(e-r)*(i-o);if(u){var c=((t*r-e*n)*(i-o)-(t-n)*(i*s-a*o))/u,l=((t*r-e*n)*(a-s)-(e-r)*(i*s-a*o))/u,h=+c.toFixed(2),f=+l.toFixed(2);if(!(h<+Math.min(t,n).toFixed(2)||h>+Math.max(t,n).toFixed(2)||h<+Math.min(i,o).toFixed(2)||h>+Math.max(i,o).toFixed(2)||f<+Math.min(e,r).toFixed(2)||f>+Math.max(e,r).toFixed(2)||f<+Math.min(a,s).toFixed(2)||f>+Math.max(a,s).toFixed(2)))return{x:c,y:l}}}},w=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},C=function(t,e,n,r,i){if(i)return[["M",+t+ +i,e],["l",n-2*i,0],["a",i,i,0,0,1,i,i],["l",0,r-2*i],["a",i,i,0,0,1,-i,i],["l",2*i-n,0],["a",i,i,0,0,1,-i,-i],["l",0,2*i-r],["a",i,i,0,0,1,i,-i],["z"]];var a=[["M",t,e],["l",n,0],["l",0,r],["l",-n,0],["z"]];return a.parsePathArray=m,a},O=function(t,e,n,r){return null===t&&(t=e=n=r=0),null===e&&(e=t.y,n=t.width,r=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:r,h:r,x2:t+n,y2:e+r,cx:t+n/2,cy:e+r/2,r1:Math.min(n,r)/2,r2:Math.max(n,r)/2,r0:Math.sqrt(n*n+r*r)/2,path:C(t,e,n,r),vb:[t,e,n,r].join(" ")}},A=function(t,e,n,r,i,o,s,u){Object(a.isArray)(t)||(t=[t,e,n,r,i,o,s,u]);var c=M.apply(null,t);return O(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)},P=function(t,e,n,r,i,a,o,s,u){var c=1-u,l=Math.pow(c,3),h=Math.pow(c,2),f=u*u,p=f*u,d=t+2*u*(n-t)+f*(i-2*n+t),g=e+2*u*(r-e)+f*(a-2*r+e),v=n+2*u*(i-n)+f*(o-2*i+n),y=r+2*u*(a-r)+f*(s-2*a+r);return{x:l*t+3*h*u*n+3*c*u*u*i+p*o,y:l*e+3*h*u*r+3*c*u*u*a+p*s,m:{x:d,y:g},n:{x:v,y:y},start:{x:c*t+u*n,y:c*e+u*r},end:{x:c*i+u*o,y:c*a+u*s},alpha:90-180*Math.atan2(d-v,g-y)/Math.PI}},S=function(t,e,n){if(!function(t,e){return t=O(t),e=O(e),w(e,t.x,t.y)||w(e,t.x2,t.y)||w(e,t.x,t.y2)||w(e,t.x2,t.y2)||w(t,e.x,e.y)||w(t,e.x2,e.y)||w(t,e.x,e.y2)||w(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(A(t),A(e)))return n?0:[];for(var r=~~(b.apply(0,t)/8),i=~~(b.apply(0,e)/8),a=[],o=[],s={},u=n?0:[],c=0;c=0&&x<=1&&M>=0&&M<=1&&(n?u+=1:u.push({x:m.x,y:m.y,t1:x,t2:M}))}}return u},E=function(t,e){return function(t,e,n){var r,i,a,o,s,u,c,l,h,f;t=v(t),e=v(e);for(var p=n?0:[],d=0,g=t.length;d=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e=e.concat(t[t.length-1])}))}(t,e,n));else{var i=[].concat(t);"M"===i[0]&&(i[0]="L");for(var a=0;a<=n-1;a++)r.push(i)}return r},k=function(t,e){if(1===t.length)return t;var n=t.length-1,r=e.length-1,i=n/r,a=[];if(1===t.length&&"M"===t[0][0]){for(var o=0;o=0;u--)o=a[u].index,"add"===a[u].type?t.splice(o,0,[].concat(t[o])):t.splice(o,1)}var h=i-(r=t.length);if(r0)){t[r]=e[r];break}n=D(n,t[r-1],1)}t[r]=["Q"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[r]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(r>0)){t[r]=e[r];break}n=D(n,t[r-1],2)}t[r]=["C"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(n.length<2){if(!(r>0)){t[r]=e[r];break}n=D(n,t[r-1],1)}t[r]=["S"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[r]=e[r]}return t},N=function(){function t(t,e){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}(),Y=n(1),G=n(59),X=n.n(G),V=(n(31),n(39)),q=n.n(V),z=n(23),H=n.n(z),W=n(41),U=n.n(W),Z=(n(15),n(67)),Q=n.n(Z),$=n(24),K=n.n($),J=n(68),tt=n.n(J);function et(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}var nt="undefined"!=typeof window&&void 0!==window.document,rt=function(t){function e(e){var n=t.call(this)||this;n.destroyed=!1;var r=n.getDefaultCfg();return n.cfg=Q()(r,e),n}return Object(Y.__extends)(e,t),e.prototype.getDefaultCfg=function(){return{}},e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){this.cfg[t]=e},e.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},e}(X.a),it=n(2);function at(t,e){var n=[],r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],f=e[0],p=e[1],d=e[2],g=e[3],v=e[4],y=e[5],m=e[6],x=e[7],b=e[8];return n[0]=f*r+p*o+d*c,n[1]=f*i+p*s+d*l,n[2]=f*a+p*u+d*h,n[3]=g*r+v*o+y*c,n[4]=g*i+v*s+y*l,n[5]=g*a+v*u+y*h,n[6]=m*r+x*o+b*c,n[7]=m*i+x*s+b*l,n[8]=m*a+x*u+b*h,n}function ot(t,e){var n=[],r=e[0],i=e[1];return n[0]=t[0]*r+t[3]*i+t[6],n[1]=t[1]*r+t[4]*i+t[7],n}var st=["zIndex","capture","visible","type"],ut=["repeat"];function ct(t,e){var n={},r=e.attrs;for(var i in t)n[i]=r[i];return n}function lt(t,e){var n={},r=e.attr();return Object(a.each)(t,(function(t,e){-1!==ut.indexOf(e)||Object(a.isEqual)(r[e],t)||(n[e]=t)})),n}function ht(t,e){if(e.onFrame)return t;var n=e.startTime,r=e.delay,i=e.duration,o=Object.prototype.hasOwnProperty;return Object(a.each)(t,(function(t){n+rt.delay&&Object(a.each)(e.toAttrs,(function(e,n){o.call(t.toAttrs,n)&&(delete t.toAttrs[n],delete t.fromAttrs[n])}))})),t}var ft=function(t){function e(e){var n=t.call(this,e)||this;n.attrs={};var r=n.getDefaultAttrs();return Object(a.mix)(r,e.attrs),n.attrs=r,n.initAttrs(r),n.initAnimate(),n}return Object(Y.__extends)(e,t),e.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},e.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},e.prototype.onCanvasChange=function(t){},e.prototype.initAttrs=function(t){},e.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},e.prototype.isGroup=function(){return!1},e.prototype.getParent=function(){return this.get("parent")},e.prototype.getCanvas=function(){return this.get("canvas")},e.prototype.attr=function(){for(var t,e=[],n=0;n0?r=ht(r,x):n.addAnimator(this),r.push(x),this.set("animations",r),this.set("_pause",{isPaused:!1})},e.prototype.stopAnimate=function(t){var e=this;void 0===t&&(t=!0);var n=this.get("animations");Object(a.each)(n,(function(n){t&&(n.onFrame?e.attr(n.onFrame(1)):e.attr(n.toAttrs)),n.callback&&n.callback()})),this.set("animating",!1),this.set("animations",[])},e.prototype.pauseAnimate=function(){var t=this.get("timeline"),e=this.get("animations");return Object(a.each)(e,(function(t){t.pauseCallback&&t.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:t.getTime()}),this},e.prototype.resumeAnimate=function(){var t=this.get("timeline").getTime(),e=this.get("animations"),n=this.get("_pause").pauseTime;return Object(a.each)(e,(function(e){e.startTime=e.startTime+(t-n),e._paused=!1,e._pauseTime=null,e.resumeCallback&&e.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",e),this},e.prototype.emitDelegation=function(t,e){for(var n=e.propagationPath,r=this.getEvents(),i=0;i0)}));return o.length>0?(K()(o,(function(t){var e=t.getBBox();i.push(e.minX,e.maxX),a.push(e.minY,e.maxY)})),t=Math.min.apply(null,i),e=Math.max.apply(null,i),n=Math.min.apply(null,a),r=Math.max.apply(null,a)):(t=0,e=0,n=0,r=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:r,width:e-t,height:r-n}},e.prototype.getCanvasBBox=function(){var t=1/0,e=-1/0,n=1/0,r=-1/0,i=[],a=[],o=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));return o.length>0?(K()(o,(function(t){var e=t.getCanvasBBox();i.push(e.minX,e.maxX),a.push(e.minY,e.maxY)})),t=Math.min.apply(null,i),e=Math.max.apply(null,i),n=Math.min.apply(null,a),r=Math.max.apply(null,a)):(t=0,e=0,n=0,r=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:r,width:e-t,height:r-n}},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.children=[],e},e.prototype.onAttrChange=function(e,n,r){if(t.prototype.onAttrChange.call(this,e,n,r),"matrix"===e){var i=this.getTotalMatrix();this._applyChildrenMarix(i)}},e.prototype.applyMatrix=function(e){var n=this.getTotalMatrix();t.prototype.applyMatrix.call(this,e);var r=this.getTotalMatrix();r!==n&&this._applyChildrenMarix(r)},e.prototype._applyChildrenMarix=function(t){var e=this.getChildren();K()(e,(function(e){e.applyMatrix(t)}))},e.prototype.addShape=function(){for(var t=[],e=0;e=0;a--){var o=t[a];if(dt(o)&&(o.isGroup()?i=o.getShape(e,n,r):o.isHit(e,n)&&(i=o)),i)break}return i},e.prototype.add=function(t){var e=this.getCanvas(),n=this.getChildren(),r=this.get("timeline"),i=t.getParent();i&&function(t,e,n){void 0===n&&(n=!0),n?e.destroy():(e.set("parent",null),e.set("canvas",null)),et(t.getChildren(),e)}(i,t,!1),t.set("parent",this),e&&function t(e,n){if(e.set("canvas",n),e.isGroup()){var r=e.get("children");r.length&&r.forEach((function(e){t(e,n)}))}}(t,e),r&&function t(e,n){if(e.set("timeline",n),e.isGroup()){var r=e.get("children");r.length&&r.forEach((function(e){t(e,n)}))}}(t,r),n.push(t),function(t){t.isGroup()?(t.isEntityGroup()||t.get("children").length)&&t.onCanvasChange("add"):t.onCanvasChange("add")}(t),this._applyElementMatrix(t)},e.prototype._applyElementMatrix=function(t){var e=this.getTotalMatrix();e&&t.applyMatrix(e)},e.prototype.getChildren=function(){return this.get("children")},e.prototype.sort=function(){var t,e=this.getChildren();K()(e,(function(t,e){return t._INDEX=e,t})),e.sort((t=function(t,e){return t.get("zIndex")-e.get("zIndex")},function(e,n){var r=t(e,n);return 0===r?e._INDEX-n._INDEX:r})),this.onCanvasChange("sort")},e.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),e=t.length-1;e>=0;e--)t[e].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},e.prototype.destroy=function(){this.get("destroyed")||(this.clear(),t.prototype.destroy.call(this))},e.prototype.getFirst=function(){return this.getChildByIndex(0)},e.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},e.prototype.getChildByIndex=function(t){return this.getChildren()[t]},e.prototype.getCount=function(){return this.getChildren().length},e.prototype.contain=function(t){return this.getChildren().indexOf(t)>-1},e.prototype.removeChild=function(t,e){void 0===e&&(e=!0),this.contain(t)&&t.remove(e)},e.prototype.findAll=function(t){var e=[],n=this.getChildren();return K()(n,(function(n){t(n)&&e.push(n),n.isGroup()&&(e=e.concat(n.findAll(t)))})),e},e.prototype.find=function(t){var e=null,n=this.getChildren();return K()(n,(function(n){if(t(n)?e=n:n.isGroup()&&(e=n.find(t)),e)return!1})),e},e.prototype.findById=function(t){return this.find((function(e){return e.get("id")===t}))},e.prototype.findByClassName=function(t){return this.find((function(e){return e.get("className")===t}))},e.prototype.findAllByName=function(t){return this.findAll((function(e){return e.get("name")===t}))},e}(ft),mt=0,xt=0,bt=0,Mt=0,_t=0,wt=0,Ct="object"==typeof performance&&performance.now?performance:Date,Ot="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function At(){return _t||(Ot(Pt),_t=Ct.now()+wt)}function Pt(){_t=0}function St(){this._call=this._time=this._next=null}function Et(t,e,n){var r=new St;return r.restart(t,e,n),r}function It(){_t=(Mt=Ct.now())+wt,mt=xt=0;try{!function(){At(),++mt;for(var t,e=gt;e;)(t=_t-e._time)>=0&&e._call.call(null,t),e=e._next;--mt}()}finally{mt=0,function(){var t,e,n=gt,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:gt=e);vt=t,kt(r)}(),_t=0}}function Tt(){var t=Ct.now(),e=t-Mt;e>1e3&&(wt-=e,Mt=t)}function kt(t){mt||(xt&&(xt=clearTimeout(xt)),t-_t>24?(t<1/0&&(xt=setTimeout(It,t-Ct.now()-wt)),bt&&(bt=clearInterval(bt))):(bt||(Mt=Ct.now(),bt=setInterval(Tt,1e3)),mt=1,Ot(It)))}function jt(t){return+t}function Lt(t){return t*t}function Bt(t){return t*(2-t)}function Dt(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function Ft(t){return t*t*t}function Rt(t){return--t*t*t+1}function Nt(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}St.prototype=Et.prototype={constructor:St,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?At():+n)+(null==e?0:+e),this._next||vt===this||(vt?vt._next=this:gt=this,vt=this),this._call=t,this._time=n,kt()},stop:function(){this._call&&(this._call=null,this._time=1/0,kt())}};var Yt=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),Gt=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),Xt=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),Vt=Math.PI,qt=Vt/2;function zt(t){return 1-Math.cos(t*qt)}function Ht(t){return Math.sin(t*qt)}function Wt(t){return(1-Math.cos(Vt*t))/2}function Ut(t){return Math.pow(2,10*t-10)}function Zt(t){return 1-Math.pow(2,-10*t)}function Qt(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function $t(t){return 1-Math.sqrt(1-t*t)}function Kt(t){return Math.sqrt(1- --t*t)}function Jt(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var te=7.5625;function ee(t){return 1-ne(1-t)}function ne(t){return(t=+t)<4/11?te*t*t:t<8/11?te*(t-=6/11)*t+3/4:t<10/11?te*(t-=9/11)*t+15/16:te*(t-=21/22)*t+63/64}function re(t){return((t*=2)<=1?1-ne(1-t):ne(t-1)+1)/2}var ie=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),ae=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),oe=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),se=2*Math.PI,ue=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=se);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*se)},i.period=function(n){return t(e,n)},i}(1,.3),ce=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=se);function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*se)},i.period=function(n){return t(e,n)},i}(1,.3),le=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=se);function i(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*se)},i.period=function(n){return t(e,n)},i}(1,.3),he=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function fe(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function pe(){}var de="\\s*([+-]?\\d+)\\s*",ge="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ve="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ye=/^#([0-9a-f]{3,8})$/,me=new RegExp("^rgb\\("+[de,de,de]+"\\)$"),xe=new RegExp("^rgb\\("+[ve,ve,ve]+"\\)$"),be=new RegExp("^rgba\\("+[de,de,de,ge]+"\\)$"),Me=new RegExp("^rgba\\("+[ve,ve,ve,ge]+"\\)$"),_e=new RegExp("^hsl\\("+[ge,ve,ve]+"\\)$"),we=new RegExp("^hsla\\("+[ge,ve,ve,ge]+"\\)$"),Ce={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Oe(){return this.rgb().formatHex()}function Ae(){return this.rgb().formatRgb()}function Pe(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ye.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Se(e):3===n?new ke(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new ke(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new ke(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=me.exec(t))?new ke(e[1],e[2],e[3],1):(e=xe.exec(t))?new ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=be.exec(t))?Ee(e[1],e[2],e[3],e[4]):(e=Me.exec(t))?Ee(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=_e.exec(t))?De(e[1],e[2]/100,e[3]/100,1):(e=we.exec(t))?De(e[1],e[2]/100,e[3]/100,e[4]):Ce.hasOwnProperty(t)?Se(Ce[t]):"transparent"===t?new ke(NaN,NaN,NaN,0):null}function Se(t){return new ke(t>>16&255,t>>8&255,255&t,1)}function Ee(t,e,n,r){return r<=0&&(t=e=n=NaN),new ke(t,e,n,r)}function Ie(t){return t instanceof pe||(t=Pe(t)),t?new ke((t=t.rgb()).r,t.g,t.b,t.opacity):new ke}function Te(t,e,n,r){return 1===arguments.length?Ie(t):new ke(t,e,n,null==r?1:r)}function ke(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function je(){return"#"+Be(this.r)+Be(this.g)+Be(this.b)}function Le(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Be(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function De(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Re(t,e,n,r)}function Fe(t){if(t instanceof Re)return new Re(t.h,t.s,t.l,t.opacity);if(t instanceof pe||(t=Pe(t)),!t)return new Re;if(t instanceof Re)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n0&&u<1?0:o,new Re(o,s,u,t.opacity)}function Re(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ne(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Ye(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}he(pe,Pe,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Oe,formatHex:Oe,formatHsl:function(){return Fe(this).formatHsl()},formatRgb:Ae,toString:Ae}),he(ke,Te,fe(pe,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ke(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ke(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:je,formatHex:je,formatRgb:Le,toString:Le})),he(Re,(function(t,e,n,r){return 1===arguments.length?Fe(t):new Re(t,e,n,null==r?1:r)}),fe(pe,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Re(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Re(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ke(Ne(t>=240?t-240:t+120,i,r),Ne(t,i,r),Ne(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Ge=function(t){return function(){return t}};function Xe(t,e){return function(n){return t+n*e}}function Ve(t){return 1==(t=+t)?qe:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Ge(isNaN(e)?n:e)}}function qe(t,e){var n=e-t;return n?Xe(t,n):Ge(isNaN(t)?e:t)}var ze=function t(e){var n=Ve(e);function r(t,e){var r=n((t=Te(t)).r,(e=Te(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=qe(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function He(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=ra&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,u.push({i:o,x:$e(n,r)})),a=tn.lastIndex;return ad.length?(p=c(o[f]),d=c(i[f]),d=B(d,p),d=R(d,p),e.fromAttrs.path=d,e.toAttrs.path=p):e.pathFormatted||(p=c(o[f]),d=c(i[f]),d=R(d,p),e.fromAttrs.path=d,e.toAttrs.path=p,e.pathFormatted=!0),r[f]=[];for(var g=0;g0){for(var a=r.animators.length-1;a>=0;a--)if((t=r.animators[a]).destroyed)r.removeAnimator(a);else{if(!t.isAnimatePaused())for(var o=(e=t.get("animations")).length-1;o>=0;o--)n=e[o],an(t,n,i)&&(e.splice(o,1),!1,n.callback&&n.callback());0===e.length&&r.removeAnimator(a)}r.canvas.get("autoDraw")||r.canvas.draw()}}))},t.prototype.addAnimator=function(t){this.animators.push(t)},t.prototype.removeAnimator=function(t){this.animators.splice(t,1)},t.prototype.isAnimating=function(){return!!this.animators.length},t.prototype.stop=function(){this.timer&&this.timer.stop()},t.prototype.stopAllAnimations=function(t){void 0===t&&(t=!0),this.animators.forEach((function(e){e.stopAnimate(t)})),this.animators=[],this.canvas.draw()},t.prototype.getTime=function(){return this.current},t}(),sn=function(t){function e(e){var n=t.call(this,e)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}return Object(Y.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.cursor="default",e},e.prototype.initContainer=function(){var t=this.get("container");H()(t)&&(t=document.getElementById(t),this.set("container",t))},e.prototype.initDom=function(){var t=this.createDom();this.set("el",t),this.get("container").appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},e.prototype.initEvents=function(){},e.prototype.initTimeline=function(){var t=new on(this);this.set("timeline",t)},e.prototype.setDOMSize=function(t,e){var n=this.get("el");nt&&(n.style.width=t+"px",n.style.height=e+"px")},e.prototype.changeSize=function(t,e){this.setDOMSize(t,e),this.set("width",t),this.set("height",e),this.onCanvasChange("changeSize")},e.prototype.getRenderer=function(){return this.get("renderer")},e.prototype.getCursor=function(){return this.get("cursor")},e.prototype.setCursor=function(t){this.set("cursor",t);var e=this.get("el");nt&&e&&(e.style.cursor=t)},e.prototype.getPointByClient=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t-n.left,y:e-n.top}},e.prototype.getClientByPoint=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t+n.left,y:e+n.top}},e.prototype.draw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},e.prototype.clearEvents=function(){},e.prototype.isCanvas=function(){return!0},e.prototype.getParent=function(){return null},e.prototype.destroy=function(){var e=this.get("timeline");this.get("destroyed")||(this.clear(),e&&e.stop(),this.clearEvents(),this.removeDom(),t.prototype.destroy.call(this))},e}(yt),un=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(Y.__extends)(e,t),e.prototype.isGroup=function(){return!0},e.prototype.isEntityGroup=function(){return!1},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=this.getChildren(),r=0;r=t&&n.minY<=e&&n.maxY>=e},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e),this.clearCacheBBox()},e.prototype.getBBox=function(){var t=this.get("bbox");return t||(t=this.calculateBBox(),this.set("bbox",t)),t},e.prototype.getCanvasBBox=function(){var t=this.get("canvasBox");return t||(t=this.calculateCanvasBBox(),this.set("canvasBox",t)),t},e.prototype.applyMatrix=function(e){t.prototype.applyMatrix.call(this,e),this.set("canvasBox",null)},e.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),e=this.getTotalMatrix(),n=t.minX,r=t.minY,i=t.maxX,a=t.maxY;if(e){var o=ot(e,[t.minX,t.minY]),s=ot(e,[t.maxX,t.minY]),u=ot(e,[t.minX,t.maxY]),c=ot(e,[t.maxX,t.maxY]);n=Math.min(o[0],s[0],u[0],c[0]),i=Math.max(o[0],s[0],u[0],c[0]),r=Math.min(o[1],s[1],u[1],c[1]),a=Math.max(o[1],s[1],u[1],c[1])}var l=this.attrs;if(l.shadowColor){var h=l.shadowBlur,f=void 0===h?0:h,p=l.shadowOffsetX,d=void 0===p?0:p,g=l.shadowOffsetY,v=void 0===g?0:g,y=n-f+d,m=i+f+d,x=r-f+v,b=a+f+v;n=Math.min(n,y),i=Math.max(i,m),r=Math.min(r,x),a=Math.max(a,b)}return{x:n,y:r,minX:n,minY:r,maxX:i,maxY:a,width:i-n,height:a-r}},e.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBox",null)},e.prototype.isClipShape=function(){return this.get("isClipShape")},e.prototype.isInShape=function(t,e){return!1},e.prototype.isOnlyHitBox=function(){return!1},e.prototype.isHit=function(t,e){var n=this.get("startArrowShape"),r=this.get("endArrowShape"),i=[t,e,1],a=(i=this.invertFromMatrix(i))[0],o=i[1],s=this._isInBBox(a,o);if(this.isOnlyHitBox())return s;if(s&&!this.isClipped(a,o)){if(this.isInShape(a,o))return!0;if(n&&n.isHit(a,o))return!0;if(r&&r.isHit(a,o))return!0}return!1},e}(ft),ln=n(98).version},function(t,e,n){"use strict";n.r(e),n.d(e,"parsePath",(function(){return h})),n.d(e,"catmullRom2Bezier",(function(){return f})),n.d(e,"fillPath",(function(){return g})),n.d(e,"fillPathByDiff",(function(){return x})),n.d(e,"formatPath",(function(){return _})),n.d(e,"pathIntersection",(function(){return z})),n.d(e,"parsePathArray",(function(){return W})),n.d(e,"parsePathString",(function(){return S})),n.d(e,"path2Curve",(function(){return B})),n.d(e,"path2Absolute",(function(){return T})),n.d(e,"reactPath",(function(){return C})),n.d(e,"getArcParams",(function(){return nt})),n.d(e,"path2Segments",(function(){return it})),n.d(e,"getLineIntersect",(function(){return ot})),n.d(e,"isPolygonsIntersect",(function(){return ft})),n.d(e,"isPointInPolygon",(function(){return ct}));var r=n(24),i=n.n(r),a=n(15),o=n.n(a),s=n(23),u=n.n(s),c=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,l=/[^\s\,]+/gi;var h=function(t){var e=t||[];return o()(e)?e:u()(e)?(e=e.match(c),i()(e,(function(t,n){if((t=t.match(l))[0].length>1){var r=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=r}i()(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0};function f(t,e){for(var n=[],r=0,i=t.length;i-2*!e>r;r+=2){var a=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?i-4===r?a[3]={x:+t[0],y:+t[1]}:i-2===r&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[i-2],y:+t[i-1]}:i-4===r?a[3]=a[2]:r||(a[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return n}function p(t,e){var n=[],r=[];return t.length&&function t(e,i){if(1===e.length)n.push(e[0]),r.push(e[0]);else{for(var a=[],o=0;o=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e=e.concat(t[t.length-1])}))}(t,e,n));else{var i=[].concat(t);"M"===i[0]&&(i[0]="L");for(var a=0;a<=n-1;a++)r.push(i)}return r}function g(t,e){if(1===t.length)return t;var n=t.length-1,r=e.length-1,i=n/r,a=[];if(1===t.length&&"M"===t[0][0]){for(var o=0;o=0;u--)o=a[u].index,"add"===a[u].type?t.splice(o,0,[].concat(t[o])):t.splice(o,1)}if((r=t.length)0)){t[r]=e[r];break}n=M(n,t[r-1],1)}t[r]=["Q"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[r]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(r>0)){t[r]=e[r];break}n=M(n,t[r-1],2)}t[r]=["C"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(n.length<2){if(!(r>0)){t[r]=e[r];break}n=M(n,t[r-1],1)}t[r]=["S"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[r]=e[r]}return t}var w=n(0);function C(t,e,n,r,i){return i?[["M",+t+ +i,e],["l",n-2*i,0],["a",i,i,0,0,1,i,i],["l",0,r-2*i],["a",i,i,0,0,1,-i,i],["l",2*i-n,0],["a",i,i,0,0,1,-i,-i],["l",0,2*i-r],["a",i,i,0,0,1,i,-i],["z"]]:[["M",t,e],["l",n,0],["l",0,r],["l",-n,0],["z"]]}var O="\t\n\v\f\r   ᠎              \u2028\u2029",A=new RegExp("([a-z])["+O+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+O+"]*,?["+O+"]*)+)","ig"),P=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+O+"]*,?["+O+"]*","ig");function S(t){if(!t)return null;if(o()(t))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(t).replace(A,(function(t,r,i){var a=[],o=r.toLowerCase();if(i.replace(P,(function(t,e){e&&a.push(+e)})),"m"===o&&a.length>2&&(n.push([r].concat(a.splice(0,2))),o="l",r="m"===r?"l":"L"),"o"===o&&1===a.length&&n.push([r,a[0]]),"r"===o)n.push([r].concat(a));else for(;a.length>=e[o]&&(n.push([r].concat(a.splice(0,e[o]))),e[o]););return""})),n}var E=/[a-z]/;function I(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function T(t){var e=S(t);if(!e||!e.length)return[["M",0,0]];for(var n=!1,r=0;r=0){n=!0;break}}if(!n)return e;var a=[],o=0,s=0,u=0,c=0,l=0,h=e[0];"M"!==h[0]&&"m"!==h[0]||(u=o=+h[1],c=s=+h[2],l++,a[0]=["M",o,s]);r=l;for(var f=e.length;r1&&(n*=M=Math.sqrt(M),r*=M);var _=n*n,w=r*r,C=(a===o?-1:1)*Math.sqrt(Math.abs((_*w-_*b*b-w*x*x)/(_*b*b+w*x*x)));p=C*n*b/r+(t+s)/2,d=C*-r*x/n+(e+u)/2,h=Math.asin(Number(((e-d)/r).toFixed(9))),f=Math.asin(Number(((u-d)/r).toFixed(9))),h=tf&&(h-=2*Math.PI),!o&&f>h&&(f-=2*Math.PI)}var O=f-h;if(Math.abs(O)>g){var A=f,P=s,S=u;f=h+g*(o&&f>h?1:-1),s=p+n*Math.cos(f),u=d+r*Math.sin(f),y=k(s,u,n,r,i,0,o,P,S,[f,A,p,d])}O=f-h;var E=Math.cos(h),I=Math.sin(h),T=Math.cos(f),j=Math.sin(f),L=Math.tan(O/4),B=4/3*n*L,D=4/3*r*L,F=[t,e],R=[t+B*I,e-D*E],N=[s+B*j,u-D*T],Y=[s,u];if(R[0]=2*F[0]-R[0],R[1]=2*F[1]-R[1],c)return[R,N,Y].concat(y);for(var G=[],X=0,V=(y=[R,N,Y].concat(y).join().split(",")).length;X7){t[e].shift();for(var a=t[e];a.length;)s[e]="A",i&&(u[e]="A"),t.splice(e++,0,["C"].concat(a.splice(0,6)));t.splice(e,1),n=Math.max(r.length,i&&i.length||0)}},p=function(t,e,a,o,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",o.x,o.y]),a.bx=0,a.by=0,a.x=t[s][1],a.y=t[s][2],n=Math.max(r.length,i&&i.length||0))};n=Math.max(r.length,i&&i.length||0);for(var d=0;d1?1:u<0?0:u)/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,p=0;p<12;p++){var d=c*l[p]+c,g=D(d,t,n,i,o),v=D(d,e,r,a,s),y=g*g+v*v;f+=h[p]*Math.sqrt(y)}return c*f},R=function(t,e,n,r,i,a,o,s){for(var u,c,l,h,f=[],p=[[],[]],d=0;d<2;++d)if(0===d?(c=6*t-12*n+6*i,u=-3*t+9*n-9*i+3*o,l=3*n-3*t):(c=6*e-12*r+6*a,u=-3*e+9*r-9*a+3*s,l=3*r-3*e),Math.abs(u)<1e-12){if(Math.abs(c)<1e-12)continue;(h=-l/c)>0&&h<1&&f.push(h)}else{var g=c*c-4*l*u,v=Math.sqrt(g);if(!(g<0)){var y=(-c+v)/(2*u);y>0&&y<1&&f.push(y);var m=(-c-v)/(2*u);m>0&&m<1&&f.push(m)}}for(var x,b=f.length,M=b;b--;)x=1-(h=f[b]),p[0][b]=x*x*x*t+3*x*x*h*n+3*x*h*h*i+h*h*h*o,p[1][b]=x*x*x*e+3*x*x*h*r+3*x*h*h*a+h*h*h*s;return p[0][M]=t,p[1][M]=e,p[0][M+1]=o,p[1][M+1]=s,p[0].length=p[1].length=M+2,{min:{x:Math.min.apply(0,p[0]),y:Math.min.apply(0,p[1])},max:{x:Math.max.apply(0,p[0]),y:Math.max.apply(0,p[1])}}},N=function(t,e,n,r,i,a,o,s){if(!(Math.max(t,n)Math.max(i,o)||Math.max(e,r)Math.max(a,s))){var u=(t-n)*(a-s)-(e-r)*(i-o);if(u){var c=((t*r-e*n)*(i-o)-(t-n)*(i*s-a*o))/u,l=((t*r-e*n)*(a-s)-(e-r)*(i*s-a*o))/u,h=+c.toFixed(2),f=+l.toFixed(2);if(!(h<+Math.min(t,n).toFixed(2)||h>+Math.max(t,n).toFixed(2)||h<+Math.min(i,o).toFixed(2)||h>+Math.max(i,o).toFixed(2)||f<+Math.min(e,r).toFixed(2)||f>+Math.max(e,r).toFixed(2)||f<+Math.min(a,s).toFixed(2)||f>+Math.max(a,s).toFixed(2)))return{x:c,y:l}}}},Y=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},G=function(t,e,n,r){return null===t&&(t=e=n=r=0),null===e&&(e=t.y,n=t.width,r=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:r,h:r,x2:t+n,y2:e+r,cx:t+n/2,cy:e+r/2,r1:Math.min(n,r)/2,r2:Math.max(n,r)/2,r0:Math.sqrt(n*n+r*r)/2,path:C(t,e,n,r),vb:[t,e,n,r].join(" ")}},X=function(t,e,n,r,i,a,o,s){Object(w.isArray)(t)||(t=[t,e,n,r,i,a,o,s]);var u=R.apply(null,t);return G(u.min.x,u.min.y,u.max.x-u.min.x,u.max.y-u.min.y)},V=function(t,e,n,r,i,a,o,s,u){var c=1-u,l=Math.pow(c,3),h=Math.pow(c,2),f=u*u,p=f*u,d=t+2*u*(n-t)+f*(i-2*n+t),g=e+2*u*(r-e)+f*(a-2*r+e),v=n+2*u*(i-n)+f*(o-2*i+n),y=r+2*u*(a-r)+f*(s-2*a+r);return{x:l*t+3*h*u*n+3*c*u*u*i+p*o,y:l*e+3*h*u*r+3*c*u*u*a+p*s,m:{x:d,y:g},n:{x:v,y:y},start:{x:c*t+u*n,y:c*e+u*r},end:{x:c*i+u*o,y:c*a+u*s},alpha:90-180*Math.atan2(d-v,g-y)/Math.PI}},q=function(t,e,n){if(!function(t,e){return t=G(t),e=G(e),Y(e,t.x,t.y)||Y(e,t.x2,t.y)||Y(e,t.x,t.y2)||Y(e,t.x2,t.y2)||Y(t,e.x,e.y)||Y(t,e.x2,e.y)||Y(t,e.x,e.y2)||Y(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(X(t),X(e)))return n?0:[];for(var r=~~(F.apply(0,t)/8),i=~~(F.apply(0,e)/8),a=[],o=[],s={},u=n?0:[],c=0;c=0&&x<=1&&b>=0&&b<=1&&(n?u++:u.push({x:m.x,y:m.y,t1:x,t2:b}))}}return u};function z(t,e){return function(t,e,n){var r,i,a,o,s,u,c,l,h,f;t=B(t),e=B(e);for(var p=n?0:[],d=0,g=t.length;d1&&(n*=Math.sqrt(p),r*=Math.sqrt(p));var d=n*n*(f*f)+r*r*(h*h),g=d?Math.sqrt((n*n*(r*r)-d)/d):1;a===o&&(g*=-1),isNaN(g)&&(g=0);var v=r?g*n*f/r:0,y=n?g*-r*h/n:0,m=(s+c)/2+Math.cos(i)*v-Math.sin(i)*y,x=(u+l)/2+Math.sin(i)*v+Math.cos(i)*y,b=[(h-v)/n,(f-y)/r],M=[(-1*h-v)/n,(-1*f-y)/r],_=tt([1,0],b),w=tt(b,M);return J(b,M)<=-1&&(w=Math.PI),J(b,M)>=1&&(w=0),0===o&&w>0&&(w-=2*Math.PI),1===o&&w<0&&(w+=2*Math.PI),{cx:m,cy:x,rx:et(t,[c,l])?0:n,ry:et(t,[c,l])?0:r,startAngle:_,endAngle:_+w,xRotation:i,arcFlag:a,sweepFlag:o}}function rt(t,e){return{x:e.x+(e.x-t.x),y:e.y+(e.y-t.y)}}function it(t){for(var e=[],n=null,r=null,i=null,a=0,o=(t=h(t)).length,s=0;s=e&&t<=n};function ot(t,e,n,r){var i=n.x-t.x,a=n.y-t.y,o=e.x-t.x,s=e.y-t.y,u=r.x-n.x,c=r.y-n.y,l=o*c-s*u,h=null;if(l*l>.001*(o*o+s*s)*(u*u+c*c)){var f=(i*c-a*u)/l,p=(i*s-a*o)/l;at(f,0,1)&&at(p,0,1)&&(h={x:t.x+f*o,y:t.y+f*s})}return h}function st(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function ut(t,e,n){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])&&Math.min(t[0],e[0])<=n[0]&&n[0]<=Math.max(t[0],e[0])&&Math.min(t[1],e[1])<=n[1]&&n[1]<=Math.max(t[1],e[1])}function ct(t,e,n){var r=!1,i=t.length;if(i<=2)return!1;for(var a=0;a0!=st(s[1]-n)>0&&st(e-(n-o[1])*(o[0]-s[0])/(o[1]-s[1])-o[0])<0&&(r=!r)}return r}function lt(t){for(var e=[],n=t.length,r=0;r1){var o=t[0],s=t[n-1];e.push({from:{x:s[0],y:s[1]},to:{x:o[0],y:o[1]}})}return e}function ht(t){var e=t.map((function(t){return t[0]})),n=t.map((function(t){return t[1]}));return{minX:Math.min.apply(null,e),maxX:Math.max.apply(null,e),minY:Math.min.apply(null,n),maxY:Math.max.apply(null,n)}}function ft(t,e){if(t.length<2||e.length<2)return!1;var n,r,i=ht(t),a=ht(e);if(n=i,(r=a).minX>n.maxX||r.maxXn.maxY||r.maxY=c}))||t[t.length-1]}var c=i.memoize((function(t){if(t.isCategory)return 1;var e=t.values,n=t.translate(e[0]),r=n;i.each(e,(function(e){var i=t.translate(e);ir&&(r=i)}));var a=e.length;return(r-n)/(a-1)}));function l(t){var e,n=function(t){var e=i.values(t.attributes);return i.filter(e,(function(t){return i.contains(a.GROUP_ATTRS,t.type)}))}(t);i.each(n,(function(t){var n=t.getScale(t.type);if(n&&n.isLinear)return e=n,!1}));var r=t.getXScale(),o=t.getYScale();return e||o||r}e.findDataByPoint=function(t,e,n){if(0===e.length)return null;var r=n.type,o=n.getXScale(),l=n.getYScale(),h=o.field,f=l.field,p=null;if("heatmap"===r||"point"===r){var d=n.coordinate.invert(t),g=o.invert(d.x),v=l.invert(d.y),y=1/0;return i.each(e,(function(t){var e=t[a.FIELD_ORIGIN],n=Math.pow(e[h]-g,2)+Math.pow(e[f]-v,2);n(1+a)/2&&(s=o),r.translate(r.invert(s))}(t,n),M=m[a.FIELD_ORIGIN][h],_=m[a.FIELD_ORIGIN][f],w=x[a.FIELD_ORIGIN][h],C=l.isLinear&&i.isArray(_);if(i.isArray(M))i.each(e,(function(t){var e=t[a.FIELD_ORIGIN];if(o.translate(e[h][0])<=b&&o.translate(e[h][1])>=b){if(!C)return p=t,!1;i.isArray(p)||(p=[]),p.push(t)}})),i.isArray(p)&&(p=u(p,t,n));else{var O;if(o.isLinear||"timeCat"===o.type){if(b>o.translate(w)||bMath.abs(o.translate(O[a.FIELD_ORIGIN][h])-b)&&(x=O)}var I=c(n.getXScale());return!p&&Math.abs(o.translate(x[a.FIELD_ORIGIN][h])-b)<=I/2&&(p=x),p},e.getTooltipItems=function(t,e,n){void 0===n&&(n="");var s,u,c=t[a.FIELD_ORIGIN],h=function(t,e,n){var r=n;n||(r=e.getAttribute("position").getFields()[0]);var a=e.scales;return a[r]?a[r].getText(t[r]):i.hasKey(t,r)?t[r]:r}(c,e,n),f=e.tooltipOption,p=e.theme.defaultColor,d=[];function g(e,n){if(!i.isNil(n)&&""!==n){var r={title:h,data:c,mappingData:t,name:e||h,value:n,color:t.color||p,marker:!0};d.push(r)}}if(i.isObject(f)){var v=f.fields,y=f.callback;if(y){var m=v.map((function(e){return t[a.FIELD_ORIGIN][e]})),x=y.apply(void 0,m),b=r.__assign({data:t[a.FIELD_ORIGIN],mappingData:t,title:h,color:t.color||p,marker:!0},x);d.push(b)}else{var M=e.scales;i.each(v,(function(t){if(!i.isNil(c[t])){var e=M[t];s=o.getName(e),u=e.getText(c[t]),g(s,u)}}))}}else{var _=l(e);i.isNil(c[_.field])||(u=function(t,e){var n=t[e.field];return i.isArray(n)?n.map((function(t){return e.getText(t)})).join("-"):e.getText(n)}(c,_),g(s=function(t,e){var n,r=e.getGroupScales();if(r.length&&i.each(r,(function(t){return n=t,!1})),n){var a=n.field;return n.getText(t[a])}var s=l(e);return o.getName(s)}(c,e),u))}return d}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={};e.registerComponentController=function(t,e){r[t]=e},e.unregisterComponentController=function(t){delete r[t]},e.getComponentControllerNames=function(){return Object.keys(r)},e.getComponentController=function(t){return r[t]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e,n){this.view=t,this.gEvent=e,this.data=n,this.type=e.type}return Object.defineProperty(t.prototype,"target",{get:function(){return this.gEvent.target},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"event",{get:function(){return this.gEvent.originalEvent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.gEvent.x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.gEvent.y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clientX",{get:function(){return this.gEvent.clientX},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clientY",{get:function(){return this.gEvent.clientY},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.clone=function(){return new t(this.view,this.gEvent,this.data)},t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={};e.getAnimation=function(t){return r[t.toLowerCase()]},e.registerAnimation=function(t,e){r[t.toLowerCase()]=e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(18),o=r.__importDefault(n(36)),s=n(10),u=n(126),c=function(t){function e(e){var n=t.call(this,e)||this;n.states=[];var r=e.shapeFactory,i=e.theme,a=e.container,o=e.offscreenGroup,s=e.visible,u=void 0===s||s;return n.shapeFactory=r,n.theme=i,n.container=a,n.offscreenGroup=o,n.visible=u,n}return r.__extends(e,t),e.prototype.draw=function(t,e){void 0===e&&(e=!1),this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.drawShape(t,e),!1===this.visible&&this.changeVisible(!1)},e.prototype.update=function(t){var e=this.shapeFactory,n=this.shape;if(n){this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t);var r=this.getShapeDrawCfg(t);this.setShapeInfo(n,r);var i=this.getOffscreenGroup(),a=e.drawShape(this.shapeType,r,i);a.set("data",this.data),a.set("origin",r),this.syncShapeStyle(n,a,"",this.getAnimateCfg("update"))}},e.prototype.destroy=function(){var e=this.shapeFactory,n=this.shape;if(n){var i=this.getAnimateCfg("leave");i?a.doAnimate(n,i,{coordinate:e.coordinate,toAttrs:r.__assign({},n.attr())}):n.remove(!0)}this.states=[],t.prototype.destroy.call(this)},e.prototype.changeVisible=function(e){t.prototype.changeVisible.call(this,e),e?(this.shape&&this.shape.show(),this.labelShape&&this.labelShape.forEach((function(t){t.show()}))):(this.shape&&this.shape.hide(),this.labelShape&&this.labelShape.forEach((function(t){t.hide()})))},e.prototype.setState=function(t,e){var n=this,r=this,i=r.states,a=r.shapeFactory,o=r.model,s=r.shape,c=r.shapeType,l=i.indexOf(t);if(e){if(l>-1)return;i.push(t),"active"!==t&&"selected"!==t||s.toFront()}else{if(-1===l)return;i.splice(l,1),"active"!==t&&"selected"!==t||s.toBack()}var h=this.getShapeDrawCfg(o),f=a.drawShape(c,h,this.getOffscreenGroup());i.length?i.forEach((function(t){n.syncShapeStyle(s,f,t,null)})):this.syncShapeStyle(s,f,"",null),f.remove(!0);var p={state:t,stateStatus:e,element:this,target:this.container};this.container.emit("statechange",p),u.propagationDelegate(this.container,"statechange",p)},e.prototype.clearStates=function(){var t=this,e=this.states;i.each(e,(function(e){t.setState(e,!1)})),this.states=[]},e.prototype.hasState=function(t){return this.states.includes(t)},e.prototype.getStates=function(){return this.states},e.prototype.getData=function(){return this.data},e.prototype.getModel=function(){return this.model},e.prototype.getBBox=function(){var t=this.shape,e=this.labelShape,n={x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0};return t&&(n=t.getCanvasBBox()),e&&e.forEach((function(t){var e=t.getCanvasBBox();n.x=Math.min(e.x,n.x),n.y=Math.min(e.y,n.y),n.minX=Math.min(e.minX,n.minX),n.minY=Math.min(e.minY,n.minY),n.maxX=Math.max(e.maxX,n.maxX),n.maxY=Math.max(e.maxY,n.maxY)})),n.width=n.maxX-n.minX,n.height=n.maxY-n.minY,n},e.prototype.getStateStyle=function(t,e){var n=this.theme,r=this.shapeFactory,a=this.shapeType;n[a]||(a=r.defaultShapeType);var o=i.get(this.geometry.stateOption,t,{}),s=i.deepMix({},i.get(n,[a,t],{}),o),u=i.get(s.style,[e])?i.get(s.style,[e]):s.style;return i.isFunction(u)&&(u=u(this)),{animate:s.animate,style:u}},e.prototype.getAnimateCfg=function(t){var e=this.geometry.animateOption,n=this.shapeFactory,o=n.geometryType,s=n.coordinate,u=a.getDefaultAnimateCfg(o,s,t);return!e||!0===e&&i.isEmpty(u)||!1===e[t]||null===e[t]?null:r.__assign(r.__assign({},u),e[t])},e.prototype.drawShape=function(t,e){void 0===e&&(e=!1);var n=this.shapeFactory,i=this.container,o=this.shapeType,s=this.getShapeDrawCfg(t);if(this.shape=n.drawShape(o,s,i),this.shape){this.setShapeInfo(this.shape,s),this.shape.get("name")||this.shape.set("name",this.shapeFactory.geometryType),this.shape.set("inheritNames",["element"]);var u=e?"enter":"appear",c=this.getAnimateCfg(u);c&&a.doAnimate(this.shape,c,{coordinate:n.coordinate,toAttrs:r.__assign({},this.shape.attr())})}},e.prototype.getOffscreenGroup=function(){if(!this.offscreenGroup){var t=this.container.getGroupBase();this.offscreenGroup=new t({})}return this.offscreenGroup},e.prototype.setShapeInfo=function(t,e){var n=this;(t.set("origin",e),t.set("element",this),t.isGroup())&&t.get("children").forEach((function(t){n.setShapeInfo(t,e)}))},e.prototype.getShapeDrawCfg=function(t){return r.__assign(r.__assign({},t),{defaultStyle:this.getStateStyle("default").style})},e.prototype.syncShapeStyle=function(t,e,n,r,i){if(void 0===n&&(n=""),void 0===i&&(i=0),t.isGroup())for(var o=t.get("children"),u=e.get("children"),c=0;c1){o.sort();var c=function(t,e){var n=t.length,i=t;r.isString(i[0])&&(i=t.map((function(t){return e.translate(t)})));for(var a=i[1]-i[0],o=2;os&&(a=s)}return a}(o,a);u=(a.max-a.min)/c,o.length>u&&(u=o.length)}var l=a.range,h=1/u,f=1;n.isPolar?f=n.isTransposed&&u>1?e.multiplePieWidthRatio:e.roseWidthRatio:(a.isLinear&&(h*=l[1]-l[0]),f=e.columnWidthRatio),h*=f,t.getAdjust("dodge")&&(h/=function(t,e){if(e){var n=r.flatten(t);return r.valuesOfKey(n,e).length}return t.length}(s,t.getAdjust("dodge").dodgeBy));var p=e.maxColumnWidth,d=e.minColumnWidth,g=i.getXDimensionLength(t.coordinate);if(p){var v=p/g;h>v&&(h=v)}if(d){var y=d/g;h=-Math.PI/2?"left":"right";else if(n.isTransposed){var r=n.getCenter(),i=this.getDefaultOffset(t.offset);e=Math.abs(t.x-r.x)<1?"center":t.angle>Math.PI||t.angle<=0?i>0?"left":"right":i>0?"right":"left"}else e="center";return e},e.prototype.getLabelPoint=function(t,e,n){var r,i=1,a=t.content[n];this.isToMiddle(e)?r=this.getMiddlePoint(e.points):(1===t.content.length&&0===n?n=1:0===n&&(i=-1),r=this.getArcPoint(e,n));var o=this.getDefaultOffset(t.offset)*i,s=this.getPointAngle(r),u=t.labelEmit,c=this.getCirclePoint(s,o,r,u);return 0===c.r?c.content="":(c.content=a,c.angle=s,c.color=e.color),c.rotate=t.autoRotate?this.getLabelRotate(s,o,u):t.rotate,c.start={x:r.x,y:r.y},c},e.prototype.getArcPoint=function(t,e){return void 0===e&&(e=0),i.isArray(t.x)||i.isArray(t.y)?{x:i.isArray(t.x)?t.x[e]:t.x,y:i.isArray(t.y)?t.y[e]:t.y}:{x:t.x,y:t.y}},e.prototype.getPointAngle=function(t){return o.getAngleByPoint(this.getCoordinate(),t)},e.prototype.getCirclePoint=function(t,e,n,i){var o=this.getCoordinate(),s=o.getCenter(),u=a.getDistanceToCenter(o,n);if(0===u)return r.__assign(r.__assign({},s),{r:u});var c=t;o.isTransposed&&u>e&&!i?c=t+2*Math.asin(e/(2*u)):u+=e;return{x:s.x+u*Math.cos(c),y:s.y+u*Math.sin(c),r:u}},e.prototype.getLabelRotate=function(t,e,n){var r=t+u;return n&&(r-=u),r&&(r>u?r-=Math.PI:r<-u&&(r+=Math.PI)),r},e.prototype.getMiddlePoint=function(t){var e=this.getCoordinate(),n=t.length,r={x:0,y:0};return i.each(t,(function(t){r.x+=t.x,r.y+=t.y})),r.x/=n,r.y/=n,r=e.convert(r)},e.prototype.isToMiddle=function(t){return t.x.length>2},e}(s.default);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3);function i(t){return t===r.DIRECTION.LEFT?r.DIRECTION.RIGHT:t===r.DIRECTION.RIGHT?r.DIRECTION.LEFT:t}function a(t){return t===r.DIRECTION.TOP?r.DIRECTION.BOTTOM:t===r.DIRECTION.BOTTOM?r.DIRECTION.TOP:t}e.directionToPosition=function(t,e,n){return n===r.DIRECTION.TOP?[t.minX+t.width/2-e.width/2,t.minY]:n===r.DIRECTION.BOTTOM?[t.minX+t.width/2-e.width/2,t.maxY-e.height]:n===r.DIRECTION.LEFT?[t.minX,t.minY+t.height/2-e.height/2]:n===r.DIRECTION.RIGHT?[t.maxX-e.width,t.minY+t.height/2-e.height/2]:n===r.DIRECTION.TOP_LEFT||n===r.DIRECTION.LEFT_TOP?[t.tl.x,t.tl.y]:n===r.DIRECTION.TOP_RIGHT||n===r.DIRECTION.RIGHT_TOP?[t.tr.x-e.width,t.tr.y]:n===r.DIRECTION.BOTTOM_LEFT||n===r.DIRECTION.LEFT_BOTTOM?[t.bl.x,t.bl.y-e.height]:n===r.DIRECTION.BOTTOM_RIGHT||n===r.DIRECTION.RIGHT_BOTTOM?[t.br.x-e.width,t.br.y-e.height]:[0,0]},e.getTranslateDirection=function(t,e){var n=t;return n=function(t,e){var n=t;return e.isReflect("x")&&(n=i(n)),e.isReflect("y")&&(n=a(n)),n}(n=function(t,e){var n=e.matrix[0],r=e.matrix[4],o=t;return n<0&&(o=i(o)),r<0&&(o=a(o)),o}(n=function(t,e){if(e.isTransposed)switch(t){case r.DIRECTION.BOTTOM:return r.DIRECTION.LEFT;case r.DIRECTION.LEFT:return r.DIRECTION.BOTTOM;case r.DIRECTION.RIGHT:return r.DIRECTION.TOP;case r.DIRECTION.TOP:return r.DIRECTION.RIGHT}return t}(n,e),e),e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0);function a(t,e){if(!t)return!1;return!!t.className&&(i.isNil(t.className.baseVal)?t.className:t.className.baseVal).includes(e)}var o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.timeStamp=0,e}return r.__extends(e,t),e.prototype.show=function(){var t=this.context,e=t.event,n=t.view;if(!n.isTooltipLocked()){var r=this.timeStamp,a=+new Date;if(a-r>16){var o=this.location,s={x:e.x,y:e.y};o&&i.isEqual(o,s)||this.showTooltip(n,s),this.timeStamp=a,this.location=s}}},e.prototype.hide=function(){var t=this.context.view;if(!t.isTooltipLocked()){var e=this.context.event,n=i.get(e,["gEvent","originalEvent","toElement"]);n&&(a(n,"g2-tooltip")||function(t,e){for(var n=t.parentNode,r=!1;n&&n!==document.body;){if(a(n,e)){r=!0;break}n=n.parentNode}return r}(n,"g2-tooltip"))||(this.hideTooltip(t),this.location=null)}},e.prototype.showTooltip=function(t,e){t.showTooltip(e)},e.prototype.hideTooltip=function(t){t.hideTooltip()},e}(r.__importDefault(n(8)).default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shapeType="rect",e}return r.__extends(e,t),e.prototype.getRegion=function(){var t=this.points;return{start:i.head(t),end:i.last(t)}},e.prototype.getMaskAttrs=function(){var t=this.getRegion(),e=t.start,n=t.end;return{x:Math.min(e.x,n.x),y:Math.min(e.y,n.y),width:Math.abs(n.x-e.x),height:Math.abs(n.y-e.y)}},e}(r.__importDefault(n(58)).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.getMaskPath=function(){var t=this.points,e=[];return t.length&&(i.each(t,(function(t,n){0===n?e.push(["M",t.x,t.y]):e.push(["L",t.x,t.y])})),e.push(["L",t[0].x,t[0].y])),e},e.prototype.getMaskAttrs=function(){return{path:this.getMaskPath()}},e.prototype.addPoint=function(){this.resize()},e}(r.__importDefault(n(58)).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=r.__importDefault(n(8)),a=n(5);function o(t,e,n,r){var i=Math.min(n[e],r[e]),a=Math.max(n[e],r[e]),o=t.range,s=o[0],u=o[1];if(iu&&(a=u),i===u&&a===u)return null;var c=t.invert(i),l=t.invert(a);if(t.isCategory){var h=t.values.indexOf(c),f=t.values.indexOf(l),p=t.values.slice(h,f+1);return function(t){return p.includes(t)}}return function(t){return t>=c&&t<=l}}var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dims=["x","y"],e.startPoint=null,e.isStarted=!1,e}return r.__extends(e,t),e.prototype.hasDim=function(t){return this.dims.includes(t)},e.prototype.start=function(){var t=this.context;this.isStarted=!0,this.startPoint=t.getCurrentPoint()},e.prototype.filter=function(){var t,e;if(a.isMask(this.context)){var n=this.context.event.target.getCanvasBBox();t={x:n.x,y:n.y},e={x:n.maxX,y:n.maxY}}else{if(!this.isStarted)return;t=this.startPoint,e=this.context.getCurrentPoint()}if(!(Math.abs(t.x-e.x)<5||Math.abs(t.x-e.y)<5)){var r=this.context.view,i=r.getCoordinate(),s=i.invert(e),u=i.invert(t);if(this.hasDim("x")){var c=r.getXScale(),l=o(c,"x",s,u);this.filterView(r,c.field,l)}if(this.hasDim("y")){var h=r.getYScales()[0];l=o(h,"y",s,u);this.filterView(r,h.field,l)}this.reRender(r)}},e.prototype.end=function(){this.isStarted=!1},e.prototype.reset=function(){var t=this.context.view;if(this.isStarted=!1,this.hasDim("x")){var e=t.getXScale();this.filterView(t,e.field,null)}if(this.hasDim("y")){var n=t.getYScales()[0];this.filterView(t,n.field,null)}this.reRender(t)},e.prototype.filterView=function(t,e,n){t.filter(e,n)},e.prototype.reRender=function(t){t.render(!0)},e}(i.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(45),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dims=["x","y"],e.cfgFields=["dims"],e.cacheScaleDefs={},e}return r.__extends(e,t),e.prototype.hasDim=function(t){return this.dims.includes(t)},e.prototype.getScale=function(t){var e=this.context.view;return"x"===t?e.getXScale():e.getYScales()[0]},e.prototype.resetDim=function(t){var e=this.context.view;if(this.hasDim(t)&&this.cacheScaleDefs[t]){var n=this.getScale(t);e.scale(n.field,this.cacheScaleDefs[t]),this.cacheScaleDefs[t]=null}},e.prototype.reset=function(){this.resetDim("x"),this.resetDim("y"),this.context.view.render(!0)},e}(i.Action);e.default=a},function(t,e,n){"use strict";n.r(e),n.d(e,"registerAttribute",(function(){return v})),n.d(e,"getAttribute",(function(){return g})),n.d(e,"Attribute",(function(){return a})),n.d(e,"Color",(function(){return u})),n.d(e,"Opacity",(function(){return c})),n.d(e,"Position",(function(){return l})),n.d(e,"Shape",(function(){return h})),n.d(e,"Size",(function(){return f})),n.d(e,"Scale",(function(){return p.Scale}));var r=n(0),i=function(t,e){return Object(r.isString)(e)?e:t.invert(t.scale(e))},a=function(){function t(t){this.names=[],this.scales=[],this.linear=!1,this.values=[],this.callback=function(){return[]},this._parseCfg(t)}return t.prototype.mapping=function(){for(var t=this,e=[],n=0;n1?0:i<-1?Math.PI:Math.acos(i)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.equals=function(t,e){var n=t[0],i=t[1],a=t[2],o=e[0],s=e[1],u=e[2];return Math.abs(n-o)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-s)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(a-u)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(u))};var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(42));function i(){var t=new r.ARRAY_TYPE(3);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function a(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function o(t,e,n){var i=new r.ARRAY_TYPE(3);return i[0]=t,i[1]=e,i[2]=n,i}function s(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function u(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function c(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function l(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)}function h(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function f(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function p(t,e){var n=e[0],r=e[1],i=e[2],a=n*n+r*r+i*i;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}function d(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}var g;e.sub=s,e.mul=u,e.div=c,e.dist=l,e.sqrDist=h,e.len=a,e.sqrLen=f,e.forEach=(g=i(),function(t,e,n,r,i,a){var o=void 0,s=void 0;for(e||(e=3),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,o=n;o0}jt.registerInteraction("tooltip",{start:[{trigger:"plot:mousemove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"plot:mouseleave",action:"tooltip:hide"}]}),jt.registerInteraction("element-active",{start:[{trigger:"element:mouseenter",action:"element-active:active"}],end:[{trigger:"element:mouseleave",action:"element-active:reset"}]}),jt.registerInteraction("element-selected",{start:[{trigger:"element:click",action:"element-selected:toggle"}]}),jt.registerInteraction("element-highlight",{start:[{trigger:"element:mouseenter",action:"element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight:reset"}]}),jt.registerInteraction("element-highlight-by-x",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-x:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-x:reset"}]}),jt.registerInteraction("element-highlight-by-color",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-color:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-color:reset"}]}),jt.registerInteraction("legend-active",{start:[{trigger:"legend-item:mouseenter",action:["list-active:active","element-active:active"]}],end:[{trigger:"legend-item:mouseleave",action:["list-active:reset","element-active:reset"]}]}),jt.registerInteraction("legend-highlight",{start:[{trigger:"legend-item:mouseenter",action:["legend-item-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"legend-item:mouseleave",action:["legend-item-highlight:reset","element-highlight:reset"]}]}),jt.registerInteraction("axis-label-highlight",{start:[{trigger:"axis-label:mouseenter",action:["axis-label-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"axis-label:mouseleave",action:["axis-label-highlight:reset","element-highlight:reset"]}]}),jt.registerInteraction("element-list-highlight",{start:[{trigger:"element:mouseenter",action:["list-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"element:mouseleave",action:["list-highlight:reset","element-highlight:reset"]}]}),jt.registerInteraction("element-range-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"mask:mouseenter",action:"cursor:move"},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:function(t){return!t.isInShape("mask")},action:["rect-mask:start","rect-mask:show"]},{trigger:"mask:dragstart",action:["rect-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:drag",action:["rect-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end"]},{trigger:"mask:dragend",action:["rect-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(t){return!t.isInPlot()},action:["element-range-highlight:clear","rect-mask:end","rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","rect-mask:hide"]}]}),jt.registerInteraction("brush",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Lt,action:["brush:start","rect-mask:start","rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:Lt,action:["rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Lt,action:["brush:filter","brush:end","rect-mask:end","rect-mask:hide","reset-button:show"]}],rollback:[{trigger:"reset-button:click",action:["brush:reset","reset-button:hide","cursor:crosshair"]}]}),jt.registerInteraction("brush-visible",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"plot:mousedown",action:["rect-mask:start","rect-mask:show","element-range-highlight:start"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize","element-range-highlight:highlight"]},{trigger:"mask:end",action:["element-filter:filter"]}],end:[{trigger:"mouseup",isEnable:Lt,action:["rect-mask:end","rect-mask:hide","element-range-highlight:end","element-range-highlight:clear"]}],rollback:[{trigger:"dblclick",action:["element-filter:clear"]}]}),jt.registerInteraction("brush-x",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Lt,action:["brush-x:start","x-rect-mask:start","x-rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:Lt,action:["x-rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Lt,action:["brush-x:filter","brush-x:end","x-rect-mask:end","x-rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]}),jt.registerInteraction("element-path-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Lt,action:"path-mask:start"},{trigger:"mousedown",isEnable:Lt,action:"path-mask:show"}],processing:[{trigger:"mousemove",action:"path-mask:addPoint"}],end:[{trigger:"mouseup",action:"path-mask:end"}],rollback:[{trigger:"dblclick",action:"path-mask:hide"}]}),jt.registerInteraction("element-single-selected",{start:[{trigger:"element:click",action:"element-single-selected:toggle"}]}),jt.registerInteraction("legend-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:"list-unchecked:toggle"},{trigger:"legend-item:click",action:"data-filter:filter"}]}),jt.registerInteraction("continuous-filter",{start:[{trigger:"legend:valuechanged",action:"data-filter:filter"}]}),jt.registerInteraction("continuous-visible-filter",{start:[{trigger:"legend:valuechanged",action:"element-filter:filter"}]}),jt.registerInteraction("legend-visible-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:"list-unchecked:toggle"},{trigger:"legend-item:click",action:"element-filter:filter"}]}),jt.registerInteraction("active-region",{start:[{trigger:"plot:mousemove",action:"active-region:show"}],end:[{trigger:"plot:mouseleave",action:"active-region:hide"}]}),jt.registerInteraction("view-zoom",{start:[{trigger:"plot:mousewheel",isEnable:function(t){return Bt(t.event)},action:"scale-zoom:zoomOut",throttle:{wait:100,leading:!0,trailing:!1}},{trigger:"plot:mousewheel",isEnable:function(t){return!Bt(t.event)},action:"scale-zoom:zoomIn",throttle:{wait:100,leading:!0,trailing:!1}}]}),jt.registerInteraction("sibling-tooltip",{start:[{trigger:"plot:mousemove",action:"sibling-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"sibling-tooltip:hide"}]}),r.__exportStar(n(11),e);var Dt=n(10),Ft=n(47);e.Util={translate:Ft.translate,rotate:Ft.rotate,zoom:Ft.zoom,transform:Ft.transform,getAngle:Dt.getAngle,polarToCartesian:Dt.polarToCartesian}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(3),o=n(65),s=n(95),u=function(t){function e(e){var n=this,u=e.container,c=e.width,l=e.height,h=e.autoFit,f=void 0!==h&&h,p=e.padding,d=e.renderer,g=void 0===d?"canvas":d,v=e.pixelRatio,y=e.localRefresh,m=void 0===y||y,x=e.visible,b=void 0===x||x,M=e.defaultInteractions,_=void 0===M?["tooltip","legend-filter","legend-active","continuous-filter"]:M,w=e.options,C=e.limitInPlot,O=e.theme,A=i.isString(u)?document.getElementById(u):u,P=s.createDom('
    ');A.appendChild(P);var S=s.getChartSize(P,f,c,l),E=new(o.getEngine(g).Canvas)(r.__assign({container:P,pixelRatio:v,localRefresh:m},S));return(n=t.call(this,{parent:null,canvas:E,backgroundGroup:E.addGroup({zIndex:a.GROUP_Z_INDEX.BG}),middleGroup:E.addGroup({zIndex:a.GROUP_Z_INDEX.MID}),foregroundGroup:E.addGroup({zIndex:a.GROUP_Z_INDEX.FORE}),padding:p,visible:b,options:w,limitInPlot:C,theme:O})||this).onResize=i.debounce((function(){var t=s.getChartSize(n.ele,n.autoFit,n.width,n.height),e=t.width,r=t.height;n.changeSize(e,r)}),300),n.ele=P,n.canvas=E,n.width=S.width,n.height=S.height,n.autoFit=f,n.localRefresh=m,n.renderer=g,n.wrapperElement=P,n.bindAutoFit(),n.initDefaultInteractions(_),n}return r.__extends(e,t),e.prototype.initDefaultInteractions=function(t){var e=this;i.each(t,(function(t){e.interaction(t)}))},e.prototype.changeSize=function(t,e){return this.width=t,this.height=e,this.canvas.changeSize(t,e),this.render(!0),this},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.unbindAutoFit(),this.canvas.destroy(),s.removeDom(this.wrapperElement),this.wrapperElement=null},e.prototype.changeVisible=function(t){return this.wrapperElement.style.display=t?"":"none",this},e.prototype.bindAutoFit=function(){this.autoFit&&window.addEventListener("resize",this.onResize)},e.prototype.unbindAutoFit=function(){this.autoFit&&window.removeEventListener("resize",this.onResize)},e}(r.__importDefault(n(66)).default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3);function i(t){return"number"==typeof t&&!isNaN(t)}e.getChartSize=function(t,e,n,a){var o=n,s=a;if(e){var u=function(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height}}(t);o=u.width?u.width:o,s=u.height?u.height:s}return{width:Math.max(i(o)?o:r.MIN_CHART_WIDTH,r.MIN_CHART_WIDTH),height:Math.max(i(s)?s:r.MIN_CHART_HEIGHT,r.MIN_CHART_HEIGHT)}},e.removeDom=function(t){var e=t.parentNode;e&&e.removeChild(t)};var a=n(6);e.createDom=a.createDom},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t){t.exports=JSON.parse('{"name":"@antv/g-base","version":"0.4.0","description":"A common util collection for antv projects","main":"lib/index.js","module":"esm/index.js","types":"lib/index.d.ts","files":["package.json","esm","lib","LICENSE","README.md"],"scripts":{"build":"npm run clean && run-p build:*","build:esm":"tsc -p tsconfig.json --target ES5 --module ESNext --outDir esm","build:cjs":"tsc -p tsconfig.json --target ES5 --module commonjs --outDir lib","clean":"rm -rf esm lib","watch:cjs":"tsc-watch -p tsconfig.json --target ES5 --module commonjs --outDir lib --compiler typescript/bin/tsc","coverage":"npm run coverage-generator && npm run coverage-viewer","coverage-generator":"torch --coverage --compile --source-pattern src/*.js,src/**/*.js --opts tests/mocha.opts","coverage-viewer":"torch-coverage","test":"torch --renderer --compile --opts tests/mocha.opts","test-live":"torch --compile --interactive --opts tests/mocha.opts","tsc":"tsc --noEmit","typecheck":"tsc --noEmit"},"repository":{"type":"git","url":"git+https://github.com/antvis/util.git"},"keywords":["util","antv","g"],"publishConfig":{"access":"public"},"author":"https://github.com/orgs/antvis/people","license":"ISC","bugs":{"url":"https://github.com/antvis/util/issues"},"devDependencies":{"@antv/gl-matrix":"~2.7.1","@antv/torch":"^1.0.0","less":"^3.9.0","npm-run-all":"^4.1.5","tsc-watch":"^4.0.0"},"homepage":"https://github.com/antvis/util#readme","dependencies":{"@antv/event-emitter":"^0.1.1","@antv/g-math":"^0.1.1","@antv/matrix-util":"^2.0.4","@antv/path-util":"~2.0.5","@antv/util":"~2.0.0","@types/d3-timer":"^1.0.9","d3-ease":"^1.0.5","d3-interpolate":"^1.3.2","d3-timer":"^1.0.9"},"__npminstall_done":"Mon Mar 23 2020 16:19:44 GMT+0800 (中国标准时间)","gitHead":"95487b1e5ded41f5db351a622adf12659f564d8b","_from":"@antv/g-base@0.4.0","_resolved":"https://registry.npm.alibaba-inc.com/@antv/g-base/download/@antv/g-base-0.4.0.tgz"}')},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(31);e.default=function(t){return r.default(t)?"":t.toString()}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(101);e.Adjust=r.default;var i={},a=function(t){return i[t.toLowerCase()]};e.getAdjust=a;e.registerAdjust=function(t,e){if(a(t))throw new Error("Adjust type '"+t+"' existed.");i[t.toLowerCase()]=e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(102),a=function(){function t(t){var e=t.xField,n=t.yField,r=t.adjustNames,i=void 0===r?["x","y"]:r;this.adjustNames=i,this.xField=e,this.yField=n}return t.prototype.isAdjust=function(t){return this.adjustNames.indexOf(t)>=0},t.prototype.getAdjustRange=function(t,e,n){var r,i,a=this.yField,o=n.indexOf(e),s=n.length;return!a&&this.isAdjust("y")?(r=0,i=1):s>1?(r=n[0===o?0:o-1],i=n[o===s-1?s-1:o+1],0!==o?r+=(e-r)/2:r-=(i-e)/2,o!==s-1?i-=(i-e)/2:i+=(e-n[s-2])/2):(r=0===e?0:e-.5,i=0===e?1:e+.5),{pre:r,next:i}},t.prototype.adjustData=function(t,e){var n=this,i=this.getDimValues(e);r.each(t,(function(t,e){r.each(i,(function(r,i){n.adjustDim(i,r,t,e)}))}))},t.prototype.groupData=function(t,e){return r.each(t,(function(t){void 0===t[e]&&(t[e]=i.DEFAULT_Y)})),r.groupBy(t,e)},t.prototype.adjustDim=function(t,e,n,r){},t.prototype.getDimValues=function(t){var e=this.xField,n=this.yField,a={},o=[];if(e&&this.isAdjust("x")&&o.push(e),n&&this.isAdjust("y")&&o.push(n),o.forEach((function(e){a[e]=r.valuesOfKey(t,e).sort((function(t,e){return t-e}))})),!n&&this.isAdjust("y")){a.y=[i.DEFAULT_Y,1]}return a},t}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_Y=0,e.MARGIN_RATIO=.5,e.DODGE_RATIO=.5,e.GAP=.05},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(104);e.Attribute=i.default;var a={},o=function(t){return a[t.toLowerCase()]};e.getAttribute=o;e.registerAttribute=function(t,e){if(o(t))throw new Error("Attribute type '"+t+"' existed.");a[t.toLowerCase()]=e},r.__exportStar(n(105),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=function(t,e){return r.isString(e)?e:t.invert(t.scale(e))},a=function(){function t(t){this.names=[],this.scales=[],this.linear=!1,this.values=[],this.callback=function(){return[]},this._parseCfg(t)}return t.prototype.mapping=function(){for(var t=this,e=[],n=0;n=0&&e.splice(n,1)},t.prototype.getCurrentPoint=function(){var t=this.event;return t?t.target instanceof HTMLElement?this.view.getCanvas().getPointByClient(t.clientX,t.clientY):{x:t.x,y:t.y}:null},t.prototype.getCurrentShape=function(){return r.get(this.event,["gEvent","shape"])},t.prototype.isInPlot=function(){var t=this.getCurrentPoint();return!!t&&this.view.isPointInPlot(t)},t.prototype.isInShape=function(t){var e=this.getCurrentShape();return!!e&&e.get("name")===t},t.prototype.isInComponent=function(t){var e=i.getComponents(this.view),n=this.getCurrentPoint();return!!n&&!!e.find((function(e){var r=e.getBBox();return t?e.get("name")===t&&i.isInBox(r,n):i.isInBox(r,n)}))},t.prototype.destroy=function(){this.view=null,this.event=null,r.each(this.actions.slice(),(function(t){t.destroy()})),this.actions=null,this.cacheMap=null},t}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(115),i=n(116),a=n(0);function o(t){for(var e=[],n=t.length,r=0;r1){var o=t[0],s=t[n-1];e.push({from:{x:s[0],y:s[1]},to:{x:o[0],y:o[1]}})}return e}function s(t){var e=t.map((function(t){return t[0]})),n=t.map((function(t){return t[1]}));return{minX:Math.min.apply(null,e),maxX:Math.max.apply(null,e),minY:Math.min.apply(null,n),maxY:Math.max.apply(null,n)}}e.default=function(t,e){if(t.length<2||e.length<2)return!1;var n,u,c=s(t),l=s(e);if(n=c,(u=l).minX>n.maxX||u.maxXn.maxY||u.maxY0!=r(c[1]-n)>0&&r(e-(n-u[1])*(u[0]-c[0])/(u[1]-c[1])-u[0])<0&&(a=!a)}return a}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e,n){return t>=e&&t<=n};e.default=function(t,e,n,i){var a=n.x-t.x,o=n.y-t.y,s=e.x-t.x,u=e.y-t.y,c=i.x-n.x,l=i.y-n.y,h=s*l-u*c,f=null;if(h*h>.001*(s*s+u*u)*(c*c+l*l)){var p=(a*l-o*c)/h,d=(a*u-o*s)/h;r(p,0,1)&&r(d,0,1)&&(f={x:t.x+p*s,y:t.y+p*u})}return f}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(71);e.mergeTheme=function(t,e){var n=r.isObject(e)?e:i.getTheme(e);return r.deepMix(t,n)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=r.__importStar(n(119)),a=n(2),o=n(0),s=n(10);e.getThemeByStylesheet=function(t){var e,n={point:{default:{fill:t.pointFillColor,r:t.pointSize,stroke:t.pointBorderColor,lineWidth:t.pointBorder,fillOpacity:t.pointFillOpacity},active:{stroke:t.pointActiveBorderColor,lineWidth:t.pointActiveBorder},selected:{stroke:t.pointSelectedBorderColor,lineWidth:t.pointSelectedBorder},inactive:{fillOpacity:t.pointInactiveFillOpacity,strokeOpacity:t.pointInactiveBorderOpacity}},hollowPoint:{default:{fill:t.hollowPointFillColor,lineWidth:t.hollowPointBorder,stroke:t.hollowPointBorderColor,strokeOpacity:t.hollowPointBorderOpacity,r:t.hollowPointSize},active:{stroke:t.hollowPointActiveBorderColor,strokeOpacity:t.hollowPointActiveBorderOpacity},selected:{lineWidth:t.hollowPointSelectedBorder,stroke:t.hollowPointSelectedBorderColor,strokeOpacity:t.hollowPointSelectedBorderOpacity},inactive:{strokeOpacity:t.hollowPointInactiveBorderOpacity}},area:{default:{fill:t.areaFillColor,fillOpacity:t.areaFillOpacity,stroke:null},active:{fillOpacity:t.areaActiveFillOpacity},selected:{fillOpacity:t.areaSelectedFillOpacity},inactive:{fillOpacity:t.areaInactiveFillOpacity}},hollowArea:{default:{fill:null,stroke:t.hollowAreaBorderColor,lineWidth:t.hollowAreaBorder,strokeOpacity:t.hollowAreaBorderOpacity},active:{fill:null,lineWidth:t.hollowAreaActiveBorder},selected:{fill:null,lineWidth:t.hollowAreaSelectedBorder},inactive:{strokeOpacity:t.hollowAreaInactiveBorderOpacity}},interval:{default:{fill:t.intervalFillColor,fillOpacity:t.intervalFillOpacity},active:{stroke:t.intervalActiveBorderColor,lineWidth:t.intervalActiveBorder},selected:{stroke:t.intervalSelectedBorderColor,lineWidth:t.intervalSelectedBorder},inactive:{fillOpacity:t.intervalInactiveFillOpacity,strokeOpacity:t.intervalInactiveBorderOpacity}},hollowInterval:{default:{fill:t.hollowIntervalFillColor,stroke:t.hollowIntervalBorderColor,lineWidth:t.hollowIntervalBorder,strokeOpacity:t.hollowIntervalBorderOpacity},active:{stroke:t.hollowIntervalActiveBorderColor,lineWidth:t.hollowIntervalActiveBorder,strokeOpacity:t.hollowIntervalActiveBorderOpacity},selected:{stroke:t.hollowIntervalSelectedBorderColor,lineWidth:t.hollowIntervalSelectedBorder,strokeOpacity:t.hollowIntervalSelectedBorderOpacity},inactive:{stroke:t.hollowIntervalInactiveBorderColor,lineWidth:t.hollowIntervalInactiveBorder,strokeOpacity:t.hollowIntervalInactiveBorderOpacity}},line:{default:{stroke:t.lineBorderColor,lineWidth:t.lineBorder,strokeOpacity:t.lineBorderOpacity,fill:null,lineAppendWidth:10},active:{lineWidth:t.lineActiveBorder},selected:{lineWidth:t.lineSelectedBorder},inactive:{strokeOpacity:t.lineInactiveBorderOpacity}}},u={title:{autoRotate:!0,position:"center",style:{fill:t.axisTitleTextFillColor,fontSize:t.axisTitleTextFontSize,lineHeight:t.axisTitleTextLineHeight,textBaseline:"middle",fontFamily:t.fontFamily},offset:32},label:{autoRotate:!0,autoHide:!0,offset:16,style:{fill:t.axisLabelFillColor,fontSize:t.axisLabelFontSize,lineHeight:t.axisLabelLineHeight,textBaseline:"middle",fontFamily:t.fontFamily}},line:{style:{lineWidth:t.axisLineBorder,stroke:t.axisLineBorderColor}},tickLine:{style:{lineWidth:t.axisTickLineBorder,stroke:t.axisTickLineBorderColor},alignTick:!0,length:t.axisTickLineLength},subTickLine:null,animate:!0},c={line:{type:"line",style:{stroke:t.axisGridBorderColor,lineWidth:t.axisGridBorder,lineDash:t.axisGridLineDash}},alignTick:!0,animate:!0},l={title:null,marker:{symbol:"circle",style:{r:t.legendCircleMarkerSize,fill:t.legendMarkerColor}},itemName:{spacing:5,style:{fill:t.legendItemNameFillColor,fontFamily:t.fontFamily,fontSize:t.legendItemNameFontSize,lineHeight:t.legendItemNameLineHeight,fontWeight:t.legendItemNameFontWeight,textAlign:"start",textBaseline:"middle"}},flipPage:!0,animate:!1};return{defaultColor:t.brandColor,padding:"auto",fontFamily:t.fontFamily,columnWidthRatio:.5,maxColumnWidth:null,minColumnWidth:null,roseWidthRatio:.9999999,multiplePieWidthRatio:1/1.3,colors10:t.paletteQualitative10,colors20:t.paletteQualitative20,shapes:{point:["hollow-circle","hollow-square","hollow-bowtie","hollow-diamond","hollow-hexagon","hollow-triangle","hollow-triangle-down","circle","square","bowtie","diamond","hexagon","triangle","triangle-down","cross","tick","plus","hyphen","line"],line:["line","dash","dot","smooth"],area:["area","smooth","line","smooth-line"],interval:["rect","hollow-rect","line","tick"]},sizes:[1,10],geometries:{interval:{rect:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{animateCfg:{duration:300},style:function(t){var e=t.geometry.coordinate;if(e.isPolar&&e.isTransposed){var r=s.getAngle(t.getModel(),e),i=(r.startAngle+r.endAngle)/2,o=7.5*Math.cos(i),u=7.5*Math.sin(i);return{matrix:a.transform(null,[["t",o,u]])}}return n.interval.selected}}},"hollow-rect":{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},line:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},tick:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},funnel:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:n.interval.selected}},pyramid:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:n.interval.selected}}},line:{line:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},dot:{default:{style:r.__assign(r.__assign({},n.line.default),{lineDash:[1,1]})},active:{style:r.__assign(r.__assign({},n.line.active),{lineDash:[1,1]})},inactive:{style:r.__assign(r.__assign({},n.line.inactive),{lineDash:[1,1]})},selected:{style:r.__assign(r.__assign({},n.line.selected),{lineDash:[1,1]})}},dash:{default:{style:r.__assign(r.__assign({},n.line.default),{lineDash:[5.5,1]})},active:{style:r.__assign(r.__assign({},n.line.active),{lineDash:[5.5,1]})},inactive:{style:r.__assign(r.__assign({},n.line.inactive),{lineDash:[5.5,1]})},selected:{style:r.__assign(r.__assign({},n.line.selected),{lineDash:[5.5,1]})}},smooth:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},hv:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},vh:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},hvh:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},vhv:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}}},polygon:{polygon:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:n.interval.selected}}},point:{circle:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},square:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},bowtie:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},diamond:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},hexagon:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},triangle:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},"triangle-down":{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},"hollow-circle":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-square":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-bowtie":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-diamond":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-hexagon":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-triangle":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-triangle-down":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},cross:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},tick:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},plus:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},hyphen:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},line:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}}},area:{area:{default:{style:n.area.default},active:{style:n.area.active},inactive:{style:n.area.inactive},selected:{style:n.area.selected}},smooth:{default:{style:n.area.default},active:{style:n.area.active},inactive:{style:n.area.inactive},selected:{style:n.area.selected}},line:{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}},"smooth-line":{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}}},schema:{candle:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},box:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}}},edge:{line:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},vhv:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},smooth:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},arc:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}}}},components:{axis:{top:o.deepMix({},u,{position:"top",grid:null,title:null}),bottom:o.deepMix({},u,{position:"bottom",grid:null,title:null}),left:o.deepMix({},u,{position:"left",label:{offset:8},title:null,line:null,tickLine:null,grid:c}),right:o.deepMix({},u,{position:"right",label:{offset:8},title:null,line:null,tickLine:null,grid:c}),circle:o.deepMix({},u,{title:null,label:{offset:8},grid:o.deepMix({},c,{line:{type:"line"}})}),radius:o.deepMix({},u,{title:null,label:{offset:8},grid:o.deepMix({},c,{line:{type:"circle"}})})},legend:{right:o.deepMix({},l,{layout:"vertical"}),left:o.deepMix({},l,{layout:"vertical"}),top:o.deepMix({},l,{layout:"horizontal"}),bottom:o.deepMix({},l,{layout:"horizontal"}),continuous:{title:null,background:null,track:{},rail:{type:"color",size:t.sliderRailHeight,defaultLength:t.sliderRailWidth,style:{fill:t.sliderRailFillColor,stroke:t.sliderRailBorderColor,lineWidth:t.sliderRailBorder}},label:{align:"rail",spacing:4,formatter:null,style:{fill:t.sliderLabelTextFillColor,fontSize:t.sliderLabelTextFontSize,lineHeight:t.sliderLabelTextLineHeight,textBaseline:"middle",fontFamily:t.fontFamily}},handler:{size:t.sliderHandlerWidth,style:{fill:t.sliderHandlerFillColor,stroke:t.sliderHandlerBorderColor}},slidable:!0}},tooltip:{showContent:!0,follow:!0,showCrosshairs:!1,showMarkers:!0,shared:!1,enterable:!1,position:"auto",marker:{symbol:"circle",stroke:"#fff",shadowBlur:10,shadowOffsetX:0,shadowOffSetY:0,shadowColor:"rgba(0,0,0,0.09)",lineWidth:2,r:4},crosshairs:{line:{style:{stroke:t.tooltipCrosshairsBorderColor,lineWidth:t.tooltipCrosshairsBorder}},text:null,textBackground:{padding:2,style:{fill:"rgba(0, 0, 0, 0.25)",lineWidth:0,stroke:null}},follow:!1},domStyles:(e={},e[""+i.CONTAINER_CLASS]={position:"absolute",visibility:"hidden",zIndex:8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)",backgroundColor:t.tooltipContainerFillColor,opacity:t.tooltipContainerFillOpacity,boxShadow:t.tooltipContainerShadow,borderRadius:t.tooltipContainerBorderRadius+"px",color:t.tooltipTextFillColor,fontSize:t.tooltipTextFontSize+"px",fontFamily:t.fontFamily,lineHeight:t.tooltipTextLineHeight+"px",padding:"0 12px 0 12px"},e[""+i.TITLE_CLASS]={marginBottom:"12px",marginTop:"12px"},e[""+i.LIST_CLASS]={margin:0,listStyleType:"none",padding:0},e[""+i.LIST_ITEM_CLASS]={listStyleType:"none",padding:0,marginBottom:"12px",marginTop:"12px",marginLeft:0,marginRight:0},e[""+i.MARKER_CLASS]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},e[""+i.VALUE_CLASS]={display:"inline-block",float:"right",marginLeft:"30px"},e)},annotation:{arc:{style:{stroke:t.annotationArcBorderColor,lineWidth:t.annotationArcBorder},animate:!0},line:{style:{stroke:t.annotationLineBorderColor,lineDash:t.annotationLineDash,lineWidth:t.annotationLineBorder},text:{position:"start",autoRotate:!0,style:{fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,textAlign:"start",fontFamily:t.fontFamily,textBaseline:"bottom"}},animate:!0},text:{style:{fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,textBaseline:"middle",textAlign:"start",fontFamily:t.fontFamily},animate:!0},region:{top:!1,style:{lineWidth:t.annotationRegionBorder,stroke:t.annotationRegionBorderColor,fill:t.annotationRegionFillColor,fillOpacity:t.annotationRegionFillOpacity},animate:!0},image:{top:!1,animate:!0},dataMarker:{top:!0,point:{style:{r:3,stroke:t.brandColor,lineWidth:2}},line:{style:{stroke:t.annotationLineBorderColor,lineWidth:t.annotationLineBorder},length:t.annotationDataMarkerLineLength},text:{style:{textAlign:"start",fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,fontFamily:t.fontFamily}},direction:"upward",autoAdjust:!0,animate:!0},dataRegion:{style:{region:{fill:t.annotationRegionFillColor,fillOpacity:t.annotationRegionFillOpacity},text:{textAlign:"center",textBaseline:"bottom",fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,fontFamily:t.fontFamily}},animate:!0}}},labels:{offset:12,style:{fill:t.labelFillColor,fontSize:t.labelFontSize,fontFamily:t.fontFamily,stroke:t.labelBorderColor,lineWidth:t.labelBorder},autoRotate:!0},innerLabels:{style:{fill:t.innerLabelFillColor,fontSize:t.innerLabelFontSize,fontFamily:t.fontFamily,stroke:t.innerLabelBorderColor,lineWidth:t.innerLabelBorder},autoRotate:!0},pieLabels:{labelHeight:14,offset:30,labelLine:{style:{lineWidth:t.labelLineBorder}},autoRotate:!0}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTAINER_CLASS="g2-tooltip",e.TITLE_CLASS="g2-tooltip-title",e.LIST_CLASS="g2-tooltip-list",e.LIST_ITEM_CLASS="g2-tooltip-list-item",e.MARKER_CLASS="g2-tooltip-marker",e.VALUE_CLASS="g2-tooltip-value",e.NAME_CLASS="g2-tooltip-name",e.CROSSHAIR_X="g2-tooltip-crosshair-x",e.CROSSHAIR_Y="g2-tooltip-crosshair-y"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="#000",i="#595959",a="#8C8C8C",o="#BFBFBF",s="#D9D9D9",u="#F0F0F0",c="#FFFFFF",l="#F2F2F2",h=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#E86452","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];e.antvLight={brandColor:h[0],paletteQualitative10:h,paletteQualitative20:["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#E86452","#F8D0CB","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],paletteSemanticRed:"#F4664A",paletteSemanticGreen:"#30BF78",paletteSemanticYellow:"#FAAD14",fontFamily:'"-apple-system", "Segoe UI", Roboto, "Helvetica Neue", Arial,\n "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",\n "Noto Color Emoji"',axisLineBorderColor:o,axisLineBorder:.5,axisLineDash:null,axisTitleTextFillColor:i,axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTickLineBorderColor:o,axisTickLineLength:4,axisTickLineBorder:.5,axisSubTickLineBorderColor:s,axisSubTickLineLength:2,axisSubTickLineBorder:.5,axisLabelFillColor:a,axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisGridBorderColor:s,axisGridBorder:.5,axisGridLineDash:null,legendTitleTextFillColor:a,legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:h[0],legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:i,legendItemNameFontSize:12,legendItemNameLineHeight:12,legendItemNameFontWeight:"normal",sliderRailFillColor:s,sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:a,sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:u,sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:o,annotationArcBorderColor:s,annotationArcBorder:.5,annotationLineBorderColor:o,annotationLineBorder:.5,annotationLineDash:null,annotationTextFillColor:i,annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:l,annotationTextBorder:1.5,annotationRegionFillColor:r,annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:o,tooltipCrosshairsBorder:.5,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"rgb(255, 255, 255)",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 0px 10px #aeaeae",tooltipContainerBorderRadius:3,tooltipTextFillColor:i,tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:i,labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:c,labelBorder:2,innerLabelFillColor:c,innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,labelLineBorder:.5,labelLineBorderColor:o,pointFillColor:h[0],pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:c,pointBorderOpacity:1,pointActiveBorderColor:r,pointSelectedBorder:2,pointSelectedBorderColor:r,pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:h[0],hollowPointBorderOpacity:.95,hollowPointFillColor:c,hollowPointActiveBorder:1,hollowPointActiveBorderColor:r,hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:r,hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:h[0],lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:h[0],areaFillOpacity:.25,areaActiveFillColor:h[0],areaActiveFillOpacity:.5,areaSelectedFillColor:h[0],areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:h[0],hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:r,hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:r,hollowAreaInactiveBorderOpacity:.3,intervalFillColor:h[0],intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:r,intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:r,intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:h[0],hollowIntervalBorderOpacity:1,hollowIntervalFillColor:c,hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:r,hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:r,hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(17),o=function(){function t(t){this.option=this.wrapperOption(t)}return t.prototype.update=function(t){return this.option=this.wrapperOption(t),this},t.prototype.hasAction=function(t){var e=this.option.actions;return i.some(e,(function(e){return e[0]===t}))},t.prototype.create=function(t,e){var n=this.option,i=n.type,o=n.cfg,s=r.__assign({start:t,end:e},o),u=a.getCoordinate(this.isTheta()?"polar":i);return this.coordinate=new u(s),this.coordinate.type=i,this.isTheta()&&(this.hasAction("transpose")||this.transpose()),this.execActions(),this.coordinate},t.prototype.adjust=function(t,e){return this.coordinate.update({start:t,end:e}),this.coordinate.resetMatrix(),this.execActions(["scale","rotate","translate"]),this.coordinate},t.prototype.rotate=function(t){return this.option.actions.push(["rotate",t]),this},t.prototype.reflect=function(t){return this.option.actions.push(["reflect",t]),this},t.prototype.scale=function(t,e){return this.option.actions.push(["scale",t,e]),this},t.prototype.transpose=function(){return this.option.actions.push(["transpose"]),this},t.prototype.isTheta=function(){return"theta"===this.option.type},t.prototype.getOption=function(){return this.option},t.prototype.getCoordinate=function(){return this.coordinate},t.prototype.wrapperOption=function(t){return r.__assign({type:"rect",actions:[],cfg:{}},t)},t.prototype.execActions=function(t){var e=this,n=this.option.actions;i.each(n,(function(n){var r,a=n[0],o=n.slice(1);(!!i.isNil(t)||t.includes(a))&&(r=e.coordinate)[a].apply(r,o)}))},t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(123);e.default=function(t){var e=t.getController("axis"),n=t.getController("legend"),i=t.getController("annotation"),a=t.getController("slider"),o=r.calculatePadding(t);t.coordinateBBox=t.viewBBox.shrink(o),t.adjustCoordinate(),[e,a,n,i].forEach((function(t){t&&t.layout()}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(3),a=n(26),o=n(44),s=n(124);e.calculatePadding=function(t){var e=t.padding;if(!o.isAutoPadding(e))return o.parsePadding(e);var n=t.viewBBox,u=new s.PaddingCal;return r.each(t.getComponents(),(function(t){var e=t.component,r=t.type;if(r!==i.COMPONENT_TYPE.GRID&&r!==i.COMPONENT_TYPE.TOOLTIP){var o=e.getLayoutBBox(),s=new a.BBox(o.x,o.y,o.width,o.height);if(r===i.COMPONENT_TYPE.AXIS){var c=s.exceed(n);u.shrink(c)}else{var l=t.direction;u.inc(s,l)}}})),u.getPadding()}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.top=t,this.right=e,this.bottom=n,this.left=r}return t.prototype.shrink=function(t){var e=t[0],n=t[1],r=t[2],i=t[3];return this.top+=e,this.right+=n,this.bottom+=r,this.left+=i,this},t.prototype.inc=function(t,e){var n=t.width,i=t.height;switch(e){case r.DIRECTION.TOP:case r.DIRECTION.TOP_LEFT:case r.DIRECTION.TOP_RIGHT:this.top+=i;break;case r.DIRECTION.RIGHT:case r.DIRECTION.RIGHT_TOP:case r.DIRECTION.RIGHT_BOTTOM:this.right+=n;break;case r.DIRECTION.BOTTOM:case r.DIRECTION.BOTTOM_LEFT:case r.DIRECTION.BOTTOM_RIGHT:this.bottom+=i;break;case r.DIRECTION.LEFT:case r.DIRECTION.LEFT_TOP:case r.DIRECTION.LEFT_BOTTOM:this.left+=n}return this},t.prototype.getPadding=function(){return[this.top,this.right,this.bottom,this.left]},t}();e.PaddingCal=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(30),a=function(){function t(){this.scales={},this.syncScales={}}return t.prototype.createScale=function(t,e,n,a){var o=n,s=this.getScaleMeta(a);if(r.isEmpty(e)&&s){var u=s.scale,c={type:u.type};u.isCategory&&(c.values=u.values),o=r.deepMix(c,s.scaleDef,n)}var l=i.createScaleByField(t,e,o);return this.cacheScale(l,n,a),l},t.prototype.sync=function(){var t=this;r.each(this.syncScales,(function(e,n){var i=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,o=[];r.each(e,(function(e){var n=t.getScale(e);a=r.isNumber(n.max)?Math.max(a,n.max):a,i=r.isNumber(n.min)?Math.min(i,n.min):i,r.each(n.values,(function(t){o.includes(t)||o.push(t)}))})),r.each(e,(function(e){var n=t.getScale(e);n.isContinuous?n.change({min:i,max:a,values:o}):n.isCategory&&n.change({values:o})}))}))},t.prototype.cacheScale=function(t,e,n){var r=this.getScaleMeta(n);r&&r.scale.type===t.type?(i.syncScale(r.scale,t),r.scaleDef=e):(r={key:n,scale:t,scaleDef:e},this.scales[n]=r);var a=this.getSyncKey(r);this.removeFromSyncScales(n),a&&(this.syncScales[a]||(this.syncScales[a]=[]),this.syncScales[a].push(n))},t.prototype.getScale=function(t){var e=this.getScaleMeta(t);if(!e){var n=r.last(t.split("-"));this.syncScales[n]&&this.syncScales[n].length&&(e=this.getScaleMeta(this.syncScales[n][0]))}return e&&e.scale},t.prototype.clear=function(){this.scales={},this.syncScales={}},t.prototype.removeFromSyncScales=function(t){var e=this;r.each(this.syncScales,(function(n,r){var i=n.indexOf(t);if(-1!==i)return n.splice(i,1),0===n.length&&delete e.syncScales[r],!1}))},t.prototype.getSyncKey=function(t){var e=t.scale,n=t.scaleDef,i=e.field,a=r.get(n,["sync"]);return!0===a?i:!1===a?void 0:a},t.prototype.getScaleMeta=function(t){return this.scales[t]},t}();e.ScalePool=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(60);e.propagationDelegate=function(t,e,n){var i=new r.default(e,n);i.target=t,i.propagationPath.push(t),t.emitDelegation(e,i);for(var a=t.getParent();a;)a.emitDelegation(e,i),i.propagationPath.push(a),a=a.getParent()}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0);e.group=function(t,e,n){if(void 0===n&&(n={}),!e)return[t];var i=r.groupToMap(t,e),a=[];if(1===e.length&&n[e[0]])for(var o=0,s=n[e[0]];o=0;s--)(i=t[s])&&(o=(a<3?i(o):a>3?i(e,n,o):i(e,n))||o);return a>3&&o&&Object.defineProperty(e,n,o),o}function u(t,e){return function(n,r){e(n,r,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))((function(i,a){function o(t){try{u(r.next(t))}catch(t){a(t)}}function s(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}u((r=r.apply(t,e||[])).next())}))}function h(t,e){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function g(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{(n=i[t](e)).value instanceof y?Promise.resolve(n.value.v).then(u,c):l(a[0][2],n)}catch(t){l(a[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),a.shift(),a.length&&s(a[0][0],a[0][1])}}function x(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:y(t[r](e)),done:"return"===r}:i?i(e):e}:i}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=p(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,i){!function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)}(r,i,(e=t[n](e)).done,e.value)}))}}}function M(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function _(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function w(t){return t&&t.__esModule?t:{default:t}}function C(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function O(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sub=e.mul=void 0,e.create=function(){var t=new r.ARRAY_TYPE(9);return r.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},e.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},e.clone=function(t){var e=new r.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromValues=function(t,e,n,i,a,o,s,u,c){var l=new r.ARRAY_TYPE(9);return l[0]=t,l[1]=e,l[2]=n,l[3]=i,l[4]=a,l[5]=o,l[6]=s,l[7]=u,l[8]=c,l},e.set=function(t,e,n,r,i,a,o,s,u,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=u,t[8]=c,t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.transpose=function(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},e.invert=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=l*o-s*c,f=-l*a+s*u,p=c*a-o*u,d=n*h+r*f+i*p;return d?(d=1/d,t[0]=h*d,t[1]=(-l*r+i*c)*d,t[2]=(s*r-i*o)*d,t[3]=f*d,t[4]=(l*n-i*u)*d,t[5]=(-s*n+i*a)*d,t[6]=p*d,t[7]=(-c*n+r*u)*d,t[8]=(o*n-r*a)*d,t):null},e.adjoint=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],l=e[8];return t[0]=o*l-s*c,t[1]=i*c-r*l,t[2]=r*s-i*o,t[3]=s*u-a*l,t[4]=n*l-i*u,t[5]=i*a-n*s,t[6]=a*c-o*u,t[7]=r*u-n*c,t[8]=n*o-r*a,t},e.determinant=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],u=t[7],c=t[8];return e*(c*a-o*u)+n*(-c*i+o*s)+r*(u*i-a*s)},e.multiply=i,e.translate=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1];return t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=u,t[6]=f*r+p*o+c,t[7]=f*i+p*s+l,t[8]=f*a+p*u+h,t},e.rotate=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=Math.sin(n),p=Math.cos(n);return t[0]=p*r+f*o,t[1]=p*i+f*s,t[2]=p*a+f*u,t[3]=p*o-f*r,t[4]=p*s-f*i,t[5]=p*u-f*a,t[6]=c,t[7]=l,t[8]=h,t},e.scale=function(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},e.fromRotation=function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat2d=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},e.fromQuat=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n+n,s=r+r,u=i+i,c=n*o,l=r*o,h=r*s,f=i*o,p=i*s,d=i*u,g=a*o,v=a*s,y=a*u;return t[0]=1-h-d,t[3]=l-y,t[6]=f+v,t[1]=l+y,t[4]=1-c-d,t[7]=p-g,t[2]=f-v,t[5]=p+g,t[8]=1-c-h,t},e.normalFromMat4=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],g=e[13],v=e[14],y=e[15],m=n*s-r*o,x=n*u-i*o,b=n*c-a*o,M=r*u-i*s,_=r*c-a*s,w=i*c-a*u,C=l*g-h*d,O=l*v-f*d,A=l*y-p*d,P=h*v-f*g,S=h*y-p*g,E=f*y-p*v,I=m*E-x*S+b*P+M*A-_*O+w*C;return I?(I=1/I,t[0]=(s*E-u*S+c*P)*I,t[1]=(u*A-o*E-c*O)*I,t[2]=(o*S-s*A+c*C)*I,t[3]=(i*S-r*E-a*P)*I,t[4]=(n*E-i*A+a*O)*I,t[5]=(r*A-n*S-a*C)*I,t[6]=(g*w-v*_+y*M)*I,t[7]=(v*b-d*w-y*x)*I,t[8]=(d*_-g*b+y*m)*I,t):null},e.projection=function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},e.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},e.subtract=a,e.multiplyScalar=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},e.multiplyScalarAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},e.equals=function(t,e){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],f=e[0],p=e[1],d=e[2],g=e[3],v=e[4],y=e[5],m=e[6],x=e[7],b=e[8];return Math.abs(n-f)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(f))&&Math.abs(i-p)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(a-d)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(o-g)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(g))&&Math.abs(s-v)<=r.EPSILON*Math.max(1,Math.abs(s),Math.abs(v))&&Math.abs(u-y)<=r.EPSILON*Math.max(1,Math.abs(u),Math.abs(y))&&Math.abs(c-m)<=r.EPSILON*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(l-x)<=r.EPSILON*Math.max(1,Math.abs(l),Math.abs(x))&&Math.abs(h-b)<=r.EPSILON*Math.max(1,Math.abs(h),Math.abs(b))};var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(23));function i(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1],d=n[2],g=n[3],v=n[4],y=n[5],m=n[6],x=n[7],b=n[8];return t[0]=f*r+p*o+d*c,t[1]=f*i+p*s+d*l,t[2]=f*a+p*u+d*h,t[3]=g*r+v*o+y*c,t[4]=g*i+v*s+y*l,t[5]=g*a+v*u+y*h,t[6]=m*r+x*o+b*c,t[7]=m*i+x*s+b*l,t[8]=m*a+x*u+b*h,t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}e.mul=i,e.sub=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getPixelRatio=function(){return window?window.devicePixelRatio:1},e.distance=function(t,e,n,r){var i=t-n,a=e-r;return Math.sqrt(i*i+a*a)},e.inBox=function(t,e,n,r,i,a){return i>=t&&i<=t+n&&a>=e&&a<=e+r};var r=null;e.getOffScreenContext=function(){if(!r){var t=document.createElement("canvas");t.width=1,t.height=1,r=t.getContext("2d")}return r},e.intersectRect=function(t,e){return!(e.minX>t.maxX||e.maxXt.maxY||e.maxY0&&(a.isNil(i)||1===i||(t.globalAlpha=i),this.stroke(t)),this.afterDrawPath(t)},e.prototype.createPath=function(t){},e.prototype.afterDrawPath=function(t){},e.prototype.isInShape=function(t,e){var n=this.isStroke(),r=this.isFill(),i=this.getHitLineWidth();return this.isInStrokeOrPath(t,e,n,r,i)},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){return!1},e.prototype.getHitLineWidth=function(){if(!this.isStroke())return 0;var t=this.attrs;return t.lineWidth+t.lineAppendWidth},e}(i.AbstractShape);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.sqrDist=e.dist=e.div=e.mul=e.sub=e.len=void 0,e.create=a,e.clone=function(t){var e=new i.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},e.fromValues=function(t,e){var n=new i.ARRAY_TYPE(2);return n[0]=t,n[1]=e,n},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.set=function(t,e,n){return t[0]=e,t[1]=n,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},e.subtract=o,e.multiply=s,e.divide=u,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},e.scaleAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t},e.distance=c,e.squaredDistance=l,e.length=h,e.squaredLength=f,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},e.normalize=function(t,e){var n=e[0],r=e[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},e.lerp=function(t,e,n,r){var i=e[0],a=e[1];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t},e.random=function(t,e){e=e||1;var n=2*i.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.transformMat2=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t},e.transformMat2d=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t},e.transformMat3=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t},e.transformMat4=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t},e.rotate=function(t,e,n,r){var i=e[0]-n[0],a=e[1]-n[1],o=Math.sin(r),s=Math.cos(r);return t[0]=i*s-a*o+n[0],t[1]=i*o+a*s+n[1],t},e.angle=function(t,e){var n=t[0],r=t[1],i=e[0],a=e[1],o=n*n+r*r;o>0&&(o=1/Math.sqrt(o));var s=i*i+a*a;s>0&&(s=1/Math.sqrt(s));var u=(n*i+r*a)*o*s;return u>1?0:u<-1?Math.PI:Math.acos(u)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],r=t[1],a=e[0],o=e[1];return Math.abs(n-a)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-o)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(o))};var r,i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(23));function a(){var t=new i.ARRAY_TYPE(2);return i.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function o(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function s(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function u(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function c(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}function l(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function h(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function f(t){var e=t[0],n=t[1];return e*e+n*n}e.len=h,e.sub=o,e.mul=s,e.div=u,e.dist=c,e.sqrDist=l,e.sqrLen=f,e.forEach=(r=a(),function(t,e,n,i,a,o){var s,u=void 0;for(e||(e=2),n||(n=0),s=i?Math.min(i*e+n,t.length):t.length,u=n;u(n-t)*(n-t)+(i-e)*(i-e)?r.distance(n,i,a,o):this.pointToLine(t,e,n,i,a,o)},pointToLine:function(t,e,n,r,a,o){var s=[n-t,r-e];if(i.exactEquals(s,[0,0]))return Math.sqrt((a-t)*(a-t)+(o-e)*(o-e));var u=[-s[1],s[0]];i.normalize(u,u);var c=[a-t,o-e];return Math.abs(i.dot(c,u))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3);e.Base=r.default;var i=n(78);e.Circle=i.default;var a=n(79);e.Ellipse=a.default;var o=n(80);e.Image=o.default;var s=n(81);e.Line=s.default;var u=n(82);e.Marker=u.default;var c=n(84);e.Path=c.default;var l=n(90);e.Polygon=l.default;var h=n(91);e.Polyline=h.default;var f=n(94);e.Rect=f.default;var p=n(97);e.Text=p.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(20);e.default=function(t){return Array.isArray?Array.isArray(t):r.default(t,"Array")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(18),i=n(32),a=n(57),o=n(2),s=n(16),u={fill:"fillStyle",stroke:"strokeStyle",opacity:"globalAlpha"};function c(t){var e;if(t.destroyed)e=t._cacheCanvasBBox;else{var n=t.get("cacheCanvasBBox"),r=t.getCanvasBBox();e=o.mergeRegion(n,r)}return e}e.applyAttrsToContext=function(t,e){var n=e.attr();for(var a in n){var o=n[a],s=u[a]?u[a]:a;"matrix"===s&&o?t.transform(o[0],o[1],o[3],o[4],o[6],o[7]):"lineDash"===s&&t.setLineDash?r.isArray(o)&&t.setLineDash(o):("strokeStyle"===s||"fillStyle"===s?o=i.parseStyle(t,e,o):"globalAlpha"===s&&(o*=t.globalAlpha),t[s]=o)}},e.drawChildren=function(t,e,n){for(var r=0;r_?M:_,S=M>_?1:M/_,E=M>_?_/M:1;e.translate(x,b),e.rotate(O),e.scale(S,E),e.arc(0,0,P,w,C,1-A),e.scale(1/S,1/E),e.rotate(-O),e.translate(-x,-b)}break;case"Z":e.closePath()}if("Z"===d)c=l;else{var I=p.length;c=[p[I-2],p[I-1]]}}},e.refreshElement=function(t,e){var n=t.get("canvas");n&&("remove"===e&&(t._cacheCanvasBBox=t.get("cacheCanvasBBox")),t.get("hasChanged")||(n.refreshElement(t,e,n),n.get("autoDraw")&&n.draw(),t.set("hasChanged",!0)))},e.getRefreshRegion=c,e.getMergedRegion=function(t){if(!t.length)return null;var e=[],n=[],i=[],a=[];return r.each(t,(function(t){var r=c(t);r&&(e.push(r.minX),n.push(r.minY),i.push(r.maxX),a.push(r.maxY))})),{minX:Math.min.apply(null,e),minY:Math.min.apply(null,n),maxX:Math.max.apply(null,i),maxY:Math.max.apply(null,a)}}},function(t,e,n){"use strict";n.r(e),n.d(e,"version",(function(){return En})),n.d(e,"Event",(function(){return nt})),n.d(e,"Base",(function(){return Mt})),n.d(e,"AbstractCanvas",(function(){return An})),n.d(e,"AbstractGroup",(function(){return Pn})),n.d(e,"AbstractShape",(function(){return Sn})),n.d(e,"PathUtil",(function(){return r}));var r={};n.r(r),n.d(r,"catmullRomToBezier",(function(){return S})),n.d(r,"fillPath",(function(){return Z})),n.d(r,"fillPathByDiff",(function(){return K})),n.d(r,"formatPath",(function(){return et})),n.d(r,"intersection",(function(){return W})),n.d(r,"parsePathArray",(function(){return D})),n.d(r,"parsePathString",(function(){return P})),n.d(r,"pathToAbsolute",(function(){return I})),n.d(r,"pathToCurve",(function(){return L})),n.d(r,"rectPath",(function(){return X}));var i={};n.r(i),n.d(i,"easeLinear",(function(){return te})),n.d(i,"easeQuad",(function(){return re})),n.d(i,"easeQuadIn",(function(){return ee})),n.d(i,"easeQuadOut",(function(){return ne})),n.d(i,"easeQuadInOut",(function(){return re})),n.d(i,"easeCubic",(function(){return oe})),n.d(i,"easeCubicIn",(function(){return ie})),n.d(i,"easeCubicOut",(function(){return ae})),n.d(i,"easeCubicInOut",(function(){return oe})),n.d(i,"easePoly",(function(){return ce})),n.d(i,"easePolyIn",(function(){return se})),n.d(i,"easePolyOut",(function(){return ue})),n.d(i,"easePolyInOut",(function(){return ce})),n.d(i,"easeSin",(function(){return de})),n.d(i,"easeSinIn",(function(){return fe})),n.d(i,"easeSinOut",(function(){return pe})),n.d(i,"easeSinInOut",(function(){return de})),n.d(i,"easeExp",(function(){return ye})),n.d(i,"easeExpIn",(function(){return ge})),n.d(i,"easeExpOut",(function(){return ve})),n.d(i,"easeExpInOut",(function(){return ye})),n.d(i,"easeCircle",(function(){return be})),n.d(i,"easeCircleIn",(function(){return me})),n.d(i,"easeCircleOut",(function(){return xe})),n.d(i,"easeCircleInOut",(function(){return be})),n.d(i,"easeBounce",(function(){return we})),n.d(i,"easeBounceIn",(function(){return _e})),n.d(i,"easeBounceOut",(function(){return we})),n.d(i,"easeBounceInOut",(function(){return Ce})),n.d(i,"easeBack",(function(){return Pe})),n.d(i,"easeBackIn",(function(){return Oe})),n.d(i,"easeBackOut",(function(){return Ae})),n.d(i,"easeBackInOut",(function(){return Pe})),n.d(i,"easeElastic",(function(){return Ie})),n.d(i,"easeElasticIn",(function(){return Ee})),n.d(i,"easeElasticOut",(function(){return Ie})),n.d(i,"easeElasticInOut",(function(){return Te}));var a=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},o={}.toString,s=function(t,e){return o.call(t)==="[object "+e+"]"},u=function(t){return Array.isArray?Array.isArray(t):s(t,"Array")},c=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},l=function(t,e){if(t)if(u(t))for(var n=0,r=t.length;n2&&(n.push([i].concat(o.splice(0,2))),s="l",i="m"===i?"l":"L"),"o"===s&&1===o.length&&n.push([i,o[0]]),"r"===s)n.push([i].concat(o));else for(;o.length>=e[s]&&(n.push([i].concat(o.splice(0,e[s]))),e[s]););return t})),n},S=function(t,e){for(var n=[],r=0,i=t.length;i-2*!e>r;r+=2){var a=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?i-4===r?a[3]={x:+t[0],y:+t[1]}:i-2===r&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[i-2],y:+t[i-1]}:i-4===r?a[3]=a[2]:r||(a[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return n},E=function(t,e,n,r,i){var a=[];if(null===i&&null===r&&(r=n),t=+t,e=+e,n=+n,r=+r,null!==i){var o=Math.PI/180,s=t+n*Math.cos(-r*o),u=t+n*Math.cos(-i*o);a=[["M",s,e+n*Math.sin(-r*o)],["A",n,n,0,+(i-r>180),0,u,e+n*Math.sin(-i*o)]]}else a=[["M",t,e],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]];return a},I=function(t){if(!(t=P(t))||!t.length)return[["M",0,0]];var e,n,r=[],i=0,a=0,o=0,s=0,u=0;"M"===t[0][0]&&(o=i=+t[0][1],s=a=+t[0][2],u++,r[0]=["M",i,a]);for(var c=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),l=void 0,h=void 0,f=u,p=t.length;f1&&(n*=M=Math.sqrt(M),r*=M);var _=n*n,w=r*r,C=(a===o?-1:1)*Math.sqrt(Math.abs((_*w-_*b*b-w*x*x)/(_*b*b+w*x*x)));p=C*n*b/r+(t+s)/2,d=C*-r*x/n+(e+u)/2,h=Math.asin(((e-d)/r).toFixed(9)),f=Math.asin(((u-d)/r).toFixed(9)),h=tf&&(h-=2*Math.PI),!o&&f>h&&(f-=2*Math.PI)}var O=f-h;if(Math.abs(O)>g){var A=f,P=s,S=u;f=h+g*(o&&f>h?1:-1),s=p+n*Math.cos(f),u=d+r*Math.sin(f),y=j(s,u,n,r,i,0,o,P,S,[f,A,p,d])}O=f-h;var E=Math.cos(h),I=Math.sin(h),T=Math.cos(f),k=Math.sin(f),L=Math.tan(O/4),B=4/3*n*L,D=4/3*r*L,F=[t,e],R=[t+B*I,e-D*E],N=[s+B*k,u-D*T],Y=[s,u];if(R[0]=2*F[0]-R[0],R[1]=2*F[1]-R[1],c)return[R,N,Y].concat(y);for(var G=[],X=0,V=(y=[R,N,Y].concat(y).join().split(",")).length;X7){t[e].shift();for(var a=t[e];a.length;)s[e]="A",i&&(u[e]="A"),t.splice(e++,0,["C"].concat(a.splice(0,6)));t.splice(e,1),n=Math.max(r.length,i&&i.length||0)}},p=function(t,e,a,o,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",o.x,o.y]),a.bx=0,a.by=0,a.x=t[s][1],a.y=t[s][2],n=Math.max(r.length,i&&i.length||0))};n=Math.max(r.length,i&&i.length||0);for(var d=0;d1?1:u<0?0:u)/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,p=0;p<12;p++){var d=c*l[p]+c,g=F(d,t,n,i,o),v=F(d,e,r,a,s),y=g*g+v*v;f+=h[p]*Math.sqrt(y)}return c*f},N=function(t,e,n,r,i,a,o,s){for(var u,c,l,h,f=[],p=[[],[]],d=0;d<2;++d)if(0===d?(c=6*t-12*n+6*i,u=-3*t+9*n-9*i+3*o,l=3*n-3*t):(c=6*e-12*r+6*a,u=-3*e+9*r-9*a+3*s,l=3*r-3*e),Math.abs(u)<1e-12){if(Math.abs(c)<1e-12)continue;(h=-l/c)>0&&h<1&&f.push(h)}else{var g=c*c-4*l*u,v=Math.sqrt(g);if(!(g<0)){var y=(-c+v)/(2*u);y>0&&y<1&&f.push(y);var m=(-c-v)/(2*u);m>0&&m<1&&f.push(m)}}for(var x,b=f.length,M=b;b--;)x=1-(h=f[b]),p[0][b]=x*x*x*t+3*x*x*h*n+3*x*h*h*i+h*h*h*o,p[1][b]=x*x*x*e+3*x*x*h*r+3*x*h*h*a+h*h*h*s;return p[0][M]=t,p[1][M]=e,p[0][M+1]=o,p[1][M+1]=s,p[0].length=p[1].length=M+2,{min:{x:Math.min.apply(0,p[0]),y:Math.min.apply(0,p[1])},max:{x:Math.max.apply(0,p[0]),y:Math.max.apply(0,p[1])}}},Y=function(t,e,n,r,i,a,o,s){if(!(Math.max(t,n)Math.max(i,o)||Math.max(e,r)Math.max(a,s))){var u=(t-n)*(a-s)-(e-r)*(i-o);if(u){var c=((t*r-e*n)*(i-o)-(t-n)*(i*s-a*o))/u,l=((t*r-e*n)*(a-s)-(e-r)*(i*s-a*o))/u,h=+c.toFixed(2),f=+l.toFixed(2);if(!(h<+Math.min(t,n).toFixed(2)||h>+Math.max(t,n).toFixed(2)||h<+Math.min(i,o).toFixed(2)||h>+Math.max(i,o).toFixed(2)||f<+Math.min(e,r).toFixed(2)||f>+Math.max(e,r).toFixed(2)||f<+Math.min(a,s).toFixed(2)||f>+Math.max(a,s).toFixed(2)))return{x:c,y:l}}}},G=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},X=function(t,e,n,r,i){if(i)return[["M",+t+ +i,e],["l",n-2*i,0],["a",i,i,0,0,1,i,i],["l",0,r-2*i],["a",i,i,0,0,1,-i,i],["l",2*i-n,0],["a",i,i,0,0,1,-i,-i],["l",0,2*i-r],["a",i,i,0,0,1,i,-i],["z"]];var a=[["M",t,e],["l",n,0],["l",0,r],["l",-n,0],["z"]];return a.parsePathArray=D,a},V=function(t,e,n,r){return null===t&&(t=e=n=r=0),null===e&&(e=t.y,n=t.width,r=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:r,h:r,x2:t+n,y2:e+r,cx:t+n/2,cy:e+r/2,r1:Math.min(n,r)/2,r2:Math.max(n,r)/2,r0:Math.sqrt(n*n+r*r)/2,path:X(t,e,n,r),vb:[t,e,n,r].join(" ")}},q=function(t,e,n,r,i,a,o,s){u(t)||(t=[t,e,n,r,i,a,o,s]);var c=N.apply(null,t);return V(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)},z=function(t,e,n,r,i,a,o,s,u){var c=1-u,l=Math.pow(c,3),h=Math.pow(c,2),f=u*u,p=f*u,d=t+2*u*(n-t)+f*(i-2*n+t),g=e+2*u*(r-e)+f*(a-2*r+e),v=n+2*u*(i-n)+f*(o-2*i+n),y=r+2*u*(a-r)+f*(s-2*a+r);return{x:l*t+3*h*u*n+3*c*u*u*i+p*o,y:l*e+3*h*u*r+3*c*u*u*a+p*s,m:{x:d,y:g},n:{x:v,y:y},start:{x:c*t+u*n,y:c*e+u*r},end:{x:c*i+u*o,y:c*a+u*s},alpha:90-180*Math.atan2(d-v,g-y)/Math.PI}},H=function(t,e,n){if(!function(t,e){return t=V(t),e=V(e),G(e,t.x,t.y)||G(e,t.x2,t.y)||G(e,t.x,t.y2)||G(e,t.x2,t.y2)||G(t,e.x,e.y)||G(t,e.x2,e.y)||G(t,e.x,e.y2)||G(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(q(t),q(e)))return n?0:[];for(var r=~~(R.apply(0,t)/8),i=~~(R.apply(0,e)/8),a=[],o=[],s={},u=n?0:[],c=0;c=0&&x<=1&&b>=0&&b<=1&&(n?u+=1:u.push({x:m.x,y:m.y,t1:x,t2:b}))}}return u},W=function(t,e){return function(t,e,n){var r,i,a,o,s,u,c,l,h,f;t=L(t),e=L(e);for(var p=[],d=0,g=t.length;d=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e.concat(t[t.length-1])}))}(t,e,n));else{var i=[].concat(t);"M"===i[0]&&(i[0]="L");for(var a=0;a<=n-1;a++)r.push(i)}return r}(t[i],t[i+1],r))}),[]);return u.unshift(t[0]),"Z"!==e[r]&&"z"!==e[r]||u.push("Z"),u},Q=function(t,e){if(t.length!==e.length)return!1;var n=!0;return l(t,(function(t,r){if(t!==e[r])return n=!1,!1})),n};function $(t,e,n){var r=null,i=n;return e=0;u--)o=a[u].index,"add"===a[u].type?t.splice(o,0,[].concat(t[o])):t.splice(o,1)}var h=i-(r=t.length);if(r0)){t[r]=e[r];break}n=J(n,t[r-1],1)}t[r]=["Q"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[r]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(r>0)){t[r]=e[r];break}n=J(n,t[r-1],2)}t[r]=["C"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(n.length<2){if(!(r>0)){t[r]=e[r];break}n=J(n,t[r-1],1)}t[r]=["S"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[r]=e[r]}return t},nt=function(){function t(t,e){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}(),rt=function(t,e){return(rt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function it(t,e){function n(){this.constructor=t}rt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var at=n(45),ot=n.n(at),st=(n(11),n(19)),ut=n.n(st),ct=n(12),lt=n.n(ct),ht=n(13),ft=n.n(ht),pt=(n(8),n(21)),dt=n.n(pt),gt=n(14),vt=n.n(gt),yt=n(22),mt=n.n(yt);function xt(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}var bt="undefined"!=typeof window&&void 0!==window.document,Mt=function(t){function e(e){var n=t.call(this)||this;n.destroyed=!1;var r=n.getDefaultCfg();return n.cfg=dt()(r,e),n}return it(e,t),e.prototype.getDefaultCfg=function(){return{}},e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){this.cfg[t]=e},e.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},e}(ot.a),_t=n(1);_t.translate=function(t,e,n){var r=new Array(9);return _t.fromTranslation(r,n),_t.multiply(t,r,e)},_t.rotate=function(t,e,n){var r=new Array(9);return _t.fromRotation(r,n),_t.multiply(t,r,e)},_t.scale=function(t,e,n){var r=new Array(9);return _t.fromScaling(r,n),_t.multiply(t,r,e)},_t.transform=function(t,e){for(var n=[].concat(t),r=0,i=e.length;rn?n:t}(n,-1,1))},Ct.direction=function(t,e){return t[0]*e[1]-e[0]*t[1]},Ct.angleTo=function(t,e,n){var r=Ct.angle(t,e),i=Ct.direction(t,e)>=0;return n?i?2*Math.PI-r:r:i?r:2*Math.PI-r},Ct.vertical=function(t,e,n){return n?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t},n(46);var Ot=function(t,e){var n=t?m(t):[1,0,0,0,1,0,0,0,1];return l(e,(function(t){switch(t[0]){case"t":wt.translate(n,n,[t[1],t[2]]);break;case"s":wt.scale(n,n,[t[1],t[2]]);break;case"r":wt.rotate(n,n,t[1]);break;case"m":wt.multiply(n,n,t[1]);break;default:return!1}})),n};function At(t,e){var n=[],r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],f=e[0],p=e[1],d=e[2],g=e[3],v=e[4],y=e[5],m=e[6],x=e[7],b=e[8];return n[0]=f*r+p*o+d*c,n[1]=f*i+p*s+d*l,n[2]=f*a+p*u+d*h,n[3]=g*r+v*o+y*c,n[4]=g*i+v*s+y*l,n[5]=g*a+v*u+y*h,n[6]=m*r+x*o+b*c,n[7]=m*i+x*s+b*l,n[8]=m*a+x*u+b*h,n}function Pt(t,e){var n=[],r=e[0],i=e[1];return n[0]=t[0]*r+t[3]*i+t[6],n[1]=t[1]*r+t[4]*i+t[7],n}var St=["zIndex","capture","visible","type"],Et=["repeat"];function It(t,e){var n={},r=e.attrs;for(var i in t)n[i]=r[i];return n}function Tt(t,e){var n={},r=e.attr();return l(t,(function(t,e){-1!==Et.indexOf(e)||b(r[e],t)||(n[e]=t)})),n}function kt(t,e){if(e.onFrame)return t;var n=e.startTime,r=e.delay,i=e.duration,a=Object.prototype.hasOwnProperty;return l(t,(function(t){n+rt.delay&&l(e.toAttrs,(function(e,n){a.call(t.toAttrs,n)&&(delete t.toAttrs[n],delete t.fromAttrs[n])}))})),t}var jt=function(t){function e(e){var n=t.call(this,e)||this;n.attrs={};var r=n.getDefaultAttrs();return function(t,e,n,r){e&&v(t,e),n&&v(t,n),r&&v(t,r)}(r,e.attrs),n.attrs=r,n.initAttrs(r),n.initAnimate(),n}return it(e,t),e.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},e.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},e.prototype.onCanvasChange=function(t){},e.prototype.initAttrs=function(t){},e.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},e.prototype.isGroup=function(){return!1},e.prototype.getParent=function(){return this.get("parent")},e.prototype.getCanvas=function(){return this.get("canvas")},e.prototype.attr=function(){for(var t,e=[],n=0;n0?r=kt(r,M):n.addAnimator(this),r.push(M),this.set("animations",r),this.set("_pause",{isPaused:!1})},e.prototype.stopAnimate=function(t){var e=this;void 0===t&&(t=!0);var n=this.get("animations");l(n,(function(n){t&&(n.onFrame?e.attr(n.onFrame(1)):e.attr(n.toAttrs)),n.callback&&n.callback()})),this.set("animating",!1),this.set("animations",[])},e.prototype.pauseAnimate=function(){var t=this.get("timeline"),e=this.get("animations");return l(e,(function(t){t.pauseCallback&&t.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:t.getTime()}),this},e.prototype.resumeAnimate=function(){var t=this.get("timeline").getTime(),e=this.get("animations"),n=this.get("_pause").pauseTime;return l(e,(function(e){e.startTime=e.startTime+(t-n),e._paused=!1,e._pauseTime=null,e.resumeCallback&&e.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",e),this},e.prototype.emitDelegation=function(t,e){for(var n=e.propagationPath,r=this.getEvents(),i=0;i0)}));return o.length>0?(vt()(o,(function(t){var e=t.getBBox();i.push(e.minX,e.maxX),a.push(e.minY,e.maxY)})),t=Math.min.apply(null,i),e=Math.max.apply(null,i),n=Math.min.apply(null,a),r=Math.max.apply(null,a)):(t=0,e=0,n=0,r=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:r,width:e-t,height:r-n}},e.prototype.getCanvasBBox=function(){var t=1/0,e=-1/0,n=1/0,r=-1/0,i=[],a=[],o=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));return o.length>0?(vt()(o,(function(t){var e=t.getCanvasBBox();i.push(e.minX,e.maxX),a.push(e.minY,e.maxY)})),t=Math.min.apply(null,i),e=Math.max.apply(null,i),n=Math.min.apply(null,a),r=Math.max.apply(null,a)):(t=0,e=0,n=0,r=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:r,width:e-t,height:r-n}},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.children=[],e},e.prototype.onAttrChange=function(e,n,r){if(t.prototype.onAttrChange.call(this,e,n,r),"matrix"===e){var i=this.getTotalMatrix();this._applyChildrenMarix(i)}},e.prototype.applyMatrix=function(e){var n=this.getTotalMatrix();t.prototype.applyMatrix.call(this,e);var r=this.getTotalMatrix();r!==n&&this._applyChildrenMarix(r)},e.prototype._applyChildrenMarix=function(t){var e=this.getChildren();vt()(e,(function(e){e.applyMatrix(t)}))},e.prototype.addShape=function(){for(var t=[],e=0;e=0;a--){var o=t[a];if(Bt(o)&&(o.isGroup()?i=o.getShape(e,n,r):o.isHit(e,n)&&(i=o)),i)break}return i},e.prototype.add=function(t){var e=this.getCanvas(),n=this.getChildren(),r=this.get("timeline"),i=t.getParent();i&&function(t,e,n){void 0===n&&(n=!0),n?e.destroy():(e.set("parent",null),e.set("canvas",null)),xt(t.getChildren(),e)}(i,t,!1),t.set("parent",this),e&&function t(e,n){if(e.set("canvas",n),e.isGroup()){var r=e.get("children");r.length&&r.forEach((function(e){t(e,n)}))}}(t,e),r&&function t(e,n){if(e.set("timeline",n),e.isGroup()){var r=e.get("children");r.length&&r.forEach((function(e){t(e,n)}))}}(t,r),n.push(t),function(t){t.isGroup()?(t.isEntityGroup()||t.get("children").length)&&t.onCanvasChange("add"):t.onCanvasChange("add")}(t),this._applyElementMatrix(t)},e.prototype._applyElementMatrix=function(t){var e=this.getTotalMatrix();e&&t.applyMatrix(e)},e.prototype.getChildren=function(){return this.get("children")},e.prototype.sort=function(){var t,e=this.getChildren();vt()(e,(function(t,e){return t._INDEX=e,t})),e.sort((t=function(t,e){return t.get("zIndex")-e.get("zIndex")},function(e,n){var r=t(e,n);return 0===r?e._INDEX-n._INDEX:r})),this.onCanvasChange("sort")},e.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),e=t.length-1;e>=0;e--)t[e].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},e.prototype.destroy=function(){this.get("destroyed")||(this.clear(),t.prototype.destroy.call(this))},e.prototype.getFirst=function(){return this.getChildByIndex(0)},e.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},e.prototype.getChildByIndex=function(t){return this.getChildren()[t]},e.prototype.getCount=function(){return this.getChildren().length},e.prototype.contain=function(t){return this.getChildren().indexOf(t)>-1},e.prototype.removeChild=function(t,e){void 0===e&&(e=!0),this.contain(t)&&t.remove(e)},e.prototype.findAll=function(t){var e=[],n=this.getChildren();return vt()(n,(function(n){t(n)&&e.push(n),n.isGroup()&&(e=e.concat(n.findAll(t)))})),e},e.prototype.find=function(t){var e=null,n=this.getChildren();return vt()(n,(function(n){if(t(n)?e=n:n.isGroup()&&(e=n.find(t)),e)return!1})),e},e.prototype.findById=function(t){return this.find((function(e){return e.get("id")===t}))},e.prototype.findByClassName=function(t){return this.find((function(e){return e.get("className")===t}))},e.prototype.findAllByName=function(t){return this.findAll((function(e){return e.get("name")===t}))},e}(jt),Nt=0,Yt=0,Gt=0,Xt=0,Vt=0,qt=0,zt="object"==typeof performance&&performance.now?performance:Date,Ht="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Wt(){return Vt||(Ht(Ut),Vt=zt.now()+qt)}function Ut(){Vt=0}function Zt(){this._call=this._time=this._next=null}function Qt(t,e,n){var r=new Zt;return r.restart(t,e,n),r}function $t(){Vt=(Xt=zt.now())+qt,Nt=Yt=0;try{!function(){Wt(),++Nt;for(var t,e=Dt;e;)(t=Vt-e._time)>=0&&e._call.call(null,t),e=e._next;--Nt}()}finally{Nt=0,function(){for(var t,e,n=Dt,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Dt=e);Ft=t,Jt(r)}(),Vt=0}}function Kt(){var t=zt.now(),e=t-Xt;e>1e3&&(qt-=e,Xt=t)}function Jt(t){Nt||(Yt&&(Yt=clearTimeout(Yt)),t-Vt>24?(t<1/0&&(Yt=setTimeout($t,t-zt.now()-qt)),Gt&&(Gt=clearInterval(Gt))):(Gt||(Xt=zt.now(),Gt=setInterval(Kt,1e3)),Nt=1,Ht($t)))}function te(t){return+t}function ee(t){return t*t}function ne(t){return t*(2-t)}function re(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function ie(t){return t*t*t}function ae(t){return--t*t*t+1}function oe(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Zt.prototype=Qt.prototype={constructor:Zt,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Wt():+n)+(null==e?0:+e),this._next||Ft===this||(Ft?Ft._next=this:Dt=this,Ft=this),this._call=t,this._time=n,Jt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jt())}};var se=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),ue=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),ce=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),le=Math.PI,he=le/2;function fe(t){return 1-Math.cos(t*he)}function pe(t){return Math.sin(t*he)}function de(t){return(1-Math.cos(le*t))/2}function ge(t){return Math.pow(2,10*t-10)}function ve(t){return 1-Math.pow(2,-10*t)}function ye(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function me(t){return 1-Math.sqrt(1-t*t)}function xe(t){return Math.sqrt(1- --t*t)}function be(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Me=7.5625;function _e(t){return 1-we(1-t)}function we(t){return(t=+t)<4/11?Me*t*t:t<8/11?Me*(t-=6/11)*t+3/4:t<10/11?Me*(t-=9/11)*t+15/16:Me*(t-=21/22)*t+63/64}function Ce(t){return((t*=2)<=1?1-we(1-t):we(t-1)+1)/2}var Oe=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),Ae=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),Pe=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),Se=2*Math.PI,Ee=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Se);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Se)},i.period=function(n){return t(e,n)},i}(1,.3),Ie=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Se);function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*Se)},i.period=function(n){return t(e,n)},i}(1,.3),Te=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Se);function i(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*Se)},i.period=function(n){return t(e,n)},i}(1,.3),ke=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function je(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Le(){}var Be="\\s*([+-]?\\d+)\\s*",De="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Re=/^#([0-9a-f]{3,8})$/,Ne=new RegExp("^rgb\\("+[Be,Be,Be]+"\\)$"),Ye=new RegExp("^rgb\\("+[Fe,Fe,Fe]+"\\)$"),Ge=new RegExp("^rgba\\("+[Be,Be,Be,De]+"\\)$"),Xe=new RegExp("^rgba\\("+[Fe,Fe,Fe,De]+"\\)$"),Ve=new RegExp("^hsl\\("+[De,Fe,Fe]+"\\)$"),qe=new RegExp("^hsla\\("+[De,Fe,Fe,De]+"\\)$"),ze={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function He(){return this.rgb().formatHex()}function We(){return this.rgb().formatRgb()}function Ue(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Re.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Ze(e):3===n?new Je(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Je(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Je(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Ne.exec(t))?new Je(e[1],e[2],e[3],1):(e=Ye.exec(t))?new Je(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ge.exec(t))?Qe(e[1],e[2],e[3],e[4]):(e=Xe.exec(t))?Qe(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ve.exec(t))?rn(e[1],e[2]/100,e[3]/100,1):(e=qe.exec(t))?rn(e[1],e[2]/100,e[3]/100,e[4]):ze.hasOwnProperty(t)?Ze(ze[t]):"transparent"===t?new Je(NaN,NaN,NaN,0):null}function Ze(t){return new Je(t>>16&255,t>>8&255,255&t,1)}function Qe(t,e,n,r){return r<=0&&(t=e=n=NaN),new Je(t,e,n,r)}function $e(t){return t instanceof Le||(t=Ue(t)),t?new Je((t=t.rgb()).r,t.g,t.b,t.opacity):new Je}function Ke(t,e,n,r){return 1===arguments.length?$e(t):new Je(t,e,n,null==r?1:r)}function Je(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function tn(){return"#"+nn(this.r)+nn(this.g)+nn(this.b)}function en(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function nn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function rn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new on(t,e,n,r)}function an(t){if(t instanceof on)return new on(t.h,t.s,t.l,t.opacity);if(t instanceof Le||(t=Ue(t)),!t)return new on;if(t instanceof on)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n0&&u<1?0:o,new on(o,s,u,t.opacity)}function on(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function sn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function un(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}ke(Le,Ue,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:He,formatHex:He,formatHsl:function(){return an(this).formatHsl()},formatRgb:We,toString:We}),ke(Je,Ke,je(Le,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Je(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Je(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:tn,formatHex:tn,formatRgb:en,toString:en})),ke(on,(function(t,e,n,r){return 1===arguments.length?an(t):new on(t,e,n,null==r?1:r)}),je(Le,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new on(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new on(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Je(sn(t>=240?t-240:t+120,i,r),sn(t,i,r),sn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var cn=function(t){return function(){return t}};function ln(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):cn(isNaN(t)?e:t)}var hn=function t(e){var n=function(t){return 1==(t=+t)?ln:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):cn(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=Ke(t)).r,(e=Ke(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=ln(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function fn(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=ra&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,u.push({i:o,x:yn(n,r)})),a=bn.lastIndex;return ap.length?(f=P(a[l]),p=P(i[l]),p=K(p,f),p=et(p,f),e.fromAttrs.path=p,e.toAttrs.path=f):e.pathFormatted||(f=P(a[l]),p=P(i[l]),p=et(p,f),e.fromAttrs.path=p,e.toAttrs.path=f,e.pathFormatted=!0),r[l]=[];for(var d=0;d0){for(var a=r.animators.length-1;a>=0;a--)if((t=r.animators[a]).destroyed)r.removeAnimator(a);else{if(!t.isAnimatePaused())for(var o=(e=t.get("animations")).length-1;o>=0;o--)n=e[o],Cn(t,n,i)&&(e.splice(o,1),n.callback&&n.callback());0===e.length&&r.removeAnimator(a)}r.canvas.get("autoDraw")||r.canvas.draw()}}))},t.prototype.addAnimator=function(t){this.animators.push(t)},t.prototype.removeAnimator=function(t){this.animators.splice(t,1)},t.prototype.isAnimating=function(){return!!this.animators.length},t.prototype.stop=function(){this.timer&&this.timer.stop()},t.prototype.stopAllAnimations=function(t){void 0===t&&(t=!0),this.animators.forEach((function(e){e.stopAnimate(t)})),this.animators=[],this.canvas.draw()},t.prototype.getTime=function(){return this.current},t}(),An=function(t){function e(e){var n=t.call(this,e)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}return it(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.cursor="default",e},e.prototype.initContainer=function(){var t=this.get("container");lt()(t)&&(t=document.getElementById(t),this.set("container",t))},e.prototype.initDom=function(){var t=this.createDom();this.set("el",t),this.get("container").appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},e.prototype.initEvents=function(){},e.prototype.initTimeline=function(){var t=new On(this);this.set("timeline",t)},e.prototype.setDOMSize=function(t,e){var n=this.get("el");bt&&(n.style.width=t+"px",n.style.height=e+"px")},e.prototype.changeSize=function(t,e){this.setDOMSize(t,e),this.set("width",t),this.set("height",e),this.onCanvasChange("changeSize")},e.prototype.getRenderer=function(){return this.get("renderer")},e.prototype.getCursor=function(){return this.get("cursor")},e.prototype.setCursor=function(t){this.set("cursor",t);var e=this.get("el");bt&&e&&(e.style.cursor=t)},e.prototype.getPointByClient=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t-n.left,y:e-n.top}},e.prototype.getClientByPoint=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t+n.left,y:e+n.top}},e.prototype.draw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},e.prototype.clearEvents=function(){},e.prototype.isCanvas=function(){return!0},e.prototype.getParent=function(){return null},e.prototype.destroy=function(){var e=this.get("timeline");this.get("destroyed")||(this.clear(),e&&e.stop(),this.clearEvents(),this.removeDom(),t.prototype.destroy.call(this))},e}(Rt),Pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return it(e,t),e.prototype.isGroup=function(){return!0},e.prototype.isEntityGroup=function(){return!1},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=this.getChildren(),r=0;r=t&&n.minY<=e&&n.maxY>=e},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e),this.clearCacheBBox()},e.prototype.getBBox=function(){var t=this.get("bbox");return t||(t=this.calculateBBox(),this.set("bbox",t)),t},e.prototype.getCanvasBBox=function(){var t=this.get("canvasBox");return t||(t=this.calculateCanvasBBox(),this.set("canvasBox",t)),t},e.prototype.applyMatrix=function(e){t.prototype.applyMatrix.call(this,e),this.set("canvasBox",null)},e.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),e=this.getTotalMatrix(),n=t.minX,r=t.minY,i=t.maxX,a=t.maxY;if(e){var o=Pt(e,[t.minX,t.minY]),s=Pt(e,[t.maxX,t.minY]),u=Pt(e,[t.minX,t.maxY]),c=Pt(e,[t.maxX,t.maxY]);n=Math.min(o[0],s[0],u[0],c[0]),i=Math.max(o[0],s[0],u[0],c[0]),r=Math.min(o[1],s[1],u[1],c[1]),a=Math.max(o[1],s[1],u[1],c[1])}var l=this.attrs;if(l.shadowColor){var h=l.shadowBlur,f=void 0===h?0:h,p=l.shadowOffsetX,d=void 0===p?0:p,g=l.shadowOffsetY,v=void 0===g?0:g,y=n-f+d,m=i+f+d,x=r-f+v,b=a+f+v;n=Math.min(n,y),i=Math.max(i,m),r=Math.min(r,x),a=Math.max(a,b)}return{x:n,y:r,minX:n,minY:r,maxX:i,maxY:a,width:i-n,height:a-r}},e.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBox",null)},e.prototype.isClipShape=function(){return this.get("isClipShape")},e.prototype.isInShape=function(t,e){return!1},e.prototype.isOnlyHitBox=function(){return!1},e.prototype.isHit=function(t,e){var n=this.get("startArrowShape"),r=this.get("endArrowShape"),i=[t,e,1],a=(i=this.invertFromMatrix(i))[0],o=i[1],s=this._isInBBox(a,o);if(this.isOnlyHitBox())return s;if(s&&!this.isClipped(a,o)){if(this.isInShape(a,o))return!0;if(n&&n.isHit(a,o))return!0;if(r&&r.isHit(a,o))return!0}return!1},e}(jt),En=n(49).version},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return null==t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(20);e.default=function(t){return r.default(t,"String")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),i=n(13);e.default=function(t,e){if(t)if(r.default(t))for(var n=0,a=t.length;n=u-f&&o<=c+f&&s>=l-f&&s<=h+f&&r.default.pointToLine(t,e,n,i,o,s)<=a/2}},function(t,e,n){"use strict";n.r(e),n.d(e,"contains",(function(){return i})),n.d(e,"includes",(function(){return i})),n.d(e,"difference",(function(){return h})),n.d(e,"find",(function(){return m})),n.d(e,"findIndex",(function(){return x})),n.d(e,"firstValue",(function(){return b})),n.d(e,"flatten",(function(){return M})),n.d(e,"flattenDeep",(function(){return w})),n.d(e,"getRange",(function(){return C})),n.d(e,"pull",(function(){return S})),n.d(e,"pullAt",(function(){return I})),n.d(e,"reduce",(function(){return T})),n.d(e,"remove",(function(){return k})),n.d(e,"sortBy",(function(){return L})),n.d(e,"union",(function(){return D})),n.d(e,"uniq",(function(){return B})),n.d(e,"valuesOfKey",(function(){return F})),n.d(e,"head",(function(){return R})),n.d(e,"last",(function(){return N})),n.d(e,"startsWith",(function(){return Y})),n.d(e,"endsWith",(function(){return G})),n.d(e,"filter",(function(){return l})),n.d(e,"every",(function(){return X})),n.d(e,"some",(function(){return V})),n.d(e,"group",(function(){return W})),n.d(e,"groupBy",(function(){return z})),n.d(e,"groupToMap",(function(){return H})),n.d(e,"getWrapBehavior",(function(){return U})),n.d(e,"wrapBehavior",(function(){return Z})),n.d(e,"number2color",(function(){return $})),n.d(e,"parseRadius",(function(){return K})),n.d(e,"clamp",(function(){return J})),n.d(e,"fixedBase",(function(){return tt})),n.d(e,"isDecimal",(function(){return nt})),n.d(e,"isEven",(function(){return rt})),n.d(e,"isInteger",(function(){return it})),n.d(e,"isNegative",(function(){return at})),n.d(e,"isNumberEqual",(function(){return ot})),n.d(e,"isOdd",(function(){return st})),n.d(e,"isPositive",(function(){return ut})),n.d(e,"maxBy",(function(){return ct})),n.d(e,"minBy",(function(){return lt})),n.d(e,"mod",(function(){return ht})),n.d(e,"toDegree",(function(){return pt})),n.d(e,"toInteger",(function(){return dt})),n.d(e,"toRadian",(function(){return vt})),n.d(e,"forIn",(function(){return yt})),n.d(e,"has",(function(){return mt})),n.d(e,"hasKey",(function(){return xt})),n.d(e,"hasValue",(function(){return Mt})),n.d(e,"keys",(function(){return d})),n.d(e,"isMatch",(function(){return g})),n.d(e,"values",(function(){return bt})),n.d(e,"lowerCase",(function(){return wt})),n.d(e,"lowerFirst",(function(){return Ct})),n.d(e,"substitute",(function(){return Ot})),n.d(e,"upperCase",(function(){return At})),n.d(e,"upperFirst",(function(){return Pt})),n.d(e,"getType",(function(){return Et})),n.d(e,"isArguments",(function(){return It})),n.d(e,"isArray",(function(){return s})),n.d(e,"isArrayLike",(function(){return r})),n.d(e,"isBoolean",(function(){return Tt})),n.d(e,"isDate",(function(){return kt})),n.d(e,"isError",(function(){return jt})),n.d(e,"isFunction",(function(){return f})),n.d(e,"isFinite",(function(){return Lt})),n.d(e,"isNil",(function(){return p})),n.d(e,"isNull",(function(){return Bt})),n.d(e,"isNumber",(function(){return et})),n.d(e,"isObject",(function(){return u})),n.d(e,"isObjectLike",(function(){return v})),n.d(e,"isPlainObject",(function(){return y})),n.d(e,"isPrototype",(function(){return Ft})),n.d(e,"isRegExp",(function(){return Rt})),n.d(e,"isString",(function(){return j})),n.d(e,"isType",(function(){return o})),n.d(e,"isUndefined",(function(){return Nt})),n.d(e,"isElement",(function(){return Yt})),n.d(e,"requestAnimationFrame",(function(){return Gt})),n.d(e,"clearAnimationFrame",(function(){return Xt})),n.d(e,"augment",(function(){return zt})),n.d(e,"clone",(function(){return Wt})),n.d(e,"debounce",(function(){return Ut})),n.d(e,"memoize",(function(){return Zt})),n.d(e,"deepMix",(function(){return $t})),n.d(e,"each",(function(){return c})),n.d(e,"extend",(function(){return Kt})),n.d(e,"indexOf",(function(){return Jt})),n.d(e,"isEmpty",(function(){return ee})),n.d(e,"isEqual",(function(){return re})),n.d(e,"isEqualWith",(function(){return ie})),n.d(e,"map",(function(){return ae})),n.d(e,"mapValues",(function(){return se})),n.d(e,"mix",(function(){return qt})),n.d(e,"assign",(function(){return qt})),n.d(e,"get",(function(){return ue})),n.d(e,"set",(function(){return ce})),n.d(e,"pick",(function(){return he})),n.d(e,"throttle",(function(){return fe})),n.d(e,"toArray",(function(){return pe})),n.d(e,"toString",(function(){return _t})),n.d(e,"uniqueId",(function(){return ge})),n.d(e,"noop",(function(){return ve})),n.d(e,"identity",(function(){return ye})),n.d(e,"size",(function(){return me})),n.d(e,"Cache",(function(){return xe}));var r=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},i=function(t,e){return!!r(t)&&t.indexOf(e)>-1},a={}.toString,o=function(t,e){return a.call(t)==="[object "+e+"]"},s=function(t){return Array.isArray?Array.isArray(t):o(t,"Array")},u=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},c=function(t,e){if(t)if(s(t))for(var n=0,r=t.length;n-1;)A.call(t,a,1);return t},E=Array.prototype.splice,I=function(t,e){if(!r(t))return[];for(var n=t?e.length:0,i=n-1;n--;){var a=void 0,o=e[n];n!==i&&o===a||(a=o,E.call(t,o,1))}return t},T=function(t,e,n){if(!s(t)&&!y(t))return t;var r=n;return c(t,(function(t,n){r=e(r,t,n)})),r},k=function(t,e){var n=[];if(!r(t))return n;for(var i=-1,a=[],o=t.length;++ie[i])return 1;if(t[i]n?n:t},tt=function(t,e){var n=e.toString(),r=n.indexOf(".");if(-1===r)return Math.round(t);var i=n.substr(r+1).length;return i>20&&(i=20),parseFloat(t.toFixed(i))},et=function(t){return o(t,"Number")},nt=function(t){return et(t)&&t%1!=0},rt=function(t){return et(t)&&t%2==0},it=Number.isInteger?Number.isInteger:function(t){return et(t)&&t%1==0},at=function(t){return et(t)&&t<0};function ot(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)0},ct=function(t,e){if(s(t)){var n,r,i=t[0];return n=f(e)?e(t[0]):t[0][e],c(t,(function(t){(r=f(e)?e(t):t[e])>n&&(i=t,n=r)})),i}},lt=function(t,e){if(s(t)){var n,r,i=t[0];return n=f(e)?e(t[0]):t[0][e],c(t,(function(t){(r=f(e)?e(t):t[e])e?(r&&(clearTimeout(r),r=null),s=c,o=t.apply(i,a),r||(i=a=null)):r||!1===n.trailing||(r=setTimeout(u,l)),o};return c.cancel=function(){clearTimeout(r),s=0,r=i=a=null},c},pe=function(t){return r(t)?Array.prototype.slice.call(t):[]},de={},ge=function(t){return de[t=t||"g"]?de[t]+=1:de[t]=1,t+de[t]},ve=function(){},ye=function(t){return t};function me(t){return p(t)?0:r(t)?t.length:Object.keys(t).length}var xe=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(20);e.default=function(t){return r.default(t,"Function")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={}.toString;e.default=function(t,e){return r.call(t)==="[object "+e+"]"}},function(t,e,n){"use strict";function r(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n,i){return e&&r(t,e),n&&r(t,n),i&&r(t,i),t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(50);e.default=function(t){var e=r.default(t);return e.charAt(0).toUpperCase()+e.substring(1)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=function(t){e.ARRAY_TYPE=t},e.toRadian=function(t){return t*i},e.equals=function(t,e){return Math.abs(t-e)<=r*Math.max(1,Math.abs(t),Math.abs(e))};var r=e.EPSILON=1e-6;e.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,e.RANDOM=Math.random;var i=Math.PI/180},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={}.toString;e.default=function(t,e){return r.call(t)==="[object "+e+"]"}},function(t,e,n){"use strict";function r(t,e){return t&&e?{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}:t||e}Object.defineProperty(e,"__esModule",{value:!0}),e.mergeBBox=r,e.mergeArrowBBox=function(t,e){var n=t.get("startArrowShape"),i=t.get("endArrowShape");return n&&(e=r(e,n.getCanvasBBox())),i&&(e=r(e,i.getCanvasBBox())),e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5),i=n(6),a=n(36);function o(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function s(t,e,n,r,i){var a=1-i;return 3*(a*a*(e-t)+2*a*i*(n-e)+i*i*(r-n))}function u(t,e,n,i){var a,o,s,u=-3*t+9*e-9*n+3*i,c=6*t-12*e+6*n,l=3*e-3*t,h=[];if(r.isNumberEqual(u,0))r.isNumberEqual(c,0)||(a=-l/c)>=0&&a<=1&&h.push(a);else{var f=c*c-4*u*l;r.isNumberEqual(f,0)?h.push(-c/(2*u)):f>0&&(o=(-c-(s=Math.sqrt(f)))/(2*u),(a=(-c+s)/(2*u))>=0&&a<=1&&h.push(a),o>=0&&o<=1&&h.push(o))}return h}function c(t,e,n,r,a,s,u,c,l){var h=o(t,n,a,u,l),f=o(e,r,s,c,l),p=i.default.pointAt(t,e,n,r,l),d=i.default.pointAt(n,r,a,s,l),g=i.default.pointAt(a,s,u,c,l),v=i.default.pointAt(p.x,p.y,d.x,d.y,l),y=i.default.pointAt(d.x,d.y,g.x,g.y,l);return[[t,e,p.x,p.y,v.x,v.y,h,f],[h,f,y.x,y.y,g.x,g.y,u,c]]}e.default={extrema:u,box:function(t,e,n,i,a,s,c,l){for(var h=[t,c],f=[e,l],p=u(t,n,a,c),d=u(e,i,s,l),g=0;g=0&&s<.5*Math.PI?(r={x:l.minX,y:l.minY},a={x:l.maxX,y:l.maxY}):.5*Math.PI<=s&&s1?e*i+a(e,n)*(i-1):e},e.getLineSpaceing=a,e.getTextWidth=function(t,e){var n=i.getOffScreenContext(),a=0;if(r.isNil(t)||""===t)return a;if(n.save(),n.font=e,r.isString(t)&&t.includes("\n")){var o=t.split("\n");r.each(o,(function(t){var e=n.measureText(t).width;a=0?[a]:[]}function u(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function c(t,e,n,i,a,s,u){var c=o(t,n,a,u),l=o(e,i,s,u),h=r.default.pointAt(t,e,n,i,u),f=r.default.pointAt(n,i,a,s,u);return[[t,e,h.x,h.y,c,l],[c,l,f.x,f.y,a,s]]}e.default={box:function(t,e,n,r,a,u){var c=s(t,n,a)[0],l=s(e,r,u)[0],h=[t,a],f=[e,u];return void 0!==c&&h.push(o(t,n,a,c)),void 0!==l&&f.push(o(e,r,u,l)),i.getBBoxByArray(h,f)},length:function(t,e,n,r,a,o){return function t(e,n,r,a,o,s,u){if(0===u)return(i.distance(e,n,r,a)+i.distance(r,a,o,s)+i.distance(e,n,o,s))/2;var l=c(e,n,r,a,o,s,.5),h=l[0],f=l[1];return h.push(u-1),f.push(u-1),t.apply(null,h)+t.apply(null,f)}(t,e,n,r,a,o,3)},nearestPoint:function(t,e,n,r,i,s,u,c){return a.nearestPoint([t,n,i],[e,r,s],u,c,o)},pointDistance:function(t,e,n,r,a,o,s,u){var c=this.nearestPoint(t,e,n,r,a,o,s,u);return i.distance(c.x,c.y,s,u)},interpolationAt:o,pointAt:function(t,e,n,r,i,a,s){return{x:o(t,n,i,s),y:o(e,r,a,s)}},divide:function(t,e,n,r,i,a,o){return c(t,e,n,r,i,a,o)},tangentAngle:function(t,e,n,r,a,o,s){var c=u(t,n,a,s),l=u(e,r,o,s),h=Math.atan2(l,c);return i.piMod(h)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5);e.nearestPoint=function(t,e,n,i,a){for(var o,s=.005,u=1/0,c=[n,i],l=0;l<=20;l++){var h=.05*l,f=[a.apply(null,t.concat([h])),a.apply(null,e.concat([h]))];(v=r.distance(c[0],c[1],f[0],f[1]))=0&&v1&&(n*=Math.sqrt(m),a*=Math.sqrt(m));var x=n*n*(y*y)+a*a*(v*v),b=x?Math.sqrt((n*n*(a*a)-x)/x):1;l===h&&(b*=-1),isNaN(b)&&(b=0);var M=a?b*n*y/a:0,_=n?b*-a*v/n:0,w=(f+d)/2+Math.cos(c)*M-Math.sin(c)*_,C=(p+g)/2+Math.sin(c)*M+Math.cos(c)*_,O=[(v-M)/n,(y-_)/a],A=[(-1*v-M)/n,(-1*y-_)/a],P=s([1,0],O),S=s(O,A);return o(O,A)<=-1&&(S=Math.PI),o(O,A)>=1&&(S=0),0===h&&S>0&&(S-=2*Math.PI),1===h&&S<0&&(S+=2*Math.PI),{cx:w,cy:C,rx:u(t,[d,g])?0:n,ry:u(t,[d,g])?0:a,startAngle:P,endAngle:P+S,xRotation:c,arcFlag:l,sweepFlag:h}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(83),i=/[a-z]/;function a(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}e.default=function(t){var e=r.default(t);if(!e||!e.length)return[["M",0,0]];for(var n=!1,o=0;o=0){n=!0;break}}if(!n)return e;var u=[],c=0,l=0,h=0,f=0,p=0,d=e[0];"M"!==d[0]&&"m"!==d[0]||(h=c=+d[1],f=l=+d[2],p++,u[0]=["M",c,l]),o=p;for(var g=e.length;o1&&(n*=Math.sqrt(m),a*=Math.sqrt(m));var x=n*n*(y*y)+a*a*(v*v),b=x?Math.sqrt((n*n*(a*a)-x)/x):1;l===h&&(b*=-1),isNaN(b)&&(b=0);var M=a?b*n*y/a:0,_=n?b*-a*v/n:0,w=(f+d)/2+Math.cos(c)*M-Math.sin(c)*_,C=(p+g)/2+Math.sin(c)*M+Math.cos(c)*_,O=[(v-M)/n,(y-_)/a],A=[(-1*v-M)/n,(-1*y-_)/a],P=s([1,0],O),S=s(O,A);return o(O,A)<=-1&&(S=Math.PI),o(O,A)>=1&&(S=0),0===h&&S>0&&(S-=2*Math.PI),1===h&&S<0&&(S+=2*Math.PI),{cx:w,cy:C,rx:u(t,[d,g])?0:n,ry:u(t,[d,g])?0:a,startAngle:P,endAngle:P+S,xRotation:c,arcFlag:l,sweepFlag:h}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2);e.default=function(t,e,n){var i=r.getOffScreenContext();return t.createPath(i),i.isPointInPath(e,n)}},function(t,e,n){"use strict";function r(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function i(t,e,n){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])&&Math.min(t[0],e[0])<=n[0]&&n[0]<=Math.max(t[0],e[0])&&Math.min(t[1],e[1])<=n[1]&&n[1]<=Math.max(t[1],e[1])}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){var a=!1,o=t.length;if(o<=2)return!1;for(var s=0;s0!=r(c[1]-n)>0&&r(e-(n-u[1])*(u[0]-c[0])/(u[1]-c[1])-u[0])<0&&(a=!a)}return a}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2);e.default=function(t,e,n,i,a,o,s,u){var c=(Math.atan2(u-e,s-t)+2*Math.PI)%(2*Math.PI);if(ca)return!1;var l={x:t+n*Math.cos(c),y:e+n*Math.sin(c)};return r.distance(l.x,l.y,s,u)<=o/2}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=function(t){e.ARRAY_TYPE=t},e.toRadian=function(t){return t*i},e.equals=function(t,e){return Math.abs(t-e)<=r*Math.max(1,Math.abs(t),Math.abs(e))};var r=e.EPSILON=1e-6;e.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,e.RANDOM=Math.random;var i=Math.PI/180},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(17);e.default=function(t,e,n,i,a){var o=t.length;if(o<2)return!1;for(var s=0;s1?0:i<-1?Math.PI:Math.acos(i)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.equals=function(t,e){var n=t[0],r=t[1],a=t[2],o=e[0],s=e[1],u=e[2];return Math.abs(n-o)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-s)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-u)<=i.EPSILON*Math.max(1,Math.abs(a),Math.abs(u))};var r,i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(23));function a(){var t=new i.ARRAY_TYPE(3);return i.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function o(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function s(t,e,n){var r=new i.ARRAY_TYPE(3);return r[0]=t,r[1]=e,r[2]=n,r}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function c(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function l(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function h(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)}function f(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function p(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function d(t,e){var n=e[0],r=e[1],i=e[2],a=n*n+r*r+i*i;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}function g(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}e.sub=u,e.mul=c,e.div=l,e.dist=h,e.sqrDist=f,e.len=o,e.sqrLen=p,e.forEach=(r=a(),function(t,e,n,i,a,o){var s,u=void 0;for(e||(e=3),n||(n=0),s=i?Math.min(i*e+n,t.length):t.length,u=n;u1&&(n*=Math.sqrt(v),i*=Math.sqrt(v));var y=n*n*(g*g)+i*i*(d*d),m=y?Math.sqrt((n*n*(i*i)-y)/y):1;u===c&&(m*=-1),isNaN(m)&&(m=0);var x=i?m*n*g/i:0,b=n?m*-i*d/n:0,M=(l+f)/2+Math.cos(s)*x-Math.sin(s)*b,_=(h+p)/2+Math.sin(s)*x+Math.cos(s)*b,w=[(d-x)/n,(g-b)/i],C=[(-1*d-x)/n,(-1*g-b)/i],O=o([1,0],w),A=o(w,C);return a(w,C)<=-1&&(A=Math.PI),a(w,C)>=1&&(A=0),0===c&&A>0&&(A-=2*Math.PI),1===c&&A<0&&(A+=2*Math.PI),{cx:M,cy:_,rx:r.isSamePoint(t,[f,p])?0:n,ry:r.isSamePoint(t,[f,p])?0:i,startAngle:O,endAngle:O+A,xRotation:s,arcFlag:u,sweepFlag:c}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(59);e.getBBoxMethod=r.getMethod;var i=n(60),a=n(61),o=n(62),s=n(63),u=n(64),c=n(66),l=n(76),h=n(77);r.register("rect",i.default),r.register("image",i.default),r.register("circle",a.default),r.register("marker",a.default),r.register("polyline",o.default),r.register("polygon",s.default),r.register("text",u.default),r.register("path",c.default),r.register("line",l.default),r.register("ellipse",h.default)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=new Map;e.register=function(t,e){r.set(t,e)},e.getMethod=function(t){return r.get(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.attr();return{x:e.x,y:e.y,width:e.width,height:e.height}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.attr(),n=e.x,r=e.y,i=e.r;return{x:n-i,y:r-i,width:2*i,height:2*i}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5),i=n(25);e.default=function(t){for(var e=t.attr().points,n=[],a=[],o=0;oMath.PI/2?Math.PI-l:l,h=h>Math.PI/2?Math.PI-h:h,{xExtra:Math.cos(c/2-l)*(e/2*(1/Math.sin(c/2)))-e/2||0,yExtra:Math.cos(h-c/2)*(e/2*(1/Math.sin(c/2)))-e/2||0}}e.default=function(t){var e=t.attr(),n=e.path,s=e.stroke?e.lineWidth:0,l=function(t,e){for(var n=[],o=[],s=[],u=0;u0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},e.lerp=function(t,e,n,r){var i=e[0],a=e[1];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t},e.random=function(t,e){e=e||1;var n=2*i.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.transformMat2=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t},e.transformMat2d=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t},e.transformMat3=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t},e.transformMat4=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t},e.rotate=function(t,e,n,r){var i=e[0]-n[0],a=e[1]-n[1],o=Math.sin(r),s=Math.cos(r);return t[0]=i*s-a*o+n[0],t[1]=i*o+a*s+n[1],t},e.angle=function(t,e){var n=t[0],r=t[1],i=e[0],a=e[1],o=n*n+r*r;o>0&&(o=1/Math.sqrt(o));var s=i*i+a*a;s>0&&(s=1/Math.sqrt(s));var u=(n*i+r*a)*o*s;return u>1?0:u<-1?Math.PI:Math.acos(u)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],r=t[1],a=e[0],o=e[1];return Math.abs(n-a)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-o)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(o))};var r,i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(68));function a(){var t=new i.ARRAY_TYPE(2);return i.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function o(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function s(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function u(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function c(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}function l(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function h(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function f(t){var e=t[0],n=t[1];return e*e+n*n}e.len=h,e.sub=o,e.mul=s,e.div=u,e.dist=c,e.sqrDist=l,e.sqrLen=f,e.forEach=(r=a(),function(t,e,n,i,a,o){var s,u=void 0;for(e||(e=2),n||(n=0),s=i?Math.min(i*e+n,t.length):t.length,u=n;uh&&(h=g)}var v=function(t,e,n){return Math.atan(e/(t*Math.tan(n)))}(n,r,i),y=1/0,m=-1/0,x=[s,u];for(p=2*-Math.PI;p<=2*Math.PI;p+=Math.PI){var b=v+p;sm&&(m=M)}return{x:l,y:y,width:h-l,height:m-y}},length:function(t,e,n,r,i,a,o){},nearestPoint:function(t,e,n,r,a,o,c,l,h){var f=u(l-t,h-e,-a),p=f[0],d=f[1],g=i.default.nearestPoint(0,0,n,r,p,d),v=function(t,e,n,r){return(Math.atan2(r*t,n*e)+2*Math.PI)%(2*Math.PI)}(n,r,g.x,g.y);vc&&(g=s(n,r,c));var y=u(g.x,g.y,a);return{x:y[0]+t,y:y[1]+e}},pointDistance:function(t,e,n,i,a,o,s,u,c){var l=this.nearestPoint(t,e,n,i,u,c);return r.distance(l.x,l.y,u,c)},pointAt:function(t,e,n,r,i,s,u,c){var l=(u-s)*c+s;return{x:a(t,0,n,r,i,l),y:o(0,e,n,r,i,l)}},tangentAngle:function(t,e,n,i,a,o,s,u){var c=(s-o)*u+o,l=function(t,e,n,r,i,a,o,s){return-1*n*Math.cos(i)*Math.sin(s)-r*Math.sin(i)*Math.cos(s)}(0,0,n,i,a,0,0,c),h=function(t,e,n,r,i,a,o,s){return-1*n*Math.sin(i)*Math.sin(s)+r*Math.cos(i)*Math.cos(s)}(0,0,n,i,a,0,0,c);return r.piMod(Math.atan2(h,l))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5);function i(t,e){var n=Math.abs(t);return e>0?n:-1*n}e.default={box:function(t,e,n,r){return{x:t-n,y:e-r,width:2*n,height:2*r}},length:function(t,e,n,r){return Math.PI*(3*(n+r)-Math.sqrt((3*n+r)*(n+3*r)))},nearestPoint:function(t,e,n,r,a,o){var s=n,u=r;if(0===s||0===u)return{x:t,y:e};for(var c,l,h=a-t,f=o-e,p=Math.abs(h),d=Math.abs(f),g=s*s,v=u*u,y=Math.PI/4,m=0;m<4;m++){c=s*Math.cos(y),l=u*Math.sin(y);var x=(g-v)*Math.pow(Math.cos(y),3)/s,b=(v-g)*Math.pow(Math.sin(y),3)/u,M=c-x,_=l-b,w=p-x,C=d-b,O=Math.hypot(_,M),A=Math.hypot(C,w);y+=O*Math.asin((M*C-_*w)/(O*A))/Math.sqrt(g+v-c*c-l*l),y=Math.min(Math.PI/2,Math.max(0,y))}return{x:t+i(c,h),y:e+i(l,f)}},pointDistance:function(t,e,n,i,a,o){var s=this.nearestPoint(t,e,n,i,a,o);return r.distance(s.x,s.y,a,o)},pointAt:function(t,e,n,r,i){var a=2*Math.PI*i;return{x:t+n*Math.cos(a),y:e+r*Math.sin(a)}},tangentAngle:function(t,e,n,i,a){var o=2*Math.PI*a,s=Math.atan2(i*Math.cos(o),-n*Math.sin(o));return r.piMod(s)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(37),i=n(37),a=n(74);function o(t,e){return{x:e.x+(e.x-t.x),y:e.y+(e.y-t.y)}}e.default=function(t){for(var e=[],n=null,s=null,u=null,c=0,l=(t=a.default(t)).length,h=0;h1){var i=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=i}r.default(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)=c-l&&h<=c+l},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,r=e.y,i=e.r;t.beginPath(),t.arc(n,r,i,0,2*Math.PI,!1),t.closePath()},e}(i.default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0);function i(t,e,n,r){return t/(n*n)+e/(r*r)}var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},e),{x:0,y:0,rx:0,ry:0})},e.prototype.isInStrokeOrPath=function(t,e,n,r,a){var o=this.attr(),s=a/2,u=o.x,c=o.y,l=o.rx,h=o.ry,f=(t-u)*(t-u),p=(e-c)*(e-c);return r&&n?i(f,p,l+s,h+s)<=1:r?i(f,p,l,h)<=1:!!n&&i(f,p,l-s,h-s)>=1&&i(f,p,l+s,h+s)<=1},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,r=e.y,i=e.rx,a=e.ry;if(t.beginPath(),t.ellipse)t.ellipse(n,r,i,a,0,0,2*Math.PI,!1);else{var o=i>a?i:a,s=i>a?1:i/a,u=i>a?a/i:1;t.save(),t.translate(n,r),t.scale(s,u),t.arc(0,0,o,0,2*Math.PI),t.restore(),t.closePath()}},e}(n(3).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(3),a=n(2);function o(t){return t instanceof HTMLElement&&a.isString(t.nodeName)&&"CANVAS"===t.nodeName.toUpperCase()}var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},e),{x:0,y:0,width:0,height:0})},e.prototype.initAttrs=function(t){this._setImage(t.img)},e.prototype.isStroke=function(){return!1},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._afterLoading=function(){if(!0===this.get("toDraw")){var t=this.get("canvas");t?t.draw():this.createPath(this.get("context"))}},e.prototype._setImage=function(t){var e=this,n=this.attrs;if(a.isString(t)){var r=new Image;r.onload=function(){if(e.destroyed)return!1;e.attr("img",r),e.set("loading",!1),e._afterLoading();var t=e.get("callback");t&&t.call(e)},r.src=t,r.crossOrigin="Anonymous",this.set("loading",!0)}else t instanceof Image?(n.width||(n.width=t.width),n.height||(n.height=t.height)):o(t)&&(n.width||(n.width=Number(t.getAttribute("width"))),n.height||(n.height,Number(t.getAttribute("height"))))},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),"img"===e&&this._setImage(n)},e.prototype.createPath=function(t){if(this.get("loading"))return this.set("toDraw",!0),void this.set("context",t);var e=this.attr(),n=e.x,r=e.y,i=e.width,s=e.height,u=e.sx,c=e.sy,l=e.swidth,h=e.sheight,f=e.img;(f instanceof Image||o(f))&&(a.isNil(u)||a.isNil(c)||a.isNil(l)||a.isNil(h)?t.drawImage(f,n,r,i,s):t.drawImage(f,u,c,l,h,n,r,i,s))},e}(i.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(6),a=n(3),o=n(17),s=n(16),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},e),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},e.prototype.initAttrs=function(t){this.setArrow()},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),this.setArrow()},e.prototype.setArrow=function(){var t=this.attr(),e=t.x1,n=t.y1,r=t.x2,i=t.y2,a=t.startArrow,o=t.endArrow;a&&s.addStartArrow(this,t,r,i,e,n),o&&s.addEndArrow(this,t,e,n,r,i)},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){if(!n||!i)return!1;var a=this.attr(),s=a.x1,u=a.y1,c=a.x2,l=a.y2;return o.default(s,u,c,l,i,t,e)},e.prototype.createPath=function(t){var e=this.attr(),n=e.x1,r=e.y1,i=e.x2,a=e.y2,o=e.startArrow,u=e.endArrow,c={dx:0,dy:0},l={dx:0,dy:0};o&&o.d&&(c=s.getShortenOffset(n,r,i,a,e.startArrow.d)),u&&u.d&&(l=s.getShortenOffset(n,r,i,a,e.endArrow.d)),t.beginPath(),t.moveTo(n+c.dx,r+c.dy),t.lineTo(i-l.dx,a-l.dy)},e.prototype.afterDrawPath=function(t){var e=this.get("startArrowShape"),n=this.get("endArrowShape");e&&e.draw(t),n&&n.draw(t)},e.prototype.getTotalLength=function(){var t=this.attr(),e=t.x1,n=t.y1,r=t.x2,a=t.y2;return i.default.length(e,n,r,a)},e.prototype.getPoint=function(t){var e=this.attr(),n=e.x1,r=e.y1,a=e.x2,o=e.y2;return i.default.pointAt(n,r,a,o,t)},e}(a.default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(18),a=n(38),o=n(3),s=n(2),u=n(9),c={circle:function(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e]]},square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]},"triangle-down":function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}},l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.initAttrs=function(t){this._resetParamsCache()},e.prototype._resetParamsCache=function(){this.set("paramsCache",{})},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),-1!==["symbol","x","y","r","radius"].indexOf(e)&&this._resetParamsCache()},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._getR=function(t){return i.isNil(t.r)?t.radius:t.r},e.prototype._getPath=function(){var t,n,r=this.attr(),i=r.x,o=r.y,u=r.symbol||"circle",c=this._getR(r);return s.isFunction(u)?(n=(t=u)(i,o,c),n=a.default(n)):n=(t=e.Symbols[u])(i,o,c),t?n:(console.warn(u+" marker is not supported."),null)},e.prototype.createPath=function(t){var e=this._getPath(),n=this.get("paramsCache");u.drawPath(this,t,{path:e},n)},e.Symbols=c,e}(o.default);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(15),i="\t\n\v\f\r   ᠎              \u2028\u2029",a=new RegExp("([a-z])["+i+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+i+"]*,?["+i+"]*)+)","ig"),o=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+i+"]*,?["+i+"]*","ig");e.default=function(t){if(!t)return null;if(r.default(t))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(t).replace(a,(function(t,r,i){var a=[],s=r.toLowerCase();if(i.replace(o,(function(t,e){e&&a.push(+e)})),"m"===s&&a.length>2&&(n.push([r].concat(a.splice(0,2))),s="l",r="m"===r?"l":"L"),"o"===s&&1===a.length&&n.push([r,a[0]]),"r"===s)n.push([r].concat(a));else for(;a.length>=e[s]&&(n.push([r].concat(a.splice(0,e[s]))),e[s]););return""})),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(26),a=n(18),o=n(3),s=n(38),u=n(85),c=n(9),l=n(40),h=n(41),f=n(87),p=n(16);function d(t,e,n){for(var r=!1,i=0;i=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)}));var s=o[n];if(a.isNil(s)||a.isNil(n))return null;var u=s.length,c=o[n+1];return i.default.pointAt(s[u-2],s[u-1],c[1],c[2],c[3],c[4],c[5],c[6],e)},e.prototype._calculateCurve=function(){var t=this.attr().path;this.set("curve",f.default.pathToCurve(t))},e.prototype._setTcache=function(){var t,e,n,r,o=0,s=0,u=[],c=this.get("curve");c&&(a.each(c,(function(t,e){n=c[e+1],r=t.length,n&&(o+=i.default.length(t[r-2],t[r-1],n[1],n[2],n[3],n[4],n[5],n[6])||0)})),this.set("totalLength",o),0!==o?(a.each(c,(function(a,l){n=c[l+1],r=a.length,n&&((t=[])[0]=s/o,e=i.default.length(a[r-2],a[r-1],n[1],n[2],n[3],n[4],n[5],n[6]),s+=e||0,t[1]=s/o,u.push(t))})),this.set("tCache",u)):this.set("tCache",[]))},e.prototype.getStartTangent=function(){var t,e=this.getSegments();if(e.length>1){var n=e[0].currentPoint,r=e[1].currentPoint,i=e[1].startTangent;t=[],i?(t.push([n[0]-i[0],n[1]-i[1]]),t.push([n[0],n[1]])):(t.push([r[0],r[1]]),t.push([n[0],n[1]]))}return t},e.prototype.getEndTangent=function(){var t,e=this.getSegments(),n=e.length;if(n>1){var r=e[n-2].currentPoint,i=e[n-1].currentPoint,a=e[n-1].endTangent;t=[],a?(t.push([i[0]-a[0],i[1]-a[1]]),t.push([i[0],i[1]])):(t.push([r[0],r[1]]),t.push([i[0],i[1]]))}return t},e}(o.default);e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(39),i=n(39),a=n(86);function o(t,e){return{x:e.x+(e.x-t.x),y:e.y+(e.y-t.y)}}e.default=function(t){for(var e=[],n=null,s=null,u=null,c=0,l=(t=a.default(t)).length,h=0;h1){var i=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=i}r.default(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(10),a=n(35),o=n(26),s=n(2),u=n(17),c=n(42),l=n(88),h=n(89);e.default=r.__assign({hasArc:function(t){for(var e=!1,n=t.length,r=0;r0&&r.push(i),{polygons:n,polylines:r}},isPointInStroke:function(t,e,n,r){for(var i=!1,f=e/2,p=0;pw?_:w,I=_>w?1:_/w,T=_>w?w/_:1;l.translate(S,S,[-b,-M]),l.rotate(S,S,-A),l.scale(S,S,[1/I,1/T]),h.transformMat3(P,P,S),i=c.default(0,0,E,C,O,e,P[0],P[1])}if(i)break}}return i}},i.PathUtil)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sub=e.mul=void 0,e.create=function(){var t=new r.ARRAY_TYPE(9);return r.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},e.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},e.clone=function(t){var e=new r.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromValues=function(t,e,n,i,a,o,s,u,c){var l=new r.ARRAY_TYPE(9);return l[0]=t,l[1]=e,l[2]=n,l[3]=i,l[4]=a,l[5]=o,l[6]=s,l[7]=u,l[8]=c,l},e.set=function(t,e,n,r,i,a,o,s,u,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=u,t[8]=c,t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.transpose=function(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},e.invert=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=l*o-s*c,f=-l*a+s*u,p=c*a-o*u,d=n*h+r*f+i*p;return d?(d=1/d,t[0]=h*d,t[1]=(-l*r+i*c)*d,t[2]=(s*r-i*o)*d,t[3]=f*d,t[4]=(l*n-i*u)*d,t[5]=(-s*n+i*a)*d,t[6]=p*d,t[7]=(-c*n+r*u)*d,t[8]=(o*n-r*a)*d,t):null},e.adjoint=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],l=e[8];return t[0]=o*l-s*c,t[1]=i*c-r*l,t[2]=r*s-i*o,t[3]=s*u-a*l,t[4]=n*l-i*u,t[5]=i*a-n*s,t[6]=a*c-o*u,t[7]=r*u-n*c,t[8]=n*o-r*a,t},e.determinant=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],u=t[7],c=t[8];return e*(c*a-o*u)+n*(-c*i+o*s)+r*(u*i-a*s)},e.multiply=i,e.translate=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1];return t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=u,t[6]=f*r+p*o+c,t[7]=f*i+p*s+l,t[8]=f*a+p*u+h,t},e.rotate=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=Math.sin(n),p=Math.cos(n);return t[0]=p*r+f*o,t[1]=p*i+f*s,t[2]=p*a+f*u,t[3]=p*o-f*r,t[4]=p*s-f*i,t[5]=p*u-f*a,t[6]=c,t[7]=l,t[8]=h,t},e.scale=function(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},e.fromRotation=function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat2d=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},e.fromQuat=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n+n,s=r+r,u=i+i,c=n*o,l=r*o,h=r*s,f=i*o,p=i*s,d=i*u,g=a*o,v=a*s,y=a*u;return t[0]=1-h-d,t[3]=l-y,t[6]=f+v,t[1]=l+y,t[4]=1-c-d,t[7]=p-g,t[2]=f-v,t[5]=p+g,t[8]=1-c-h,t},e.normalFromMat4=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],g=e[13],v=e[14],y=e[15],m=n*s-r*o,x=n*u-i*o,b=n*c-a*o,M=r*u-i*s,_=r*c-a*s,w=i*c-a*u,C=l*g-h*d,O=l*v-f*d,A=l*y-p*d,P=h*v-f*g,S=h*y-p*g,E=f*y-p*v,I=m*E-x*S+b*P+M*A-_*O+w*C;return I?(I=1/I,t[0]=(s*E-u*S+c*P)*I,t[1]=(u*A-o*E-c*O)*I,t[2]=(o*S-s*A+c*C)*I,t[3]=(i*S-r*E-a*P)*I,t[4]=(n*E-i*A+a*O)*I,t[5]=(r*A-n*S-a*C)*I,t[6]=(g*w-v*_+y*M)*I,t[7]=(v*b-d*w-y*x)*I,t[8]=(d*_-g*b+y*m)*I,t):null},e.projection=function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},e.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},e.subtract=a,e.multiplyScalar=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},e.multiplyScalarAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},e.equals=function(t,e){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],f=e[0],p=e[1],d=e[2],g=e[3],v=e[4],y=e[5],m=e[6],x=e[7],b=e[8];return Math.abs(n-f)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(f))&&Math.abs(i-p)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(a-d)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(o-g)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(g))&&Math.abs(s-v)<=r.EPSILON*Math.max(1,Math.abs(s),Math.abs(v))&&Math.abs(u-y)<=r.EPSILON*Math.max(1,Math.abs(u),Math.abs(y))&&Math.abs(c-m)<=r.EPSILON*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(l-x)<=r.EPSILON*Math.max(1,Math.abs(l),Math.abs(x))&&Math.abs(h-b)<=r.EPSILON*Math.max(1,Math.abs(h),Math.abs(b))};var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(43));function i(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1],d=n[2],g=n[3],v=n[4],y=n[5],m=n[6],x=n[7],b=n[8];return t[0]=f*r+p*o+d*c,t[1]=f*i+p*s+d*l,t[2]=f*a+p*u+d*h,t[3]=g*r+v*o+y*c,t[4]=g*i+v*s+y*l,t[5]=g*a+v*u+y*h,t[6]=m*r+x*o+b*c,t[7]=m*i+x*s+b*l,t[8]=m*a+x*u+b*h,t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}e.mul=i,e.sub=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.len=e.sqrDist=e.dist=e.div=e.mul=e.sub=void 0,e.create=a,e.clone=function(t){var e=new i.ARRAY_TYPE(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},e.length=o,e.fromValues=s,e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},e.set=function(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t},e.subtract=u,e.multiply=c,e.divide=l,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t},e.scaleAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t},e.distance=h,e.squaredDistance=f,e.squaredLength=p,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},e.normalize=d,e.dot=g,e.cross=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[0],s=n[1],u=n[2];return t[0]=i*u-a*s,t[1]=a*o-r*u,t[2]=r*s-i*o,t},e.lerp=function(t,e,n,r){var i=e[0],a=e[1],o=e[2];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t[2]=o+r*(n[2]-o),t},e.hermite=function(t,e,n,r,i,a){var o=a*a,s=o*(2*a-3)+1,u=o*(a-2)+a,c=o*(a-1),l=o*(3-2*a);return t[0]=e[0]*s+n[0]*u+r[0]*c+i[0]*l,t[1]=e[1]*s+n[1]*u+r[1]*c+i[1]*l,t[2]=e[2]*s+n[2]*u+r[2]*c+i[2]*l,t},e.bezier=function(t,e,n,r,i,a){var o=1-a,s=o*o,u=a*a,c=s*o,l=3*a*s,h=3*u*o,f=u*a;return t[0]=e[0]*c+n[0]*l+r[0]*h+i[0]*f,t[1]=e[1]*c+n[1]*l+r[1]*h+i[1]*f,t[2]=e[2]*c+n[2]*l+r[2]*h+i[2]*f,t},e.random=function(t,e){e=e||1;var n=2*i.RANDOM()*Math.PI,r=2*i.RANDOM()-1,a=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*a,t[1]=Math.sin(n)*a,t[2]=r*e,t},e.transformMat4=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[3]*r+n[7]*i+n[11]*a+n[15];return o=o||1,t[0]=(n[0]*r+n[4]*i+n[8]*a+n[12])/o,t[1]=(n[1]*r+n[5]*i+n[9]*a+n[13])/o,t[2]=(n[2]*r+n[6]*i+n[10]*a+n[14])/o,t},e.transformMat3=function(t,e,n){var r=e[0],i=e[1],a=e[2];return t[0]=r*n[0]+i*n[3]+a*n[6],t[1]=r*n[1]+i*n[4]+a*n[7],t[2]=r*n[2]+i*n[5]+a*n[8],t},e.transformQuat=function(t,e,n){var r=n[0],i=n[1],a=n[2],o=n[3],s=e[0],u=e[1],c=e[2],l=i*c-a*u,h=a*s-r*c,f=r*u-i*s,p=i*f-a*h,d=a*l-r*f,g=r*h-i*l,v=2*o;return l*=v,h*=v,f*=v,p*=2,d*=2,g*=2,t[0]=s+l+p,t[1]=u+h+d,t[2]=c+f+g,t},e.rotateX=function(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[0],a[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),a[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},e.rotateY=function(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),a[1]=i[1],a[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},e.rotateZ=function(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),a[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),a[2]=i[2],t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},e.angle=function(t,e){var n=s(t[0],t[1],t[2]),r=s(e[0],e[1],e[2]);d(n,n),d(r,r);var i=g(n,r);return i>1?0:i<-1?Math.PI:Math.acos(i)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.equals=function(t,e){var n=t[0],r=t[1],a=t[2],o=e[0],s=e[1],u=e[2];return Math.abs(n-o)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-s)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-u)<=i.EPSILON*Math.max(1,Math.abs(a),Math.abs(u))};var r,i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(43));function a(){var t=new i.ARRAY_TYPE(3);return i.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function o(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function s(t,e,n){var r=new i.ARRAY_TYPE(3);return r[0]=t,r[1]=e,r[2]=n,r}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function c(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function l(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function h(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)}function f(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function p(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function d(t,e){var n=e[0],r=e[1],i=e[2],a=n*n+r*r+i*i;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}function g(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}e.sub=u,e.mul=c,e.div=l,e.dist=h,e.sqrDist=f,e.len=o,e.sqrLen=p,e.forEach=(r=a(),function(t,e,n,i,a,o){var s,u=void 0;for(e||(e=3),n||(n=0),s=i?Math.min(i*e+n,t.length):t.length,u=n;u=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)})),i.default.pointAt(r[n][0],r[n][1],r[n+1][0],r[n+1][1],e)},e.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var e=this.getTotalLength();if(!(e<=0)){var n,r,a=0,s=[];o.each(t,(function(o,u){t[u+1]&&((n=[])[0]=a/e,r=i.default.length(o[0],o[1],t[u+1][0],t[u+1][1]),a+=r,n[1]=a/e,s.push(n))})),this.set("tCache",s)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.attr().points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(s.default);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(93),i=n(5);e.default={box:function(t){for(var e=[],n=[],r=0;r1||e<0||t.length<2)return null;var n=a(t),i=n.segments,o=n.totalLength;if(0===o)return{x:t[0][0],y:t[0][1]};for(var s=0,u=null,c=0;c=s&&e<=s+p){var d=(e-s)/p;u=r.default.pointAt(h[0],h[1],f[0],f[1],d);break}s+=p}return u},e.angleAtSegments=function(t,e){if(e>1||e<0||t.length<2)return 0;for(var n=a(t),r=n.segments,i=n.totalLength,o=0,s=0,u=0;u=o&&e<=o+f){s=Math.atan2(h[1]-l[1],h[0]-l[0]);break}o+=f}return s},e.distanceAtSegment=function(t,e,n){for(var i=1/0,a=0;a0&&(a.isNil(i)||1===i||(t.globalAlpha=r),this.stroke(t)),this.isFill()&&(a.isNil(o)||1===o?this.fill(t):(t.globalAlpha=o,this.fill(t),t.globalAlpha=r)),this.afterDrawPath(t)},e.prototype.fill=function(t){this._drawText(t,!0)},e.prototype.stroke=function(t){this._drawText(t,!1)},e}(i.default);e.default=s},function(t){t.exports=JSON.parse('{"name":"@antv/g-canvas","version":"0.4.2","description":"A canvas library which providing 2d","main":"lib/index.js","module":"esm/index.js","browser":"dist/g.min.js","types":"lib/index.d.ts","files":["package.json","esm","lib","dist","LICENSE","README.md"],"scripts":{"build":"npm run clean && run-p build:*","build:esm":"tsc -p tsconfig.json --target ES5 --module ESNext --outDir esm","build:cjs":"tsc -p tsconfig.json --target ES5 --module commonjs --outDir lib","build:umd":"webpack --config webpack.config.js --mode production","clean":"rm -rf esm lib dist","coverage":"npm run coverage-generator && npm run coverage-viewer","coverage-generator":"torch --coverage --compile --source-pattern src/*.js,src/**/*.js --opts tests/mocha.opts","coverage-viewer":"torch-coverage","test":"torch --renderer --compile --opts tests/mocha.opts","test-live":"torch --compile --interactive --opts tests/mocha.opts","tsc":"tsc --noEmit","typecheck":"tsc --noEmit","dist":"webpack --config webpack.config.js --mode production"},"repository":{"type":"git","url":"git+https://github.com/antvis/g.git"},"keywords":["util","antv","g"],"publishConfig":{"access":"public"},"author":"https://github.com/orgs/antvis/people","license":"ISC","bugs":{"url":"https://github.com/antvis/g/issues"},"devDependencies":{"@antv/torch":"^1.0.0","less":"^3.9.0","npm-run-all":"^4.1.5","webpack":"^4.26.1","webpack-cli":"^3.1.2"},"homepage":"https://github.com/antvis/g#readme","dependencies":{"@antv/g-base":"^0.4.0","@antv/g-math":"^0.1.1","@antv/gl-matrix":"~2.7.1","@antv/path-util":"~2.0.5","@antv/util":"~2.0.0"},"__npminstall_done":false}')},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n(0).__exportStar(n(100),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n(0).__exportStar(n(102),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(10),a=n(104),o=n(7),s=n(27),u=n(9),c=n(2),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.renderer="canvas",e.autoDraw=!0,e.localRefresh=!0,e.refreshElements=[],e},e.prototype.onCanvasChange=function(t){"attr"!==t&&"sort"!==t&&"changeSize"!==t||(this.set("refreshElements",[this]),this.draw())},e.prototype.getShapeBase=function(){return o},e.prototype.getGroupBase=function(){return s.default},e.prototype.getPixelRatio=function(){return this.get("pixelRatio")||c.getPixelRatio()},e.prototype.getViewRange=function(){var t=this.get("el");return{minX:0,minY:0,maxX:t.width,maxY:t.height}},e.prototype.initEvents=function(){var t=new a.default({canvas:this});t.init(),this.set("eventController",t)},e.prototype.createDom=function(){var t=document.createElement("canvas"),e=t.getContext("2d");return this.set("context",e),t},e.prototype.setDOMSize=function(e,n){t.prototype.setDOMSize.call(this,e,n);var r=this.get("context"),i=this.get("el"),a=this.getPixelRatio();i.width=a*e,i.height=a*n,a>1&&r.scale(a,a)},e.prototype.clear=function(){t.prototype.clear.call(this),this._clearFrame();var e=this.get("context"),n=this.get("el");e.clearRect(0,0,n.width,n.height)},e.prototype._getRefreshRegion=function(){var t,e=this.get("refreshElements");return e.length&&e[0]===this?t=this.getViewRange():(t=u.getMergedRegion(e))&&(t.minX=Math.floor(t.minX-.5),t.minY=Math.floor(t.minY-.5),t.maxX=Math.ceil(t.maxX+.5),t.maxY=Math.ceil(t.maxY+.5)),t},e.prototype.refreshElement=function(t){this.get("refreshElements").push(t)},e.prototype._clearFrame=function(){var t=this.get("drawFrame");t&&(c.clearAnimationFrame(t),this.set("drawFrame",null),this.set("refreshElements",[]))},e.prototype.draw=function(){var t=this.get("drawFrame");this.get("autoDraw")&&t||this._startDraw()},e.prototype._drawAll=function(){var t=this.get("context"),e=this.get("el"),n=this.getChildren();t.clearRect(0,0,e.width,e.height),u.applyAttrsToContext(t,this),u.drawChildren(t,n),this.set("refreshElements",[])},e.prototype._drawRegion=function(){var t=this.get("context"),e=this.getChildren(),n=this._getRefreshRegion();n&&(t.clearRect(n.minX,n.minY,n.maxX-n.minX,n.maxY-n.minY),t.save(),t.beginPath(),t.rect(n.minX,n.minY,n.maxX-n.minX,n.maxY-n.minY),t.clip(),u.applyAttrsToContext(t,this),u.drawChildren(t,e,n),t.restore()),this.set("refreshElements",[])},e.prototype._startDraw=function(){var t=this,e=this.get("drawFrame");e||(e=c.requestAnimationFrame((function(){t.get("localRefresh")?t._drawRegion():t._drawAll(),t.set("drawFrame",null)})),this.set("drawFrame",e))},e.prototype.skipDraw=function(){},e.prototype.destroy=function(){this.get("eventController").destroy(),t.prototype.destroy.call(this)},e}(i.AbstractCanvas);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(105),i=n(34),a=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function o(t,e,n){n.name=e,n.target=t,n.currentTarget=t,n.delegateTarget=t,t.emit(e,n)}function s(t,e,n){if(n.bubbles){var r=void 0,i=!1;if("mouseenter"===e||"dragenter"===e?(r=n.fromShape,i=!0):"mouseleave"!==e&&"dragleave"!==e||(i=!0,r=n.toShape),t.isCanvas()&&i)return;if(r&&function(t,e){if(t.isCanvas())return!0;for(var n=e.getParent(),r=!1;n;){if(n===t){r=!0;break}n=n.getParent()}return r}(t,r))return void(n.bubbles=!1);n.name=e,n.currentTarget=t,n.delegateTarget=t,t.emit(e,n)}}var u=function(){function t(t){var e=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(t){var n=t.type;e._triggerEvent(n,t)},this._onDocumentMove=function(t){if(e.canvas.get("el")!==t.target&&(e.dragging||e.currentShape)){var n=e._getPointInfo(t);e.dragging&&e._emitEvent("drag",t,n,e.draggingShape)}},this._onDocumentMouseUp=function(t){if(e.canvas.get("el")!==t.target&&e.dragging){var n=e._getPointInfo(t);e.draggingShape&&e._emitEvent("drop",t,n,null),e._emitEvent("dragend",t,n,e.draggingShape),e._afterDrag(e.draggingShape,n,t)}},this.canvas=t.canvas}return t.prototype.init=function(){this._bindEvents()},t.prototype._bindEvents=function(){var t=this,e=this.canvas.get("el");i.each(a,(function(n){e.addEventListener(n,t._eventCallback)})),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._clearEvents=function(){var t=this,e=this.canvas.get("el");i.each(a,(function(n){e.removeEventListener(n,t._eventCallback)})),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._getEventObj=function(t,e,n,i,a,o){var s=new r.default(t,e);return s.fromShape=a,s.toShape=o,s.x=n.x,s.y=n.y,s.clientX=n.clientX,s.clientY=n.clientY,s.propagationPath.push(i),s},t.prototype._getShape=function(t,e){return this.canvas.getShape(t.x,t.y,e)},t.prototype._getPointInfo=function(t){var e,n,r=this.canvas,i=(n=e=t,e.touches&&(n="touchend"===e.type?e.changedTouches[0]:e.touches[0]),{clientX:n.clientX,clientY:n.clientY}),a=r.getPointByClient(i.clientX,i.clientY);return{x:a.x,y:a.y,clientX:i.clientX,clientY:i.clientY}},t.prototype._triggerEvent=function(t,e){var n=this._getPointInfo(e),r=this._getShape(n,e),i=this["_on"+t],a=!1;if(i)i.call(this,n,r,e);else{var o=this.currentShape;"mouseenter"===t||"dragenter"===t||"mouseover"===t?(this._emitEvent(t,e,n,null,null,r),r&&this._emitEvent(t,e,n,r,null,r),"mouseenter"===t&&this.draggingShape&&this._emitEvent("dragenter",e,n,null)):"mouseleave"===t||"dragleave"===t||"mouseout"===t?(a=!0,o&&this._emitEvent(t,e,n,o,o,null),this._emitEvent(t,e,n,null,o,null),"mouseleave"===t&&this.draggingShape&&this._emitEvent("dragleave",e,n,null)):this._emitEvent(t,e,n,r,null,null)}if(a||(this.currentShape=r),r&&!r.get("destroyed")){var s=this.canvas;s.get("el").style.cursor=r.attr("cursor")||s.get("cursor")}},t.prototype._onmousedown=function(t,e,n){0===n.button&&(this.mousedownShape=e,this.mousedownPoint=t,this.mousedownTimeStamp=n.timeStamp),this._emitEvent("mousedown",n,t,e,null,null)},t.prototype._emitMouseoverEvents=function(t,e,n,r){var i=this.canvas.get("el");n!==r&&(n&&(this._emitEvent("mouseout",t,e,n,n,r),this._emitEvent("mouseleave",t,e,n,n,r),r&&!r.get("destroyed")||(i.style.cursor=this.canvas.get("cursor"))),r&&(this._emitEvent("mouseover",t,e,r,n,r),this._emitEvent("mouseenter",t,e,r,n,r)))},t.prototype._emitDragoverEvents=function(t,e,n,r,i){r?(r!==n&&(n&&this._emitEvent("dragleave",t,e,n,n,r),this._emitEvent("dragenter",t,e,r,n,r)),i||this._emitEvent("dragover",t,e,r)):n&&this._emitEvent("dragleave",t,e,n,n,r),i&&this._emitEvent("dragover",t,e,r)},t.prototype._afterDrag=function(t,e,n){t&&(t.set("capture",!0),this.draggingShape=null),this.dragging=!1;var r=this._getShape(e,n);r!==t&&this._emitMouseoverEvents(n,e,t,r),this.currentShape=r},t.prototype._onmouseup=function(t,e,n){if(0===n.button){var r=this.draggingShape;this.dragging?(r&&this._emitEvent("drop",n,t,e),this._emitEvent("dragend",n,t,r),this._afterDrag(r,t,n)):(this._emitEvent("mouseup",n,t,e),e===this.mousedownShape&&this._emitEvent("click",n,t,e),this.mousedownShape=null,this.mousedownPoint=null)}},t.prototype._ondragover=function(t,e,n){n.preventDefault();var r=this.currentShape;this._emitDragoverEvents(n,t,r,e,!0)},t.prototype._onmousemove=function(t,e,n){var r=this.canvas,i=this.currentShape,a=this.draggingShape;if(this.dragging)a&&this._emitDragoverEvents(n,t,i,e,!1),this._emitEvent("drag",n,t,a);else{var o=this.mousedownPoint;if(o){var s=this.mousedownShape,u=n.timeStamp-this.mousedownTimeStamp,c=o.clientX-t.clientX,l=o.clientY-t.clientY;u>120||c*c+l*l>40?s&&s.get("draggable")?((a=this.mousedownShape).set("capture",!1),this.draggingShape=a,this.dragging=!0,this._emitEvent("dragstart",n,t,a),this.mousedownShape=null,this.mousedownPoint=null):!s&&r.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",n,t,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(n,t,i,e),this._emitEvent("mousemove",n,t,e)):(this._emitMouseoverEvents(n,t,i,e),this._emitEvent("mousemove",n,t,e))}else this._emitMouseoverEvents(n,t,i,e),this._emitEvent("mousemove",n,t,e)}},t.prototype._emitEvent=function(t,e,n,r,i,a){var u=this._getEventObj(t,e,n,r,i,a);if(r){u.shape=r,o(r,t,u);for(var c=r.getParent();c;)c.emitDelegation(t,u),u.propagationStopped||s(c,t,u),u.propagationPath.push(c),c=c.getParent()}else o(this.canvas,t,u)},t.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}();e.default=r}])},function(t,e,n){window,t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=31)}([function(t,e,n){"use strict";n.r(e);var r=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},i=function(t,e){return!!r(t)&&t.indexOf(e)>-1},a={}.toString,o=function(t,e){return a.call(t)==="[object "+e+"]"},s=function(t){return Array.isArray?Array.isArray(t):o(t,"Array")},u=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},c=function(t,e){if(t)if(s(t))for(var n=0,r=t.length;n-1;)A.call(t,a,1);return t},E=Array.prototype.splice,I=function(t,e){if(!r(t))return[];for(var n=t?e.length:0,i=n-1;n--;){var a=void 0,o=e[n];n!==i&&o===a||(a=o,E.call(t,o,1))}return t},T=function(t,e,n){if(!s(t)&&!y(t))return t;var r=n;return c(t,(function(t,n){r=e(r,t,n)})),r},k=function(t,e){var n=[];if(!r(t))return n;for(var i=-1,a=[],o=t.length;++ie[i])return 1;if(t[i]n?n:t},tt=function(t,e){var n=e.toString(),r=n.indexOf(".");if(-1===r)return Math.round(t);var i=n.substr(r+1).length;return i>20&&(i=20),parseFloat(t.toFixed(i))},et=function(t){return o(t,"Number")},nt=function(t){return et(t)&&t%1!=0},rt=function(t){return et(t)&&t%2==0},it=Number.isInteger?Number.isInteger:function(t){return et(t)&&t%1==0},at=function(t){return et(t)&&t<0};function ot(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)0},ct=function(t,e){if(s(t)){var n,r,i=t[0];return n=f(e)?e(t[0]):t[0][e],c(t,(function(t){(r=f(e)?e(t):t[e])>n&&(i=t,n=r)})),i}},lt=function(t,e){if(s(t)){var n,r,i=t[0];return n=f(e)?e(t[0]):t[0][e],c(t,(function(t){(r=f(e)?e(t):t[e])e?(r&&(clearTimeout(r),r=null),s=c,o=t.apply(i,a),r||(i=a=null)):r||!1===n.trailing||(r=setTimeout(u,l)),o};return c.cancel=function(){clearTimeout(r),s=0,r=i=a=null},c},pe=function(t){return r(t)?Array.prototype.slice.call(t):[]},de={},ge=function(t){return de[t=t||"g"]?de[t]+=1:de[t]=1,t+de[t]},ve=function(){},ye=function(t){return t};function me(t){return p(t)?0:r(t)?t.length:Object.keys(t).length}var xe=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}();n.d(e,"contains",(function(){return i})),n.d(e,"includes",(function(){return i})),n.d(e,"difference",(function(){return h})),n.d(e,"find",(function(){return m})),n.d(e,"findIndex",(function(){return x})),n.d(e,"firstValue",(function(){return b})),n.d(e,"flatten",(function(){return M})),n.d(e,"flattenDeep",(function(){return w})),n.d(e,"getRange",(function(){return C})),n.d(e,"pull",(function(){return S})),n.d(e,"pullAt",(function(){return I})),n.d(e,"reduce",(function(){return T})),n.d(e,"remove",(function(){return k})),n.d(e,"sortBy",(function(){return L})),n.d(e,"union",(function(){return D})),n.d(e,"uniq",(function(){return B})),n.d(e,"valuesOfKey",(function(){return F})),n.d(e,"head",(function(){return R})),n.d(e,"last",(function(){return N})),n.d(e,"startsWith",(function(){return Y})),n.d(e,"endsWith",(function(){return G})),n.d(e,"filter",(function(){return l})),n.d(e,"every",(function(){return X})),n.d(e,"some",(function(){return V})),n.d(e,"group",(function(){return W})),n.d(e,"groupBy",(function(){return z})),n.d(e,"groupToMap",(function(){return H})),n.d(e,"getWrapBehavior",(function(){return U})),n.d(e,"wrapBehavior",(function(){return Z})),n.d(e,"number2color",(function(){return $})),n.d(e,"parseRadius",(function(){return K})),n.d(e,"clamp",(function(){return J})),n.d(e,"fixedBase",(function(){return tt})),n.d(e,"isDecimal",(function(){return nt})),n.d(e,"isEven",(function(){return rt})),n.d(e,"isInteger",(function(){return it})),n.d(e,"isNegative",(function(){return at})),n.d(e,"isNumberEqual",(function(){return ot})),n.d(e,"isOdd",(function(){return st})),n.d(e,"isPositive",(function(){return ut})),n.d(e,"maxBy",(function(){return ct})),n.d(e,"minBy",(function(){return lt})),n.d(e,"mod",(function(){return ht})),n.d(e,"toDegree",(function(){return pt})),n.d(e,"toInteger",(function(){return dt})),n.d(e,"toRadian",(function(){return vt})),n.d(e,"forIn",(function(){return yt})),n.d(e,"has",(function(){return mt})),n.d(e,"hasKey",(function(){return xt})),n.d(e,"hasValue",(function(){return Mt})),n.d(e,"keys",(function(){return d})),n.d(e,"isMatch",(function(){return g})),n.d(e,"values",(function(){return bt})),n.d(e,"lowerCase",(function(){return wt})),n.d(e,"lowerFirst",(function(){return Ct})),n.d(e,"substitute",(function(){return Ot})),n.d(e,"upperCase",(function(){return At})),n.d(e,"upperFirst",(function(){return Pt})),n.d(e,"getType",(function(){return Et})),n.d(e,"isArguments",(function(){return It})),n.d(e,"isArray",(function(){return s})),n.d(e,"isArrayLike",(function(){return r})),n.d(e,"isBoolean",(function(){return Tt})),n.d(e,"isDate",(function(){return kt})),n.d(e,"isError",(function(){return jt})),n.d(e,"isFunction",(function(){return f})),n.d(e,"isFinite",(function(){return Lt})),n.d(e,"isNil",(function(){return p})),n.d(e,"isNull",(function(){return Bt})),n.d(e,"isNumber",(function(){return et})),n.d(e,"isObject",(function(){return u})),n.d(e,"isObjectLike",(function(){return v})),n.d(e,"isPlainObject",(function(){return y})),n.d(e,"isPrototype",(function(){return Ft})),n.d(e,"isRegExp",(function(){return Rt})),n.d(e,"isString",(function(){return j})),n.d(e,"isType",(function(){return o})),n.d(e,"isUndefined",(function(){return Nt})),n.d(e,"isElement",(function(){return Yt})),n.d(e,"requestAnimationFrame",(function(){return Gt})),n.d(e,"clearAnimationFrame",(function(){return Xt})),n.d(e,"augment",(function(){return zt})),n.d(e,"clone",(function(){return Wt})),n.d(e,"debounce",(function(){return Ut})),n.d(e,"memoize",(function(){return Zt})),n.d(e,"deepMix",(function(){return $t})),n.d(e,"each",(function(){return c})),n.d(e,"extend",(function(){return Kt})),n.d(e,"indexOf",(function(){return Jt})),n.d(e,"isEmpty",(function(){return ee})),n.d(e,"isEqual",(function(){return re})),n.d(e,"isEqualWith",(function(){return ie})),n.d(e,"map",(function(){return ae})),n.d(e,"mapValues",(function(){return se})),n.d(e,"mix",(function(){return qt})),n.d(e,"assign",(function(){return qt})),n.d(e,"get",(function(){return ue})),n.d(e,"set",(function(){return ce})),n.d(e,"pick",(function(){return he})),n.d(e,"throttle",(function(){return fe})),n.d(e,"toArray",(function(){return pe})),n.d(e,"toString",(function(){return _t})),n.d(e,"uniqueId",(function(){return ge})),n.d(e,"noop",(function(){return ve})),n.d(e,"identity",(function(){return ye})),n.d(e,"size",(function(){return me})),n.d(e,"Cache",(function(){return xe}))},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",(function(){return i})),n.d(e,"__assign",(function(){return a})),n.d(e,"__rest",(function(){return o})),n.d(e,"__decorate",(function(){return s})),n.d(e,"__param",(function(){return u})),n.d(e,"__metadata",(function(){return c})),n.d(e,"__awaiter",(function(){return l})),n.d(e,"__generator",(function(){return h})),n.d(e,"__exportStar",(function(){return f})),n.d(e,"__values",(function(){return p})),n.d(e,"__read",(function(){return d})),n.d(e,"__spread",(function(){return g})),n.d(e,"__spreadArrays",(function(){return v})),n.d(e,"__await",(function(){return y})),n.d(e,"__asyncGenerator",(function(){return m})),n.d(e,"__asyncDelegator",(function(){return x})),n.d(e,"__asyncValues",(function(){return b})),n.d(e,"__makeTemplateObject",(function(){return M})),n.d(e,"__importStar",(function(){return _})),n.d(e,"__importDefault",(function(){return w})),n.d(e,"__classPrivateFieldGet",(function(){return C})),n.d(e,"__classPrivateFieldSet",(function(){return O})); -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ -var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var a=function(){return(a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(i=t[s])&&(o=(a<3?i(o):a>3?i(e,n,o):i(e,n))||o);return a>3&&o&&Object.defineProperty(e,n,o),o}function u(t,e){return function(n,r){e(n,r,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))((function(i,a){function o(t){try{u(r.next(t))}catch(t){a(t)}}function s(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}u((r=r.apply(t,e||[])).next())}))}function h(t,e){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function g(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{(n=i[t](e)).value instanceof y?Promise.resolve(n.value.v).then(u,c):l(a[0][2],n)}catch(t){l(a[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),a.shift(),a.length&&s(a[0][0],a[0][1])}}function x(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:y(t[r](e)),done:"return"===r}:i?i(e):e}:i}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=p(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,i){!function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)}(r,i,(e=t[n](e)).done,e.value)}))}}}function M(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function _(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function w(t){return t&&t.__esModule?t:{default:t}}function C(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function O(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sub=e.mul=void 0,e.create=function(){var t=new r.ARRAY_TYPE(9);return r.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},e.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},e.clone=function(t){var e=new r.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromValues=function(t,e,n,i,a,o,s,u,c){var l=new r.ARRAY_TYPE(9);return l[0]=t,l[1]=e,l[2]=n,l[3]=i,l[4]=a,l[5]=o,l[6]=s,l[7]=u,l[8]=c,l},e.set=function(t,e,n,r,i,a,o,s,u,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=u,t[8]=c,t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.transpose=function(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},e.invert=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=l*o-s*c,f=-l*a+s*u,p=c*a-o*u,d=n*h+r*f+i*p;return d?(d=1/d,t[0]=h*d,t[1]=(-l*r+i*c)*d,t[2]=(s*r-i*o)*d,t[3]=f*d,t[4]=(l*n-i*u)*d,t[5]=(-s*n+i*a)*d,t[6]=p*d,t[7]=(-c*n+r*u)*d,t[8]=(o*n-r*a)*d,t):null},e.adjoint=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],l=e[8];return t[0]=o*l-s*c,t[1]=i*c-r*l,t[2]=r*s-i*o,t[3]=s*u-a*l,t[4]=n*l-i*u,t[5]=i*a-n*s,t[6]=a*c-o*u,t[7]=r*u-n*c,t[8]=n*o-r*a,t},e.determinant=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],u=t[7],c=t[8];return e*(c*a-o*u)+n*(-c*i+o*s)+r*(u*i-a*s)},e.multiply=i,e.translate=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1];return t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=u,t[6]=f*r+p*o+c,t[7]=f*i+p*s+l,t[8]=f*a+p*u+h,t},e.rotate=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=Math.sin(n),p=Math.cos(n);return t[0]=p*r+f*o,t[1]=p*i+f*s,t[2]=p*a+f*u,t[3]=p*o-f*r,t[4]=p*s-f*i,t[5]=p*u-f*a,t[6]=c,t[7]=l,t[8]=h,t},e.scale=function(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},e.fromRotation=function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat2d=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},e.fromQuat=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n+n,s=r+r,u=i+i,c=n*o,l=r*o,h=r*s,f=i*o,p=i*s,d=i*u,g=a*o,v=a*s,y=a*u;return t[0]=1-h-d,t[3]=l-y,t[6]=f+v,t[1]=l+y,t[4]=1-c-d,t[7]=p-g,t[2]=f-v,t[5]=p+g,t[8]=1-c-h,t},e.normalFromMat4=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],g=e[13],v=e[14],y=e[15],m=n*s-r*o,x=n*u-i*o,b=n*c-a*o,M=r*u-i*s,_=r*c-a*s,w=i*c-a*u,C=l*g-h*d,O=l*v-f*d,A=l*y-p*d,P=h*v-f*g,S=h*y-p*g,E=f*y-p*v,I=m*E-x*S+b*P+M*A-_*O+w*C;return I?(I=1/I,t[0]=(s*E-u*S+c*P)*I,t[1]=(u*A-o*E-c*O)*I,t[2]=(o*S-s*A+c*C)*I,t[3]=(i*S-r*E-a*P)*I,t[4]=(n*E-i*A+a*O)*I,t[5]=(r*A-n*S-a*C)*I,t[6]=(g*w-v*_+y*M)*I,t[7]=(v*b-d*w-y*x)*I,t[8]=(d*_-g*b+y*m)*I,t):null},e.projection=function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},e.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},e.subtract=a,e.multiplyScalar=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},e.multiplyScalarAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},e.equals=function(t,e){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],f=e[0],p=e[1],d=e[2],g=e[3],v=e[4],y=e[5],m=e[6],x=e[7],b=e[8];return Math.abs(n-f)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(f))&&Math.abs(i-p)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(a-d)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(o-g)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(g))&&Math.abs(s-v)<=r.EPSILON*Math.max(1,Math.abs(s),Math.abs(v))&&Math.abs(u-y)<=r.EPSILON*Math.max(1,Math.abs(u),Math.abs(y))&&Math.abs(c-m)<=r.EPSILON*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(l-x)<=r.EPSILON*Math.max(1,Math.abs(l),Math.abs(x))&&Math.abs(h-b)<=r.EPSILON*Math.max(1,Math.abs(h),Math.abs(b))};var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(21));function i(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1],d=n[2],g=n[3],v=n[4],y=n[5],m=n[6],x=n[7],b=n[8];return t[0]=f*r+p*o+d*c,t[1]=f*i+p*s+d*l,t[2]=f*a+p*u+d*h,t[3]=g*r+v*o+y*c,t[4]=g*i+v*s+y*l,t[5]=g*a+v*u+y*h,t[6]=m*r+x*o+b*c,t[7]=m*i+x*s+b*l,t[8]=m*a+x*u+b*h,t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}e.mul=i,e.sub=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHAPE_TO_TAGS={rect:"path",circle:"circle",line:"line",path:"path",marker:"path",text:"text",polyline:"polyline",polygon:"polygon",image:"image",ellipse:"ellipse",dom:"foreignObject"},e.SVG_ATTR_MAP={opacity:"opacity",fillStyle:"fill",fill:"fill",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",x:"x",y:"y",r:"r",rx:"rx",ry:"ry",width:"width",height:"height",x1:"x1",x2:"x2",y1:"y1",y2:"y2",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",startArrow:"marker-start",endArrow:"marker-end",path:"d",class:"class",id:"id",style:"style",preserveAspectRatio:"preserveAspectRatio"},e.EVENTS=["click","mousedown","mouseup","dblclick","contextmenu","mouseenter","mouseleave","mouseover","mouseout","mousemove","wheel"]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(16),a=n(8),o=n(15),s=n(22),u=n(3),c=n(10),l=n(23),h=n(34),f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="svg",e.canFill=!1,e.canStroke=!1,e}return r.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},e),{lineWidth:1,lineAppendWidth:0,strokeOpacity:1,fillOpacity:1})},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e);var n=this.get("canvas");if(n&&n.get("autoDraw")){var r=n.get("context");this.draw(r,e)}},e.prototype.getShapeBase=function(){return c},e.prototype.getGroupBase=function(){return l.default},e.prototype.onCanvasChange=function(t){s.refreshElement(this,t)},e.prototype.calculateBBox=function(){var t=this.get("el"),e=null;if(t)e=t.getBBox();else{var n=h.getBBoxMethod(this.get("type"));n&&(e=n(this))}if(e){var r=e.x,i=e.y,a=e.width,o=e.height,s=this.getHitLineWidth(),u=s/2,c=r-u,l=i-u;return{x:c,y:l,minX:c,minY:l,maxX:r+a+u,maxY:i+o+u,width:a+s,height:o+s}}return{x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0}},e.prototype.isFill=function(){var t=this.attr(),e=t.fill,n=t.fillStyle;return(e||n||this.isClipShape())&&this.canFill},e.prototype.isStroke=function(){var t=this.attr(),e=t.stroke,n=t.strokeStyle;return(e||n)&&this.canStroke},e.prototype.draw=function(t,e){var n=this.get("el");this.get("destroyed")?n&&n.parentNode.removeChild(n):(n||o.createDom(this),a.setClip(this,t),this.createPath(t,e),this.shadow(t,e),this.strokeAndFill(t,e),this.transform(e))},e.prototype.createPath=function(t,e){},e.prototype.strokeAndFill=function(t,e){var n=e||this.attr(),r=n.fill,i=n.fillStyle,a=n.stroke,o=n.strokeStyle,s=n.fillOpacity,c=n.strokeOpacity,l=n.lineWidth,h=this.get("el");this.canFill&&(e?"fill"in n?this._setColor(t,"fill",r):"fillStyle"in n&&this._setColor(t,"fill",i):this._setColor(t,"fill",r||i),s&&h.setAttribute(u.SVG_ATTR_MAP.fillOpacity,s)),this.canStroke&&l>0&&(e?"stroke"in n?this._setColor(t,"stroke",a):"strokeStyle"in n&&this._setColor(t,"stroke",o):this._setColor(t,"stroke",a||o),c&&h.setAttribute(u.SVG_ATTR_MAP.strokeOpacity,c),l&&h.setAttribute(u.SVG_ATTR_MAP.lineWidth,l))},e.prototype._setColor=function(t,e,n){var r=this.get("el");if(n)if(n=n.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(n))(i=t.find("gradient",n))||(i=t.addGradient(n)),r.setAttribute(u.SVG_ATTR_MAP[e],"url(#"+i+")");else if(/^[p,P]{1}[\s]*\(/.test(n)){var i;(i=t.find("pattern",n))||(i=t.addPattern(n)),r.setAttribute(u.SVG_ATTR_MAP[e],"url(#"+i+")")}else r.setAttribute(u.SVG_ATTR_MAP[e],n);else r.setAttribute(u.SVG_ATTR_MAP[e],"none")},e.prototype.shadow=function(t,e){var n=this.attr(),r=e||n,i=r.shadowOffsetX,o=r.shadowOffsetY,s=r.shadowBlur,u=r.shadowColor;(i||o||s||u)&&a.setShadow(this,t)},e.prototype.transform=function(t){var e=this.attr();(t||e).matrix&&a.setTransform(this)},e.prototype.isInShape=function(t,e){return this.isPointInPath(t,e)},e.prototype.isPointInPath=function(t,e){var n=this.get("el"),r=this.get("canvas").get("el").getBoundingClientRect(),i=t+r.left,a=e+r.top,o=document.elementFromPoint(i,a);return!(!o||!o.isEqualNode(n))},e.prototype.getHitLineWidth=function(){var t=this.attrs,e=t.lineWidth,n=t.lineAppendWidth;return this.isStroke()?e+n:0},e}(i.AbstractShape);e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.sqrDist=e.dist=e.div=e.mul=e.sub=e.len=void 0,e.create=a,e.clone=function(t){var e=new i.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},e.fromValues=function(t,e){var n=new i.ARRAY_TYPE(2);return n[0]=t,n[1]=e,n},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.set=function(t,e,n){return t[0]=e,t[1]=n,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},e.subtract=o,e.multiply=s,e.divide=u,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},e.scaleAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t},e.distance=c,e.squaredDistance=l,e.length=h,e.squaredLength=f,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},e.normalize=function(t,e){var n=e[0],r=e[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},e.lerp=function(t,e,n,r){var i=e[0],a=e[1];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t},e.random=function(t,e){e=e||1;var n=2*i.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.transformMat2=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t},e.transformMat2d=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t},e.transformMat3=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t},e.transformMat4=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t},e.rotate=function(t,e,n,r){var i=e[0]-n[0],a=e[1]-n[1],o=Math.sin(r),s=Math.cos(r);return t[0]=i*s-a*o+n[0],t[1]=i*o+a*s+n[1],t},e.angle=function(t,e){var n=t[0],r=t[1],i=e[0],a=e[1],o=n*n+r*r;o>0&&(o=1/Math.sqrt(o));var s=i*i+a*a;s>0&&(s=1/Math.sqrt(s));var u=(n*i+r*a)*o*s;return u>1?0:u<-1?Math.PI:Math.acos(u)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],r=t[1],a=e[0],o=e[1];return Math.abs(n-a)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-o)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(o))};var r,i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(21));function a(){var t=new i.ARRAY_TYPE(2);return i.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function o(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function s(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function u(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function c(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}function l(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function h(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function f(t){var e=t[0],n=t[1];return e*e+n*n}e.len=h,e.sub=o,e.mul=s,e.div=u,e.dist=c,e.sqrDist=l,e.sqrLen=f,e.forEach=(r=a(),function(t,e,n,i,a,o){var s,u=void 0;for(e||(e=2),n||(n=0),s=i?Math.min(i*e+n,t.length):t.length,u=n;u(n-t)*(n-t)+(i-e)*(i-e)?r.distance(n,i,a,o):this.pointToLine(t,e,n,i,a,o)},pointToLine:function(t,e,n,r,a,o){var s=[n-t,r-e];if(i.exactEquals(s,[0,0]))return Math.sqrt((a-t)*(a-t)+(o-e)*(o-e));var u=[-s[1],s[0]];i.normalize(u,u);var c=[a-t,o-e];return Math.abs(i.dot(c,u))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4);e.Base=r.default;var i=n(57);e.Circle=i.default;var a=n(58);e.Dom=a.default;var o=n(59);e.Ellipse=o.default;var s=n(60);e.Image=s.default;var u=n(61);e.Line=u.default;var c=n(62);e.Marker=c.default;var l=n(64);e.Path=l.default;var h=n(65);e.Polygon=h.default;var f=n(66);e.Polyline=f.default;var p=n(69);e.Rect=p.default;var d=n(71);e.Text=d.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return null==t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(18);e.default=function(t){return r.default(t,"String")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7),i=n(13);e.default=function(t,e){if(t)if(r.default(t))for(var n=0,a=t.length;n2&&(n.push([i].concat(o.splice(0,2))),s="l",i="m"===i?"l":"L"),"o"===s&&1===o.length&&n.push([i,o[0]]),"r"===s)n.push([i].concat(o));else for(;o.length>=e[s]&&(n.push([i].concat(o.splice(0,e[s]))),e[s]););return t})),n},S=function(t,e){for(var n=[],r=0,i=t.length;i-2*!e>r;r+=2){var a=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?i-4===r?a[3]={x:+t[0],y:+t[1]}:i-2===r&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[i-2],y:+t[i-1]}:i-4===r?a[3]=a[2]:r||(a[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return n},E=function(t,e,n,r,i){var a=[];if(null===i&&null===r&&(r=n),t=+t,e=+e,n=+n,r=+r,null!==i){var o=Math.PI/180,s=t+n*Math.cos(-r*o),u=t+n*Math.cos(-i*o);a=[["M",s,e+n*Math.sin(-r*o)],["A",n,n,0,+(i-r>180),0,u,e+n*Math.sin(-i*o)]]}else a=[["M",t,e],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]];return a},I=function(t){if(!(t=P(t))||!t.length)return[["M",0,0]];var e,n,r=[],i=0,a=0,o=0,s=0,u=0;"M"===t[0][0]&&(o=i=+t[0][1],s=a=+t[0][2],u++,r[0]=["M",i,a]);for(var c=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),l=void 0,h=void 0,f=u,p=t.length;f1&&(n*=M=Math.sqrt(M),r*=M);var _=n*n,w=r*r,C=(a===o?-1:1)*Math.sqrt(Math.abs((_*w-_*b*b-w*x*x)/(_*b*b+w*x*x)));p=C*n*b/r+(t+s)/2,d=C*-r*x/n+(e+u)/2,h=Math.asin(((e-d)/r).toFixed(9)),f=Math.asin(((u-d)/r).toFixed(9)),h=tf&&(h-=2*Math.PI),!o&&f>h&&(f-=2*Math.PI)}var O=f-h;if(Math.abs(O)>g){var A=f,P=s,S=u;f=h+g*(o&&f>h?1:-1),s=p+n*Math.cos(f),u=d+r*Math.sin(f),y=j(s,u,n,r,i,0,o,P,S,[f,A,p,d])}O=f-h;var E=Math.cos(h),I=Math.sin(h),T=Math.cos(f),k=Math.sin(f),L=Math.tan(O/4),B=4/3*n*L,D=4/3*r*L,F=[t,e],R=[t+B*I,e-D*E],N=[s+B*k,u-D*T],Y=[s,u];if(R[0]=2*F[0]-R[0],R[1]=2*F[1]-R[1],c)return[R,N,Y].concat(y);for(var G=[],X=0,V=(y=[R,N,Y].concat(y).join().split(",")).length;X7){t[e].shift();for(var a=t[e];a.length;)s[e]="A",i&&(u[e]="A"),t.splice(e++,0,["C"].concat(a.splice(0,6)));t.splice(e,1),n=Math.max(r.length,i&&i.length||0)}},p=function(t,e,a,o,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",o.x,o.y]),a.bx=0,a.by=0,a.x=t[s][1],a.y=t[s][2],n=Math.max(r.length,i&&i.length||0))};n=Math.max(r.length,i&&i.length||0);for(var d=0;d1?1:u<0?0:u)/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,p=0;p<12;p++){var d=c*l[p]+c,g=F(d,t,n,i,o),v=F(d,e,r,a,s),y=g*g+v*v;f+=h[p]*Math.sqrt(y)}return c*f},N=function(t,e,n,r,i,a,o,s){for(var u,c,l,h,f=[],p=[[],[]],d=0;d<2;++d)if(0===d?(c=6*t-12*n+6*i,u=-3*t+9*n-9*i+3*o,l=3*n-3*t):(c=6*e-12*r+6*a,u=-3*e+9*r-9*a+3*s,l=3*r-3*e),Math.abs(u)<1e-12){if(Math.abs(c)<1e-12)continue;(h=-l/c)>0&&h<1&&f.push(h)}else{var g=c*c-4*l*u,v=Math.sqrt(g);if(!(g<0)){var y=(-c+v)/(2*u);y>0&&y<1&&f.push(y);var m=(-c-v)/(2*u);m>0&&m<1&&f.push(m)}}for(var x,b=f.length,M=b;b--;)x=1-(h=f[b]),p[0][b]=x*x*x*t+3*x*x*h*n+3*x*h*h*i+h*h*h*o,p[1][b]=x*x*x*e+3*x*x*h*r+3*x*h*h*a+h*h*h*s;return p[0][M]=t,p[1][M]=e,p[0][M+1]=o,p[1][M+1]=s,p[0].length=p[1].length=M+2,{min:{x:Math.min.apply(0,p[0]),y:Math.min.apply(0,p[1])},max:{x:Math.max.apply(0,p[0]),y:Math.max.apply(0,p[1])}}},Y=function(t,e,n,r,i,a,o,s){if(!(Math.max(t,n)Math.max(i,o)||Math.max(e,r)Math.max(a,s))){var u=(t-n)*(a-s)-(e-r)*(i-o);if(u){var c=((t*r-e*n)*(i-o)-(t-n)*(i*s-a*o))/u,l=((t*r-e*n)*(a-s)-(e-r)*(i*s-a*o))/u,h=+c.toFixed(2),f=+l.toFixed(2);if(!(h<+Math.min(t,n).toFixed(2)||h>+Math.max(t,n).toFixed(2)||h<+Math.min(i,o).toFixed(2)||h>+Math.max(i,o).toFixed(2)||f<+Math.min(e,r).toFixed(2)||f>+Math.max(e,r).toFixed(2)||f<+Math.min(a,s).toFixed(2)||f>+Math.max(a,s).toFixed(2)))return{x:c,y:l}}}},G=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},X=function(t,e,n,r,i){if(i)return[["M",+t+ +i,e],["l",n-2*i,0],["a",i,i,0,0,1,i,i],["l",0,r-2*i],["a",i,i,0,0,1,-i,i],["l",2*i-n,0],["a",i,i,0,0,1,-i,-i],["l",0,2*i-r],["a",i,i,0,0,1,i,-i],["z"]];var a=[["M",t,e],["l",n,0],["l",0,r],["l",-n,0],["z"]];return a.parsePathArray=D,a},V=function(t,e,n,r){return null===t&&(t=e=n=r=0),null===e&&(e=t.y,n=t.width,r=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:r,h:r,x2:t+n,y2:e+r,cx:t+n/2,cy:e+r/2,r1:Math.min(n,r)/2,r2:Math.max(n,r)/2,r0:Math.sqrt(n*n+r*r)/2,path:X(t,e,n,r),vb:[t,e,n,r].join(" ")}},q=function(t,e,n,r,i,a,o,s){u(t)||(t=[t,e,n,r,i,a,o,s]);var c=N.apply(null,t);return V(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)},z=function(t,e,n,r,i,a,o,s,u){var c=1-u,l=Math.pow(c,3),h=Math.pow(c,2),f=u*u,p=f*u,d=t+2*u*(n-t)+f*(i-2*n+t),g=e+2*u*(r-e)+f*(a-2*r+e),v=n+2*u*(i-n)+f*(o-2*i+n),y=r+2*u*(a-r)+f*(s-2*a+r);return{x:l*t+3*h*u*n+3*c*u*u*i+p*o,y:l*e+3*h*u*r+3*c*u*u*a+p*s,m:{x:d,y:g},n:{x:v,y:y},start:{x:c*t+u*n,y:c*e+u*r},end:{x:c*i+u*o,y:c*a+u*s},alpha:90-180*Math.atan2(d-v,g-y)/Math.PI}},H=function(t,e,n){if(!function(t,e){return t=V(t),e=V(e),G(e,t.x,t.y)||G(e,t.x2,t.y)||G(e,t.x,t.y2)||G(e,t.x2,t.y2)||G(t,e.x,e.y)||G(t,e.x2,e.y)||G(t,e.x,e.y2)||G(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(q(t),q(e)))return n?0:[];for(var r=~~(R.apply(0,t)/8),i=~~(R.apply(0,e)/8),a=[],o=[],s={},u=n?0:[],c=0;c=0&&x<=1&&b>=0&&b<=1&&(n?u+=1:u.push({x:m.x,y:m.y,t1:x,t2:b}))}}return u},W=function(t,e){return function(t,e,n){var r,i,a,o,s,u,c,l,h,f;t=L(t),e=L(e);for(var p=[],d=0,g=t.length;d=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e.concat(t[t.length-1])}))}(t,e,n));else{var i=[].concat(t);"M"===i[0]&&(i[0]="L");for(var a=0;a<=n-1;a++)r.push(i)}return r}(t[i],t[i+1],r))}),[]);return u.unshift(t[0]),"Z"!==e[r]&&"z"!==e[r]||u.push("Z"),u},Q=function(t,e){if(t.length!==e.length)return!1;var n=!0;return l(t,(function(t,r){if(t!==e[r])return n=!1,!1})),n};function $(t,e,n){var r=null,i=n;return e=0;u--)o=a[u].index,"add"===a[u].type?t.splice(o,0,[].concat(t[o])):t.splice(o,1)}var h=i-(r=t.length);if(r0)){t[r]=e[r];break}n=J(n,t[r-1],1)}t[r]=["Q"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[r]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(r>0)){t[r]=e[r];break}n=J(n,t[r-1],2)}t[r]=["C"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(n.length<2){if(!(r>0)){t[r]=e[r];break}n=J(n,t[r-1],1)}t[r]=["S"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[r]=e[r]}return t},nt=function(){function t(t,e){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}(),rt=function(t,e){return(rt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function it(t,e){function n(){this.constructor=t}rt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var at=n(28),ot=n.n(at),st=(n(11),n(17)),ut=n.n(st),ct=n(12),lt=n.n(ct),ht=n(13),ft=n.n(ht),pt=(n(7),n(19)),dt=n.n(pt),gt=n(14),vt=n.n(gt),yt=n(20),mt=n.n(yt);function xt(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}var bt="undefined"!=typeof window&&void 0!==window.document,Mt=function(t){function e(e){var n=t.call(this)||this;n.destroyed=!1;var r=n.getDefaultCfg();return n.cfg=dt()(r,e),n}return it(e,t),e.prototype.getDefaultCfg=function(){return{}},e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){this.cfg[t]=e},e.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},e}(ot.a),_t=n(2);_t.translate=function(t,e,n){var r=new Array(9);return _t.fromTranslation(r,n),_t.multiply(t,r,e)},_t.rotate=function(t,e,n){var r=new Array(9);return _t.fromRotation(r,n),_t.multiply(t,r,e)},_t.scale=function(t,e,n){var r=new Array(9);return _t.fromScaling(r,n),_t.multiply(t,r,e)},_t.transform=function(t,e){for(var n=[].concat(t),r=0,i=e.length;rn?n:t}(n,-1,1))},Ct.direction=function(t,e){return t[0]*e[1]-e[0]*t[1]},Ct.angleTo=function(t,e,n){var r=Ct.angle(t,e),i=Ct.direction(t,e)>=0;return n?i?2*Math.PI-r:r:i?r:2*Math.PI-r},Ct.vertical=function(t,e,n){return n?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t},n(29);var Ot=function(t,e){var n=t?m(t):[1,0,0,0,1,0,0,0,1];return l(e,(function(t){switch(t[0]){case"t":wt.translate(n,n,[t[1],t[2]]);break;case"s":wt.scale(n,n,[t[1],t[2]]);break;case"r":wt.rotate(n,n,t[1]);break;case"m":wt.multiply(n,n,t[1]);break;default:return!1}})),n};function At(t,e){var n=[],r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],f=e[0],p=e[1],d=e[2],g=e[3],v=e[4],y=e[5],m=e[6],x=e[7],b=e[8];return n[0]=f*r+p*o+d*c,n[1]=f*i+p*s+d*l,n[2]=f*a+p*u+d*h,n[3]=g*r+v*o+y*c,n[4]=g*i+v*s+y*l,n[5]=g*a+v*u+y*h,n[6]=m*r+x*o+b*c,n[7]=m*i+x*s+b*l,n[8]=m*a+x*u+b*h,n}function Pt(t,e){var n=[],r=e[0],i=e[1];return n[0]=t[0]*r+t[3]*i+t[6],n[1]=t[1]*r+t[4]*i+t[7],n}var St=["zIndex","capture","visible","type"],Et=["repeat"];function It(t,e){var n={},r=e.attrs;for(var i in t)n[i]=r[i];return n}function Tt(t,e){var n={},r=e.attr();return l(t,(function(t,e){-1!==Et.indexOf(e)||b(r[e],t)||(n[e]=t)})),n}function kt(t,e){if(e.onFrame)return t;var n=e.startTime,r=e.delay,i=e.duration,a=Object.prototype.hasOwnProperty;return l(t,(function(t){n+rt.delay&&l(e.toAttrs,(function(e,n){a.call(t.toAttrs,n)&&(delete t.toAttrs[n],delete t.fromAttrs[n])}))})),t}var jt=function(t){function e(e){var n=t.call(this,e)||this;n.attrs={};var r=n.getDefaultAttrs();return function(t,e,n,r){e&&v(t,e),n&&v(t,n),r&&v(t,r)}(r,e.attrs),n.attrs=r,n.initAttrs(r),n.initAnimate(),n}return it(e,t),e.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},e.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},e.prototype.onCanvasChange=function(t){},e.prototype.initAttrs=function(t){},e.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},e.prototype.isGroup=function(){return!1},e.prototype.getParent=function(){return this.get("parent")},e.prototype.getCanvas=function(){return this.get("canvas")},e.prototype.attr=function(){for(var t,e=[],n=0;n0?r=kt(r,M):n.addAnimator(this),r.push(M),this.set("animations",r),this.set("_pause",{isPaused:!1})},e.prototype.stopAnimate=function(t){var e=this;void 0===t&&(t=!0);var n=this.get("animations");l(n,(function(n){t&&(n.onFrame?e.attr(n.onFrame(1)):e.attr(n.toAttrs)),n.callback&&n.callback()})),this.set("animating",!1),this.set("animations",[])},e.prototype.pauseAnimate=function(){var t=this.get("timeline"),e=this.get("animations");return l(e,(function(t){t.pauseCallback&&t.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:t.getTime()}),this},e.prototype.resumeAnimate=function(){var t=this.get("timeline").getTime(),e=this.get("animations"),n=this.get("_pause").pauseTime;return l(e,(function(e){e.startTime=e.startTime+(t-n),e._paused=!1,e._pauseTime=null,e.resumeCallback&&e.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",e),this},e.prototype.emitDelegation=function(t,e){for(var n=e.propagationPath,r=this.getEvents(),i=0;i0)}));return o.length>0?(vt()(o,(function(t){var e=t.getBBox();i.push(e.minX,e.maxX),a.push(e.minY,e.maxY)})),t=Math.min.apply(null,i),e=Math.max.apply(null,i),n=Math.min.apply(null,a),r=Math.max.apply(null,a)):(t=0,e=0,n=0,r=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:r,width:e-t,height:r-n}},e.prototype.getCanvasBBox=function(){var t=1/0,e=-1/0,n=1/0,r=-1/0,i=[],a=[],o=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));return o.length>0?(vt()(o,(function(t){var e=t.getCanvasBBox();i.push(e.minX,e.maxX),a.push(e.minY,e.maxY)})),t=Math.min.apply(null,i),e=Math.max.apply(null,i),n=Math.min.apply(null,a),r=Math.max.apply(null,a)):(t=0,e=0,n=0,r=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:r,width:e-t,height:r-n}},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.children=[],e},e.prototype.onAttrChange=function(e,n,r){if(t.prototype.onAttrChange.call(this,e,n,r),"matrix"===e){var i=this.getTotalMatrix();this._applyChildrenMarix(i)}},e.prototype.applyMatrix=function(e){var n=this.getTotalMatrix();t.prototype.applyMatrix.call(this,e);var r=this.getTotalMatrix();r!==n&&this._applyChildrenMarix(r)},e.prototype._applyChildrenMarix=function(t){var e=this.getChildren();vt()(e,(function(e){e.applyMatrix(t)}))},e.prototype.addShape=function(){for(var t=[],e=0;e=0;a--){var o=t[a];if(Bt(o)&&(o.isGroup()?i=o.getShape(e,n,r):o.isHit(e,n)&&(i=o)),i)break}return i},e.prototype.add=function(t){var e=this.getCanvas(),n=this.getChildren(),r=this.get("timeline"),i=t.getParent();i&&function(t,e,n){void 0===n&&(n=!0),n?e.destroy():(e.set("parent",null),e.set("canvas",null)),xt(t.getChildren(),e)}(i,t,!1),t.set("parent",this),e&&function t(e,n){if(e.set("canvas",n),e.isGroup()){var r=e.get("children");r.length&&r.forEach((function(e){t(e,n)}))}}(t,e),r&&function t(e,n){if(e.set("timeline",n),e.isGroup()){var r=e.get("children");r.length&&r.forEach((function(e){t(e,n)}))}}(t,r),n.push(t),function(t){t.isGroup()?(t.isEntityGroup()||t.get("children").length)&&t.onCanvasChange("add"):t.onCanvasChange("add")}(t),this._applyElementMatrix(t)},e.prototype._applyElementMatrix=function(t){var e=this.getTotalMatrix();e&&t.applyMatrix(e)},e.prototype.getChildren=function(){return this.get("children")},e.prototype.sort=function(){var t,e=this.getChildren();vt()(e,(function(t,e){return t._INDEX=e,t})),e.sort((t=function(t,e){return t.get("zIndex")-e.get("zIndex")},function(e,n){var r=t(e,n);return 0===r?e._INDEX-n._INDEX:r})),this.onCanvasChange("sort")},e.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),e=t.length-1;e>=0;e--)t[e].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},e.prototype.destroy=function(){this.get("destroyed")||(this.clear(),t.prototype.destroy.call(this))},e.prototype.getFirst=function(){return this.getChildByIndex(0)},e.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},e.prototype.getChildByIndex=function(t){return this.getChildren()[t]},e.prototype.getCount=function(){return this.getChildren().length},e.prototype.contain=function(t){return this.getChildren().indexOf(t)>-1},e.prototype.removeChild=function(t,e){void 0===e&&(e=!0),this.contain(t)&&t.remove(e)},e.prototype.findAll=function(t){var e=[],n=this.getChildren();return vt()(n,(function(n){t(n)&&e.push(n),n.isGroup()&&(e=e.concat(n.findAll(t)))})),e},e.prototype.find=function(t){var e=null,n=this.getChildren();return vt()(n,(function(n){if(t(n)?e=n:n.isGroup()&&(e=n.find(t)),e)return!1})),e},e.prototype.findById=function(t){return this.find((function(e){return e.get("id")===t}))},e.prototype.findByClassName=function(t){return this.find((function(e){return e.get("className")===t}))},e.prototype.findAllByName=function(t){return this.findAll((function(e){return e.get("name")===t}))},e}(jt),Nt=0,Yt=0,Gt=0,Xt=0,Vt=0,qt=0,zt="object"==typeof performance&&performance.now?performance:Date,Ht="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Wt(){return Vt||(Ht(Ut),Vt=zt.now()+qt)}function Ut(){Vt=0}function Zt(){this._call=this._time=this._next=null}function Qt(t,e,n){var r=new Zt;return r.restart(t,e,n),r}function $t(){Vt=(Xt=zt.now())+qt,Nt=Yt=0;try{!function(){Wt(),++Nt;for(var t,e=Dt;e;)(t=Vt-e._time)>=0&&e._call.call(null,t),e=e._next;--Nt}()}finally{Nt=0,function(){for(var t,e,n=Dt,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Dt=e);Ft=t,Jt(r)}(),Vt=0}}function Kt(){var t=zt.now(),e=t-Xt;e>1e3&&(qt-=e,Xt=t)}function Jt(t){Nt||(Yt&&(Yt=clearTimeout(Yt)),t-Vt>24?(t<1/0&&(Yt=setTimeout($t,t-zt.now()-qt)),Gt&&(Gt=clearInterval(Gt))):(Gt||(Xt=zt.now(),Gt=setInterval(Kt,1e3)),Nt=1,Ht($t)))}function te(t){return+t}function ee(t){return t*t}function ne(t){return t*(2-t)}function re(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function ie(t){return t*t*t}function ae(t){return--t*t*t+1}function oe(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Zt.prototype=Qt.prototype={constructor:Zt,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Wt():+n)+(null==e?0:+e),this._next||Ft===this||(Ft?Ft._next=this:Dt=this,Ft=this),this._call=t,this._time=n,Jt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jt())}};var se=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),ue=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),ce=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),le=Math.PI,he=le/2;function fe(t){return 1-Math.cos(t*he)}function pe(t){return Math.sin(t*he)}function de(t){return(1-Math.cos(le*t))/2}function ge(t){return Math.pow(2,10*t-10)}function ve(t){return 1-Math.pow(2,-10*t)}function ye(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function me(t){return 1-Math.sqrt(1-t*t)}function xe(t){return Math.sqrt(1- --t*t)}function be(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Me=7.5625;function _e(t){return 1-we(1-t)}function we(t){return(t=+t)<4/11?Me*t*t:t<8/11?Me*(t-=6/11)*t+.75:t<10/11?Me*(t-=9/11)*t+.9375:Me*(t-=21/22)*t+63/64}function Ce(t){return((t*=2)<=1?1-we(1-t):we(t-1)+1)/2}var Oe=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),Ae=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),Pe=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),Se=2*Math.PI,Ee=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Se);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Se)},i.period=function(n){return t(e,n)},i}(1,.3),Ie=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Se);function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*Se)},i.period=function(n){return t(e,n)},i}(1,.3),Te=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Se);function i(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*Se)},i.period=function(n){return t(e,n)},i}(1,.3),ke=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function je(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Le(){}var Be="\\s*([+-]?\\d+)\\s*",De="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Re=/^#([0-9a-f]{3,8})$/,Ne=new RegExp("^rgb\\("+[Be,Be,Be]+"\\)$"),Ye=new RegExp("^rgb\\("+[Fe,Fe,Fe]+"\\)$"),Ge=new RegExp("^rgba\\("+[Be,Be,Be,De]+"\\)$"),Xe=new RegExp("^rgba\\("+[Fe,Fe,Fe,De]+"\\)$"),Ve=new RegExp("^hsl\\("+[De,Fe,Fe]+"\\)$"),qe=new RegExp("^hsla\\("+[De,Fe,Fe,De]+"\\)$"),ze={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function He(){return this.rgb().formatHex()}function We(){return this.rgb().formatRgb()}function Ue(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Re.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Ze(e):3===n?new Je(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Je(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Je(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Ne.exec(t))?new Je(e[1],e[2],e[3],1):(e=Ye.exec(t))?new Je(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ge.exec(t))?Qe(e[1],e[2],e[3],e[4]):(e=Xe.exec(t))?Qe(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ve.exec(t))?rn(e[1],e[2]/100,e[3]/100,1):(e=qe.exec(t))?rn(e[1],e[2]/100,e[3]/100,e[4]):ze.hasOwnProperty(t)?Ze(ze[t]):"transparent"===t?new Je(NaN,NaN,NaN,0):null}function Ze(t){return new Je(t>>16&255,t>>8&255,255&t,1)}function Qe(t,e,n,r){return r<=0&&(t=e=n=NaN),new Je(t,e,n,r)}function $e(t){return t instanceof Le||(t=Ue(t)),t?new Je((t=t.rgb()).r,t.g,t.b,t.opacity):new Je}function Ke(t,e,n,r){return 1===arguments.length?$e(t):new Je(t,e,n,null==r?1:r)}function Je(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function tn(){return"#"+nn(this.r)+nn(this.g)+nn(this.b)}function en(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function nn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function rn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new on(t,e,n,r)}function an(t){if(t instanceof on)return new on(t.h,t.s,t.l,t.opacity);if(t instanceof Le||(t=Ue(t)),!t)return new on;if(t instanceof on)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n0&&u<1?0:o,new on(o,s,u,t.opacity)}function on(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function sn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function un(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}ke(Le,Ue,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:He,formatHex:He,formatHsl:function(){return an(this).formatHsl()},formatRgb:We,toString:We}),ke(Je,Ke,je(Le,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Je(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Je(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:tn,formatHex:tn,formatRgb:en,toString:en})),ke(on,(function(t,e,n,r){return 1===arguments.length?an(t):new on(t,e,n,null==r?1:r)}),je(Le,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new on(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new on(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Je(sn(t>=240?t-240:t+120,i,r),sn(t,i,r),sn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var cn=function(t){return function(){return t}};function ln(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):cn(isNaN(t)?e:t)}var hn=function t(e){var n=function(t){return 1==(t=+t)?ln:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):cn(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=Ke(t)).r,(e=Ke(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=ln(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function fn(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=ra&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,u.push({i:o,x:yn(n,r)})),a=bn.lastIndex;return ap.length?(f=P(a[l]),p=P(i[l]),p=K(p,f),p=et(p,f),e.fromAttrs.path=p,e.toAttrs.path=f):e.pathFormatted||(f=P(a[l]),p=P(i[l]),p=et(p,f),e.fromAttrs.path=p,e.toAttrs.path=f,e.pathFormatted=!0),r[l]=[];for(var d=0;d0){for(var a=r.animators.length-1;a>=0;a--)if((t=r.animators[a]).destroyed)r.removeAnimator(a);else{if(!t.isAnimatePaused())for(var o=(e=t.get("animations")).length-1;o>=0;o--)n=e[o],Cn(t,n,i)&&(e.splice(o,1),n.callback&&n.callback());0===e.length&&r.removeAnimator(a)}r.canvas.get("autoDraw")||r.canvas.draw()}}))},t.prototype.addAnimator=function(t){this.animators.push(t)},t.prototype.removeAnimator=function(t){this.animators.splice(t,1)},t.prototype.isAnimating=function(){return!!this.animators.length},t.prototype.stop=function(){this.timer&&this.timer.stop()},t.prototype.stopAllAnimations=function(t){void 0===t&&(t=!0),this.animators.forEach((function(e){e.stopAnimate(t)})),this.animators=[],this.canvas.draw()},t.prototype.getTime=function(){return this.current},t}(),An=function(t){function e(e){var n=t.call(this,e)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}return it(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.cursor="default",e},e.prototype.initContainer=function(){var t=this.get("container");lt()(t)&&(t=document.getElementById(t),this.set("container",t))},e.prototype.initDom=function(){var t=this.createDom();this.set("el",t),this.get("container").appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},e.prototype.initEvents=function(){},e.prototype.initTimeline=function(){var t=new On(this);this.set("timeline",t)},e.prototype.setDOMSize=function(t,e){var n=this.get("el");bt&&(n.style.width=t+"px",n.style.height=e+"px")},e.prototype.changeSize=function(t,e){this.setDOMSize(t,e),this.set("width",t),this.set("height",e),this.onCanvasChange("changeSize")},e.prototype.getRenderer=function(){return this.get("renderer")},e.prototype.getCursor=function(){return this.get("cursor")},e.prototype.setCursor=function(t){this.set("cursor",t);var e=this.get("el");bt&&e&&(e.style.cursor=t)},e.prototype.getPointByClient=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t-n.left,y:e-n.top}},e.prototype.getClientByPoint=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t+n.left,y:e+n.top}},e.prototype.draw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},e.prototype.clearEvents=function(){},e.prototype.isCanvas=function(){return!0},e.prototype.getParent=function(){return null},e.prototype.destroy=function(){var e=this.get("timeline");this.get("destroyed")||(this.clear(),e&&e.stop(),this.clearEvents(),this.removeDom(),t.prototype.destroy.call(this))},e}(Rt),Pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return it(e,t),e.prototype.isGroup=function(){return!0},e.prototype.isEntityGroup=function(){return!1},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=this.getChildren(),r=0;r=t&&n.minY<=e&&n.maxY>=e},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e),this.clearCacheBBox()},e.prototype.getBBox=function(){var t=this.get("bbox");return t||(t=this.calculateBBox(),this.set("bbox",t)),t},e.prototype.getCanvasBBox=function(){var t=this.get("canvasBox");return t||(t=this.calculateCanvasBBox(),this.set("canvasBox",t)),t},e.prototype.applyMatrix=function(e){t.prototype.applyMatrix.call(this,e),this.set("canvasBox",null)},e.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),e=this.getTotalMatrix(),n=t.minX,r=t.minY,i=t.maxX,a=t.maxY;if(e){var o=Pt(e,[t.minX,t.minY]),s=Pt(e,[t.maxX,t.minY]),u=Pt(e,[t.minX,t.maxY]),c=Pt(e,[t.maxX,t.maxY]);n=Math.min(o[0],s[0],u[0],c[0]),i=Math.max(o[0],s[0],u[0],c[0]),r=Math.min(o[1],s[1],u[1],c[1]),a=Math.max(o[1],s[1],u[1],c[1])}var l=this.attrs;if(l.shadowColor){var h=l.shadowBlur,f=void 0===h?0:h,p=l.shadowOffsetX,d=void 0===p?0:p,g=l.shadowOffsetY,v=void 0===g?0:g,y=n-f+d,m=i+f+d,x=r-f+v,b=a+f+v;n=Math.min(n,y),i=Math.max(i,m),r=Math.min(r,x),a=Math.max(a,b)}return{x:n,y:r,minX:n,minY:r,maxX:i,maxY:a,width:i-n,height:a-r}},e.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBox",null)},e.prototype.isClipShape=function(){return this.get("isClipShape")},e.prototype.isInShape=function(t,e){return!1},e.prototype.isOnlyHitBox=function(){return!1},e.prototype.isHit=function(t,e){var n=this.get("startArrowShape"),r=this.get("endArrowShape"),i=[t,e,1],a=(i=this.invertFromMatrix(i))[0],o=i[1],s=this._isInBBox(a,o);if(this.isOnlyHitBox())return s;if(s&&!this.isClipped(a,o)){if(this.isInShape(a,o))return!0;if(n&&n.isHit(a,o))return!0;if(r&&r.isHit(a,o))return!0}return!1},e}(jt);n.d(e,"version",(function(){return En})),n.d(e,"Event",(function(){return nt})),n.d(e,"Base",(function(){return Mt})),n.d(e,"AbstractCanvas",(function(){return An})),n.d(e,"AbstractGroup",(function(){return Pn})),n.d(e,"AbstractShape",(function(){return Sn})),n.d(e,"PathUtil",(function(){return r}));var En=n(32).version},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(18);e.default=function(t){return r.default(t,"Function")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={}.toString;e.default=function(t,e){return r.call(t)==="[object "+e+"]"}},function(t,e,n){"use strict";function r(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n,i){return e&&r(t,e),n&&r(t,n),i&&r(t,i),t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(33);e.default=function(t){var e=r.default(t);return e.charAt(0).toUpperCase()+e.substring(1)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=function(t){e.ARRAY_TYPE=t},e.toRadian=function(t){return t*i},e.equals=function(t,e){return Math.abs(t-e)<=r*Math.max(1,Math.abs(t),Math.abs(e))};var r=e.EPSILON=1e-6;e.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,e.RANDOM=Math.random;var i=Math.PI/180},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),i=n(15);e.drawChildren=function(t,e){e.forEach((function(e){e.draw(t)}))},e.refreshElement=function(t,e){var n=t.get("canvas");if(n&&n.get("autoDraw")){var a=n.get("context"),o=t.getParent(),s=o?o.getChildren():[n],u=t.get("el");if("remove"===e)if(t.get("isClipShape")){var c=u&&u.parentNode,l=c&&c.parentNode;c&&l&&l.removeChild(c)}else u&&u.parentNode&&u.parentNode.removeChild(u);else if("show"===e)u.setAttribute("visibility","visible");else if("hide"===e)u.setAttribute("visibility","hidden");else if("zIndex"===e)i.moveTo(u,s.indexOf(t));else if("sort"===e){var h=t.get("children");h&&h.length&&i.sortDom(t,(function(t,e){return h.indexOf(t)-h.indexOf(e)?1:0}))}else"clear"===e?u&&(u.innerHTML=""):"matrix"===e?r.setTransform(t):"clip"===e?r.setClip(t,a):"attr"===e||"add"===e&&t.draw(a)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(16),a=n(0),o=n(10),s=n(22),u=n(8),c=n(3),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.isEntityGroup=function(){return!0},e.prototype.createDom=function(){var t=document.createElementNS("http://www.w3.org/2000/svg","g");this.set("el",t);var e=this.getParent();if(e){var n=e.get("el");n||(n=e.createDom(),e.set("el",n)),n.appendChild(t)}return t},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e);var n=this.get("canvas");if(n&&n.get("autoDraw")){var r=n.get("context");this.createPath(r,e)}},e.prototype.onCanvasChange=function(t){s.refreshElement(this,t)},e.prototype.getShapeBase=function(){return o},e.prototype.getGroupBase=function(){return e},e.prototype.draw=function(t){var e=this.getChildren(),n=this.get("el");this.get("destroyed")?n&&n.parentNode.removeChild(n):(n||this.createDom(),u.setClip(this,t),this.createPath(t),e.length&&s.drawChildren(t,e))},e.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");a.each(e||n,(function(t,e){c.SVG_ATTR_MAP[e]&&r.setAttribute(c.SVG_ATTR_MAP[e],t)})),u.setTransform(this)},e}(i.AbstractGroup);e.default=l},function(t,e,n){"use strict";function r(t,e){return t&&e?{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}:t||e}Object.defineProperty(e,"__esModule",{value:!0}),e.mergeBBox=r,e.mergeArrowBBox=function(t,e){var n=t.get("startArrowShape"),i=t.get("endArrowShape");return n&&(e=r(e,n.getCanvasBBox())),i&&(e=r(e,i.getCanvasBBox())),e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeFromArray=function(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)},e.isBrowser="undefined"!=typeof window&&void 0!==window.document;var r=n(11);e.isNil=r.default;var i=n(17);e.isFunction=i.default;var a=n(12);e.isString=a.default;var o=n(13);e.isObject=o.default;var s=n(7);e.isArray=s.default;var u=n(19);e.mix=u.default;var c=n(14);e.each=c.default;var l=n(20);e.upperFirst=l.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6);e.nearestPoint=function(t,e,n,i,a){for(var o,s=.005,u=1/0,c=[n,i],l=0;l<=20;l++){var h=.05*l,f=[a.apply(null,t.concat([h])),a.apply(null,e.concat([h]))];(v=r.distance(c[0],c[1],f[0],f[1]))=0&&v1&&(n*=Math.sqrt(m),a*=Math.sqrt(m));var x=n*n*(y*y)+a*a*(v*v),b=x?Math.sqrt((n*n*(a*a)-x)/x):1;l===h&&(b*=-1),isNaN(b)&&(b=0);var M=a?b*n*y/a:0,_=n?b*-a*v/n:0,w=(f+d)/2+Math.cos(c)*M-Math.sin(c)*_,C=(p+g)/2+Math.sin(c)*M+Math.cos(c)*_,O=[(v-M)/n,(y-_)/a],A=[(-1*v-M)/n,(-1*y-_)/a],P=s([1,0],O),S=s(O,A);return o(O,A)<=-1&&(S=Math.PI),o(O,A)>=1&&(S=0),0===h&&S>0&&(S-=2*Math.PI),1===h&&S<0&&(S+=2*Math.PI),{cx:w,cy:C,rx:u(t,[d,g])?0:n,ry:u(t,[d,g])?0:a,startAngle:P,endAngle:P+S,xRotation:c,arcFlag:l,sweepFlag:h}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this._events={}}return t.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},t.prototype.once=function(t,e){return this.on(t,e,!0),this},t.prototype.emit=function(t){for(var e=this,n=[],r=1;r1?0:i<-1?Math.PI:Math.acos(i)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.equals=function(t,e){var n=t[0],r=t[1],a=t[2],o=e[0],s=e[1],u=e[2];return Math.abs(n-o)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-s)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-u)<=i.EPSILON*Math.max(1,Math.abs(a),Math.abs(u))};var r,i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(21));function a(){var t=new i.ARRAY_TYPE(3);return i.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function o(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function s(t,e,n){var r=new i.ARRAY_TYPE(3);return r[0]=t,r[1]=e,r[2]=n,r}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function c(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function l(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function h(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)}function f(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function p(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function d(t,e){var n=e[0],r=e[1],i=e[2],a=n*n+r*r+i*i;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}function g(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}e.sub=u,e.mul=c,e.div=l,e.dist=h,e.sqrDist=f,e.len=o,e.sqrLen=p,e.forEach=(r=a(),function(t,e,n,i,a,o){var s,u=void 0;for(e||(e=3),n||(n=0),s=i?Math.min(i*e+n,t.length):t.length,u=n;u1?e*i+a(e,n)*(i-1):e},e.getLineSpaceing=a,e.getTextWidth=function(t,e){var n=i.getOffScreenContext(),a=0;if(r.isNil(t)||""===t)return a;if(n.save(),n.font=e,r.isString(t)&&t.includes("\n")){var o=t.split("\n");r.each(o,(function(t){var e=n.measureText(t).width;aMath.PI/2?Math.PI-l:l,h=h>Math.PI/2?Math.PI-h:h,{xExtra:Math.cos(c/2-l)*(e/2*(1/Math.sin(c/2)))-e/2||0,yExtra:Math.cos(h-c/2)*(e/2*(1/Math.sin(c/2)))-e/2||0}}e.default=function(t){var e=t.attr(),n=e.path,s=e.stroke?e.lineWidth:0,l=function(t,e){for(var n=[],o=[],s=[],u=0;u=0?[a]:[]}function u(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function c(t,e,n,i,a,s,u){var c=o(t,n,a,u),l=o(e,i,s,u),h=r.default.pointAt(t,e,n,i,u),f=r.default.pointAt(n,i,a,s,u);return[[t,e,h.x,h.y,c,l],[c,l,f.x,f.y,a,s]]}e.default={box:function(t,e,n,r,a,u){var c=s(t,n,a)[0],l=s(e,r,u)[0],h=[t,a],f=[e,u];return void 0!==c&&h.push(o(t,n,a,c)),void 0!==l&&f.push(o(e,r,u,l)),i.getBBoxByArray(h,f)},length:function(t,e,n,r,a,o){return function t(e,n,r,a,o,s,u){if(0===u)return(i.distance(e,n,r,a)+i.distance(r,a,o,s)+i.distance(e,n,o,s))/2;var l=c(e,n,r,a,o,s,.5),h=l[0],f=l[1];return h.push(u-1),f.push(u-1),t.apply(null,h)+t.apply(null,f)}(t,e,n,r,a,o,3)},nearestPoint:function(t,e,n,r,i,s,u,c){return a.nearestPoint([t,n,i],[e,r,s],u,c,o)},pointDistance:function(t,e,n,r,a,o,s,u){var c=this.nearestPoint(t,e,n,r,a,o,s,u);return i.distance(c.x,c.y,s,u)},interpolationAt:o,pointAt:function(t,e,n,r,i,a,s){return{x:o(t,n,i,s),y:o(e,r,a,s)}},divide:function(t,e,n,r,i,a,o){return c(t,e,n,r,i,a,o)},tangentAngle:function(t,e,n,r,a,o,s){var c=u(t,n,a,s),l=u(e,r,o,s),h=Math.atan2(l,c);return i.piMod(h)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.sqrDist=e.dist=e.div=e.mul=e.sub=e.len=void 0,e.create=a,e.clone=function(t){var e=new i.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},e.fromValues=function(t,e){var n=new i.ARRAY_TYPE(2);return n[0]=t,n[1]=e,n},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.set=function(t,e,n){return t[0]=e,t[1]=n,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},e.subtract=o,e.multiply=s,e.divide=u,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},e.scaleAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t},e.distance=c,e.squaredDistance=l,e.length=h,e.squaredLength=f,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},e.normalize=function(t,e){var n=e[0],r=e[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},e.lerp=function(t,e,n,r){var i=e[0],a=e[1];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t},e.random=function(t,e){e=e||1;var n=2*i.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.transformMat2=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t},e.transformMat2d=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t},e.transformMat3=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t},e.transformMat4=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t},e.rotate=function(t,e,n,r){var i=e[0]-n[0],a=e[1]-n[1],o=Math.sin(r),s=Math.cos(r);return t[0]=i*s-a*o+n[0],t[1]=i*o+a*s+n[1],t},e.angle=function(t,e){var n=t[0],r=t[1],i=e[0],a=e[1],o=n*n+r*r;o>0&&(o=1/Math.sqrt(o));var s=i*i+a*a;s>0&&(s=1/Math.sqrt(s));var u=(n*i+r*a)*o*s;return u>1?0:u<-1?Math.PI:Math.acos(u)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],r=t[1],a=e[0],o=e[1];return Math.abs(n-a)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-o)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(o))};var r,i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(46));function a(){var t=new i.ARRAY_TYPE(2);return i.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function o(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function s(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function u(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function c(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}function l(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function h(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function f(t){var e=t[0],n=t[1];return e*e+n*n}e.len=h,e.sub=o,e.mul=s,e.div=u,e.dist=c,e.sqrDist=l,e.sqrLen=f,e.forEach=(r=a(),function(t,e,n,i,a,o){var s,u=void 0;for(e||(e=2),n||(n=0),s=i?Math.min(i*e+n,t.length):t.length,u=n;u=0&&a<=1&&h.push(a);else{var f=c*c-4*u*l;r.isNumberEqual(f,0)?h.push(-c/(2*u)):f>0&&(o=(-c-(s=Math.sqrt(f)))/(2*u),(a=(-c+s)/(2*u))>=0&&a<=1&&h.push(a),o>=0&&o<=1&&h.push(o))}return h}function c(t,e,n,r,a,s,u,c,l){var h=o(t,n,a,u,l),f=o(e,r,s,c,l),p=i.default.pointAt(t,e,n,r,l),d=i.default.pointAt(n,r,a,s,l),g=i.default.pointAt(a,s,u,c,l),v=i.default.pointAt(p.x,p.y,d.x,d.y,l),y=i.default.pointAt(d.x,d.y,g.x,g.y,l);return[[t,e,p.x,p.y,v.x,v.y,h,f],[h,f,y.x,y.y,g.x,g.y,u,c]]}e.default={extrema:u,box:function(t,e,n,i,a,s,c,l){for(var h=[t,c],f=[e,l],p=u(t,n,a,c),d=u(e,i,s,l),g=0;gh&&(h=g)}var v=function(t,e,n){return Math.atan(e/(t*Math.tan(n)))}(n,r,i),y=1/0,m=-1/0,x=[s,u];for(p=2*-Math.PI;p<=2*Math.PI;p+=Math.PI){var b=v+p;sm&&(m=M)}return{x:l,y:y,width:h-l,height:m-y}},length:function(t,e,n,r,i,a,o){},nearestPoint:function(t,e,n,r,a,o,c,l,h){var f=u(l-t,h-e,-a),p=f[0],d=f[1],g=i.default.nearestPoint(0,0,n,r,p,d),v=function(t,e,n,r){return(Math.atan2(r*t,n*e)+2*Math.PI)%(2*Math.PI)}(n,r,g.x,g.y);vc&&(g=s(n,r,c));var y=u(g.x,g.y,a);return{x:y[0]+t,y:y[1]+e}},pointDistance:function(t,e,n,i,a,o,s,u,c){var l=this.nearestPoint(t,e,n,i,u,c);return r.distance(l.x,l.y,u,c)},pointAt:function(t,e,n,r,i,s,u,c){var l=(u-s)*c+s;return{x:a(t,0,n,r,i,l),y:o(0,e,n,r,i,l)}},tangentAngle:function(t,e,n,i,a,o,s,u){var c=(s-o)*u+o,l=function(t,e,n,r,i,a,o,s){return-1*n*Math.cos(i)*Math.sin(s)-r*Math.sin(i)*Math.cos(s)}(0,0,n,i,a,0,0,c),h=function(t,e,n,r,i,a,o,s){return-1*n*Math.sin(i)*Math.sin(s)+r*Math.cos(i)*Math.cos(s)}(0,0,n,i,a,0,0,c);return r.piMod(Math.atan2(h,l))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6);function i(t,e){var n=Math.abs(t);return e>0?n:-1*n}e.default={box:function(t,e,n,r){return{x:t-n,y:e-r,width:2*n,height:2*r}},length:function(t,e,n,r){return Math.PI*(3*(n+r)-Math.sqrt((3*n+r)*(n+3*r)))},nearestPoint:function(t,e,n,r,a,o){var s=n,u=r;if(0===s||0===u)return{x:t,y:e};for(var c,l,h=a-t,f=o-e,p=Math.abs(h),d=Math.abs(f),g=s*s,v=u*u,y=Math.PI/4,m=0;m<4;m++){c=s*Math.cos(y),l=u*Math.sin(y);var x=(g-v)*Math.pow(Math.cos(y),3)/s,b=(v-g)*Math.pow(Math.sin(y),3)/u,M=c-x,_=l-b,w=p-x,C=d-b,O=Math.hypot(_,M),A=Math.hypot(C,w);y+=O*Math.asin((M*C-_*w)/(O*A))/Math.sqrt(g+v-c*c-l*l),y=Math.min(Math.PI/2,Math.max(0,y))}return{x:t+i(c,h),y:e+i(l,f)}},pointDistance:function(t,e,n,i,a,o){var s=this.nearestPoint(t,e,n,i,a,o);return r.distance(s.x,s.y,a,o)},pointAt:function(t,e,n,r,i){var a=2*Math.PI*i;return{x:t+n*Math.cos(a),y:e+r*Math.sin(a)}},tangentAngle:function(t,e,n,i,a){var o=2*Math.PI*a,s=Math.atan2(i*Math.cos(o),-n*Math.sin(o));return r.piMod(s)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(27),i=n(27),a=n(53);function o(t,e){return{x:e.x+(e.x-t.x),y:e.y+(e.y-t.y)}}e.default=function(t){for(var e=[],n=null,s=null,u=null,c=0,l=(t=a.default(t)).length,h=0;h1){var i=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=i}r.default(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)=2?r.setAttribute("points",t.map((function(t){return t[0]+","+t[1]})).join(" ")):a.SVG_ATTR_MAP[e]&&r.setAttribute(a.SVG_ATTR_MAP[e],t)}))},e}(n(4).default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(9),a=n(67),o=n(0),s=n(3),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="polyline",e.canFill=!0,e.canStroke=!0,e}return r.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},e),{startArrow:!1,endArrow:!1})},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),-1!==["points"].indexOf(e)&&this._resetCache()},e.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},e.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");o.each(e||n,(function(t,e){"points"===e&&o.isArray(t)&&t.length>=2?r.setAttribute("points",t.map((function(t){return t[0]+","+t[1]})).join(" ")):s.SVG_ATTR_MAP[e]&&r.setAttribute(s.SVG_ATTR_MAP[e],t)}))},e.prototype.getTotalLength=function(){var t=this.attr().points,e=this.get("totalLength");return o.isNil(e)?(this.set("totalLength",a.default.length(t)),this.get("totalLength")):e},e.prototype.getPoint=function(t){var e,n,r=this.attr().points,a=this.get("tCache");return a||(this._setTcache(),a=this.get("tCache")),o.each(a,(function(r,i){t>=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)})),i.default.pointAt(r[n][0],r[n][1],r[n+1][0],r[n+1][1],e)},e.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var e=this.getTotalLength();if(!(e<=0)){var n,r,a=0,s=[];o.each(t,(function(o,u){t[u+1]&&((n=[])[0]=a/e,r=i.default.length(o[0],o[1],t[u+1][0],t[u+1][1]),a+=r,n[1]=a/e,s.push(n))})),this.set("tCache",s)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.attr().points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(n(4).default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(68),i=n(6);e.default={box:function(t){for(var e=[],n=[],r=0;r1||e<0||t.length<2)return null;var n=a(t),i=n.segments,o=n.totalLength;if(0===o)return{x:t[0][0],y:t[0][1]};for(var s=0,u=null,c=0;c=s&&e<=s+p){var d=(e-s)/p;u=r.default.pointAt(h[0],h[1],f[0],f[1],d);break}s+=p}return u},e.angleAtSegments=function(t,e){if(e>1||e<0||t.length<2)return 0;for(var n=a(t),r=n.segments,i=n.totalLength,o=0,s=0,u=0;u=o&&e<=o+f){s=Math.atan2(h[1]-l[1],h[0]-l[0]);break}o+=f}return s},e.distanceAtSegment=function(t,e,n){for(var i=1/0,a=0;a1){var i=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=i}r.each(e,(function(t,n){isNaN(t)||(e[n]=+t)})),t[n]=e})),t):void 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(72),o=n(8),s=n(3),u=n(4),c={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"baseline",hanging:"hanging"},l={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",hanging:"hanging"},h={left:"left",start:"left",center:"middle",right:"end",end:"end"},f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="text",e.canFill=!0,e.canStroke=!0,e}return r.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},e),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},e.prototype.createPath=function(t,e){var n=this,r=this.attr(),a=this.get("el");this._setFont(),i.each(e||r,(function(t,e){"text"===e?n._setText(""+t):"matrix"===e&&t?o.setTransform(n):s.SVG_ATTR_MAP[e]&&a.setAttribute(s.SVG_ATTR_MAP[e],t)})),a.setAttribute("paint-order","stroke"),a.setAttribute("style","stroke-linecap:butt; stroke-linejoin:miter;")},e.prototype._setFont=function(){var t=this.get("el"),e=this.attr(),n=e.fontSize,r=e.textBaseline,i=e.textAlign,o=a.detect();o&&"firefox"===o.name?t.setAttribute("dominant-baseline",l[r]||"alphabetic"):t.setAttribute("alignment-baseline",c[r]||"baseline"),t.setAttribute("text-anchor",h[i]||"left"),n&&+n<12&&(this.attr("matrix",[1,0,0,0,1,0,0,0,1]),this.transform())},e.prototype._setText=function(t){var e=this.get("el"),n=this.attr(),r=n.x,a=n.textBaseline,o=void 0===a?"bottom":a;if(t)if(~t.indexOf("\n")){var s=t.split("\n"),u=s.length-1,c="";i.each(s,(function(t,e){0===e?"alphabetic"===o?c+=''+t+"":"top"===o?c+=''+t+"":"middle"===o?c+=''+t+"":"bottom"===o?c+=''+t+"":"hanging"===o&&(c+=''+t+""):c+=''+t+""})),e.innerHTML=c}else e.innerHTML=t;else e.innerHTML=""},e}(u.default);e.default=f},function(t,e,n){"use strict";(function(t){var n=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e1)for(var n=1;n120||c*c+l*l>40?s&&s.get("draggable")?((a=this.mousedownShape).set("capture",!1),this.draggingShape=a,this.dragging=!0,this._emitEvent("dragstart",n,t,a),this.mousedownShape=null,this.mousedownPoint=null):!s&&r.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",n,t,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(n,t,i,e),this._emitEvent("mousemove",n,t,e)):(this._emitMouseoverEvents(n,t,i,e),this._emitEvent("mousemove",n,t,e))}else this._emitMouseoverEvents(n,t,i,e),this._emitEvent("mousemove",n,t,e)}},t.prototype._emitEvent=function(t,e,n,r,i,a){var u=this._getEventObj(t,e,n,r,i,a);if(r){u.shape=r,o(r,t,u);for(var c=r.getParent();c;)c.emitDelegation(t,u),u.propagationStopped||s(c,t,u),u.propagationPath.push(c),c=c.getParent()}else o(this.canvas,t,u)},t.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(83),a=n(84),o=n(85),s=n(86),u=n(87),c=function(){function t(t){var e=document.createElementNS("http://www.w3.org/2000/svg","defs"),n=r.uniqueId("defs_");e.id=n,t.appendChild(e),this.children=[],this.defaultArrow={},this.el=e,this.canvas=t}return t.prototype.find=function(t,e){for(var n=this.children,r=null,i=0;i'})),n}var u=function(){function t(t){this.cfg={};var e,n,o,u,c,l,h,f=null,p=r.uniqueId("gradient_");return"l"===t.toLowerCase()[0]?function(t,e){var n,a,o=i.exec(t),u=r.mod(r.toRadian(parseFloat(o[1])),2*Math.PI),c=o[2];u>=0&&u<.5*Math.PI?(n={x:0,y:0},a={x:1,y:1}):.5*Math.PI<=u&&u';e.innerHTML=n},t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=function(){function t(t,e){this.cfg={};var n=document.createElementNS("http://www.w3.org/2000/svg","marker"),i=r.uniqueId("marker_");n.setAttribute("id",i);var a=document.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("stroke",t.stroke||"none"),a.setAttribute("fill",t.fill||"none"),n.appendChild(a),n.setAttribute("overflow","visible"),n.setAttribute("orient","auto-start-reverse"),this.el=n,this.child=a,this.id=i;var o=t["marker-start"===e?"startArrow":"endArrow"];return this.stroke=t.stroke||"#000",!0===o?this._setDefaultPath(e,a):(this.cfg=o,this._setMarker(t.lineWidth,a)),this}return t.prototype.match=function(){return!1},t.prototype._setDefaultPath=function(t,e){var n=this.el;e.setAttribute("d","M0,0 L"+10*Math.cos(Math.PI/6)+",5 L0,10"),n.setAttribute("refX",""+10*Math.cos(Math.PI/6)),n.setAttribute("refY","5")},t.prototype._setMarker=function(t,e){var n=this.el,i=this.cfg.path,a=this.cfg.d;r.isArray(i)&&(i=i.map((function(t){return t.join(" ")})).join("")),e.setAttribute("d",i),n.appendChild(e),a&&n.setAttribute("refX",""+a/t)},t.prototype.update=function(t){var e=this.child;e.attr?e.attr("fill",t):e.setAttribute("fill",t)},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=function(){function t(t){this.type="clip",this.cfg={};var e=document.createElementNS("http://www.w3.org/2000/svg","clipPath");this.el=e,this.id=r.uniqueId("clip_"),e.id=this.id;var n=t.cfg.el;return e.appendChild(n),this.cfg=t,this}return t.prototype.match=function(){return!1},t.prototype.remove=function(){var t=this.el;t.parentNode.removeChild(t)},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,a=function(){function t(t){this.cfg={};var e=document.createElementNS("http://www.w3.org/2000/svg","pattern");e.setAttribute("patternUnits","userSpaceOnUse");var n=document.createElementNS("http://www.w3.org/2000/svg","image");e.appendChild(n);var a=r.uniqueId("pattern_");e.id=a,this.el=e,this.id=a,this.cfg=t;var o=i.exec(t)[2];n.setAttribute("href",o);var s=new Image;function u(){e.setAttribute("width",""+s.width),e.setAttribute("height",""+s.height)}return o.match(/^data:/i)||(s.crossOrigin="Anonymous"),s.src=o,s.complete?u():(s.onload=u,s.src=s.src),this}return t.prototype.match=function(t,e){return this.cfg===e},t}();e.default=a}])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=r.__importDefault(n(48));n(134);var a=function(t){function e(e){var n=t.call(this,e)||this;n.type="area",n.shapeType="area",n.generatePoints=!0,n.startOnZero=!0;var r=e.startOnZero,i=void 0===r||r,a=e.sortable,o=void 0===a||a;return n.startOnZero=i,n.sortable=o,n}return r.__extends(e,t),e.prototype.getPoints=function(t){return t.map((function(t){return t.points}))},e.prototype.getYMinValue=function(){return this.startOnZero?t.prototype.getYMinValue.call(this):this.getYScale().min},e}(i.default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(4),a=n(33),o=i.registerShapeFactory("area",{defaultShapeType:"area",getDefaultPoints:function(t){var e=t.x,n=t.y0;return(r.isArray(t.y)?t.y:[n,t.y]).map((function(t){return{x:e,y:t}}))}});i.registerShape("area","area",{draw:function(t,e){var n=a.getShapeAttrs(t,!1,!1,this);return e.addShape({type:"path",attrs:n,name:"area"})},getMarker:function(t){return{symbol:function(t,e,n){return void 0===n&&(n=5.5),[["M",t-n,e-4],["L",t+n,e-4],["L",t+n,e+4],["L",t-n,e+4],["Z"]]},style:{r:5,fill:t.color}}}}),e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=r.__importDefault(n(14));n(136);var a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="edge",e.shapeType="edge",e.generatePoints=!0,e}return r.__extends(e,t),e}(i.default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(4),a=n(7),o=n(25),s=n(50),u=i.registerShapeFactory("edge",{defaultShapeType:"line",getDefaultPoints:function(t){return s.splitPoints(t)}});i.registerShape("edge","line",{draw:function(t,e){var n=a.getStyle(t,!0,!1,"lineWidth"),i=o.getLinePath(this.parsePoints(t.points),this.coordinate.isPolar);return e.addShape("path",{attrs:r.__assign(r.__assign({},n),{path:i})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}}),e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=r.__importDefault(n(29)),a=n(0),o=n(3),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="heatmap",e.paletteCache={},e}return r.__extends(e,t),e.prototype.createElements=function(t,e,n){void 0===n&&(n=!1);var r=this.prepareRange(t),i=this.prepareSize(),o=a.get(this.styleOption,["style","shadowBlur"]);return a.isNumber(o)||(o=i/2),this.prepareGreyScaleBlurredCircle(i,o),this.drawWithRange(t,r,i,o),null},e.prototype.clear=function(){t.prototype.clear.call(this),this.clearShadowCanvasCtx(),this.paletteCache={}},e.prototype.prepareRange=function(t){var e=this.getAttribute("color").getFields()[0],n=1/0,r=-1/0;return t.forEach((function(t){var i=t[o.FIELD_ORIGIN][e];i>r&&(r=i),i=e[0]})));for(var f=this.scales[l],p=0,d=t;p0&&!i.get(n,[r,"min"])&&e.change({min:0}),o<=0&&!i.get(n,[r,"max"])&&e.change({max:0}))}},e}(o.default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(4),a=n(7),o=n(27),s=i.registerShapeFactory("interval",{defaultShapeType:"rect",getDefaultPoints:function(t){return o.getRectPoints(t)}});i.registerShape("interval","rect",{draw:function(t,e){var n=a.getStyle(t,!1,!0),i=this.parsePath(o.getRectPath(t.points));return e.addShape("path",{attrs:r.__assign(r.__assign({},n),{path:i}),name:"interval"})},getMarker:function(t){var e=t.color;return t.isInPolar?{symbol:"circle",style:{r:4.5,fill:e}}:{symbol:"square",style:{r:4,fill:e}}}}),e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=r.__importDefault(n(48));n(78);var a=function(t){function e(e){var n=t.call(this,e)||this;n.type="line";var r=e.sortable,i=void 0===r||r;return n.sortable=i,n}return r.__extends(e,t),e}(i.default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=r.__importDefault(n(14));n(142);var a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="point",e.shapeType="point",e.generatePoints=!0,e}return r.__extends(e,t),e.prototype.getDrawCfg=function(e){var n=t.prototype.getDrawCfg.call(this,e);return r.__assign(r.__assign({},n),{isStack:!!this.getAdjust("stack")})},e}(i.default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(28),a=n(4),o=n(50),s=n(51),u=a.registerShapeFactory("point",{defaultShapeType:"hollow-circle",getDefaultPoints:function(t){return o.splitPoints(t)}});r.each(s.SHAPES,(function(t){a.registerShape("point","hollow-"+t,{draw:function(e,n){return s.drawPoints(this,e,n,t,!0)},getMarker:function(e){var n=e.color;return{symbol:i.MarkerSymbols[t]||t,style:{r:4.5,stroke:n,fill:null}}}})})),e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=r.__importDefault(n(14));n(144);var o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="polygon",e.shapeType="polygon",e.generatePoints=!0,e}return r.__extends(e,t),e.prototype.createShapePointsCfg=function(e){var n,r=t.prototype.createShapePointsCfg.call(this,e),a=r.x,o=r.y;if(!i.isArray(a)||!i.isArray(o)){var s=this.getXScale(),u=this.getYScale(),c=.5/s.values.length,l=.5/u.values.length;s.isCategory&&u.isCategory?(a=[a-c,a-c,a+c,a+c],o=[o-l,o+l,o+l,o-l]):i.isArray(a)?(a=[(n=a)[0],n[0],n[1],n[1]],o=[o-l/2,o+l/2,o+l/2,o-l/2]):i.isArray(o)&&(o=[(n=o)[0],n[1],n[1],n[0]],a=[a-c/2,a-c/2,a+c/2,a+c/2]),r.x=a,r.y=o}return r},e}(a.default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(4),o=n(7);var s=a.registerShapeFactory("polygon",{defaultShapeType:"polygon",getDefaultPoints:function(t){var e=[];return i.each(t.x,(function(n,r){var i=t.y[r];e.push({x:n,y:i})})),e}});a.registerShape("polygon","polygon",{draw:function(t,e){if(!i.isEmpty(t.points)){var n=o.getStyle(t,!0,!0),a=this.parsePath(function(t){for(var e=t[0],n=1,r=[["M",e.x,e.y]];n2?"weight":"normal";if(t.isInCircle){var l={x:0,y:1};return"normal"===c?n=function(t,e,n){var r=s.getQPath(e,n),i=[["M",t.x,t.y]];return i.push(r),i}(u[0],u[1],l):(a.fill=a.stroke,n=function(t,e){var n=s.getQPath(t[1],e),r=s.getQPath(t[3],e),i=[["M",t[0].x,t[0].y]];return i.push(r),i.push(["L",t[3].x,t[3].y]),i.push(["L",t[2].x,t[2].y]),i.push(n),i.push(["L",t[1].x,t[1].y]),i.push(["L",t[0].x,t[0].y]),i.push(["Z"]),i}(u,l)),n=this.parsePath(n),e.addShape("path",{attrs:r.__assign(r.__assign({},a),{path:n})})}if("normal"===c)return u=this.parsePoints(u),n=i.getArcPath((u[1].x+u[0].x)/2,u[0].y,Math.abs(u[1].x-u[0].x)/2,Math.PI,2*Math.PI),e.addShape("path",{attrs:r.__assign(r.__assign({},a),{path:n})});var h=s.getCPath(u[1],u[3]),f=s.getCPath(u[2],u[0]);return n=[["M",u[0].x,u[0].y],["L",u[1].x,u[1].y],h,["L",u[3].x,u[3].y],["L",u[2].x,u[2].y],f,["Z"]],n=this.parsePath(n),a.fill=a.stroke,e.addShape("path",{attrs:r.__assign(r.__assign({},a),{path:n})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(4),a=n(7),o=n(81);i.registerShape("edge","smooth",{draw:function(t,e){var n=a.getStyle(t,!0,!1,"lineWidth"),i=t.points,s=this.parsePath(function(t,e){var n=o.getCPath(t,e),r=[["M",t.x,t.y]];return r.push(n),r}(i[0],i[1]));return e.addShape("path",{attrs:r.__assign(r.__assign({},n),{path:s})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(4),o=n(7);a.registerShape("edge","vhv",{draw:function(t,e){var n=o.getStyle(t,!0,!1,"lineWidth"),a=t.points,s=this.parsePath(function(t,e){var n=[];n.push({x:t.x,y:t.y*(1-1/3)+e.y*(1/3)}),n.push({x:e.x,y:t.y*(1-1/3)+e.y*(1/3)}),n.push(e);var r=[["M",t.x,t.y]];return i.each(n,(function(t){r.push(["L",t.x,t.y])})),r}(a[0],a[1]));return e.addShape("path",{attrs:r.__assign(r.__assign({},n),{path:s})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(4),a=n(7),o=n(27);i.registerShape("interval","funnel",{getPoints:function(t){return t.size=2*t.size,o.getRectPoints(t)},draw:function(t,e){var n=a.getStyle(t,!1,!0),i=this.parsePath(o.getFunnelPath(t.points,t.nextPoints,!1));return e.addShape("path",{attrs:r.__assign(r.__assign({},n),{path:i}),name:"interval"})},getMarker:function(t){return{symbol:"square",style:{r:4,fill:t.color}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(4),a=n(7),o=n(27);i.registerShape("interval","hollow-rect",{draw:function(t,e){var n=a.getStyle(t,!0,!1),i=this.parsePath(o.getRectPath(t.points));return e.addShape("path",{attrs:r.__assign(r.__assign({},n),{path:i}),name:"interval"})},getMarker:function(t){var e=t.color;return t.isInPolar?{symbol:"circle",style:{r:4.5,stroke:e,fill:null}}:{symbol:"square",style:{r:4,stroke:e,fill:null}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(4),o=n(7),s=n(27);a.registerShape("interval","line",{getPoints:function(t){return n=(e=t).x,r=e.y,a=e.y0,i.isArray(r)?r.map((function(t,e){return{x:i.isArray(n)?n[e]:n,y:t}})):[{x:n,y:a},{x:n,y:r}];var e,n,r,a},draw:function(t,e){var n=o.getStyle(t,!0,!1,"lineWidth"),i=this.parsePath(s.getRectPath(t.points));return e.addShape("path",{attrs:r.__assign(r.__assign({},n),{path:i}),name:"interval"})},getMarker:function(t){return{symbol:function(t,e,n){return[["M",t,e-n],["L",t,e+n]]},style:{r:5,stroke:t.color}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(4),a=n(7),o=n(27);i.registerShape("interval","pyramid",{getPoints:function(t){return t.size=2*t.size,o.getRectPoints(t,!0)},draw:function(t,e){var n=a.getStyle(t,!1,!0),i=this.parsePath(o.getFunnelPath(t.points,t.nextPoints,!0));return e.addShape("path",{attrs:r.__assign(r.__assign({},n),{path:i}),name:"interval"})},getMarker:function(t){return{symbol:"square",style:{r:4,fill:t.color}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(4),o=n(7);a.registerShape("interval","tick",{getPoints:function(t){return function(t){var e,n,r=t.x,a=t.y,o=t.y0,s=t.size;i.isArray(a)?(e=a[0],n=a[1]):(e=o,n=a);var u=r+s/2,c=r-s/2;return[{x:r,y:e},{x:r,y:n},{x:c,y:e},{x:u,y:e},{x:c,y:n},{x:u,y:n}]}(t)},draw:function(t,e){var n,i=o.getStyle(t,!0,!1),a=this.parsePath([["M",(n=t.points)[0].x,n[0].y],["L",n[1].x,n[1].y],["M",n[2].x,n[2].y],["L",n[3].x,n[3].y],["M",n[4].x,n[4].y],["L",n[5].x,n[5].y]]);return e.addShape("path",{attrs:r.__assign(r.__assign({},i),{path:a}),name:"interval"})},getMarker:function(t){return{symbol:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},style:{r:5,stroke:t.color}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(4),o=n(49),s=n(7),u=n(79);function c(t,e){var n=o.getPathPoints(t.points,t.connectNulls),a=[];return i.each(n,(function(t){var n=function(t,e){var n=[];return i.each(t,(function(r,i){var a=t[i+1];if(n.push(r),a){var o=function(t,e,n){var r,i=t.x,a=t.y,o=e.x,s=e.y;switch(n){case"hv":r=[{x:o,y:a}];break;case"vh":r=[{x:i,y:s}];break;case"hvh":var u=(o+i)/2;r=[{x:u,y:a},{x:u,y:s}];break;case"vhv":var c=(a+s)/2;r=[{x:i,y:c},{x:o,y:c}]}return r}(r,a,e);n=n.concat(o)}})),n}(t,e);a=a.concat(function(t){return t.map((function(t,e){return 0===e?["M",t.x,t.y]:["L",t.x,t.y]}))}(n))})),r.__assign(r.__assign({},s.getStyle(t,!0,!1,"lineWidth")),{path:a})}i.each(["hv","vh","hvh","vhv"],(function(t){a.registerShape("line",t,{draw:function(e,n){var r=c(e,t);return n.addShape({type:"path",attrs:r,name:"line"})},getMarker:function(e){return u.getLineMarker(e,t)}})}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(28),a=n(4),o=n(51);r.each(o.HOLLOW_SHAPES,(function(t){a.registerShape("point",t,{draw:function(e,n){return o.drawPoints(this,e,n,t,!0)},getMarker:function(e){var n=e.color;return{symbol:i.MarkerSymbols[t],style:{r:4.5,stroke:n,fill:null}}}})}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4),i=n(7);r.registerShape("point","image",{draw:function(t,e){var n=i.getStyle(t,!1,!1,"r").r,r=this.parsePoints(t.points);if(r.length>1){for(var a=e.addGroup(),o=0,s=r;o1?e[1]:n;return{min:n,max:r,min1:a,max1:e.length>3?e[3]:r,median:e.length>2?e[2]:a}}function u(t,e,n){var r,a=n/2;if(i.isArray(e)){var o=s(e),u=o.min,c=o.max,l=o.median,h=o.min1,f=t-a,p=t+a;r=[[f,c],[p,c],[t,c],[t,d=o.max1],[f,h],[f,d],[p,d],[p,h],[t,h],[t,u],[f,u],[p,u],[f,l],[p,l]]}else{e=i.isNil(e)?.5:e;var d,g=s(t),v=(u=g.min,c=g.max,l=g.median,e-a),y=e+a;r=[[u,v],[u,y],[u,e],[h=g.min1,e],[h,v],[h,y],[d=g.max1,y],[d,v],[d,e],[c,e],[c,v],[c,y],[l,v],[l,y]]}return r.map((function(t){return{x:t[0],y:t[1]}}))}a.registerShape("schema","box",{getPoints:function(t){return u(t.x,t.y,t.size)},draw:function(t,e){var n,i=o.getStyle(t,!0,!1),a=this.parsePath([["M",(n=t.points)[0].x,n[0].y],["L",n[1].x,n[1].y],["M",n[2].x,n[2].y],["L",n[3].x,n[3].y],["M",n[4].x,n[4].y],["L",n[5].x,n[5].y],["L",n[6].x,n[6].y],["L",n[7].x,n[7].y],["L",n[4].x,n[4].y],["Z"],["M",n[8].x,n[8].y],["L",n[9].x,n[9].y],["M",n[10].x,n[10].y],["L",n[11].x,n[11].y],["M",n[12].x,n[12].y],["L",n[13].x,n[13].y]]);return e.addShape("path",{attrs:r.__assign(r.__assign({},i),{path:a,name:"schema"})})},getMarker:function(t){return{symbol:function(t,e,n){var r=u(t,[e-6,e-3,e,e+3,e+6],n);return[["M",r[0].x+1,r[0].y],["L",r[1].x-1,r[1].y],["M",r[2].x,r[2].y],["L",r[3].x,r[3].y],["M",r[4].x,r[4].y],["L",r[5].x,r[5].y],["L",r[6].x,r[6].y],["L",r[7].x,r[7].y],["L",r[4].x,r[4].y],["Z"],["M",r[8].x,r[8].y],["L",r[9].x,r[9].y],["M",r[10].x+1,r[10].y],["L",r[11].x-1,r[11].y],["M",r[12].x,r[12].y],["L",r[13].x,r[13].y]]},style:{r:6,lineWidth:1,stroke:t.color}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(20),o=n(4),s=n(7);function u(t,e,n){var r,o,s=(r=e,o=(i.isArray(r)?r:[r]).sort((function(t,e){return e-t})),a.padEnd(o,4,o[o.length-1]));return[{x:t,y:s[0]},{x:t,y:s[1]},{x:t-n/2,y:s[2]},{x:t-n/2,y:s[1]},{x:t+n/2,y:s[1]},{x:t+n/2,y:s[2]},{x:t,y:s[2]},{x:t,y:s[3]}]}o.registerShape("schema","candle",{getPoints:function(t){return u(t.x,t.y,t.size)},draw:function(t,e){var n,i=s.getStyle(t,!0,!0),a=this.parsePath([["M",(n=t.points)[0].x,n[0].y],["L",n[1].x,n[1].y],["M",n[2].x,n[2].y],["L",n[3].x,n[3].y],["L",n[4].x,n[4].y],["L",n[5].x,n[5].y],["Z"],["M",n[6].x,n[6].y],["L",n[7].x,n[7].y]]);return e.addShape("path",{attrs:r.__assign(r.__assign({},i),{path:a,name:"schema"})})},getMarker:function(t){var e=t.color;return{symbol:function(t,e,n){var r=u(t,[e+7.5,e+3,e-3,e-7.5],n);return[["M",r[0].x,r[0].y],["L",r[1].x,r[1].y],["M",r[2].x,r[2].y],["L",r[3].x,r[3].y],["L",r[4].x,r[4].y],["L",r[5].x,r[5].y],["Z"],["M",r[6].x,r[6].y],["L",r[7].x,r[7].y]]},style:{lineWidth:1,stroke:e,fill:e,r:6}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.setLabelPosition=function(t,e,n,r){var a=this.getCoordinate(),o=a.isTransposed,s=e.points,u=a.convert(s[0]),c=a.convert(s[2]),l=o?-1:1,h=(u.x-c.x)/2*l,f=(u.y-c.y)/2*l;switch(r){case"right":o||(t.x-=h,t.y+=f),t.textAlign=i.get(t,"textAlign","left");break;case"left":o?t.x-=2*h:(t.x+=h,t.y+=f),t.textAlign=i.get(t,"textAlign","right");break;case"bottom":o?(t.x-=h,t.y-=f):t.y+=2*f,t.textAlign=i.get(t,"textAlign","center"),t.textBaseline=i.get(t,"textBaseline","top");break;case"middle":o?t.x-=h:t.y+=f,t.textAlign=i.get(t,"textAlign","center");break;case"top":o&&(t.x-=h,t.y+=f),t.textAlign=i.get(t,"textAlign","center"),t.textBaseline=i.get(t,"textBaseline","bottom")}},e}(r.__importDefault(n(32)).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(12),o=n(10),s=function(t){function e(e){var n=t.call(this,e)||this;return n.defaultLayout="distribute",n}return r.__extends(e,t),e.prototype.getDefaultLabelCfg=function(){return i.get(this.geometry.theme,"pieLabels",{})},e.prototype.getDefaultOffset=function(t){return t||0},e.prototype.getLabelRotate=function(t,e,n){var r;return e<0&&((r=t)>Math.PI/2&&(r-=Math.PI),r<-Math.PI/2&&(r+=Math.PI)),r},e.prototype.getLabelAlign=function(t){var e,n=this.getCoordinate().getCenter();return e=t.angle<=Math.PI/2&&t.x>=n.x?"left":"right",this.getDefaultOffset(t.offset)<=0&&(e="right"===e?"left":"right"),e},e.prototype.getArcPoint=function(t){return t},e.prototype.getPointAngle=function(t){var e,n=this.getCoordinate(),r={x:i.isArray(t.x)?t.x[0]:t.x,y:t.y[0]},o={x:i.isArray(t.x)?t.x[1]:t.x,y:t.y[1]},s=a.getAngleByPoint(n,r);if(t.points&&t.points[0].y===t.points[1].y)e=s;else{var u=a.getAngleByPoint(n,o);s>=u&&(u+=2*Math.PI),e=s+(u-s)/2}return e},e.prototype.getCirclePoint=function(t,e,n){var i=this.getCoordinate(),a=i.getCenter(),s=i.getRadius()+e;return r.__assign(r.__assign({},o.polarToCartesian(a.x,a.y,s,t)),{angle:t,r:s})},e}(r.__importDefault(n(82)).default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(10);e.distribute=function(t,e,n,a){var o=t[0]?t[0].offset:0,s=e[0].get("coordinate"),u=s.getRadius(),c=s.getCenter();if(o>0){var l=2*(u+o)+28,h={start:s.start,end:s.end},f=[[],[]];t.forEach((function(t){t&&("right"===t.textAlign?f[0].push(t):f[1].push(t))})),f.forEach((function(t,n){var r=l/14;t.length>r&&(t.sort((function(t,e){return e["..percent"]-t["..percent"]})),t.splice(r,t.length-r)),t.sort((function(t,e){return t.y-e.y})),function(t,e,n,r,i,a){var o,s=!0,u=r.start,c=r.end,l=Math.min(u.y,c.y),h=Math.abs(u.y-c.y),f=0,p=Number.MIN_VALUE,d=e.map((function(t){return t.y>f&&(f=t.y),t.yh&&(h=f-l);s;)for(d.forEach((function(t){var e=(Math.min.apply(p,t.targets)+Math.max.apply(p,t.targets))/2;t.pos=Math.min(Math.max(p,e-t.size/2),h-t.size)})),s=!1,o=d.length;o--;)if(o>0){var g=d[o-1],v=d[o];g.pos+g.size>v.pos&&(g.size+=v.size,g.targets=g.targets.concat(v.targets),g.pos+g.size>h&&(g.pos=h-g.size),d.splice(o,1),s=!0)}o=0,d.forEach((function(t){var r=l+n/2;t.targets.forEach((function(){e[o].y=t.pos+r,r+=n,o++}))}));for(var y={},m=0,x=t;mr?v=r-d:l>r&&(v-=l-r),c>o?y=o-g:h>o&&(y-=h-o),v===f&&y===p||i.translate(t,v-f,y-p)}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0);e.limitInShape=function(t,e,n,i){r.each(e,(function(t,e){var r=t.getCanvasBBox(),i=n[e].getBBox();(r.minXi.maxX||r.maxY>i.maxY)&&t.remove(!0)}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=function(){function t(t){void 0===t&&(t={}),this.bitmap={};var e=t.xGap,n=void 0===e?1:e,r=t.yGap,i=void 0===r?8:r;this.xGap=n,this.yGap=i}return t.prototype.hasGap=function(t){for(var e=!0,n=this.bitmap,r=Math.round(t.minX),i=Math.round(t.maxX),a=Math.round(t.minY),o=Math.round(t.maxY),s=r;s<=i;s+=1)if(n[s]){if(s===r||s===i){for(var u=a;u<=o;u++)if(n[s][u]){e=!1;break}}else if(n[s][a]||n[s][o]){e=!1;break}}else n[s]={};return e},t.prototype.fillGap=function(t){for(var e=this.bitmap,n=Math.round(t.minX),r=Math.round(t.maxX),i=Math.round(t.minY),a=Math.round(t.maxY),o=n;o<=r;o+=1)e[o]||(e[o]={});for(o=n;o<=r;o+=this.xGap){for(var s=i;s<=a;s+=this.yGap)e[o][s]=!0;e[o][a]=!0}if(1!==this.yGap)for(o=i;o<=a;o+=1)e[n][o]=!0,e[r][o]=!0;if(1!==this.xGap)for(o=n;o<=r;o+=1)e[o][i]=!0,e[o][a]=!0},t.prototype.destroy=function(){this.bitmap={}},t}();function a(t,e,n,r){var i=t.getCanvasBBox(),a=i.width,o=i.height,s={x:e,y:n,textAlign:"center"};switch(r){case 0:s.y-=o+1,s.x+=1,s.textAlign="left";break;case 1:s.y-=o+1,s.x-=1,s.textAlign="right";break;case 2:s.y+=o+1,s.x-=1,s.textAlign="right";break;case 3:s.y+=o+1,s.x+=1,s.textAlign="left";break;case 5:s.y-=2*o+2;break;case 6:s.y+=2*o+2;break;case 7:s.x+=a+1,s.textAlign="left";break;case 8:s.x-=a+1,s.textAlign="right"}return t.attr(s),t.getCanvasBBox()}e.fixedOverlap=function(t,e,n,a){var o=new i;r.each(e,(function(t){(function(t,e,n){void 0===n&&(n=100);var r,i=t.attr(),a=i.x,o=i.y,s=t.getCanvasBBox(),u=Math.sqrt(s.width*s.width+s.height*s.height),c=1,l=0,h=0;if(e.hasGap(s))return e.fillGap(s),!0;for(var f,p,d=!1,g=0,v={};Math.min(Math.abs(l),Math.abs(h))u.x?r.x:u.x,s=u.y+h/2):"xy"===a&&(n.isPolar?(o=n.getCenter().x,s=n.getCenter().y):(o=(u.x+c.x)/2,s=(u.y+c.y)/2));var f=i(t,[o,s],a);t.animate({matrix:f},e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pathIn=function(t,e,n){var r=t.getTotalLength();t.attr("lineDash",[r]),t.animate((function(t){return{lineDashOffset:(1-t)*r}}),e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.positionUpdate=function(t,e,n){var r=n.toAttrs,i=r.x,a=r.y;delete r.x,delete r.y,t.attr(r),t.animate({x:i,y:a},e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2);e.scaleInX=function(t,e,n){var i=t.getBBox(),a=t.get("origin").mappingData.points,o=a[0].y-a[1].y>0?i.maxX:i.minX,s=(i.minY+i.maxY)/2;t.applyToMatrix([o,s,1]);var u=r.transform(t.getMatrix(),[["t",-o,-s],["s",.01,1],["t",o,s]]);t.setMatrix(u),t.animate({matrix:r.transform(t.getMatrix(),[["t",-o,-s],["s",100,1],["t",o,s]])},e)},e.scaleInY=function(t,e,n){var i=t.getBBox(),a=t.get("origin").mappingData,o=(i.minX+i.maxX)/2,s=a.points,u=s[0].y-s[1].y<=0?i.maxY:i.minY;t.applyToMatrix([o,u,1]);var c=r.transform(t.getMatrix(),[["t",-o,-u],["s",1,.01],["t",o,u]]);t.setMatrix(c),t.animate({matrix:r.transform(t.getMatrix(),[["t",-o,-u],["s",1,100],["t",o,u]])},e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=r.__importDefault(n(177)),a=n(0),o=n(10);function s(t,e){var n,r=i.default(t,e),o=r.startAngle,s=r.endAngle;return!a.isNumberEqual(o,.5*-Math.PI)&&o<.5*-Math.PI&&(o+=2*Math.PI),!a.isNumberEqual(s,.5*-Math.PI)&&s<.5*-Math.PI&&(s+=2*Math.PI),0===e[5]&&(o=(n=[s,o])[0],s=n[1]),a.isNumberEqual(o,1.5*Math.PI)&&(o=-.5*Math.PI),a.isNumberEqual(s,-.5*Math.PI)&&(s=1.5*Math.PI),{startAngle:o,endAngle:s}}function u(t){var e;return"M"===t[0]||"L"===t[0]?e=[t[1],t[2]]:"a"!==t[0]&&"A"!==t[0]||(e=[t[t.length-2],t[t.length-1]]),e}function c(t){var e,n,r,i=t.filter((function(t){return"A"===t[0]||"a"===t[0]})),o=i[0],c=i.length>1?i[1]:i[0],l=t.indexOf(o),h=t.indexOf(c),f=u(t[l-1]),p=u(t[h-1]),d=s(f,o),g=d.startAngle,v=d.endAngle,y=s(p,c),m=y.startAngle,x=y.endAngle;a.isNumberEqual(g,m)&&a.isNumberEqual(v,x)?(n=g,r=v):(n=Math.min(g,m),r=Math.max(v,x));var b=o[1],M=i[i.length-1][1];return b1&&(n*=Math.sqrt(v),i*=Math.sqrt(v));var y=n*n*(g*g)+i*i*(d*d),m=y?Math.sqrt((n*n*(i*i)-y)/y):1;u===c&&(m*=-1),isNaN(m)&&(m=0);var x=i?m*n*g/i:0,b=n?m*-i*d/n:0,M=(l+f)/2+Math.cos(s)*x-Math.sin(s)*b,_=(h+p)/2+Math.sin(s)*x+Math.cos(s)*b,w=[(d-x)/n,(g-b)/i],C=[(-1*d-x)/n,(-1*g-b)/i],O=o([1,0],w),A=o(w,C);return a(w,C)<=-1&&(A=Math.PI),a(w,C)>=1&&(A=0),0===c&&A>0&&(A-=2*Math.PI),1===c&&A<0&&(A+=2*Math.PI),{cx:M,cy:_,rx:r.isSamePoint(t,[f,p])?0:n,ry:r.isSamePoint(t,[f,p])?0:i,startAngle:O,endAngle:O+A,xRotation:s,arcFlag:u,sweepFlag:c}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getPixelRatio=function(){return window?window.devicePixelRatio:1},e.distance=function(t,e,n,r){var i=t-n,a=e-r;return Math.sqrt(i*i+a*a)},e.inBox=function(t,e,n,r,i,a){return i>=t&&i<=t+n&&a>=e&&a<=e+r};var r=null;e.getOffScreenContext=function(){if(!r){var t=document.createElement("canvas");t.width=1,t.height=1,r=t.getContext("2d")}return r},e.intersectRect=function(t,e){return!(e.minX>t.maxX||e.maxXt.maxY||e.maxY=0;i--)for(var a=0,o=this.getFacetsByLevel(t,i);a=n){var i=r.parsePosition([t[u],t[s.field]]);i&&f.push(i)}if(t[u]===h)return!1})),f},e.prototype.getNormalizedValue=function(t,e){var n,r;switch(t){case"start":n=0;break;case"end":n=1;break;case"median":r=e.isCategory?(e.values.length-1)/2:(e.min+e.max)/2,n=e.scale(r);break;case"min":case"max":r=e.isCategory?"min"===t?0:e.values.length-1:e[t],n=e.scale(r);break;default:n=e.scale(t)}return n},e.prototype.parsePercentPosition=function(t){var e=parseFloat(t[0])/100,n=parseFloat(t[1])/100,r=this.view.getCoordinate(),i=r.start,a=r.end,o=Math.min(i.x,a.x),s=Math.min(i.y,a.y);return{x:r.getWidth()*e+o,y:r.getHeight()*n+s}},e.prototype.getCoordinateBBox=function(){var t=this.view.getCoordinate(),e=t.start,n=t.end,r=t.getWidth(),i=t.getHeight(),a={x:Math.min(e.x,n.x),y:Math.min(e.y,n.y)};return{x:a.x,y:a.y,minX:a.x,minY:a.y,maxX:a.x+r,maxY:a.y+i,width:r,height:i}},e.prototype.getAnnotationCfg=function(t,e,n){var a=this.view.getCoordinate(),s={};if(i.isNil(e))return null;if("arc"===t){var c=e,l=c.start,h=c.end,f=this.parsePosition(l),p=this.parsePosition(h),d=u.getAngleByPoint(a,f),g=u.getAngleByPoint(a,p);d>g&&(g=2*Math.PI+g),s={center:a.getCenter(),radius:u.getDistanceToCenter(a,f),startAngle:d,endAngle:g}}else if("image"===t){var v=e;l=v.start,h=v.end;s={start:this.parsePosition(l),end:this.parsePosition(h),src:e.src}}else if("line"===t){var y=e;l=y.start,h=y.end;s={start:this.parsePosition(l),end:this.parsePosition(h),text:i.get(e,"text",null)}}else if("region"===t){var m=e;l=m.start,h=m.end;s={start:this.parsePosition(l),end:this.parsePosition(h)}}else if("text"===t){var x=e,b=x.position,M=x.rotate;s=r.__assign(r.__assign({},this.parsePosition(b)),{content:e.content,rotate:M})}else if("dataMarker"===t){var _=e,w=(b=_.position,_.point),C=_.line,O=_.text,A=_.autoAdjust,P=_.direction;s=r.__assign(r.__assign({},this.parsePosition(b)),{coordinateBBox:this.getCoordinateBBox(),point:w,line:C,text:O,autoAdjust:A,direction:P})}else if("dataRegion"===t){var S=e,E=(l=S.start,h=S.end,S.region),I=(O=S.text,S.lineLength);s={points:this.getRegionPoints(l,h),region:E,text:O,lineLength:I}}else if("regionFilter"===t){var T=e,k=(l=T.start,h=T.end,T.apply),j=T.color,L=this.view.geometries,B=[],D=function(t){t&&(t.isGroup()?t.getChildren().forEach((function(t){return D(t)})):B.push(t))};i.each(L,(function(t){k?i.contains(k,t.type)&&i.each(t.elements,(function(t){D(t.shape)})):i.each(t.elements,(function(t){D(t.shape)}))})),s={color:j,shapes:B,start:this.parsePosition(l),end:this.parsePosition(h)}}var F=i.deepMix({},n,r.__assign(r.__assign({},s),{top:e.top,style:e.style,offsetX:e.offsetX,offsetY:e.offsetY}));return F.container=this.getComponentContainer(F),F.animate=this.view.getOptions().animate&&F.animate&&i.get(e,"animate",F.animate),F.animateOption=i.deepMix({},o.DEFAULT_ANIMATE_CFG,F.animateOption,e.animateOption),F},e.prototype.isTop=function(t){return i.get(t,"top",!0)},e.prototype.getComponentContainer=function(t){return this.isTop(t)?this.foregroundContainer:this.backgroundContainer},e.prototype.getAnnotationTheme=function(t){return i.get(this.view.getTheme(),["components","annotation",t],{})},e}(n(21).Controller);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(3),o=n(17),s=n(18),u=n(38),c=n(38),l=n(192),h=n(20),f=n(21),p=["container"],d=function(t){function e(e){var n=t.call(this,e)||this;return n.cache=new Map,n.gridContainer=n.view.getLayer(a.LAYER.BG).addGroup(),n.axisContainer=n.view.getLayer(a.LAYER.BG).addGroup(),n}return r.__extends(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"axis"},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){this.option=this.view.getOptions().axes,this.createXAxes(),this.createYAxes()},e.prototype.layout=function(){var t=this,e=this.view.getCoordinate();i.each(this.getComponents(),(function(n){var r,i=n.component,o=n.direction,s=n.type,c=n.extra,h=c.dim,f=c.scale,p=c.alignTick;if(s===a.COMPONENT_TYPE.AXIS)e.isPolar?"x"===h?r=e.isTransposed?u.getAxisRegion(e,o):u.getCircleAxisCenterRadius(e):"y"===h&&(r=e.isTransposed?u.getCircleAxisCenterRadius(e):u.getAxisRegion(e,o)):r=u.getAxisRegion(e,o);else if(s===a.COMPONENT_TYPE.GRID)if(e.isPolar){r={items:e.isTransposed?"x"===h?l.getCircleGridItems(e,t.view.getYScales()[0],f,p,h):l.getLineGridItems(e,f,h,p):"x"===h?l.getLineGridItems(e,f,h,p):l.getCircleGridItems(e,t.view.getXScale(),f,p,h),center:t.view.getCoordinate().getCenter()}}else r={items:l.getLineGridItems(e,f,h,p)};i.update(r)}))},e.prototype.update=function(){this.option=this.view.getOptions().axes;var t=new Map;this.updateXAxes(t),this.updateYAxes(t);var e=new Map;this.cache.forEach((function(n,r){t.has(r)?e.set(r,n):n.component.destroy()})),this.cache=e},e.prototype.clear=function(){t.prototype.clear.call(this),this.cache.clear(),this.gridContainer.clear(),this.axisContainer.clear()},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.gridContainer.remove(!0),this.axisContainer.remove(!0)},e.prototype.getComponents=function(){var t=[];return this.cache.forEach((function(e){t.push(e)})),t},e.prototype.updateXAxes=function(t){var e=this.view.getXScale();if(e&&!e.isIdentity){var n=e.field,r=c.getAxisOption(this.option,e.field);if(!1!==r){var o=this.view.getCoordinate(),s=this.getId("axis",n),l=this.getId("grid",n),f=u.getAxisDirection(r,a.DIRECTION.BOTTOM),d=a.LAYER.BG;if(o.isRect){if(v=this.cache.get(s)){var g=this.getLineAxisCfg(e,r,f);h.omit(g,p),v.component.update(g),t.set(s,v)}else v=this.createLineAxis(e,r,d,f,"x"),this.cache.set(s,v),t.set(s,v);if(y=this.cache.get(l)){g=this.getLineGridCfg(e,r,f,"x");h.omit(g,p),y.component.update(g),t.set(l,y)}else(y=this.createLineGrid(e,r,d,f,"x"))&&(this.cache.set(l,y),t.set(l,y))}else if(o.isPolar){var v,y;if(v=this.cache.get(s)){g=o.isTransposed?this.getLineAxisCfg(e,r,"radius"):this.getCircleAxisCfg(e,r,f);h.omit(g,p),v.component.update(g),t.set(s,v)}else{if(o.isTransposed){if(i.isUndefined(r))return;v=this.createLineAxis(e,r,d,"radius","x")}else v=this.createCircleAxis(e,r,d,f,"x");this.cache.set(s,v),t.set(s,v)}if(y=this.cache.get(l)){g=o.isTransposed?this.getCircleGridCfg(e,r,"radius","x"):this.getLineGridCfg(e,r,"circle","x");h.omit(g,p),y.component.update(g),t.set(l,y)}else{if(o.isTransposed){if(i.isUndefined(r))return;y=this.createCircleGrid(e,r,d,"radius","x")}else y=this.createLineGrid(e,r,d,"circle","x");y&&(this.cache.set(l,y),t.set(l,y))}}}}},e.prototype.updateYAxes=function(t){var e=this,n=this.view.getYScales();i.each(n,(function(n,r){if(n&&!n.isIdentity){var o=n.field,s=c.getAxisOption(e.option,o);if(!1!==s){var l=a.LAYER.BG,f=e.getId("axis",o),d=e.getId("grid",o),g=e.view.getCoordinate();if(g.isRect){var v=u.getAxisDirection(s,0===r?a.DIRECTION.LEFT:a.DIRECTION.RIGHT);if(m=e.cache.get(f)){var y=e.getLineAxisCfg(n,s,v);h.omit(y,p),m.component.update(y),t.set(f,m)}else m=e.createLineAxis(n,s,l,v,"y"),e.cache.set(f,m),t.set(f,m);if(x=e.cache.get(d)){y=e.getLineGridCfg(n,s,v,"y");h.omit(y,p),x.component.update(y),t.set(d,x)}else(x=e.createLineGrid(n,s,l,v,"y"))&&(e.cache.set(d,x),t.set(d,x))}else if(g.isPolar){var m,x;if(m=e.cache.get(f)){y=g.isTransposed?e.getCircleAxisCfg(n,s,"circle"):e.getLineAxisCfg(n,s,"radius");h.omit(y,p),m.component.update(y),t.set(f,m)}else{if(g.isTransposed){if(i.isUndefined(s))return;m=e.createCircleAxis(n,s,l,"circle","y")}else m=e.createLineAxis(n,s,l,"radius","y");e.cache.set(f,m),t.set(f,m)}if(x=e.cache.get(d)){y=g.isTransposed?e.getLineGridCfg(n,s,"circle","y"):e.getCircleGridCfg(n,s,"radius","y");h.omit(y,p),x.component.update(y),t.set(d,x)}else{if(g.isTransposed){if(i.isUndefined(s))return;x=e.createLineGrid(n,s,l,"circle","y")}else x=e.createCircleGrid(n,s,l,"radius","y");x&&(e.cache.set(d,x),t.set(d,x))}}}}}))},e.prototype.createXAxes=function(){var t=this.view.getXScale();if(t&&!t.isIdentity){var e=c.getAxisOption(this.option,t.field);if(!1!==e){var n=u.getAxisDirection(e,a.DIRECTION.BOTTOM),r=a.LAYER.BG,o=this.view.getCoordinate(),s=this.getId("axis",t.field),l=this.getId("grid",t.field);if(o.isRect){var h=this.createLineAxis(t,e,r,n,"x");this.cache.set(s,h),(f=this.createLineGrid(t,e,r,n,"x"))&&this.cache.set(l,f)}else if(o.isPolar){h=void 0;var f=void 0;if(o.isTransposed){if(i.isUndefined(e))return;h=this.createLineAxis(t,e,r,"radius","x"),f=this.createCircleGrid(t,e,r,"radius","x")}else h=this.createCircleAxis(t,e,r,n,"x"),f=this.createLineGrid(t,e,r,"circle","x");this.cache.set(s,h),f&&this.cache.set(l,f)}}}},e.prototype.createYAxes=function(){var t=this,e=this.view.getYScales();i.each(e,(function(e,n){if(e&&!e.isIdentity){var r=e.field,o=c.getAxisOption(t.option,r);if(!1!==o){var s=a.LAYER.BG,l=t.getId("axis",r),h=t.getId("grid",r),f=t.view.getCoordinate();if(f.isRect){var p=u.getAxisDirection(o,0===n?a.DIRECTION.LEFT:a.DIRECTION.RIGHT),d=t.createLineAxis(e,o,s,p,"y");t.cache.set(l,d),(g=t.createLineGrid(e,o,s,p,"y"))&&t.cache.set(h,g)}else if(f.isPolar){d=void 0;var g=void 0;if(f.isTransposed){if(i.isUndefined(o))return;d=t.createCircleAxis(e,o,s,"circle","y"),g=t.createLineGrid(e,o,s,"circle","y")}else d=t.createLineAxis(e,o,s,"radius","y"),g=t.createCircleGrid(e,o,s,"radius","y");t.cache.set(t.getId("axis",e.field),d),g&&t.cache.set(h,g)}}}}))},e.prototype.createLineAxis=function(t,e,n,r,i){var s={component:new o.LineAxis(this.getLineAxisCfg(t,e,r)),layer:n,direction:"radius"===r?a.DIRECTION.NONE:r,type:a.COMPONENT_TYPE.AXIS,extra:{dim:i,scale:t}};return s.component.set("field",t.field),s.component.init(),s},e.prototype.createLineGrid=function(t,e,n,r,s){var u=this.getLineGridCfg(t,e,r,s);if(u){var c={component:new o.LineGrid(u),layer:n,direction:a.DIRECTION.NONE,type:a.COMPONENT_TYPE.GRID,extra:{dim:s,scale:t,alignTick:i.get(u,"alignTick",!0)}};return c.component.init(),c}},e.prototype.createCircleAxis=function(t,e,n,r,i){var s={component:new o.CircleAxis(this.getCircleAxisCfg(t,e,r)),layer:n,direction:r,type:a.COMPONENT_TYPE.AXIS,extra:{dim:i,scale:t}};return s.component.set("field",t.field),s.component.init(),s},e.prototype.createCircleGrid=function(t,e,n,r,s){var u=this.getCircleGridCfg(t,e,r,s);if(u){var c={component:new o.CircleGrid(u),layer:n,direction:a.DIRECTION.NONE,type:a.COMPONENT_TYPE.GRID,extra:{dim:s,scale:t,alignTick:i.get(u,"alignTick",!0)}};return c.component.init(),c}},e.prototype.getLineAxisCfg=function(t,e,n){var a=this.axisContainer,o=this.view.getCoordinate(),s=u.getAxisRegion(o,n),c=u.getAxisTitleText(t,e),l=r.__assign(r.__assign({container:a},s),{ticks:i.map(t.getTicks(),(function(t){return{id:""+t.tickValue,name:t.text,value:t.value}})),title:{text:c},verticalFactor:o.isPolar?-1*u.getAxisFactorByRegion(s,o.getCenter()):u.getAxisFactorByRegion(s,o.getCenter())}),h=u.getAxisThemeCfg(this.view.getTheme(),n),f=i.get(e,["title"])?i.deepMix({},{title:{style:{text:c}}},e):e,p=i.deepMix({},l,h,f);return i.mix(p,this.getAnimateCfg(p))},e.prototype.getLineGridCfg=function(t,e,n,r){if(l.showGrid(u.getAxisThemeCfg(this.view.getTheme(),n),e)){var a=l.getGridThemeCfg(this.view.getTheme(),n),o=i.deepMix({container:this.gridContainer},a,i.get(e,"grid",{}),this.getAnimateCfg(e));return o.items=l.getLineGridItems(this.view.getCoordinate(),t,r,i.get(o,"alignTick",!0)),o}},e.prototype.getCircleAxisCfg=function(t,e,n){var a=this.axisContainer,o=i.map(t.getTicks(),(function(t){return{id:""+t.tickValue,name:t.text,value:t.value}})),s=this.view.getCoordinate();t.isCategory||Math.abs(s.endAngle-s.startAngle)!==2*Math.PI||o.pop();var c=u.getAxisTitleText(t,e),l=r.__assign(r.__assign({container:a},u.getCircleAxisCenterRadius(this.view.getCoordinate())),{ticks:o,title:{text:c},verticalFactor:1}),h=u.getAxisThemeCfg(this.view.getTheme(),"circle"),f=i.get(e,["title"])?i.deepMix({},{title:{style:{text:c}}},e):e,p=i.deepMix({},l,h,f);return i.mix(p,this.getAnimateCfg(p))},e.prototype.getCircleGridCfg=function(t,e,n,r){if(l.showGrid(u.getAxisThemeCfg(this.view.getTheme(),n),e)){var a=l.getGridThemeCfg(this.view.getTheme(),"radius"),o=i.deepMix({container:this.gridContainer,center:this.view.getCoordinate().getCenter()},a,i.get(e,"grid",{}),this.getAnimateCfg(e)),s=i.get(o,"alignTick",!0),c="x"===r?this.view.getYScales()[0]:this.view.getXScale();return o.items=l.getCircleGridItems(this.view.getCoordinate(),c,t,s,r),o}},e.prototype.getId=function(t,e){return t+"-"+e+"-"+this.view.getCoordinate().type},e.prototype.getAnimateCfg=function(t){return{animate:this.view.getOptions().animate&&i.get(t,"animate"),animateOption:i.deepMix({},s.DEFAULT_ANIMATE_CFG,{appear:null},i.get(t,"animateOption",{}))}},e}(f.Controller);e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0);e.getGridThemeCfg=function(t,e){return r.get(t,["components","axis",e,"grid"],{})},e.getLineGridItems=function(t,e,n,r){var i=[],a=e.getTicks();return t.isPolar&&a.push({value:1,text:"",tickValue:""}),a.reduce((function(e,a,o){var s=a.value;if(r)i.push({points:[t.convert("y"===n?{x:0,y:s}:{x:s,y:0}),t.convert("y"===n?{x:1,y:s}:{x:s,y:1})]});else if(o){var u=(e.value+s)/2;i.push({points:[t.convert("y"===n?{x:0,y:u}:{x:u,y:0}),t.convert("y"===n?{x:1,y:u}:{x:u,y:1})]})}return a}),a[0]),i},e.getCircleGridItems=function(t,e,n,i,a){var o=e.values.length,s=[],u=n.getTicks();return u.reduce((function(e,n){var u=e?e.value:n.value,c=n.value,l=(u+c)/2;return"x"===a?s.push({points:[t.convert({x:i?c:l,y:0}),t.convert({x:i?c:l,y:1})]}):s.push({points:r.map(Array(o+1),(function(e,n){return t.convert({x:n/o,y:i?c:l})}))}),n}),u[0]),s},e.showGrid=function(t,e){var n=r.get(e,"grid");if(null===n)return!1;var i=r.get(t,"grid");return!(void 0===n&&null===i)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(3),o=n(17),s=n(18),u=n(26),c=n(83),l=n(20),h=n(194),f=n(30);function p(t,e){return i.isBoolean(t)?!1!==t&&{}:i.get(t,[e],t)}function d(t){return i.get(t,"position",a.DIRECTION.BOTTOM)}var g=function(t){function e(e){var n=t.call(this,e)||this;return n.container=n.view.getLayer(a.LAYER.FORE).addGroup(),n}return r.__extends(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"legend"},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){var t=this;this.option=this.view.getOptions().legends;if(i.get(this.option,"custom")){var e=this.createCustomLegend(void 0,void 0,void 0,this.option);if(e){e.init();var n=a.LAYER.FORE,r=d(this.option);this.components.push({id:"global-custom",component:e,layer:n,direction:r,type:a.COMPONENT_TYPE.LEGEND,extra:void 0})}}else this.loopLegends((function(e,n,r){var i=t.createFieldLegend(e,n,r);i&&(i.component.init(),t.components.push(i))}))},e.prototype.layout=function(){var t=this;i.each(this.components,(function(e){var n=e.component,r=e.direction,i=h.getLegendLayout(r),a=t.getCategoryLegendSizeCfg(i),o=n.get("maxWidth"),s=n.get("maxHeight");n.update({maxWidth:Math.min(a.maxWidth,o||0),maxHeight:Math.min(a.maxHeight,s||0)});var l=n.getLayoutBBox(),f=new u.BBox(l.x,l.y,l.width,l.height),p=c.directionToPosition(t.view.coordinateBBox,f,r),d=p[0],g=p[1],v=c.directionToPosition(t.view.viewBBox,f,r),y=v[0],m=v[1],x=0,b=0;r.startsWith("top")||r.startsWith("bottom")?(x=d,b=m):(x=y,b=g),n.update({x:x,y:b})}))},e.prototype.update=function(){var t=this;this.option=this.view.getOptions().legends;var e={};if(i.get(this.option,"custom")){var n="global-custom",r=this.getComponentById(n);if(r){var o=this.getCategoryCfg(void 0,void 0,void 0,this.option,!0);l.omit(o,["container"]),r.component.update(o),e[n]=!0}else{var s=this.createCustomLegend(void 0,void 0,void 0,this.option);if(s){s.init();var u=a.LAYER.FORE,c=d(this.option);this.components.push({id:n,component:s,layer:u,direction:c,type:a.COMPONENT_TYPE.LEGEND,extra:void 0}),e[n]=!0}}}else this.loopLegends((function(n,r,a){var o=t.getId(a.field),s=t.getComponentById(o);if(s){var u=void 0,c=p(t.option,a.field);!1!==c&&(i.get(c,"custom")?u=t.getCategoryCfg(n,r,a,c,!0):a.isLinear?u=t.getContinuousCfg(n,r,a,c):a.isCategory&&(u=t.getCategoryCfg(n,r,a,c))),u&&(l.omit(u,["container"]),s.direction=d(c),s.component.update(u),e[o]=!0)}else{var h=t.createFieldLegend(n,r,a);h&&(h.component.init(),t.components.push(h),e[o]=!0)}}));var h=[];i.each(this.getComponents(),(function(t){e[t.id]?h.push(t):t.component.destroy()})),this.components=h},e.prototype.clear=function(){t.prototype.clear.call(this),this.container.clear()},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.container.remove(!0)},e.prototype.getGeometries=function(t,e){var n=this;return void 0===e&&(e=[]),e.push.apply(e,t.geometries),i.each(t.views,(function(t){return n.getGeometries(t,e)})),e},e.prototype.loopLegends=function(t){if(this.view.getRootView()===this.view){var e=this.getGeometries(this.view),n={};i.each(e,(function(e){var r=e.getGroupAttributes();i.each(r,(function(r){var i=r.getScale(r.type);i&&"identity"!==i.type&&!n[i.field]&&(t(e,r,i),n[i.field]=!0)}))}))}},e.prototype.createFieldLegend=function(t,e,n){var r,o=p(this.option,n.field),s=a.LAYER.FORE,u=d(o);if(!1!==o&&(i.get(o,"custom")?r=this.createCustomLegend(t,e,n,o):n.isLinear?r=this.createContinuousLegend(t,e,n,o):n.isCategory&&(r=this.createCategoryLegend(t,e,n,o))),r)return r.set("field",n.field),{id:this.getId(n.field),component:r,layer:s,direction:u,type:a.COMPONENT_TYPE.LEGEND,extra:{scale:n}}},e.prototype.createCustomLegend=function(t,e,n,r){var i=this.getCategoryCfg(t,e,n,r,!0);return new o.CategoryLegend(i)},e.prototype.createContinuousLegend=function(t,e,n,r){var i=this.getContinuousCfg(t,e,n,r);return new o.ContinuousLegend(i)},e.prototype.createCategoryLegend=function(t,e,n,r){var i=this.getCategoryCfg(t,e,n,r);return new o.CategoryLegend(i)},e.prototype.getContinuousCfg=function(t,e,n,a){var o=n.getTicks(),s=i.find(o,(function(t){return 0===t.value})),u=i.find(o,(function(t){return 1===t.value})),c=i.map(o,(function(t){var r=t.value,i=t.tickValue,a=e.mapping(n.invert(r)).join("");return{value:i,attrValue:a,color:a,scaleValue:r}}));s||c.push({value:n.min,attrValue:e.mapping(0).join(""),color:e.mapping(0).join(""),scaleValue:0}),u||c.push({value:n.max,attrValue:e.mapping(1).join(""),color:e.mapping(1).join(""),scaleValue:1}),c.sort((function(t,e){return t.value-e.value}));var l={min:i.head(c).value,max:i.last(c).value,colors:[],rail:{type:e.type},track:{}};"size"===e.type&&(l=r.__assign(r.__assign({},l),{track:{style:{fill:"size"===e.type?this.view.getTheme().defaultColor:void 0}}})),"color"===e.type&&(l=r.__assign(r.__assign({},l),{colors:i.map(c,(function(t){return t.attrValue}))}));var p=this.container,g=d(a),v=h.getLegendLayout(g),y=i.get(a,"title");y&&(y=i.deepMix({text:f.getName(n)},y));var m=r.__assign(r.__assign({container:p,layout:v},l),{title:y});return this.mergeLegendCfg(m,a,"continuous")},e.prototype.getCategoryCfg=function(t,e,n,o,s){var u=this.container,c=i.get(o,"position",a.DIRECTION.BOTTOM),l=i.get(this.view.getTheme(),["components","legend",c,"marker"]),p=i.get(o,"marker"),d=h.getLegendLayout(c),g=s?h.getCustomLegendItems(l,p,o.items):h.getLegendItems(this.view,t,e,l,p),v=i.get(o,"title");v&&(v=i.deepMix({text:n?f.getName(n):""},v));var y=r.__assign({container:u,layout:d,items:g,title:v},this.getCategoryLegendSizeCfg(d)),m=this.mergeLegendCfg(y,o,c);return m.reversed&&m.items.reverse(),m},e.prototype.mergeLegendCfg=function(t,e,n){var r=i.get(this.view.getTheme(),["components","legend",n],{});return i.deepMix({},r,t,{animateOption:s.DEFAULT_ANIMATE_CFG},e)},e.prototype.getId=function(t){return this.name+"-"+t},e.prototype.getComponentById=function(t){return i.find(this.components,(function(e){return e.id===t}))},e.prototype.getCategoryLegendSizeCfg=function(t){var e=this.view.viewBBox,n=e.width,r=e.height,i=this.view.coordinateBBox,o=i.width,s=i.height;return"vertical"===t?{maxWidth:n*a.COMPONENT_MAX_VIEW_PERCENTAGE,maxHeight:s}:{maxWidth:o,maxHeight:r*a.COMPONENT_MAX_VIEW_PERCENTAGE}},e}(n(21).Controller);e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(3),a=n(195),o=n(28);e.getLegendLayout=function(t){return t.startsWith(i.DIRECTION.LEFT)||t.startsWith(i.DIRECTION.RIGHT)?"vertical":"horizontal"},e.getLegendItems=function(t,e,n,i,s){var u=n.getScale(n.type);if(u.isCategory){var c=u.field;return r.map(u.getTicks(),(function(n){var l,h=n.text,f=n.value,p=h,d=u.invert(f),g=!r.size(t.filterFieldData(c,[(l={},l[c]=d,l)])),v=e.getAttribute("color"),y=e.getAttribute("shape"),m=a.getMappingValue(v,d,t.getTheme().defaultColor),x=a.getMappingValue(y,d,"point"),b=e.getShapeMarker(x,{color:m,isInPolar:e.coordinate.isPolar}),M=(b=r.deepMix({},i,b,s)).symbol;return r.isString(M)&&o.MarkerSymbols[M]&&(b.symbol=o.MarkerSymbols[M]),{id:d,name:p,value:d,marker:b,unchecked:g}}))}return[]},e.getCustomLegendItems=function(t,e,n){return r.map(n,(function(n){var i=r.deepMix({},t,e,n.marker),a=i.symbol;return r.isString(a)&&o.MarkerSymbols[a]&&(i.symbol=o.MarkerSymbols[a]),n.marker=i,n}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1);e.getMappingValue=function(t,e,n){if(!t)return n;var i;if(t.callback&&t.callback.length>1){var a=Array(t.callback.length-1).fill("");i=t.mapping.apply(t,r.__spreadArrays([e],a)).join("")}else i=t.mapping(e).join("");return i||n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(3),o=n(17),s=n(26),u=n(83),c=n(20),l=function(t){function e(e){var n=t.call(this,e)||this;return n.onValueChanged=function(t){var e=t[0],r=t[1];n.updateMinMaxText(e,r),n.view.render(!0)},n.container=n.view.getLayer(a.LAYER.FORE).addGroup(),n}return r.__extends(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"slider"},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){if(this.option=this.view.getOptions().slider,this.option){this.slider?this.slider=this.updateSlider():(this.slider=this.createSlider(),this.slider.component.on("sliderchange",this.onValueChanged));var t=this.slider.component.get("start"),e=this.slider.component.get("end");this.updateMinMaxText(t,e)}else this.slider&&(this.slider.component.destroy(),this.slider=void 0)},e.prototype.layout=function(){if(this.slider){var t=this.view.coordinateBBox.width,e=this.slider.component.getLayoutBBox(),n=new s.BBox(e.x,e.y,Math.min(e.width,t),e.height),r=u.directionToPosition(this.view.viewBBox,n,a.DIRECTION.BOTTOM),i=(r[0],r[1]),o=u.directionToPosition(this.view.coordinateBBox,n,a.DIRECTION.BOTTOM),c=o[0];o[1];this.slider.component.update({x:c,y:i,width:t})}},e.prototype.update=function(){this.render()},e.prototype.createSlider=function(){var t=this.getSliderCfg(),e=new o.Slider(r.__assign({container:this.container},t));return e.init(),{component:e,layer:a.LAYER.FORE,direction:a.DIRECTION.BOTTOM,type:a.COMPONENT_TYPE.OTHER}},e.prototype.updateSlider=function(){var t=this.getSliderCfg();return c.omit(t,["x","y","width","start","end","minText","maxText"]),this.slider.component.update(t),this.slider},e.prototype.getSliderCfg=function(){if(i.isObject(this.option)){var t=r.__assign({data:this.getData()},i.get(this.option,"trendCfg",{})),e=this.view.coordinateBBox.width,n=i.deepMix({},{x:0,y:0,width:e},this.option);return r.__assign(r.__assign({},n),{trendCfg:t})}return{}},e.prototype.getData=function(){var t=this.view.getOptions().data,e=this.view.getYScales()[0];return i.map(t,(function(t){return t[e.field]||0}))},e.prototype.updateMinMaxText=function(t,e){var n=this.view.getOptions().data,r=i.size(n),a=this.view.getXScale();if(a&&r){var o=a.field,s=i.map(n,(function(t){return t[o]||""})),u=Math.floor(t*(r-1)),l=Math.floor(e*(r-1)),h=i.get(s,[u]),f=i.get(s,[l]);this.slider.component.update({minText:h,maxText:f,start:t,end:e}),this.view.filter(a.field,(function(t,e,n){return c.isBetween(n,u,l)}))}},e.prototype.getComponents=function(){return this.slider?[this.slider]:[]},e}(n(21).Controller);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(17),o=n(12),s=n(10),u=n(72);var c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isLocked=!1,e.isVisible=!0,e}return r.__extends(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"tooltip"},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){var t=this.view.getOptions().tooltip;this.isVisible=!1!==t},e.prototype.showTooltip=function(t){if(this.isVisible){var e=this.view,n=this.getTooltipItems(t);if(n.length){var a=this.getTitle(n),o={x:n[0].x,y:n[0].y};e.emit("tooltip:show",r.__assign({items:n,title:a},t));var s=this.getTooltipCfg(),u=s.follow,c=s.showMarkers,l=s.showCrosshairs,h=s.showContent,f=s.marker,p=this.items,d=this.title;if(i.isEqual(d,a)&&i.isEqual(p,n)){if(this.tooltip){var g=u?t:o;this.tooltip.update(g),this.tooltip.show()}this.tooltipMarkersGroup&&this.tooltipMarkersGroup.show()}else e.emit("tooltip:change",r.__assign({items:n,title:a},t)),h&&(this.tooltip||this.renderTooltip(),this.tooltip.update(i.mix({},s,{items:n,title:a},u?t:o)),this.tooltip.show()),c&&this.renderTooltipMarkers(n,f);if(this.items=n,this.title=a,l){var v=i.get(s,["crosshairs","follow"],!1);this.renderCrosshairs(v?t:o,s)}}else this.hideTooltip()}},e.prototype.hideTooltip=function(){var t=this.tooltipMarkersGroup;t&&t.hide();var e=this.xCrosshair,n=this.yCrosshair;e&&e.hide(),n&&n.hide();var r=this.tooltip;r&&r.hide(),this.view.emit("tooltip:hide",{})},e.prototype.lockTooltip=function(){this.isLocked=!0,this.tooltip&&this.tooltip.setCapture(!0)},e.prototype.unlockTooltip=function(){this.isLocked=!1;var t=this.getTooltipCfg();this.tooltip&&this.tooltip.setCapture(t.capture)},e.prototype.isTooltipLocked=function(){return this.isLocked},e.prototype.clear=function(){var t=this.tooltip,e=this.xCrosshair,n=this.yCrosshair,r=this.tooltipMarkersGroup;t&&(t.hide(),t.clear()),e&&e.clear(),n&&n.clear(),r&&r.clear()},e.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),this.xCrosshair&&this.xCrosshair.destroy(),this.yCrosshair&&this.yCrosshair.destroy(),this.guideGroup&&this.guideGroup.remove(!0),this.items=null,this.title=null,this.tooltipMarkersGroup=null,this.tooltipCrosshairsGroup=null,this.xCrosshair=null,this.yCrosshair=null,this.tooltip=null,this.guideGroup=null,this.isLocked=!1},e.prototype.changeVisible=function(t){if(this.visible!==t){var e=this.tooltip,n=this.tooltipMarkersGroup,r=this.xCrosshair,i=this.yCrosshair;t?(e&&e.show(),n&&n.show(),r&&r.show(),i&&i.show()):(e&&e.hide(),n&&n.hide(),r&&r.hide(),i&&i.hide()),this.visible=t}},e.prototype.getTooltipItems=function(t){var e=this.findItemsFromView(this.view,t);if(e.length){if(e=i.flatten(e),i.each(e,(function(t){i.each(t,(function(t){var e=t.mappingData,n=e.x,r=e.y;t.x=i.isArray(n)?n[n.length-1]:n,t.y=i.isArray(r)?r[r.length-1]:r}))})),!1===this.getTooltipCfg().shared&&e.length>1){var n=e[0],r=Math.abs(t.y-n[0].y);i.each(e,(function(e){var i=Math.abs(t.y-e[0].y);i<=r&&(n=e,r=i)})),e=[n]}return function(t){var e=[];return i.each(t,(function(t){i.find(e,(function(e){return e.color===t.color&&e.name===t.name&&e.value===t.value&&e.title===t.title}))||e.push(t)})),e}(i.flatten(e))}return[]},e.prototype.layout=function(){},e.prototype.update=function(){this.clear()},e.prototype.getTooltipCfg=function(){var t=this.view,e=t.getOptions().tooltip,n=t.getTheme(),r=i.get(n,["components","tooltip"],{}),a=i.isUndefined(i.get(e,"enterable"))?r.enterable:i.get(e,"enterable");return i.deepMix({},r,e,{capture:!(!a&&!this.isLocked)})},e.prototype.getTitle=function(t){var e=t[0].title||t[0].name;return this.title=e,e},e.prototype.renderTooltip=function(){var t=this.view.getCanvas(),e={start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}},n=this.getTooltipCfg(),i=new a.HtmlTooltip(r.__assign(r.__assign({parent:t.get("el").parentNode,region:e},n),{visible:!1,crosshairs:null}));i.init(),this.tooltip=i},e.prototype.renderTooltipMarkers=function(t,e){var n=this.getTooltipMarkersGroup();i.each(t,(function(t){var i=t.x,a=t.y,o=r.__assign(r.__assign({fill:t.color,symbol:"circle",shadowColor:t.color},e),{x:i,y:a});n.addShape("marker",{attrs:o})}))},e.prototype.renderCrosshairs=function(t,e){var n=i.get(e,["crosshairs","type"],"x");"x"===n?(this.yCrosshair&&this.yCrosshair.hide(),this.renderXCrosshairs(t,e)):"y"===n?(this.xCrosshair&&this.xCrosshair.hide(),this.renderYCrosshairs(t,e)):"xy"===n&&(this.renderXCrosshairs(t,e),this.renderYCrosshairs(t,e))},e.prototype.renderXCrosshairs=function(t,e){var n=this.getViewWithGeometry(this.view).getCoordinate();if(o.isPointInCoordinate(n,t)){var r,u;if(n.isRect)n.isTransposed?(r={x:n.start.x,y:t.y},u={x:n.end.x,y:t.y}):(r={x:t.x,y:n.end.y},u={x:t.x,y:n.start.y});else{var c=o.getAngleByPoint(n,t),l=n.getCenter(),h=n.getRadius();u=s.polarToCartesian(l.x,l.y,h,c),r=l}var f=i.deepMix({start:r,end:u,container:this.getTooltipCrosshairsGroup()},i.get(e,"crosshairs",{}),this.getCrosshairsText("x",t,e));delete f.type;var p=this.xCrosshair;p?p.update(f):(p=new a.Crosshair.Line(f)).init(),p.render(),p.show(),this.xCrosshair=p}},e.prototype.renderYCrosshairs=function(t,e){var n=this.getViewWithGeometry(this.view).getCoordinate();if(o.isPointInCoordinate(n,t)){var r,s;if(n.isRect){var u=void 0,c=void 0;n.isTransposed?(u={x:t.x,y:n.end.y},c={x:t.x,y:n.start.y}):(u={x:n.start.x,y:t.y},c={x:n.end.x,y:t.y}),r={start:u,end:c},s="Line"}else r={center:n.getCenter(),radius:o.getDistanceToCenter(n,t),startAngle:n.startAngle,endAngle:n.endAngle},s="Circle";delete(r=i.deepMix({container:this.getTooltipCrosshairsGroup()},r,i.get(e,"crosshairs",{}),this.getCrosshairsText("y",t,e))).type;var l=this.yCrosshair;l?n.isRect&&"circle"===l.get("type")||!n.isRect&&"line"===l.get("type")?(l=new a.Crosshair[s](r)).init():l.update(r):(l=new a.Crosshair[s](r)).init(),l.render(),l.show(),this.yCrosshair=l}},e.prototype.getCrosshairsText=function(t,e,n){var r=i.get(n,["crosshairs","text"]),a=i.get(n,["crosshairs","follow"]),o=this.items;if(r){var s=this.getViewWithGeometry(this.view),u=o[0],c=s.getXScale(),l=s.getYScales()[0],h=void 0,f=void 0;if(a){var p=this.view.getCoordinate().invert(e);h=c.invert(p.x),f=l.invert(p.y)}else h=u.data[c.field],f=u.data[l.field];var d="x"===t?h:f;return i.isFunction(r)?r=r(t,d,o,e):r.content=d,{text:r}}},e.prototype.getGuideGroup=function(){if(!this.guideGroup){var t=this.view.foregroundGroup;this.guideGroup=t.addGroup({name:"tooltipGuide",capture:!1})}return this.guideGroup},e.prototype.getTooltipMarkersGroup=function(){var t=this.tooltipMarkersGroup;return t&&!t.destroyed?(t.clear(),t.show()):((t=this.getGuideGroup().addGroup({name:"tooltipMarkersGroup"})).toFront(),this.tooltipMarkersGroup=t),t},e.prototype.getTooltipCrosshairsGroup=function(){var t=this.tooltipCrosshairsGroup;return t||((t=this.getGuideGroup().addGroup({name:"tooltipCrosshairsGroup",capture:!1})).toBack(),this.tooltipCrosshairsGroup=t),t},e.prototype.getTooltipItemsByHitShape=function(t,e,n){var r=[],i=t.container.getShape(e.x,e.y);if(i&&i.get("visible")&&i.get("origin")){var a=i.get("origin").mappingData,o=u.getTooltipItems(a,t,n);o.length&&r.push(o)}return r},e.prototype.getTooltipItemsByFindData=function(t,e,n){var r=[];return i.each(t.dataArray,(function(i){var a=u.findDataByPoint(e,i,t);if(a){var o=t.getElementId(a),s=t.elementsMap[o];if("heatmap"===t.type||s.visible){var c=u.getTooltipItems(a,t,n);c.length&&r.push(c)}}})),r},e.prototype.findItemsFromView=function(t,e){var n=this;if(!1===t.getOptions().tooltip)return[];var r=[],a=t.geometries,o=this.getTooltipCfg(),s=o.shared,u=o.title;return i.each(a,(function(t){if(t.visible&&!1!==t.tooltipOption){var i=t.type,a=void 0;(a=["point","edge","polygon"].includes(i)?n.getTooltipItemsByHitShape(t,e,u):["area","line","path","heatmap"].includes(i)||!1!==s?n.getTooltipItemsByFindData(t,e,u):n.getTooltipItemsByHitShape(t,e,u)).length&&r.push(a)}})),i.each(t.views,(function(t){r=r.concat(n.findItemsFromView(t,e))})),r},e.prototype.getViewWithGeometry=function(t){var e=this;return t.geometries.length?t:i.find(t.views,(function(t){return e.getViewWithGeometry(t)}))},e}(n(21).Controller);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(10),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.show=function(){var t=this.context.view,e=this.context.event,n=t.getTooltipItems({x:e.x,y:e.y});if(!i.isEqual(n,this.items)&&(this.items=n,n.length)){var r=t.getXScale().field,o=n[0].data[r],s=[],u=t.geometries;if(i.each(u,(function(t){if("interval"===t.type||"schema"===t.type){var e=t.getElementsBy((function(t){return t.getData()[r]===o}));s=s.concat(e)}})),s.length){var c=t.getCoordinate(),l=s[0].shape.getCanvasBBox(),h=s[0].shape.getCanvasBBox(),f=l;i.each(s,(function(t){var e=t.shape.getCanvasBBox();c.isTransposed?(e.minYh.maxY&&(h=e)):(e.minXh.maxX&&(h=e)),f.x=Math.min(e.minX,f.minX),f.y=Math.min(e.minY,f.minY),f.width=Math.max(e.maxX,f.maxX)-f.x,f.height=Math.max(e.maxY,f.maxY)-f.y}));var p=t.backgroundGroup,d=t.coordinateBBox,g=void 0;if(c.isRect){var v=t.getXScale().isLinear?0:.25,y=void 0,m=void 0,x=void 0,b=void 0;c.isTransposed?(y=d.minX,m=Math.min(h.minY,l.minY)-v*h.height,x=d.width,b=f.height+2*v*h.height):(y=Math.min(l.minX,h.minX)-v*l.width,m=Math.min(d.minY,l.minY),x=f.width+2*v*l.width,b=d.height),g=[["M",y,m],["L",y+x,m],["L",y+x,m+b],["L",y,m+b],["Z"]]}else{var M=i.head(s),_=i.last(s),w=a.getAngle(M.getModel(),c).startAngle,C=a.getAngle(_.getModel(),c).endAngle,O=c.getCenter(),A=c.getRadius(),P=c.innerRadius*A;g=a.getSectorPath(O.x,O.y,A,w,C,P)}this.regionPath?(this.regionPath.attr("path",g),this.regionPath.show()):this.regionPath=p.addShape({type:"path",name:"active-region",capture:!1,attrs:{path:g,fill:"#CCD6EC",opacity:.3}})}}},e.prototype.hide=function(){this.regionPath&&this.regionPath.hide(),this.items=null},e.prototype.destroy=function(){this.hide(),this.regionPath&&this.regionPath.remove(!0),t.prototype.destroy.call(this)},e}(r.__importDefault(n(8)).default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(5),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.showTooltip=function(t,e){var n=a.getSilbings(t);i.each(n,(function(n){var r=a.getSiblingPoint(t,n,e);n.showTooltip(r)}))},e.prototype.hideTooltip=function(t){var e=a.getSilbings(t);i.each(e,(function(t){t.hideTooltip()}))},e}(r.__importDefault(n(84)).default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e}return r.__extends(e,t),e.prototype.active=function(){this.setState()},e}(r.__importDefault(n(52)).default);e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=r.__importDefault(n(8)),a=n(5),o=n(0),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cache={},e}return r.__extends(e,t),e.prototype.getColorScale=function(t,e){var n=e.geometry.getAttribute("color");return n?t.getScaleByField(n.getFields()[0]):null},e.prototype.getLinkPath=function(t,e){var n=t.shape.getCanvasBBox(),r=e.shape.getCanvasBBox();return[["M",n.maxX,n.minY],["L",r.minX,r.minY],["L",r.minX,r.maxY],["L",n.maxX,n.maxY],["Z"]]},e.prototype.addLinkShape=function(t,e,n){t.addShape({type:"path",attrs:{opacity:.4,fill:e.shape.attr("fill"),path:this.getLinkPath(e,n)}})},e.prototype.linkByElement=function(t){var e=this,n=this.context.view,r=this.getColorScale(n,t);if(r){var i=a.getElementValue(t,r.field);if(!this.cache[i]){var s=a.getElementsByField(n,r.field,i),u=this.linkGroup.addGroup();this.cache[i]=u;var c=s.length;o.each(s,(function(t,n){if(n=0}),e)},e}(r.__importDefault(n(54)).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(5),a=n(57),o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e}return r.__extends(e,t),e.prototype.highlight=function(){this.setState()},e.prototype.setElementState=function(t,e){var n=this.context.view,r=i.getElements(n);a.setHighlightBy(r,(function(e){return t===e}),e)},e.prototype.clear=function(){var t=this.context.view;a.clearHighlight(t)},e}(r.__importDefault(n(55)).default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return r.__extends(e,t),e.prototype.selected=function(){this.setState()},e}(r.__importDefault(n(54)).default);e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return r.__extends(e,t),e.prototype.selected=function(){this.setState()},e}(r.__importDefault(n(52)).default);e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return r.__extends(e,t),e.prototype.selected=function(){this.setState()},e}(r.__importDefault(n(55)).default);e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e}return r.__extends(e,t),e.prototype.active=function(){this.setState()},e}(r.__importDefault(n(34)).default);e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(213),o=r.__importDefault(n(34)),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e.ignoreItemStates=["unchecked"],e}return r.__extends(e,t),e.prototype.setItemsState=function(t,e,n){this.setHighlightBy(t,(function(t){return t.name===e}),n)},e.prototype.setItemState=function(t,e,n){t.getItems();this.setHighlightBy(t,(function(t){return t===e}),n)},e.prototype.setHighlightBy=function(t,e,n){var r=t.getItems();if(n)i.each(r,(function(n){e(n)?(t.hasState(n,"inactive")&&t.setItemState(n,"inactive",!1),t.setItemState(n,"active",!0)):t.hasState(n,"active")||t.setItemState(n,"inactive",!0)}));else{var a=t.getItemsByState("active"),o=!0;i.each(a,(function(t){if(!e(t))return o=!1,!1})),o?this.clear():i.each(r,(function(n){e(n)&&(t.hasState(n,"active")&&t.setItemState(n,"active",!1),t.setItemState(n,"inactive",!0))}))}},e.prototype.highlight=function(){this.setState()},e.prototype.clear=function(){var t=this.getTriggerListInfo();if(t)a.clearList(t.list);else{var e=this.getAllowComponents();i.each(e,(function(t){t.clearItemsState("active"),t.clearItemsState("inactive")}))}},e}(o.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0);e.clearList=function(t){var e=t.getItems();r.each(e,(function(e){t.hasState(e,"active")&&t.setItemState(e,"active",!1),t.hasState(e,"inactive")&&t.setItemState(e,"inactive",!1)}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return r.__extends(e,t),e.prototype.selected=function(){this.setState()},e}(r.__importDefault(n(34)).default);e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="unchecked",e}return r.__extends(e,t),e.prototype.unchecked=function(){this.setState()},e}(r.__importDefault(n(34)).default);e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=n(5),o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shapeType="circle",e}return r.__extends(e,t),e.prototype.getMaskAttrs=function(){var t=this.points,e=i.last(this.points),n=0,r=0,o=0;if(t.length){var s=t[0];n=a.distance(s,e)/2,r=(e.x+s.x)/2,o=(e.y+s.y)/2}return{x:r,y:o,r:n}},e}(r.__importDefault(n(58)).default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0);function a(t){t.x=i.clamp(t.x,0,1),t.y=i.clamp(t.y,0,1)}var o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dim="x",e.inPlot=!0,e}return r.__extends(e,t),e.prototype.getRegion=function(){var t=null,e=null,n=this.points,r=this.dim,o=this.context.view.getCoordinate(),s=o.invert(i.head(n)),u=o.invert(i.last(n));return this.inPlot&&(a(s),a(u)),"x"===r?(t=o.convert({x:s.x,y:0}),e=o.convert({x:u.x,y:1})):(t=o.convert({x:0,y:s.y}),e=o.convert({x:1,y:u.y})),{start:t,end:e}},e}(r.__importDefault(n(85)).default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(5),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.getMaskPath=function(){var t=this.points;return i.getSpline(t,!0)},e}(r.__importDefault(n(86)).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.setCursor=function(t){this.context.view.getCanvas().setCursor(t)},e.prototype.default=function(){this.setCursor("default")},e.prototype.pointer=function(){this.setCursor("pointer")},e.prototype.move=function(){this.setCursor("move")},e.prototype.crosshair=function(){this.setCursor("crosshair")},e.prototype.wait=function(){this.setCursor("wait")},e.prototype.help=function(){this.setCursor("help")},e.prototype.text=function(){this.setCursor("text")},e.prototype.eResize=function(){this.setCursor("e-resize")},e.prototype.wResize=function(){this.setCursor("w-resize")},e.prototype.nResize=function(){this.setCursor("n-resize")},e.prototype.sResize=function(){this.setCursor("s-resize")},e.prototype.neResize=function(){this.setCursor("ne-resize")},e.prototype.nwResize=function(){this.setCursor("nw-resize")},e.prototype.seResize=function(){this.setCursor("se-resize")},e.prototype.swResize=function(){this.setCursor("sw-resize")},e.prototype.nsResize=function(){this.setCursor("ns-resize")},e.prototype.ewResize=function(){this.setCursor("ew-resize")},e}(r.__importDefault(n(8)).default);e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=r.__importDefault(n(8)),o=n(5),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.filterView=function(t,e,n){var r=this;t.getScaleByField(e)&&t.filter(e,n),t.views&&t.views.length&&i.each(t.views,(function(t){r.filterView(t,e,n)}))},e.prototype.filter=function(){var t=o.getDelegationObject(this.context);if(t){var e=this.context.view,n=t.component,r=n.get("field");if(o.isList(t)){if(r){var i=n.getItemsByState("unchecked"),a=o.getScaleByField(e,r),s=i.map((function(t){return t.name}));s.length?this.filterView(e,r,(function(t){var e=a.getText(t);return!s.includes(e)})):this.filterView(e,r,null),e.render(!0)}}else if(o.isSlider(t)){var u=n.getValue(),c=u[0],l=u[1];this.filterView(e,r,(function(t){return t>=c&&t<=l})),e.render(!0)}}},e}(a.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=r.__importDefault(n(87)),o=n(5),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.filterView=function(t,e,n){var r=o.getSilbings(t);i.each(r,(function(t){t.filter(e,n)}))},e.prototype.reRender=function(t){var e=o.getSilbings(t);i.each(e,(function(t){t.render(!0)}))},e}(a.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=r.__importDefault(n(8)),o=n(5),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.filter=function(){var t=o.getDelegationObject(this.context),e=this.context.view,n=o.getElements(e);if(o.isMask(this.context)){var r=o.getMaskedElements(this.context,10);r&&i.each(n,(function(t){r.includes(t)?t.show():t.hide()}))}else if(t){var a=t.component,s=a.get("field");if(o.isList(t)){if(s){var u=a.getItemsByState("unchecked"),c=o.getScaleByField(e,s),l=u.map((function(t){return t.name}));i.each(n,(function(t){var e=o.getElementValue(t,s),n=c.getText(e);l.indexOf(n)>=0?t.hide():t.show()}))}}else if(o.isSlider(t)){var h=a.getValue(),f=h[0],p=h[1];i.each(n,(function(t){var e=o.getElementValue(t,s);e>=f&&e<=p?t.show():t.hide()}))}}},e.prototype.clear=function(){var t=o.getElements(this.context.view);i.each(t,(function(t){t.show()}))},e.prototype.reset=function(){this.clear()},e}(a.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=r.__importDefault(n(8)),o=n(5),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.byRecord=!1,e}return r.__extends(e,t),e.prototype.filter=function(){o.isMask(this.context)&&(this.byRecord?this.filterByRecord():this.filterByBBox())},e.prototype.filterByRecord=function(){var t=this.context.view,e=o.getMaskedElements(this.context,10);if(e){var n=t.getXScale().field,r=t.getYScales()[0].field,a=e.map((function(t){return t.getModel().data})),s=o.getSilbings(t);i.each(s,(function(t){var e=o.getElements(t);i.each(e,(function(t){var e=t.getModel().data;o.isInRecords(a,e,n,r)?t.show():t.hide()}))}))}},e.prototype.filterByBBox=function(){var t=this,e=this.context.view,n=o.getSilbings(e);i.each(n,(function(e){var n=o.getSiblingMaskElements(t.context,e,10),r=o.getElements(e);n&&i.each(r,(function(t){n.includes(t)?t.show():t.hide()}))}))},e.prototype.reset=function(){var t=o.getSilbings(this.context.view);i.each(t,(function(t){var e=o.getElements(t);i.each(e,(function(t){t.show()}))}))},e}(a.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(2),a=n(0),o=n(44),s=r.__importDefault(n(8)),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.buttonGroup=null,e.buttonCfg={name:"button",text:"button",textStyle:{x:0,y:0,fontSize:12,fill:"#333333",cursor:"pointer"},padding:[8,10],style:{fill:"#f7f7f7",stroke:"#cccccc",cursor:"pointer"},activeStyle:{fill:"#e6e6e6"}},e}return r.__extends(e,t),e.prototype.getButtonCfg=function(){return a.deepMix(this.buttonCfg,this.cfg)},e.prototype.drawButton=function(){var t=this.getButtonCfg(),e=this.context.view.foregroundGroup.addGroup({name:t.name}),n=e.addShape({type:"text",name:"button-text",attrs:r.__assign({text:t.text},t.textStyle)}).getBBox(),i=o.parsePadding(t.padding),a=e.addShape({type:"rect",name:"button-rect",attrs:r.__assign({x:n.x-i[3],y:n.y-i[0],width:n.width+i[1]+i[3],height:n.height+i[0]+i[2]},t.style)});a.toBack(),e.on("mouseenter",(function(){a.attr(t.activeStyle)})),e.on("mouseleave",(function(){a.attr(t.style)})),this.buttonGroup=e},e.prototype.resetPosition=function(){var t=this.context.view.getCoordinate().convert({x:1,y:1}),e=this.buttonGroup,n=e.getBBox(),r=i.transform(null,[["t",t.x-n.width-10,t.y+n.height+5]]);e.setMatrix(r)},e.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},e.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},e.prototype.destroy=function(){var e=this.buttonGroup;e&&e.remove(),t.prototype.destroy.call(this)},e}(s.default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=r.__importDefault(n(8)),a=n(5),o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.starting=!1,e.dragStart=!1,e}return r.__extends(e,t),e.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint()},e.prototype.drag=function(){if(this.startPoint){var t=this.context.getCurrentPoint(),e=this.context.view,n=this.context.event;this.dragStart?e.emit("drag",{target:n.target,x:n.x,y:n.y}):a.distance(t,this.startPoint)>4&&(e.emit("dragstart",{target:n.target,x:n.x,y:n.y}),this.dragStart=!0)}},e.prototype.end=function(){if(this.dragStart){var t=this.context.view,e=this.context.event;t.emit("dragend",{target:e.target,x:e.x,y:e.y})}this.starting=!1,this.dragStart=!1},e}(i.default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(2),a=n(45),o=n(5),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.starting=!1,e.isMoving=!1,e.startPoint=null,e.startMatrix=null,e}return r.__extends(e,t),e.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint(),this.startMatrix=this.context.view.middleGroup.getMatrix()},e.prototype.move=function(){if(this.starting){var t=this.startPoint,e=this.context.getCurrentPoint();if(o.distance(t,e)>5&&!this.isMoving&&(this.isMoving=!0),this.isMoving){var n=this.context.view,r=i.transform(this.startMatrix,[["t",e.x-t.x,e.y-t.y]]);n.backgroundGroup.setMatrix(r),n.foregroundGroup.setMatrix(r),n.middleGroup.setMatrix(r)}}},e.prototype.end=function(){this.isMoving&&(this.isMoving=!1),this.startMatrix=null,this.starting=!1,this.startPoint=null},e.prototype.reset=function(){this.starting=!1,this.startPoint=null,this.isMoving=!1;var t=this.context.view;t.backgroundGroup.resetMatrix(),t.foregroundGroup.resetMatrix(),t.middleGroup.resetMatrix(),this.isMoving=!1},e}(a.Action);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.startPoint=null,e.starting=!1,e.startCache={},e}return r.__extends(e,t),e.prototype.start=function(){var t=this;this.startPoint=this.context.getCurrentPoint(),this.starting=!0;var e=this.dims;i.each(e,(function(e){var n=t.getScale(e),r=n.min,i=n.max,a=n.values;t.startCache[e]={min:r,max:i,values:a}}))},e.prototype.end=function(){this.startPoint=null,this.starting=!1,this.startCache={}},e.prototype.translate=function(){var t=this;if(this.starting){var e=this.startPoint,n=this.context.view.getCoordinate(),r=this.context.getCurrentPoint(),a=n.invert(e),o=n.invert(r),s=o.x-a.x,u=o.y-a.y,c=this.context.view,l=this.dims;i.each(l,(function(e){t.translateDim(e,{x:-1*s,y:-1*u})})),c.render(!0)}},e.prototype.translateDim=function(t,e){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.translateLinear(t,n,e)}},e.prototype.translateLinear=function(t,e,n){var r=this.context.view,i=this.startCache[t],a=i.min,o=i.max,s=o-a,u=n[t]*s;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:e.nice,min:a,max:o}),r.scale(e.field,{nice:!1,min:a+u,max:o+u})},e.prototype.reset=function(){t.prototype.reset.call(this),this.startPoint=null,this.starting=!1},e}(r.__importDefault(n(88)).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.zoomRatio=.05,e}return r.__extends(e,t),e.prototype.zoomIn=function(){this.zoom(this.zoomRatio)},e.prototype.zoom=function(t){var e=this,n=this.dims;i.each(n,(function(n){e.zoomDim(n,t)})),this.context.view.render(!0)},e.prototype.zoomOut=function(){this.zoom(-1*this.zoomRatio)},e.prototype.zoomDim=function(t,e){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.zoomLinear(t,n,e)}},e.prototype.zoomLinear=function(t,e,n){var r=this.context.view;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:e.nice,min:e.min,max:e.max});var i=this.cacheScaleDefs[t],a=i.max-i.min,o=e.min,s=e.max,u=n*a,c=o-u,l=s+u,h=(l-c)/a;l>c&&h<100&&h>.01&&r.scale(e.field,{nice:!1,min:o-u,max:s+u})},e}(r.__importDefault(n(88)).default);e.default=a},function(t,e,n){"use strict";n.r(e),n.d(e,"Component",(function(){return k})),n.d(e,"GroupComponent",(function(){return B})),n.d(e,"HtmlComponent",(function(){return Pt})),n.d(e,"Axis",(function(){return u})),n.d(e,"Annotation",(function(){return r})),n.d(e,"Grid",(function(){return l})),n.d(e,"Legend",(function(){return h})),n.d(e,"Tooltip",(function(){return p})),n.d(e,"Crosshair",(function(){return c})),n.d(e,"Slider",(function(){return te})),n.d(e,"Scrollbar",(function(){return ne}));var r={};n.r(r),n.d(r,"Line",(function(){return F})),n.d(r,"Text",(function(){return R})),n.d(r,"Arc",(function(){return N})),n.d(r,"Region",(function(){return Y})),n.d(r,"Image",(function(){return G})),n.d(r,"DataMarker",(function(){return X})),n.d(r,"DataRegion",(function(){return V})),n.d(r,"RegionFilter",(function(){return q}));var i={};n.r(i),n.d(i,"getDefault",(function(){return Q})),n.d(i,"ellipsisHead",(function(){return $})),n.d(i,"ellipsisTail",(function(){return K})),n.d(i,"ellipsisMiddle",(function(){return J}));var a={};n.r(a),n.d(a,"getDefault",(function(){return it})),n.d(a,"reserveFirst",(function(){return at})),n.d(a,"reserveLast",(function(){return ot})),n.d(a,"reserveBoth",(function(){return st})),n.d(a,"equidistance",(function(){return ut}));var o={};n.r(o),n.d(o,"getDefault",(function(){return lt})),n.d(o,"fixedAngle",(function(){return ht})),n.d(o,"unfixedAngle",(function(){return ft}));var s={};n.r(s),n.d(s,"autoHide",(function(){return a})),n.d(s,"autoRotate",(function(){return o})),n.d(s,"autoEllipsis",(function(){return i}));var u={};n.r(u),n.d(u,"Line",(function(){return pt})),n.d(u,"Circle",(function(){return dt})),n.d(u,"Base",(function(){return H}));var c={};n.r(c),n.d(c,"Line",(function(){return vt})),n.d(c,"Circle",(function(){return yt})),n.d(c,"Base",(function(){return gt}));var l={};n.r(l),n.d(l,"Base",(function(){return mt})),n.d(l,"Circle",(function(){return bt})),n.d(l,"Line",(function(){return Mt}));var h={};n.r(h),n.d(h,"Category",(function(){return wt})),n.d(h,"Continuous",(function(){return Ct})),n.d(h,"Base",(function(){return _t}));var f={};n.r(f),n.d(f,"CONTAINER_CLASS",(function(){return St})),n.d(f,"TITLE_CLASS",(function(){return Et})),n.d(f,"LIST_CLASS",(function(){return It})),n.d(f,"LIST_ITEM_CLASS",(function(){return Tt})),n.d(f,"MARKER_CLASS",(function(){return kt})),n.d(f,"VALUE_CLASS",(function(){return jt})),n.d(f,"NAME_CLASS",(function(){return Lt})),n.d(f,"CROSSHAIR_X",(function(){return Bt})),n.d(f,"CROSSHAIR_Y",(function(){return Dt}));var p={};n.r(p),n.d(p,"Html",(function(){return Nt}));var d=n(1),g=n(0),v=n(60),y=n.n(v);var m=n(2),x=[1,0,0,0,1,0,0,0,1];function b(t,e){return e?Object(m.transform)(x,[["t",-t.x,-t.y],["r",e],["t",t.x,t.y]]):null}function M(t,e){return t.x||t.y?Object(m.transform)(e||x,[["t",t.x,t.y]]):null}function _(t,e){var n=[];return m.vec2.transformMat3(n,e,t),n}function w(t){var e=0,n=0,r=0,i=0;return Object(g.isNumber)(t)?e=n=r=i=t:Object(g.isArray)(t)&&(e=t[0],r=Object(g.isNil)(t[1])?t[0]:t[1],i=Object(g.isNil)(t[2])?t[0]:t[2],n=Object(g.isNil)(t[3])?r:t[3]),[e,r,i,n]}function C(t){for(var e=t.childNodes,n=e.length-1;n>=0;n--)t.removeChild(e[n])}function O(t){var e=t.start,n=t.end,r=Math.min(e.x,n.x),i=Math.min(e.y,n.y),a=Math.max(e.x,n.x),o=Math.max(e.y,n.y);return{x:r,y:i,minX:r,minY:i,maxX:a,maxY:o,width:a-r,height:o-i}}function A(t,e,n,r){return{x:t,y:e,width:n,height:r,minX:t,minY:e,maxX:t+n,maxY:e+r}}function P(t,e,n){return(1-n)*t+e*n}function S(t,e,n){return{x:t.x+Math.cos(n)*e,y:t.y+Math.sin(n)*e}}function E(t){var e,n,r,i,a,o=t.getClip(),s=o&&o.getBBox();if(t.isGroup()){var u=1/0,c=-1/0,l=1/0,h=-1/0,f=t.getChildren();f.length>0?Object(g.each)(f,(function(t){if(t.get("visible")){if(t.isGroup()&&0===t.get("children").length)return!0;var e=E(t),n=t.applyToMatrix([e.minX,e.minY,1]),r=t.applyToMatrix([e.minX,e.maxY,1]),i=t.applyToMatrix([e.maxX,e.minY,1]),a=t.applyToMatrix([e.maxX,e.maxY,1]),o=Math.min(n[0],r[0],i[0],a[0]),s=Math.max(n[0],r[0],i[0],a[0]),f=Math.min(n[1],r[1],i[1],a[1]),p=Math.max(n[1],r[1],i[1],a[1]);oc&&(c=s),fh&&(h=p)}})):(u=0,c=0,l=0,h=0),e=A(u,l,c-u,h-l)}else e=t.getBBox();return s?(n=e,r=s,i=Math.max(n.minX,r.minX),a=Math.max(n.minY,r.minY),A(i,a,Math.min(n.maxX,r.maxX)-i,Math.min(n.maxY,r.maxY)-a)):e}var I=n(63),T={none:[],point:["x","y"],region:["start","end"],points:["points"],circle:["center","radius","startAngle","endAngle"]},k=function(t){function e(e){var n=t.call(this,e)||this;return n.initCfg(),n}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){return{id:"",name:"",type:"",locationType:"none",offsetX:0,offsetY:0,animate:!1,capture:!0,updateAutoRender:!1,animateOption:{appear:null,update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},events:null,defaultCfg:{},visible:!0}},e.prototype.clear=function(){},e.prototype.update=function(t){var e=this,n=this.get("defaultCfg");Object(g.each)(t,(function(t,r){var i=t;e.get(r)!==t&&(Object(g.isObject)(t)&&n[r]&&(i=Object(g.deepMix)({},n[r],t)),e.set(r,i))})),Object(g.hasKey)(t,"visible")&&(t.visible?this.show():this.hide()),Object(g.hasKey)(t,"capture")&&this.setCapture(t.capture)},e.prototype.getLayoutBBox=function(){return this.getBBox()},e.prototype.getLocationType=function(){return this.get("locationType")},e.prototype.getOffset=function(){return{offsetX:this.get("offsetX"),offsetY:this.get("offsetY")}},e.prototype.setOffset=function(t,e){this.update({offsetX:t,offsetY:e})},e.prototype.setLocation=function(t){var e=Object(d.__assign)({},t);this.update(e)},e.prototype.getLocation=function(){var t=this,e={},n=this.get("locationType"),r=T[n];return Object(g.each)(r,(function(n){e[n]=t.get(n)})),e},e.prototype.isList=function(){return!1},e.prototype.isSlider=function(){return!1},e.prototype.init=function(){},e.prototype.initCfg=function(){var t=this,e=this.get("defaultCfg");Object(g.each)(e,(function(e,n){var r=t.get(n);if(Object(g.isObject)(r)){var i=Object(g.deepMix)({},e,r);t.set(n,i)}}))},e}(I.Base),j=["visible","tip","delegateObject"],L=["container","group","shapesMap","isRegister","isUpdating","destroyed"],B=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{container:null,shapesMap:{},group:null,capture:!0,isRegister:!1,isUpdating:!1,isInit:!0})},e.prototype.remove=function(){this.clear(),this.get("group").remove()},e.prototype.clear=function(){this.get("group").clear(),this.set("shapesMap",{}),this.clearOffScreenCache(),this.set("isInit",!0)},e.prototype.getChildComponentById=function(t){var e=this.getElementById(t);return e&&e.get("component")},e.prototype.getElementById=function(t){return this.get("shapesMap")[t]},e.prototype.getElementByLocalId=function(t){var e=this.getElementId(t);return this.getElementById(e)},e.prototype.getElementsByName=function(t){var e=[];return Object(g.each)(this.get("shapesMap"),(function(n){n.get("name")===t&&e.push(n)})),e},e.prototype.getContainer=function(){return this.get("container")},e.prototype.update=function(e){t.prototype.update.call(this,e),this.offScreenRender(),this.get("updateAutoRender")&&this.render()},e.prototype.render=function(){var t=this.get("offScreenGroup");t||(t=this.offScreenRender());var e=this.get("group");this.updateElements(t,e),this.deleteElements(),this.applyOffset(),this.get("eventInitted")||(this.initEvent(),this.set("eventInitted",!0)),this.set("isInit",!1)},e.prototype.show=function(){this.get("group").show(),this.set("visible",!0)},e.prototype.hide=function(){this.get("group").hide(),this.set("visible",!1)},e.prototype.setCapture=function(t){this.get("group").set("capture",t),this.set("capture",t)},e.prototype.destroy=function(){this.removeEvent(),this.remove(),t.prototype.destroy.call(this)},e.prototype.getBBox=function(){return this.get("group").getCanvasBBox()},e.prototype.getLayoutBBox=function(){var t=this.get("group"),e=this.getInnerLayoutBBox(),n=t.getTotalMatrix();return n&&(e=function(t,e){var n=_(t,[e.minX,e.minY]),r=_(t,[e.maxX,e.minY]),i=_(t,[e.minX,e.maxY]),a=_(t,[e.maxX,e.maxY]),o=Math.min(n[0],r[0],i[0],a[0]),s=Math.max(n[0],r[0],i[0],a[0]),u=Math.min(n[1],r[1],i[1],a[1]),c=Math.max(n[1],r[1],i[1],a[1]);return{x:o,y:u,minX:o,minY:u,maxX:s,maxY:c,width:s-o,height:c-u}}(n,e)),e},e.prototype.on=function(t,e,n){return this.get("group").on(t,e,n),this},e.prototype.off=function(t,e){var n=this.get("group");return n&&n.off(t,e),this},e.prototype.emit=function(t,e){this.get("group").emit(t,e)},e.prototype.init=function(){t.prototype.init.call(this),this.get("group")||this.initGroup(),this.offScreenRender()},e.prototype.getInnerLayoutBBox=function(){return this.get("offScreenBBox")||this.get("group").getBBox()},e.prototype.delegateEmit=function(t,e){var n=this.get("group");e.target=n,n.emit(t,e),function(t,e,n){var r=new y.a(e,n);r.target=t,r.propagationPath.push(t),t.emitDelegation(e,r);for(var i=t.getParent();i;)i.emitDelegation(e,r),r.propagationPath.push(i),i=i.getParent()}(n,t,e)},e.prototype.createOffScreenGroup=function(){return new(this.get("group").getGroupBase())({delegateObject:this.getDelegateObject()})},e.prototype.applyOffset=function(){var t=this.get("offsetX"),e=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t,y:e})},e.prototype.initGroup=function(){var t=this.get("container");this.set("group",t.addGroup({id:this.get("id"),name:this.get("name"),capture:this.get("capture"),visible:this.get("visible"),isComponent:!0,component:this,delegateObject:this.getDelegateObject()}))},e.prototype.offScreenRender=function(){this.clearOffScreenCache();var t=this.createOffScreenGroup();return this.renderInner(t),this.set("offScreenGroup",t),this.set("offScreenBBox",E(t)),t},e.prototype.addGroup=function(t,e){this.appendDelegateObject(t,e);var n=t.addGroup(e);return this.get("isRegister")&&this.registerElement(n),n},e.prototype.addShape=function(t,e){this.appendDelegateObject(t,e);var n=t.addShape(e);return this.get("isRegister")&&this.registerElement(n),n},e.prototype.addComponent=function(t,e){var n=e.id,r=e.component,i=Object(d.__rest)(e,["id","component"]),a=new r(Object(d.__assign)(Object(d.__assign)({},i),{id:n,container:t,updateAutoRender:this.get("updateAutoRender")}));return a.init(),a.render(),this.get("isRegister")&&this.registerElement(a.get("group")),a},e.prototype.initEvent=function(){},e.prototype.removeEvent=function(){this.get("group").off()},e.prototype.getElementId=function(t){return this.get("id")+"-"+this.get("name")+"-"+t},e.prototype.registerElement=function(t){var e=t.get("id");this.get("shapesMap")[e]=t},e.prototype.unregisterElement=function(t){var e=t.get("id");delete this.get("shapesMap")[e]},e.prototype.moveElementTo=function(t,e){var n=M(e);t.attr("matrix",n)},e.prototype.addAnimation=function(t,e,n){var r=e.attr("opacity");Object(g.isNil)(r)&&(r=1),e.attr("opacity",0),e.animate({opacity:r},n)},e.prototype.removeAnimation=function(t,e,n){e.animate({opacity:0},n)},e.prototype.updateAnimation=function(t,e,n,r){e.animate(n,r)},e.prototype.updateElements=function(t,e){var n,r=this,i=this.get("animate"),a=this.get("animateOption"),o=t.getChildren().slice(0);Object(g.each)(o,(function(t){var o=t.get("id"),s=r.getElementById(o),u=t.get("name");if(s)if(t.get("isComponent")){var c=t.get("component"),l=s.get("component"),h=Object(g.pick)(c.cfg,Object(g.difference)(Object(g.keys)(c.cfg),L));l.update(h),s.set("update_status","update")}else{var f=r.getReplaceAttrs(s,t);i&&a.update?r.updateAnimation(u,s,f,a.update):s.attr(f),t.isGroup()&&r.updateElements(t,s),Object(g.each)(j,(function(e){s.set(e,t.get(e))})),function(t,e){if(t.getClip()||e.getClip()){var n=e.getClip();if(n){var r={type:n.get("type"),attrs:n.attr()};t.setClip(r)}else t.setClip(null)}}(s,t),n=s,s.set("update_status","update")}else{e.add(t);var p=e.getChildren();if(p.splice(p.length-1,1),n){var d=p.indexOf(n);p.splice(d+1,0,t)}else p.unshift(t);if(r.registerElement(t),t.set("update_status","add"),t.get("isComponent"))(c=t.get("component")).set("container",e);else t.isGroup()&&r.registerNewGroup(t);if(n=t,i){var v=r.get("isInit")?a.appear:a.enter;v&&r.addAnimation(u,t,v)}}}))},e.prototype.clearUpdateStatus=function(t){var e=t.getChildren();Object(g.each)(e,(function(t){t.set("update_status",null)}))},e.prototype.clearOffScreenCache=function(){var t=this.get("offScreenGroup");t&&t.destroy(),this.set("offScreenGroup",null),this.set("offScreenBBox",null)},e.prototype.getDelegateObject=function(){var t;return(t={})[this.get("name")]=this,t.component=this,t},e.prototype.appendDelegateObject=function(t,e){var n=t.get("delegateObject");e.delegateObject||(e.delegateObject={}),Object(g.mix)(e.delegateObject,n)},e.prototype.getReplaceAttrs=function(t,e){var n=t.attr(),r=e.attr();return Object(g.each)(n,(function(t,e){void 0===r[e]&&(r[e]=void 0)})),r},e.prototype.registerNewGroup=function(t){var e=this,n=t.getChildren();Object(g.each)(n,(function(t){e.registerElement(t),t.set("update_status","add"),t.isGroup()&&e.registerNewGroup(t)}))},e.prototype.deleteElements=function(){var t=this,e=this.get("shapesMap"),n=[];Object(g.each)(e,(function(t,e){!t.get("update_status")||t.destroyed?n.push([e,t]):t.set("update_status",null)}));var r=this.get("animate"),i=this.get("animateOption");Object(g.each)(n,(function(n){var a=n[0],o=n[1];if(!o.destroyed){var s=o.get("name");if(r&&i.leave){var u=Object(g.mix)({callback:function(){t.removeElement(o)}},i.leave);t.removeAnimation(s,o,u)}else t.removeElement(o)}delete e[a]}))},e.prototype.removeElement=function(t){if(t.get("isGroup")){var e=t.get("component");e&&e.destroy()}t.remove()},e}(k),D={fontFamily:'\n "-apple-system", BlinkMacSystemFont, "Segoe UI", Roboto,"Helvetica Neue",\n Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",\n SimSun, "sans-serif"',textColor:"#2C3542",activeTextColor:"#333333",uncheckedColor:"#D8D8D8",lineColor:"#416180",regionColor:"#CCD7EB",verticalAxisRotate:-Math.PI/4,horizontalAxisRotate:Math.PI/4},F=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"line",locationType:"region",start:null,end:null,style:{},text:null,defaultCfg:{style:{fill:D.textColor,fontSize:12,textAlign:"center",textBaseline:"bottom",fontFamily:D.fontFamily},text:{position:"center",autoRotate:!0,content:null,offsetX:0,offsetY:0,style:{stroke:D.lineColor,lineWidth:1}}}})},e.prototype.renderInner=function(t){this.renderLine(t),this.get("text")&&this.renderLabel(t)},e.prototype.renderLine=function(t){var e=this.get("start"),n=this.get("end"),r=this.get("style");this.addShape(t,{type:"line",id:this.getElementId("line"),name:"annotation-line",attrs:Object(d.__assign)({x1:e.x,y1:e.y,x2:n.x,y2:n.y},r)})},e.prototype.getLabelPoint=function(t,e,n){var r;return((r="start"===n?0:"center"===n?.5:Object(g.isString)(n)&&-1!==n.indexOf("%")?parseInt(n,10)/100:Object(g.isNumber)(n)?n:1)>1||r<0)&&(r=1),{x:P(t.x,e.x,r),y:P(t.y,e.y,r)}},e.prototype.renderLabel=function(t){var e=this.get("text"),n=this.get("start"),r=this.get("end"),i=e.position,a=e.content,o=e.style,s=e.offsetX,u=e.offsetY,c=e.autoRotate,l=this.getLabelPoint(n,r,i),h=Object(d.__assign)({x:l.x+s,y:l.y+u,text:a},o);if(c){var f=[r.x-n.x,r.y-n.y],p=b(l,Math.atan2(f[1],f[0]));h.matrix=p}this.addShape(t,{type:"text",id:this.getElementId("line-text"),name:"annotation-line-text",attrs:h})},e}(B),R=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"text",locationType:"point",x:0,y:0,content:"",rotate:null,style:{},defaultCfg:{style:{fill:D.textColor,fontSize:12,textAlign:"center",textBaseline:"middle",fontFamily:D.fontFamily}}})},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},e.prototype.renderInner=function(t){this.renderText(t)},e.prototype.renderText=function(t){var e=this.getLocation(),n=e.x,r=e.y,i=this.get("content"),a=this.get("style"),o=this.addShape(t,{type:"text",id:this.getElementId("text"),name:"annotation-text",attrs:Object(d.__assign)({x:n,y:r,text:i},a)});this.applyRotate(o,n,r)},e.prototype.applyRotate=function(t,e,n){var r=this.get("rotate"),i=null;r&&(i=b({x:e,y:n},r)),t.attr("matrix",i)},e.prototype.resetLocation=function(){var t=this.getElementByLocalId("text");if(t){var e=this.getLocation(),n=e.x,r=e.y;t.attr({x:n,y:r}),this.applyRotate(t,n,r)}},e}(B),N=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"arc",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:3*Math.PI/2,style:{stroke:"#999",lineWidth:1}})},e.prototype.renderInner=function(t){this.renderArc(t)},e.prototype.getArcPath=function(){var t=this.getLocation(),e=t.center,n=t.radius,r=t.startAngle,i=t.endAngle,a=S(e,n,r),o=S(e,n,i),s=i-r>Math.PI?1:0,u=[["M",a.x,a.y]];if(i-r==2*Math.PI){var c=S(e,n,r+Math.PI);u.push(["A",n,n,0,s,1,c.x,c.y]),u.push(["A",n,n,0,s,1,o.x,o.y])}else u.push(["A",n,n,0,s,1,o.x,o.y]);return u},e.prototype.renderArc=function(t){var e=this.getArcPath(),n=this.get("style");this.addShape(t,{type:"path",id:this.getElementId("arc"),name:"annotation-arc",attrs:Object(d.__assign)({path:e},n)})},e}(B),Y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"region",locationType:"region",start:null,end:null,style:{},defaultCfg:{style:{lineWidth:0,fill:D.regionColor,opacity:.4}}})},e.prototype.renderInner=function(t){this.renderRegion(t)},e.prototype.renderRegion=function(t){var e=this.get("start"),n=this.get("end"),r=this.get("style"),i=O({start:e,end:n});this.addShape(t,{type:"rect",id:this.getElementId("region"),name:"annotation-region",attrs:Object(d.__assign)({x:i.x,y:i.y,width:i.width,height:i.height},r)})},e}(B),G=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"image",locationType:"region",start:null,end:null,src:null,style:{}})},e.prototype.renderInner=function(t){this.renderImage(t)},e.prototype.getImageAttrs=function(){var t=this.get("start"),e=this.get("end"),n=this.get("style"),r=O({start:t,end:e}),i=this.get("src");return Object(d.__assign)({x:r.x,y:r.y,img:i,width:r.width,height:r.height},n)},e.prototype.renderImage=function(t){this.addShape(t,{type:"image",id:this.getElementId("image"),name:"annotation-image",attrs:this.getImageAttrs()})},e}(B),X=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"dataMarker",locationType:"point",x:0,y:0,point:{},line:{},text:{},direction:"upward",autoAdjust:!0,coordinateBBox:null,defaultCfg:{point:{display:!0,style:{r:3,fill:"#FFFFFF",stroke:"#1890FF",lineWidth:2}},line:{display:!0,length:20,style:{stroke:D.lineColor,lineWidth:1}},text:{content:"",display:!0,style:{fill:D.textColor,opacity:.65,fontSize:12,textAlign:"start",fontFamily:D.fontFamily}}}})},e.prototype.renderInner=function(t){Object(g.get)(this.get("line"),"display")&&this.renderLine(t),Object(g.get)(this.get("text"),"display")&&this.renderText(t),Object(g.get)(this.get("point"),"display")&&this.renderPoint(t),this.get("autoAdjust")&&this.autoAdjust(t)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x")+this.get("offsetX"),y:this.get("y")+this.get("offsetY")})},e.prototype.renderPoint=function(t){var e=this.getShapeAttrs().point;this.addShape(t,{type:"circle",id:this.getElementId("point"),name:"annotation-point",attrs:e})},e.prototype.renderLine=function(t){var e=this.getShapeAttrs().line;this.addShape(t,{type:"path",id:this.getElementId("line"),name:"annotation-line",attrs:e})},e.prototype.renderText=function(t){var e=this.getShapeAttrs().text;this.addShape(t,{type:"text",id:this.getElementId("text"),name:"annotation-text",attrs:e})},e.prototype.autoAdjust=function(t){var e=this.get("direction"),n=this.get("x"),r=this.get("y"),i=Object(g.get)(this.get("line"),"length",0),a=this.get("coordinateBBox"),o=t.getBBox(),s=o.minX,u=o.maxX,c=o.minY,l=o.maxY,h=t.findById(this.getElementId("text")),f=t.findById(this.getElementId("line"));if(a&&(h&&(n+s<=a.minX&&h.attr("textAlign","start"),n+u>=a.maxX&&h.attr("textAlign","end")),"upward"===e&&r+c<=a.minY||"upward"!==e&&r+l>=a.maxY)){var p=void 0,d=void 0;"upward"===e&&r+c<=a.minY?(p="top",d=1):(p="bottom",d=-1),h.attr("textBaseline",p),f&&f.attr("path",[["M",0,0],["L",0,i*d]]),h.attr("y",(i+2)*d)}},e.prototype.getShapeAttrs=function(){var t=Object(g.get)(this.get("line"),"display"),e=Object(g.get)(this.get("point"),"style",{}),n=Object(g.get)(this.get("line"),"style",{}),r=Object(g.get)(this.get("text"),"style",{}),i=this.get("direction"),a=t?Object(g.get)(this.get("line"),"length",0):0,o="upward"===i?-1:1;return{point:Object(d.__assign)({x:0,y:0},e),line:Object(d.__assign)({path:[["M",0,0],["L",0,a*o]]},n),text:Object(d.__assign)({x:0,y:(a+2)*o,text:Object(g.get)(this.get("text"),"content",""),textBaseline:"upward"===i?"bottom":"top"},r)}},e}(B),V=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"dataRegion",locationType:"points",points:[],lineLength:0,region:{},text:{},defaultCfg:{region:{style:{lineWidth:0,fill:D.regionColor,opacity:.4}},text:{content:"",style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:D.textColor,fontFamily:D.fontFamily}}}})},e.prototype.renderInner=function(t){var e=Object(g.get)(this.get("region"),"style",{}),n=Object(g.get)(this.get("text"),"style",{}),r=this.get("lineLength")||0,i=this.get("points");if(i.length){var a=function(t){var e=t.map((function(t){return t.x})),n=t.map((function(t){return t.y})),r=Math.min.apply(Math,e),i=Math.min.apply(Math,n),a=Math.max.apply(Math,e),o=Math.max.apply(Math,n);return{x:r,y:i,minX:r,minY:i,maxX:a,maxY:o,width:a-r,height:o-i}}(i),o=[];o.push(["M",i[0].x,a.minY-r]),i.forEach((function(t){o.push(["L",t.x,t.y])})),o.push(["L",i[i.length-1].x,i[i.length-1].y-r]),this.addShape(t,{type:"path",id:this.getElementId("region"),name:"annotation-region",attrs:Object(d.__assign)({path:o},e)}),this.addShape(t,{type:"text",id:this.getElementId("text"),name:"annotation-text",attrs:Object(d.__assign)({x:(a.minX+a.maxX)/2,y:a.minY-r,text:Object(g.get)(this.get("text"),"content","")},n)})}},e}(B),q=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"regionFilter",locationType:"region",start:null,end:null,color:null,shape:[]})},e.prototype.renderInner=function(t){var e=this,n=this.get("start"),r=this.get("end"),i=this.addGroup(t,{id:this.getElementId("region-filter"),capture:!1});Object(g.each)(this.get("shapes"),(function(t,n){var r=t.get("type"),a=Object(g.clone)(t.attr());e.adjustShapeAttrs(a),e.addShape(i,{id:e.getElementId("shape-"+r+"-"+n),capture:!1,type:r,attrs:a})}));var a=O({start:n,end:r});i.setClip({type:"rect",attrs:{x:a.minX,y:a.minY,width:a.width,height:a.height}})},e.prototype.adjustShapeAttrs=function(t){var e=this.get("color");t.fill&&(t.fill=t.fillStyle=e),t.stroke=t.strokeStyle=e},e}(B);function z(t,e,n){var r=e+"Style",i=null;return Object(g.each)(n,(function(e,n){t[n]&&e[r]&&(i||(i={}),Object(g.mix)(i,e[r]))})),i}var H=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"axis",ticks:[],line:{},tickLine:{},subTickLine:null,title:null,label:{},verticalFactor:1,verticalLimitLength:null,overlapOrder:["autoRotate","autoEllipsis","autoHide"],tickStates:{},defaultCfg:{line:{style:{lineWidth:1,stroke:D.lineColor}},tickLine:{style:{lineWidth:1,stroke:D.lineColor},alignTick:!0,length:5,displayWithLabel:!0},subTickLine:{style:{lineWidth:1,stroke:D.lineColor},count:4,length:2},label:{autoRotate:!0,autoHide:!1,autoEllipsis:!1,style:{fontSize:12,fill:D.textColor,textBaseline:"middle",fontFamily:D.fontFamily,fontWeight:"normal"},offset:10},title:{autoRotate:!0,spacing:5,position:"center",style:{fontSize:12,fill:D.textColor,textBaseline:"middle",fontFamily:D.fontFamily,textAlign:"center"},offset:48},tickStates:{active:{labelStyle:{fontWeight:500},tickLineStyle:{lineWidth:2}},inactive:{labelStyle:{fill:D.uncheckedColor}}}}})},e.prototype.renderInner=function(t){this.get("line")&&this.drawLine(t),this.drawTicks(t),this.get("title")&&this.drawTitle(t)},e.prototype.isList=function(){return!0},e.prototype.getItems=function(){return this.get("ticks")},e.prototype.setItems=function(t){this.update({ticks:t})},e.prototype.updateItem=function(t,e){Object(g.mix)(t,e),this.clear(),this.render()},e.prototype.clearItems=function(){var t=this.getElementByLocalId("label-group");t&&t.clear()},e.prototype.setItemState=function(t,e,n){t[e]=n,this.updateTickStates(t)},e.prototype.hasState=function(t,e){return!!t[e]},e.prototype.getItemStates=function(t){var e=this.get("tickStates"),n=[];return Object(g.each)(e,(function(e,r){t[r]&&n.push(r)})),n},e.prototype.clearItemsState=function(t){var e=this,n=this.getItemsByState(t);Object(g.each)(n,(function(n){e.setItemState(n,t,!1)}))},e.prototype.getItemsByState=function(t){var e=this,n=this.getItems();return Object(g.filter)(n,(function(n){return e.hasState(n,t)}))},e.prototype.getSidePoint=function(t,e){var n=this.getSideVector(e,t);return{x:t.x+n[0],y:t.y+n[1]}},e.prototype.getTextAnchor=function(t){var e;return Object(g.isNumberEqual)(t[0],0)?e="center":t[0]>0?e="start":t[0]<0&&(e="end"),e},e.prototype.processOverlap=function(t){},e.prototype.drawLine=function(t){var e=this.getLinePath(),n=this.get("line");this.addShape(t,{type:"path",id:this.getElementId("line"),name:"axis-line",attrs:Object(g.mix)({path:e},n.style)})},e.prototype.getTickLineItems=function(t){var e=this,n=[],r=this.get("tickLine"),i=r.alignTick,a=r.length,o=1;return t.length>=2&&(o=t[1].value-t[0].value),Object(g.each)(t,(function(t){var r=t.point;i||(r=e.getTickPoint(t.value-o/2));var s=e.getSidePoint(r,a);n.push({startPoint:r,tickValue:t.value,endPoint:s,tickId:t.id,id:"tickline-"+t.id})})),n},e.prototype.getSubTickLineItems=function(t){var e=[],n=this.get("subTickLine"),r=n.count,i=t.length;if(i>=2)for(var a=0;a0&&t.charCodeAt(e)<128?1:2}function U(t,e,n,r){var i=e.attr("text"),a=function(t,e){var n=e.getCanvasBBox();return t?n.width:n.height}(t,e),o=function(t){for(var e=0,n=0;n=0?function(t,e,n){var r=t.length,i="";if("tail"===n){for(var a=0,o=0;a1){c=Math.ceil(c);for(var h=0;hn:o=a>Math.abs(i[1].attr("x")-i[0].attr("x"));o&&function(t,e){Object(g.each)(t,(function(t){var n=b({x:t.attr("x"),y:t.attr("y")},e);t.attr("matrix",n)}))}(i,r(n,a));return o}function lt(){return ht}function ht(t,e,n){return ct(t,e,n,(function(){return t?D.verticalAxisRotate:D.horizontalAxisRotate}))}function ft(t,e,n){return ct(t,e,n,(function(e,n){if(!e)return t?D.verticalAxisRotate:D.horizontalAxisRotate;if(t)return-Math.acos(e/n);var r=0;return(e>n||(r=Math.asin(e/n))>Math.PI/4)&&(r=Math.PI/4),r}))}var pt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{type:"line",locationType:"region",start:null,end:null})},e.prototype.getLinePath=function(){var t=this.get("start"),e=this.get("end"),n=[];return n.push(["M",t.x,t.y]),n.push(["L",e.x,e.y]),n},e.prototype.getInnerLayoutBBox=function(){var e=this.get("start"),n=this.get("end"),r=t.prototype.getInnerLayoutBBox.call(this),i=Math.min(e.x,n.x,r.x),a=Math.min(e.y,n.y,r.y),o=Math.max(e.x,n.x,r.maxX),s=Math.max(e.y,n.y,r.maxY);return{x:i,y:a,minX:i,minY:a,maxX:o,maxY:s,width:o-i,height:s-a}},e.prototype.isVertical=function(){var t=this.get("start"),e=this.get("end");return Object(g.isNumberEqual)(t.x,e.x)},e.prototype.isHorizontal=function(){var t=this.get("start"),e=this.get("end");return Object(g.isNumberEqual)(t.y,e.y)},e.prototype.getTickPoint=function(t){var e=this.get("start"),n=this.get("end"),r=n.x-e.x,i=n.y-e.y;return{x:e.x+r*t,y:e.y+i*t}},e.prototype.getSideVector=function(t){var e=this.getAxisVector(),n=m.vec2.normalize([],e),r=this.get("verticalFactor"),i=[n[1],-1*n[0]];return m.vec2.scale([],i,t*r)},e.prototype.getAxisVector=function(){var t=this.get("start"),e=this.get("end");return[e.x-t.x,e.y-t.y]},e.prototype.processOverlap=function(t){var e=this,n=this.isVertical(),r=this.isHorizontal();if(n||r){var i=this.get("label"),a=this.get("title"),o=this.get("verticalLimitLength"),s=i.offset,u=o,c=0,l=0;a&&(c=a.style.fontSize,l=a.spacing),u&&(u=u-s-l-c);var h=this.get("overlapOrder");if(Object(g.each)(h,(function(n){i[n]&&e.autoProcessOverlap(n,i[n],t,u)})),a){var f=t.getBBox(),p=n?f.width:f.height;a.offset=s+p+l+c/2}}},e.prototype.autoProcessOverlap=function(t,e,n,r){var i=this,a=this.isVertical(),o=!1,u=s[t];if(!0===e?o=u.getDefault()(a,n,r):Object(g.isFunction)(e)?o=e(a,n,r):u[e]&&(o=u[e](a,n,r)),"autoRotate"===t){if(o){var c=n.getChildren(),l=this.get("verticalFactor");Object(g.each)(c,(function(t){if("center"===t.attr("textAlign")){var e=l>0?"end":"start";t.attr("textAlign",e)}}))}}else if("autoHide"===t){var h=n.getChildren().slice(0);Object(g.each)(h,(function(t){t.get("visible")||(i.get("isRegister")&&i.unregisterElement(t),t.remove())}))}},e}(H),dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{type:"circle",locationType:"circle",center:null,radius:null,startAngle:-Math.PI/2,endAngle:3*Math.PI/2})},e.prototype.getLinePath=function(){var t=this.get("center"),e=t.x,n=t.y,r=this.get("radius"),i=r,a=this.get("startAngle"),o=this.get("endAngle"),s=[];if(Math.abs(o-a)===2*Math.PI)s=[["M",e,n-i],["A",r,i,0,1,1,e,n+i],["A",r,i,0,1,1,e,n-i],["Z"]];else{var u=this.getCirclePoint(a),c=this.getCirclePoint(o),l=Math.abs(o-a)>Math.PI?1:0,h=a>o?0:1;s=[["M",e,n],["L",u.x,u.y],["A",r,i,0,l,h,c.x,c.y],["L",e,n]]}return s},e.prototype.getTickPoint=function(t){var e=this.get("startAngle"),n=e+(this.get("endAngle")-e)*t;return this.getCirclePoint(n)},e.prototype.getSideVector=function(t,e){var n=this.get("center"),r=[e.x-n.x,e.y-n.y],i=this.get("verticalFactor"),a=m.vec2.length(r);return m.vec2.scale(r,r,i*t/a),r},e.prototype.getAxisVector=function(t){var e=this.get("center"),n=[t.x-e.x,t.y-e.y];return[n[1],-1*n[0]]},e.prototype.getCirclePoint=function(t,e){var n=this.get("center");return e=e||this.get("radius"),{x:n.x+Math.cos(t)*e,y:n.y+Math.sin(t)*e}},e}(H),gt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"crosshair",type:"base",line:{},text:null,textBackground:{},capture:!1,defaultCfg:{line:{style:{lineWidth:1,stroke:D.lineColor}},text:{position:"start",offset:10,autoRotate:!1,content:null,style:{fill:D.textColor,textAlign:"center",textBaseline:"middle",fontFamily:D.fontFamily}},textBackground:{padding:5,style:{stroke:D.lineColor}}}})},e.prototype.renderInner=function(t){this.get("line")&&this.renderLine(t),this.get("text")&&(this.renderText(t),this.renderBackground(t))},e.prototype.renderText=function(t){var e=this.get("text"),n=e.style,r=e.autoRotate,i=e.content;if(!Object(g.isNil)(i)){var a=this.getTextPoint(),o=null;if(r)o=b(a,this.getRotateAngle());this.addShape(t,{type:"text",name:"crosshair-text",id:this.getElementId("text"),attrs:Object(d.__assign)(Object(d.__assign)(Object(d.__assign)({},a),{text:i,matrix:o}),n)})}},e.prototype.renderLine=function(t){var e=this.getLinePath(),n=this.get("line").style;this.addShape(t,{type:"path",name:"crosshair-line",id:this.getElementId("line"),attrs:Object(d.__assign)({path:e},n)})},e.prototype.renderBackground=function(t){var e=this.getElementId("text"),n=t.findById(e),r=this.get("textBackground");if(r&&n){var i=n.getBBox(),a=w(r.padding),o=r.style;this.addShape(t,{type:"rect",name:"crosshair-text-background",id:this.getElementId("text-background"),attrs:Object(d.__assign)({x:i.x-a[3],y:i.y-a[0],width:i.width+a[1]+a[3],height:i.height+a[0]+a[2],matrix:n.attr("matrix")},o)}).toBack()}},e}(B),vt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{type:"line",locationType:"region",start:null,end:null})},e.prototype.getRotateAngle=function(){var t=this.getLocation(),e=t.start,n=t.end,r=this.get("text").position,i=Math.atan2(n.y-e.y,n.x-e.x);return"start"===r?i-Math.PI/2:i+Math.PI/2},e.prototype.getTextPoint=function(){var t,e,n,r,i=this.getLocation(),a=i.start,o=i.end,s=this.get("text"),u=s.position,c=s.offset/(t=a,n=(e=o).x-t.x,r=e.y-t.y,Math.sqrt(n*n+r*r)),l=0;return"start"===u?l=0-c:"end"===u&&(l=1+c),{x:P(a.x,o.x,l),y:P(a.y,o.y,l)}},e.prototype.getLinePath=function(){var t=this.getLocation(),e=t.start,n=t.end;return[["M",e.x,e.y],["L",n.x,n.y]]},e}(gt),yt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{type:"circle",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:3*Math.PI/2})},e.prototype.getRotateAngle=function(){var t=this.getLocation(),e=t.startAngle,n=t.endAngle;return"start"===this.get("text").position?e+Math.PI/2:n-Math.PI/2},e.prototype.getTextPoint=function(){var t=this.get("text"),e=t.position,n=t.offset,r=this.getLocation(),i=r.center,a=r.radius,o=r.startAngle,s=r.endAngle,u="start"===e?o:s,c=this.getRotateAngle()-Math.PI,l=S(i,a,u),h=Math.cos(c)*n,f=Math.sin(c)*n;return{x:l.x+h,y:l.y+f}},e.prototype.getLinePath=function(){var t=this.getLocation(),e=t.center,n=t.radius,r=t.startAngle,i=t.endAngle,a=null;if(i-r==2*Math.PI){var o=e.x,s=e.y;a=[["M",o,s-n],["A",n,n,0,1,1,o,s+n],["A",n,n,0,1,1,o,s-n],["Z"]]}else{var u=S(e,n,r),c=S(e,n,i),l=Math.abs(i-r)>Math.PI?1:0,h=r>i?0:1;a=[["M",u.x,u.y],["A",n,n,0,l,h,c.x,c.y]]}return a},e}(gt),mt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"grid",line:{},alternateColor:null,capture:!1,items:[],closed:!1,defaultCfg:{line:{type:"line",style:{lineWidth:1,stroke:D.lineColor}}}})},e.prototype.getLineType=function(){return(this.get("line")||this.get("defaultCfg").line).type},e.prototype.renderInner=function(t){this.drawGrid(t)},e.prototype.getAlternatePath=function(t,e){var n=this.getGridPath(t),r=e.slice(0).reverse(),i=this.getGridPath(r,!0);return this.get("closed")?n=n.concat(i):(i[0][0]="L",(n=n.concat(i)).push(["Z"])),n},e.prototype.getPathStyle=function(){return this.get("line").style},e.prototype.drawGrid=function(t){var e=this,n=this.get("line"),r=this.get("items"),i=this.get("alternateColor"),a=null;Object(g.each)(r,(function(r,o){var s=r.id||o;if(n){var u=e.getPathStyle(),c=e.getElementId("line-"+s),l=e.getGridPath(r.points);e.addShape(t,{type:"path",name:"grid-line",id:c,attrs:Object(g.mix)({path:l},u)})}if(i&&o>0){var h=e.getElementId("region-"+s),f=o%2==0;if(Object(g.isString)(i))f&&e.drawAlternateRegion(h,t,a.points,r.points,i);else{var p=f?i[1]:i[0];e.drawAlternateRegion(h,t,a.points,r.points,p)}}a=r}))},e.prototype.drawAlternateRegion=function(t,e,n,r,i){var a=this.getAlternatePath(n,r);this.addShape(e,{type:"path",id:t,name:"grid-region",attrs:{path:a,fill:i}})},e}(B);var xt,bt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{type:"circle",center:null,closed:!0})},e.prototype.getGridPath=function(t,e){var n,r,i,a,o,s,u=this.getLineType(),c=this.get("closed"),l=[];if(t.length)if("circle"===u){var h=this.get("center"),f=t[0],p=(n=h.x,r=h.y,i=f.x,a=f.y,o=i-n,s=a-r,Math.sqrt(o*o+s*s)),d=e?0:1;c?(l.push(["M",h.x,h.y-p]),l.push(["A",p,p,0,0,d,h.x,h.y+p]),l.push(["A",p,p,0,0,d,h.x,h.y-p]),l.push(["Z"])):Object(g.each)(t,(function(t,e){0===e?l.push(["M",t.x,t.y]):l.push(["A",p,p,0,0,d,t.x,t.y])}))}else Object(g.each)(t,(function(t,e){0===e?l.push(["M",t.x,t.y]):l.push(["L",t.x,t.y])})),c&&l.push(["Z"]);return l},e}(mt),Mt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{type:"line"})},e.prototype.getGridPath=function(t){var e=[];return Object(g.each)(t,(function(t,n){0===n?e.push(["M",t.x,t.y]):e.push(["L",t.x,t.y])})),e},e}(mt),_t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"legend",layout:"horizontal",locationType:"point",x:0,y:0,offsetX:0,offsetY:0,title:null,background:null})},e.prototype.getLayoutBBox=function(){var e=t.prototype.getLayoutBBox.call(this),n=this.get("x"),r=this.get("y"),i=this.get("offsetX"),a=this.get("offsetY"),o=this.get("maxWidth"),s=this.get("maxHeight"),u=n+i,c=r+a,l=e.maxX-u,h=e.maxY-c;return o&&(l=Math.min(l,o)),s&&(h=Math.min(h,s)),A(u,c,l,h)},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},e.prototype.resetLocation=function(){var t=this.get("x"),e=this.get("y"),n=this.get("offsetX"),r=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t+n,y:e+r})},e.prototype.applyOffset=function(){this.resetLocation()},e.prototype.getDrawPoint=function(){return this.get("currentPoint")},e.prototype.setDrawPoint=function(t){return this.set("currentPoint",t)},e.prototype.renderInner=function(t){this.resetDraw(),this.get("title")&&this.drawTitle(t),this.drawLegendContent(t),this.get("background")&&this.drawBackground(t)},e.prototype.drawBackground=function(t){var e=this.get("background"),n=t.getBBox(),r=w(e.padding),i=Object(d.__assign)({x:0,y:0,width:n.width+r[1]+r[3],height:n.height+r[0]+r[2]},e.style);this.addShape(t,{type:"rect",id:this.getElementId("background"),name:"legend-background",attrs:i}).toBack()},e.prototype.drawTitle=function(t){var e=this.get("currentPoint"),n=this.get("title"),r=n.spacing,i=n.style,a=n.text,o=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"legend-title",attrs:Object(d.__assign)({text:a,x:e.x,y:e.y},i)}).getBBox();this.set("currentPoint",{x:e.x,y:o.maxY+r})},e.prototype.resetDraw=function(){var t=this.get("background"),e={x:0,y:0};if(t){var n=w(t.padding);e.x=n[3],e.y=n[0]}this.set("currentPoint",e)},e}(B),wt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.currentPageIndex=1,e.totalPagesCnt=1,e.pageWidth=0,e.pageHeight=0,e.startX=0,e.startY=0,e.onNavigationBack=function(){var t=e.getElementByLocalId("item-group");if(e.currentPageIndex>1){e.currentPageIndex-=1,e.updateNavigation();var n=e.getCurrentNavigationMatrix();e.get("animate")?t.animate({matrix:n},100):t.attr({matrix:n})}},e.onNavigationAfter=function(){var t=e.getElementByLocalId("item-group");if(e.currentPageIndexp&&(p=y),"horizontal"===l?(d&&dm&&(m=e.width)})),x=m,m+=l,s&&(m=Math.min(s,m),x=Math.min(s,x)),this.pageWidth=m,this.pageHeight=u-Math.max(p.height,h);var b=Math.floor(this.pageHeight/h);Object(g.each)(o,(function(t,e){0!==e&&e%b==0&&(v+=1,d.x+=m,d.y=i),n.moveElementTo(t,d),d.y+=h})),this.totalPagesCnt=v,this.moveElementTo(f,{x:r+x/2-p.width/2-p.minX,y:u-p.height-p.minY})}this.pageHeight&&this.pageWidth&&e.getParent().setClip({type:"rect",attrs:{x:this.startX,y:this.startY,width:this.pageWidth,height:this.pageHeight}}),this.totalPagesCnt=v,this.currentPageIndex>this.totalPagesCnt&&(this.currentPageIndex=1),this.updateNavigation(f),e.attr("matrix",this.getCurrentNavigationMatrix())},e.prototype.drawNavigation=function(t,e,n,r){var i={x:0,y:0},a=this.addGroup(t,{id:this.getElementId("navigation-group"),name:"legend-navigation"}),o=this.drawArrow(a,i,"navigation-arrow-left","horizontal"===e?"up":"left",r);o.on("click",this.onNavigationBack);var s=o.getBBox();i.x+=s.width+2;var u=this.addShape(a,{type:"text",id:this.getElementId("navigation-text"),name:"navigation-text",attrs:{x:i.x,y:i.y+r/2,text:n,fontSize:12,fill:"#ccc",textBaseline:"middle"}}).getBBox();return i.x+=u.width+2,this.drawArrow(a,i,"navigation-arrow-right","horizontal"===e?"down":"right",r).on("click",this.onNavigationAfter),a},e.prototype.updateNavigation=function(t){var e=this.currentPageIndex+"/"+this.totalPagesCnt,n=t?t.getChildren()[1]:this.getElementByLocalId("navigation-text"),r=t?t.findById(this.getElementId("navigation-arrow-left")):this.getElementByLocalId("navigation-arrow-left"),i=t?t.findById(this.getElementId("navigation-arrow-right")):this.getElementByLocalId("navigation-arrow-right"),a=n.getBBox();n.attr("text",e);var o=n.getBBox();n.attr("x",n.attr("x")-(o.width-a.width)/2),r.attr("opacity",1===this.currentPageIndex?.45:1),r.attr("cursor",1===this.currentPageIndex?"not-allowed":"pointer"),i.attr("opacity",this.currentPageIndex===this.totalPagesCnt?.45:1),i.attr("cursor",this.currentPageIndex===this.totalPagesCnt?"not-allowed":"pointer")},e.prototype.drawArrow=function(t,e,n,r,i){var a=e.x,o=e.y,s={right:90*Math.PI/180,left:270*Math.PI/180,up:0,down:180*Math.PI/180},u=this.addShape(t,{type:"path",id:this.getElementId(n),name:n,attrs:{path:[["M",a+i/2,o],["L",a,o+i],["L",a+i,o+i],["Z"]],fill:"#000",cursor:"pointer"}});return u.attr("matrix",b({x:a+i/2,y:o+i/2},s[r])),u},e.prototype.getCurrentNavigationMatrix=function(){var t=this.currentPageIndex,e=this.pageWidth,n=this.pageHeight;return M("horizontal"===this.get("layout")?{x:0,y:n*(1-t)}:{x:e*(1-t),y:0})},e.prototype.applyItemStates=function(t,e){if(this.getItemStates(t).length>0){var n=e.getChildren(),r=this.get("itemStates");Object(g.each)(n,(function(e){var n=e.get("name").split("-")[2],i=z(t,n,r);i&&(e.attr(i),"marker"!==n||e.get("isStroke")&&e.get("isFill")||(e.get("isStroke")&&e.attr("fill",null),e.get("isFill")&&e.attr("stroke",null)))}))}},e}(_t),Ct=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{type:"continue",min:0,max:100,value:null,colors:[],track:{},rail:{},label:{},handler:{},slidable:!0,tip:null,step:null,maxWidth:null,maxHeight:null,defaultCfg:{label:{align:"rail",spacing:5,formatter:null,style:{fontSize:12,fill:D.textColor,textBaseline:"middle",fontFamily:D.fontFamily}},handler:{size:10,style:{fill:"#fff",stroke:"#333"}},track:{},rail:{type:"color",size:20,defaultLength:100,style:{fill:"#DCDEE2"}},title:{spacing:5,style:{fill:D.textColor,fontSize:12,textAlign:"start",textBaseline:"top"}}}})},e.prototype.isSlider=function(){return!0},e.prototype.getValue=function(){return this.getCurrentValue()},e.prototype.getRange=function(){return{min:this.get("min"),max:this.get("max")}},e.prototype.setRange=function(t,e){this.update({min:t,max:e})},e.prototype.setValue=function(t){var e=this.getValue();this.set("value",t);var n=this.get("group");this.resetTrackClip(),this.get("slidable")&&this.resetHandlers(n),this.delegateEmit("valuechanged",{originValue:e,value:t})},e.prototype.initEvent=function(){var t=this.get("group");this.bindSliderEvent(t),this.bindRailEvent(t),this.bindTrackEvent(t)},e.prototype.drawLegendContent=function(t){this.drawRail(t),this.drawLabels(t),this.fixedElements(t),this.resetTrack(t),this.resetTrackClip(t),this.get("slidable")&&this.resetHandlers(t)},e.prototype.bindSliderEvent=function(t){this.bindHandlersEvent(t)},e.prototype.bindHandlersEvent=function(t){var e=this;t.on("legend-handler-min:drag",(function(t){var n=e.getValueByCanvasPoint(t.x,t.y),r=e.getCurrentValue()[1];rn&&(r=n),e.setValue([r,n])}))},e.prototype.bindRailEvent=function(t){},e.prototype.bindTrackEvent=function(t){var e=this,n=null;t.on("legend-track:dragstart",(function(t){n={x:t.x,y:t.y}})),t.on("legend-track:drag",(function(t){if(n){var r=e.getValueByCanvasPoint(n.x,n.y),i=e.getValueByCanvasPoint(t.x,t.y),a=e.getCurrentValue(),o=a[1]-a[0],s=e.getRange(),u=i-r;u<0?a[0]+u>s.min?e.setValue([a[0]+u,a[1]+u]):e.setValue([s.min,s.min+o]):u>0&&(u>0&&a[1]+ui&&(u=i),u0&&this.changeRailLength(r,i,n[i]-c)}},e.prototype.changeRailLength=function(t,e,n){var r,i=t.getBBox();r="height"===e?this.getRailPath(i.x,i.y,i.width,n):this.getRailPath(i.x,i.y,n,i.height),t.attr("path",r)},e.prototype.changeRailPosition=function(t,e,n){var r=t.getBBox(),i=this.getRailPath(e,n,r.width,r.height);t.attr("path",i)},e.prototype.fixedHorizontal=function(t,e,n,r){var i=this.get("label"),a=i.align,o=i.spacing,s=n.getBBox(),u=t.getBBox(),c=e.getBBox(),l=s.height;this.fitRailLength(u,c,s,n),s=n.getBBox(),"rail"===a?(t.attr({x:r.x,y:r.y+l/2}),this.changeRailPosition(n,r.x+u.width+o,r.y),e.attr({x:r.x+u.width+s.width+2*o,y:r.y+l/2})):"top"===a?(t.attr({x:r.x,y:r.y}),e.attr({x:r.x+s.width,y:r.y}),this.changeRailPosition(n,r.x,r.y+u.height+o)):(this.changeRailPosition(n,r.x,r.y),t.attr({x:r.x,y:r.y+s.height+o}),e.attr({x:r.x+s.width,y:r.y+s.height+o}))},e.prototype.fixedVertail=function(t,e,n,r){var i=this.get("label"),a=i.align,o=i.spacing,s=n.getBBox(),u=t.getBBox(),c=e.getBBox();if(this.fitRailLength(u,c,s,n),s=n.getBBox(),"rail"===a)t.attr({x:r.x,y:r.y}),this.changeRailPosition(n,r.x,r.y+u.height+o),e.attr({x:r.x,y:r.y+u.height+s.height+2*o});else if("right"===a)t.attr({x:r.x+s.width+o,y:r.y}),this.changeRailPosition(n,r.x,r.y),e.attr({x:r.x+s.width+o,y:r.y+s.height});else{var l=Math.max(u.width,c.width);t.attr({x:r.x,y:r.y}),this.changeRailPosition(n,r.x+l+o,r.y),e.attr({x:r.x,y:r.y+s.height})}},e}(_t),Ot=n(6),At=n(29),Pt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{container:null,containerTpl:"
    ",updateAutoRender:!0,parent:null})},e.prototype.getContainer=function(){return this.get("container")},e.prototype.show=function(){this.get("container").style.display="",this.set("visible",!0)},e.prototype.hide=function(){this.get("container").style.display="none",this.set("visible",!1)},e.prototype.setCapture=function(t){var e=t?"auto":"none";this.getContainer().style.pointerEvents=e,this.set("capture",t)},e.prototype.getBBox=function(){var t=this.getContainer();return A(parseFloat(t.style.left)||0,parseFloat(t.style.top)||0,t.clientWidth,t.clientHeight)},e.prototype.clear=function(){C(this.get("container"))},e.prototype.destroy=function(){this.removeEvent(),this.removeDom(),t.prototype.destroy.call(this)},e.prototype.init=function(){t.prototype.init.call(this),this.initContainer(),this.initEvent(),this.initCapture(),this.initVisible()},e.prototype.initCapture=function(){this.setCapture(this.get("capture"))},e.prototype.initVisible=function(){this.get("visible")?this.show():this.hide()},e.prototype.initContainer=function(){var t=this.get("container");if(Object(g.isNil)(t)){t=this.createDom();var e=this.get("parent");Object(g.isString)(e)&&(e=document.getElementById(e),this.set("parent",e)),e.appendChild(t),this.set("container",t)}else Object(g.isString)(t)&&(t=document.getElementById(t),this.set("container",t));this.get("parent")||this.set("parent",t.parentNode)},e.prototype.createDom=function(){var t=this.get("containerTpl");return Object(Ot.createDom)(t)},e.prototype.initEvent=function(){},e.prototype.removeDom=function(){var t=this.get("container");t&&t.parentNode.removeChild(t)},e.prototype.removeEvent=function(){},e}(k),St="g2-tooltip",Et="g2-tooltip-title",It="g2-tooltip-list",Tt="g2-tooltip-list-item",kt="g2-tooltip-marker",jt="g2-tooltip-value",Lt="g2-tooltip-name",Bt="g2-tooltip-crosshair-x",Dt="g2-tooltip-crosshair-y",Ft=((xt={})[""+St]={position:"absolute",visibility:"visible",zIndex:8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxShadow:"0px 0px 10px #aeaeae",borderRadius:"3px",color:"rgb(87, 87, 87)",fontSize:"12px",fontFamily:D.fontFamily,lineHeight:"20px",padding:"10px 10px 6px 10px"},xt[""+Et]={marginBottom:"4px"},xt[""+It]={margin:0,listStyleType:"none",padding:0},xt[""+Tt]={listStyleType:"none",marginBottom:"4px"},xt[""+kt]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},xt[""+jt]={display:"inline-block",float:"right",marginLeft:"30px"},xt[""+Bt]={position:"absolute",width:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},xt[""+Dt]={position:"absolute",height:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},xt);function Rt(t){return t+"px"}var Nt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"tooltip",type:"html",x:0,y:0,items:[],containerTpl:'
      ',itemTpl:'
    • \n \n {name}:\n {value}\n
    • ',xCrosshairTpl:'
      ',yCrosshairTpl:'
      ',title:null,showTitle:!0,region:null,crosshairsRegion:null,crosshairs:null,offset:10,position:"right",domStyles:null,defaultStyles:Ft})},e.prototype.render=function(){this.resetTitle(),this.renderItems(),this.resetPosition()},e.prototype.clear=function(){this.clearCrosshairs(),this.setTitle(""),this.clearItemDoms()},e.prototype.update=function(e){var n,r,i;t.prototype.update.call(this,e),n=e,r=["title","showTitle"],i=!1,Object(g.each)(r,(function(t){if(Object(g.hasKey)(n,t))return i=!0,!1})),i&&this.resetTitle(),Object(g.hasKey)(e,"items")&&this.renderItems(),Object(g.hasKey)(e,"domStyles")&&(this.resetStyles(),this.applyStyles()),this.resetPosition()},e.prototype.show=function(){var t=this.getContainer();t&&!this.destroyed&&(this.set("visible",!0),Object(Ot.modifyCSS)(t,{visibility:"visible"}),this.setCrossHairsVisible(!0))},e.prototype.hide=function(){var t=this.getContainer();t&&!this.destroyed&&(this.set("visible",!1),Object(Ot.modifyCSS)(t,{visibility:"hidden"}),this.setCrossHairsVisible(!1))},e.prototype.getLocation=function(){return{x:this.get("x"),y:this.get("y")}},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetPosition()},e.prototype.setCrossHairsVisible=function(t){var e=t?"":"none",n=this.get("xCrosshairDom"),r=this.get("yCrosshairDom");n&&Object(Ot.modifyCSS)(n,{display:e}),r&&Object(Ot.modifyCSS)(r,{display:e})},e.prototype.initContainer=function(){t.prototype.initContainer.call(this),this.cacheDoms(),this.resetStyles(),this.applyStyles()},e.prototype.removeDom=function(){t.prototype.removeDom.call(this),this.clearCrosshairs()},e.prototype.cacheDoms=function(){var t=this.getContainer(),e=t.getElementsByClassName(Et)[0],n=t.getElementsByClassName(It)[0];this.set("titleDom",e),this.set("listDom",n)},e.prototype.resetPosition=function(){var t,e=this.get("x"),n=this.get("y"),r=this.get("offset"),i=this.getOffset(),a=i.offsetX,o=i.offsetY,s=this.get("position"),u=this.get("region"),c=this.getContainer(),l=this.getBBox(),h=l.width,f=l.height;u&&(t=O(u));var p=function(t,e,n,r,i,a,o){var s=function(t,e,n,r,i,a){var o=t,s=e;switch(a){case"left":o=t-r-n,s=e-i/2;break;case"right":o=t+n,s=e-i/2;break;case"top":o=t-r/2,s=e-i-n;break;case"bottom":o=t-r/2,s=e+n;break;default:o=t+n,s=e-i-n}return{x:o,y:s}}(t,e,n,r,i,a);if(o){var u=function(t,e,n,r,i){return{left:ti.x+i.width,top:ei.y+i.height}}(s.x,s.y,r,i,o);"auto"===a?(u.right&&(s.x=t-r-n),u.top&&(s.y=e+n)):"top"===a||"bottom"===a?(u.left&&(s.x=o.x),u.right&&(s.x=o.x+o.width-r),"top"===a&&u.top&&(s.y=e+n),"bottom"===a&&u.bottom&&(s.y=e-i-n)):(u.top&&(s.y=o.y),u.bottom&&(s.y=o.y+o.height-i),"left"===a&&u.left&&(s.x=t+n),"right"===a&&u.right&&(s.x=t-r-n))}return s}(e,n,r,h,f,s,t);Object(Ot.modifyCSS)(c,{left:Rt(p.x+a),top:Rt(p.y+o)}),this.resetCrosshairs()},e.prototype.resetTitle=function(){var t=this.get("title");this.get("showTitle")&&t?this.setTitle(t):this.setTitle("")},e.prototype.setTitle=function(t){var e=this.get("titleDom");e&&(e.innerText=t)},e.prototype.resetCrosshairs=function(){var t=this.get("crosshairsRegion"),e=this.get("crosshairs");if(t&&e){var n=O(t),r=this.get("xCrosshairDom"),i=this.get("yCrosshairDom");"x"===e?(this.resetCrosshair("x",n),i&&(i.remove(),this.set("yCrosshairDom",null))):"y"===e?(this.resetCrosshair("y",n),r&&(r.remove(),this.set("xCrosshairDom",null))):(this.resetCrosshair("x",n),this.resetCrosshair("y",n)),this.setCrossHairsVisible(this.get("visible"))}else this.clearCrosshairs()},e.prototype.resetCrosshair=function(t,e){var n=this.checkCrosshair(t),r=this.get(t);"x"===t?Object(Ot.modifyCSS)(n,{left:Rt(r),top:Rt(e.y),height:Rt(e.height)}):Object(Ot.modifyCSS)(n,{top:Rt(r),left:Rt(e.x),width:Rt(e.width)})},e.prototype.checkCrosshair=function(t){var e=t+"CrosshairDom",n=t+"CrosshairTpl",r="CROSSHAIR_"+t.toUpperCase(),i=f[r],a=this.get(e),o=this.get("parent");return a||(a=Object(Ot.createDom)(this.get(n)),this.applyStyle(i,a),o.appendChild(a),this.set(e,a)),a},e.prototype.resetStyles=function(){var t=this.get("domStyles"),e=this.get("defaultStyles");t=t?Object(g.deepMix)({},e,t):e,this.set("domStyles",t)},e.prototype.applyStyles=function(){var t,e=this.get("domStyles"),n=this.getContainer();if(this.applyChildrenStyles(n,e),t=St,n.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))){var r=e[St];Object(Ot.modifyCSS)(n,r)}},e.prototype.applyChildrenStyles=function(t,e){Object(g.each)(e,(function(e,n){var r=t.getElementsByClassName(n);Object(g.each)(r,(function(t){Object(Ot.modifyCSS)(t,e)}))}))},e.prototype.applyStyle=function(t,e){var n=this.get("domStyles");Object(Ot.modifyCSS)(e,n[t])},e.prototype.renderItems=function(){this.clearItemDoms();var t=this.get("items"),e=this.get("itemTpl"),n=this.get("listDom");Object(g.each)(t,(function(t){var r=At.default.toCSSGradient(t.color),i=Object(d.__assign)(Object(d.__assign)({},t),{color:r}),a=Object(g.substitute)(e,i),o=Object(Ot.createDom)(a);n.appendChild(o)})),this.applyChildrenStyles(n,this.get("domStyles"))},e.prototype.clearItemDoms=function(){C(this.get("listDom"))},e.prototype.clearCrosshairs=function(){var t=this.get("xCrosshairDom"),e=this.get("yCrosshairDom");t&&t.remove(),e&&e.remove(),this.set("xCrosshairDom",null),this.set("yCrosshairDom",null)},e}(Pt),Yt={opacity:0},Gt={stroke:"#C5C5C5",strokeOpacity:.85},Xt={fill:"#CACED4",opacity:.85},Vt=n(64),qt=n(19);function zt(t){return function(t){return Object(g.map)(t,(function(t,e){return[0===e?"M":"L",t[0],t[1]]}))}(t)}function Ht(t,e,n,r){void 0===r&&(r=!0);var i=new qt.Linear({values:t}),a=new qt.Category({values:Object(g.map)(t,(function(t,e){return e}))}),o=Object(g.map)(t,(function(t,r){return[a.scale(r)*e,n-i.scale(t)*n]}));return r?function(t){if(t.length<=2)return zt(t);var e=[];Object(g.each)(t,(function(t){Object(g.isEqual)(t,e.slice(e.length-2))||e.push(t[0],t[1])}));var n=Object(Vt.catmullRom2Bezier)(e,!1),r=Object(g.head)(t),i=r[0],a=r[1];return n.unshift(["M",i,a]),n}(o):zt(o)}var Wt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"trend",x:0,y:0,width:200,height:16,smooth:!0,isArea:!1,data:[],backgroundStyle:Yt,lineStyle:Gt,areaStyle:Xt})},e.prototype.renderInner=function(t){var e=this.cfg,n=e.width,r=e.height,i=e.data,a=e.smooth,o=e.isArea,s=e.backgroundStyle,u=e.lineStyle,c=e.areaStyle;this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:Object(d.__assign)({x:0,y:0,width:n,height:r},s)});var l=Ht(i,n,r,a);if(this.addShape(t,{id:this.getElementId("line"),type:"path",attrs:Object(d.__assign)({path:l},u)}),o){var h=function(t,e,n){var r=Object(d.__spreadArrays)(t);return r.push(["L",e,0]),r.push(["L",0,n]),r.push(["Z"]),r}(l,n,r);this.addShape(t,{id:this.getElementId("area"),type:"path",attrs:Object(d.__assign)({path:h},c)})}},e.prototype.applyOffset=function(){var t=this.cfg,e=t.x,n=t.y;this.moveElementTo(this.get("group"),{x:e,y:n})},e}(B),Ut={fill:"#416180 ",opacity:.05},Zt={fill:"#5B8FF9",opacity:.15,cursor:"move"},Qt={width:10,height:24},$t={textBaseline:"middle",fill:"#000",opacity:.45},Kt={fill:"#F7F7F7",stroke:"#BFBFBF",radius:2,opacity:1,cursor:"ew-resize",highLightFill:"#FFF"},Jt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"handler",x:0,y:0,width:10,height:24,style:Kt})},e.prototype.renderInner=function(t){var e=this.cfg,n=e.width,r=e.height,i=e.style,a=i.fill,o=i.stroke,s=i.radius,u=i.opacity,c=i.cursor;this.addShape(t,{type:"rect",id:this.getElementId("background"),attrs:{x:0,y:0,width:n,height:r,fill:a,stroke:o,radius:s,opacity:u,cursor:c}});var l=1/3*n,h=2/3*n,f=1/4*r,p=3/4*r;this.addShape(t,{id:this.getElementId("line-left"),type:"line",attrs:{x1:l,y1:f,x2:l,y2:p,stroke:o,cursor:c}}),this.addShape(t,{id:this.getElementId("line-right"),type:"line",attrs:{x1:h,y1:f,x2:h,y2:p,stroke:o,cursor:c}})},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.bindEvents=function(){var t=this;this.get("group").on("mouseenter",(function(){var e=t.get("style").highLightFill;t.getElementByLocalId("background").attr("fill",e),t.draw()})),this.get("group").on("mouseleave",(function(){var e=t.get("style").fill;t.getElementByLocalId("background").attr("fill",e),t.draw()}))},e.prototype.draw=function(){var t=this.get("container").get("canvas");t&&t.draw()},e}(B),te=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onMouseDown=function(t){return function(n){e.currentTarget=t;var r=n.originalEvent;r.stopPropagation(),r.preventDefault(),e.prevX=Object(g.get)(r,"touches.0.pageX",r.pageX),e.prevY=Object(g.get)(r,"touches.0.pageY",r.pageY);var i=e.getContainerDOM();i.addEventListener("mousemove",e.onMouseMove),i.addEventListener("mouseup",e.onMouseUp),i.addEventListener("mouseleave",e.onMouseUp),i.addEventListener("touchmove",e.onMouseMove),i.addEventListener("touchend",e.onMouseUp),i.addEventListener("touchcancel",e.onMouseUp)}},e.onMouseMove=function(t){var n=e.cfg.width,r=[e.get("start"),e.get("end")];t.stopPropagation(),t.preventDefault();var i=Object(g.get)(t,"touches.0.pageX",t.pageX),a=Object(g.get)(t,"touches.0.pageY",t.pageY),o=i-e.prevX,s=e.adjustOffsetRange(o/n);e.updateStartEnd(s),e.updateUI(e.getElementByLocalId("foreground"),e.getElementByLocalId("minText"),e.getElementByLocalId("maxText")),e.prevX=i,e.prevY=a,e.draw(),e.emit("sliderchange",[e.get("start"),e.get("end")].sort()),e.delegateEmit("valuechanged",{originValue:r,value:[e.get("start"),e.get("end")]})},e.onMouseUp=function(){e.currentTarget&&(e.currentTarget=void 0);var t=e.getContainerDOM();t&&(t.removeEventListener("mousemove",e.onMouseMove),t.removeEventListener("mouseup",e.onMouseUp),t.removeEventListener("mouseleave",e.onMouseUp),t.removeEventListener("touchmove",e.onMouseMove),t.removeEventListener("touchend",e.onMouseUp),t.removeEventListener("touchcancel",e.onMouseUp))},e}return Object(d.__extends)(e,t),e.prototype.setRange=function(t,e){this.set("minLimit",t),this.set("maxLimit",e)},e.prototype.getRange=function(){return{min:this.get("minLimit")||0,max:this.get("maxLimit")||1}},e.prototype.setValue=function(t){if(Object(g.isArray)(t)&&2===t.length){var e=[this.get("start"),this.get("end")];this.update({start:t[0],end:t[1]}),this.get("updateAutoRender")||this.render(),this.delegateEmit("valuechanged",{originValue:e,value:t})}},e.prototype.getValue=function(){return[this.get("start"),this.get("end")]},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"slider",x:0,y:0,width:100,height:16,backgroundStyle:{},foregroundStyle:{},handlerStyle:{},textStyle:{},defaultCfg:{backgroundStyle:Ut,foregroundStyle:Zt,handlerStyle:Qt,textStyle:$t}})},e.prototype.update=function(e){var n=e.start,r=e.end,i=Object(d.__assign)({},e);Object(g.isNil)(n)||(i.start=Object(g.clamp)(n,0,1)),Object(g.isNil)(r)||(i.end=Object(g.clamp)(r,0,1)),t.prototype.update.call(this,i),this.minHandler=this.getChildComponentById(this.getElementId("minHandler")),this.maxHandler=this.getChildComponentById(this.getElementId("maxHandler"))},e.prototype.init=function(){this.set("start",Object(g.clamp)(this.get("start"),0,1)),this.set("end",Object(g.clamp)(this.get("end"),0,1)),t.prototype.init.call(this)},e.prototype.renderInner=function(t){var e=this.cfg,n=(e.start,e.end,e.width),r=e.height,i=e.trendCfg,a=void 0===i?{}:i,o=e.minText,s=e.maxText,u=e.backgroundStyle,c=void 0===u?{}:u,l=e.foregroundStyle,h=void 0===l?{}:l,f=e.textStyle,p=void 0===f?{}:f,v=e.handlerStyle,y=void 0===v?{}:v;Object(g.size)(Object(g.get)(a,"data"))&&this.addComponent(t,Object(d.__assign)({component:Wt,id:this.getElementId("trend"),x:0,y:0,width:n,height:r},a)),this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:Object(d.__assign)({x:0,y:0,width:n,height:r},c)});var m=this.addShape(t,{id:this.getElementId("minText"),type:"text",attrs:Object(d.__assign)({y:r/2,textAlign:"right",text:o,silent:!1},p)}),x=this.addShape(t,{id:this.getElementId("maxText"),type:"text",attrs:Object(d.__assign)({y:r/2,textAlign:"left",text:s,silent:!1},p)}),b=this.addShape(t,{id:this.getElementId("foreground"),name:"foreground",type:"rect",attrs:Object(d.__assign)({y:0,height:r},h)}),M=Object(g.get)(y,"height",24);this.minHandler=this.addComponent(t,Object(d.__assign)({component:Jt,id:this.getElementId("minHandler"),name:"handler-min",x:0,y:(r-M)/2,width:n,height:M,cursor:"ew-resize"},y)),this.maxHandler=this.addComponent(t,Object(d.__assign)({component:Jt,id:this.getElementId("maxHandler"),name:"handler-max",x:0,y:(r-M)/2,width:n,height:M,cursor:"ew-resize"},y)),this.updateUI(b,m,x)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.updateUI=function(t,e,n){var r=this.cfg,i=r.start,a=r.end,o=r.width,s=r.minText,u=r.maxText,c=r.handlerStyle,l=i*o,h=a*o;t.attr("x",l),t.attr("width",h-l);var f=Object(g.get)(c,"width",10);e.attr("text",s),n.attr("text",u);var p=this._dodgeText([l,h],e,n),d=p[0],v=p[1];this.minHandler&&(this.minHandler.update({x:l-f/2}),this.get("updateAutoRender")||this.minHandler.render()),Object(g.each)(d,(function(t,n){return e.attr(n,t)})),this.maxHandler&&(this.maxHandler.update({x:h-f/2}),this.get("updateAutoRender")||this.maxHandler.render()),Object(g.each)(v,(function(t,e){return n.attr(e,t)}))},e.prototype.bindEvents=function(){var t=this.get("group");t.on("handler-min:mousedown",this.onMouseDown("minHandler")),t.on("handler-min:touchstart",this.onMouseDown("minHandler")),t.on("handler-max:mousedown",this.onMouseDown("maxHandler")),t.on("handler-max:touchstart",this.onMouseDown("maxHandler"));var e=t.findById(this.getElementId("foreground"));e.on("mousedown",this.onMouseDown("foreground")),e.on("touchstart",this.onMouseDown("foreground"))},e.prototype.adjustOffsetRange=function(t){var e=this.cfg,n=e.start,r=e.end;switch(this.currentTarget){case"minHandler":var i=0-n,a=1-n;return Math.min(a,Math.max(i,t));case"maxHandler":i=0-r,a=1-r;return Math.min(a,Math.max(i,t));case"foreground":i=0-n,a=1-r;return Math.min(a,Math.max(i,t));default:return 0}},e.prototype.updateStartEnd=function(t){var e=this.cfg,n=e.start,r=e.end;switch(this.currentTarget){case"minHandler":n+=t;break;case"maxHandler":r+=t;break;case"foreground":n+=t,r+=t}this.set("start",n),this.set("end",r)},e.prototype._dodgeText=function(t,e,n){var r,i,a=this.cfg,o=a.handlerStyle,s=a.width,u=Object(g.get)(o,"width",10),c=t[0],l=t[1],h=!1;c>l&&(c=(r=[l,c])[0],l=r[1],e=(i=[n,e])[0],n=i[1],h=!0);var f=e.getBBox(),p=n.getBBox(),d=f.width>c-2?{x:c+u/2+2,textAlign:"left"}:{x:c-u/2-2,textAlign:"right"},v=p.width>s-l-2?{x:l-u/2-2,textAlign:"right"}:{x:l+u/2+2,textAlign:"left"};return h?[v,d]:[d,v]},e.prototype.draw=function(){var t=this.get("container"),e=t&&t.get("canvas");e&&e.draw()},e.prototype.getContainerDOM=function(){var t=this.get("container"),e=t&&t.get("canvas");return e&&e.get("container")},e}(B),ee={default:{trackColor:"rgba(0,0,0,0)",thumbColor:"rgba(0,0,0,0.15)",size:8,lineCap:"round"},hover:{thumbColor:"rgba(0,0,0,0.2)"}},ne=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.clearEvents=g.noop,e.onStartEvent=function(t){return function(n){e.isMobile=t,n.originalEvent.preventDefault();var r=t?Object(g.get)(n.originalEvent,"touches.0.clientX"):n.clientX,i=t?Object(g.get)(n.originalEvent,"touches.0.clientY"):n.clientY;e.startPos=e.cfg.isHorizontal?r:i,e.bindLaterEvent()}},e.bindLaterEvent=function(){var t=e.getContainerDOM(),n=[];n=e.isMobile?[Object(Ot.addEventListener)(t,"touchmove",e.onMouseMove),Object(Ot.addEventListener)(t,"touchend",e.onMouseUp),Object(Ot.addEventListener)(t,"touchcancel",e.onMouseUp)]:[Object(Ot.addEventListener)(t,"mousemove",e.onMouseMove),Object(Ot.addEventListener)(t,"mouseup",e.onMouseUp),Object(Ot.addEventListener)(t,"mouseleave",e.onMouseUp)],e.clearEvents=function(){n.forEach((function(t){t.remove()}))}},e.onMouseMove=function(t){var n=e.cfg,r=n.isHorizontal,i=n.thumbOffset;t.preventDefault();var a=e.isMobile?Object(g.get)(t,"touches.0.clientX"):t.clientX,o=e.isMobile?Object(g.get)(t,"touches.0.clientY"):t.clientY,s=r?a:o,u=s-e.startPos;e.startPos=s,e.updateThumbOffset(i+u)},e.onMouseUp=function(t){t.preventDefault(),e.clearEvents()},e.onTrackClick=function(t){var n=e.cfg,r=n.isHorizontal,i=n.x,a=n.y,o=n.thumbLen,s=e.getContainerDOM().getBoundingClientRect(),u=t.clientX,c=t.clientY,l=r?u-s.left-i-o/2:c-s.top-a-o/2,h=e.validateRange(l);e.updateThumbOffset(h)},e.onThumbMouseOver=function(){var t=e.cfg.theme.hover.thumbColor;e.getElementByLocalId("thumb").attr("stroke",t),e.draw()},e.onThumbMouseOut=function(){var t=e.cfg.theme.default.thumbColor;e.getElementByLocalId("thumb").attr("stroke",t),e.draw()},e}return Object(d.__extends)(e,t),e.prototype.setRange=function(t,e){this.set("minLimit",t),this.set("maxLimit",e)},e.prototype.getRange=function(){return{min:this.get("minLimit"),max:this.get("maxLimit")}},e.prototype.setValue=function(t){var e=this.getValue();this.update({thumbOffset:this.get("trackLen")-this.get("thumbLen")*Object(g.clamp)(t,0,1)}),this.delegateEmit("valuechange",{originalValue:e,value:this.getValue()})},e.prototype.getValue=function(){return Object(g.clamp)(this.get("thumbOffset")/(this.get("trackLen")-this.get("thumbLen")),0,1)},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"scrollbar",isHorizontal:!0,minThumbLen:20,thumbOffset:0,theme:ee})},e.prototype.renderInner=function(t){this.renderTrackShape(t),this.renderThumbShape(t)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.renderTrackShape=function(t){var e=this.cfg,n=e.trackLen,r=e.theme,i=(void 0===r?{default:{}}:r).default,a=i.lineCap,o=i.trackColor,s=i.size,u=this.get("isHorizontal")?{x1:0+s/2,y1:s/2,x2:n-s/2,y2:s/2,lineWidth:s,stroke:o,lineCap:a}:{x1:s/2,y1:0+s/2,x2:s/2,y2:n-s/2,lineWidth:s,stroke:o,lineCap:a};return this.addShape(t,{id:this.getElementId("track"),name:"track",type:"line",attrs:u})},e.prototype.renderThumbShape=function(t){var e=this.cfg,n=e.thumbOffset,r=e.thumbLen,i=e.theme,a=(void 0===i?{default:{}}:i).default,o=a.size,s=a.lineCap,u=a.thumbColor,c=this.get("isHorizontal")?{x1:n+o/2,y1:o/2,x2:n+r-o/2,y2:o/2,lineWidth:o,stroke:u,lineCap:s,cursor:"default"}:{x1:o/2,y1:n+o/2,x2:o/2,y2:n+r-o/2,lineWidth:o,stroke:u,lineCap:s,cursor:"default"};return this.addShape(t,{id:this.getElementId("thumb"),name:"thumb",type:"line",attrs:c})},e.prototype.bindEvents=function(){var t=this.get("group");t.on("mousedown",this.onStartEvent(!1)),t.on("mouseup",this.onMouseUp),t.on("touchstart",this.onStartEvent(!0)),t.on("touchend",this.onMouseUp),t.findById(this.getElementId("track")).on("click",this.onTrackClick);var e=t.findById(this.getElementId("thumb"));e.on("mouseover",this.onThumbMouseOver),e.on("mouseout",this.onThumbMouseOut)},e.prototype.getContainerDOM=function(){var t=this.get("container"),e=t&&t.get("canvas");return e&&e.get("container")},e.prototype.validateRange=function(t){var e=this.cfg,n=e.thumbLen,r=e.trackLen,i=t;return t+n>r?i=r-n:t+n=0},t.prototype.getAdjustRange=function(t,e,n){var r,i,a=this.yField,o=n.indexOf(e),s=n.length;return!a&&this.isAdjust("y")?(r=0,i=1):s>1?(r=n[0===o?0:o-1],i=n[o===s-1?s-1:o+1],0!==o?r+=(e-r)/2:r-=(i-e)/2,o!==s-1?i-=(i-e)/2:i+=(e-n[s-2])/2):(r=0===e?0:e-.5,i=0===e?1:e+.5),{pre:r,next:i}},t.prototype.adjustData=function(t,e){var n=this,i=this.getDimValues(e);r.each(t,(function(t,e){r.each(i,(function(r,i){n.adjustDim(i,r,t,e)}))}))},t.prototype.groupData=function(t,e){return r.each(t,(function(t){void 0===t[e]&&(t[e]=0)})),r.groupBy(t,e)},t.prototype.adjustDim=function(t,e,n,r){},t.prototype.getDimValues=function(t){var e=this.xField,n=this.yField,i={},a=[];if(e&&this.isAdjust("x")&&a.push(e),n&&this.isAdjust("y")&&a.push(n),a.forEach((function(e){i[e]=r.valuesOfKey(t,e).sort((function(t,e){return t-e}))})),!n&&this.isAdjust("y")){i.y=[0,1]}return i},t}(),a={},o=function(t){return a[t.toLowerCase()]},s=function(t,e){if(o(t))throw new Error("Adjust type '"+t+"' existed.");a[t.toLowerCase()]=e},u=n(1),c=function(t){function e(e){var n=t.call(this,e)||this;n.cacheMap={},n.adjustDataArray=[],n.mergeData=[];var r=e.marginRatio,i=void 0===r?.5:r,a=e.dodgeRatio,o=void 0===a?.5:a,s=e.dodgeBy;return n.marginRatio=i,n.dodgeRatio=o,n.dodgeBy=s,n}return Object(u.__extends)(e,t),e.prototype.process=function(t){var e=r.clone(t),n=r.flatten(e),i=this.dodgeBy,a=i?r.group(n,i):e;return this.cacheMap={},this.adjustDataArray=a,this.mergeData=n,this.adjustData(a,n),this.adjustDataArray=[],this.mergeData=[],e},e.prototype.adjustDim=function(t,e,n,i){var a=this,o=this.getDistribution(t),s=this.groupData(n,t);return r.each(s,(function(n,s){var u;u=1===e.length?{pre:e[0]-1,next:e[0]+1}:a.getAdjustRange(t,parseFloat(s),e),r.each(n,(function(e){var n=e[t],r=o[n],s=r.indexOf(i);e[t]=a.getDodgeOffset(u,s,r.length)}))})),[]},e.prototype.getDodgeOffset=function(t,e,n){var r=this.dodgeRatio,i=this.marginRatio,a=t.pre,o=t.next,s=o-a,u=s*r/n,c=i*u;return(a+o)/2+(.5*(s-n*u-(n-1)*c)+((e+1)*u+e*c)-.5*u-.5*s)},e.prototype.getDistribution=function(t){var e=this.adjustDataArray,n=this.cacheMap,i=n[t];return i||(i={},r.each(e,(function(e,n){var a=r.valuesOfKey(e,t);a.length||a.push(0),r.each(a,(function(t){i[t]||(i[t]=[]),i[t].push(n)}))})),n[t]=i),i},e}(i);var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(u.__extends)(e,t),e.prototype.process=function(t){var e=r.clone(t),n=r.flatten(e);return this.adjustData(e,n),e},e.prototype.adjustDim=function(t,e,n){var i=this,a=this.groupData(n,t);return r.each(a,(function(n,r){return i.adjustGroup(n,t,parseFloat(r),e)}))},e.prototype.getAdjustOffset=function(t){var e,n=t.pre,r=t.next,i=.05*(r-n);return(r-i-(e=n+i))*Math.random()+e},e.prototype.adjustGroup=function(t,e,n,i){var a=this,o=this.getAdjustRange(e,n,i);return r.each(t,(function(t){t[e]=a.getAdjustOffset(o)})),t},e}(i),h=r.Cache,f=function(t){function e(e){var n=t.call(this,e)||this,r=e.adjustNames,i=void 0===r?["y"]:r,a=e.height,o=void 0===a?NaN:a,s=e.size,u=void 0===s?10:s,c=e.reverseOrder,l=void 0!==c&&c;return n.adjustNames=i,n.height=o,n.size=u,n.reverseOrder=l,n}return Object(u.__extends)(e,t),e.prototype.process=function(t){var e=this.yField,n=this.reverseOrder,r=e?this.processStack(t):this.processOneDimStack(t);return n?this.reverse(r):r},e.prototype.reverse=function(t){return t.slice(0).reverse()},e.prototype.processStack=function(t){var e=this.xField,n=this.yField,i=this.reverseOrder?this.reverse(t):t,a=new h,o=new h;return i.map((function(t){return t.map((function(t){var i,s=r.get(t,e,0),c=r.get(t,n),l=s.toString();if(c=r.isArray(c)?c[1]:c,!r.isNil(c)){var h=c>=0?a:o;h.has(l)||h.set(l,0);var f=h.get(l),p=c+f;return h.set(l,p),Object(u.__assign)(Object(u.__assign)({},t),((i={})[n]=[f,p],i))}return t}))}))},e.prototype.processOneDimStack=function(t){var e=this,n=this.xField,r=this.height,i=this.reverseOrder,a=i?this.reverse(t):t,o=new h;return a.map((function(t){return t.map((function(t){var i,a=e.size,s=t[n],c=2*a/r;o.has(s)||o.set(s,c/2);var l=o.get(s);return o.set(s,l+c),Object(u.__assign)(Object(u.__assign)({},t),((i={}).y=l,i))}))}))},e}(i),p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(u.__extends)(e,t),e.prototype.process=function(t){var e=r.flatten(t),n=this.xField,i=this.yField,a=this.getXValuesMaxMap(e),o=Math.max.apply(Math,Object.keys(a).map((function(t){return a[t]})));return r.map(t,(function(t){return r.map(t,(function(t){var e,s,c=t[i],l=t[n];if(r.isArray(c)){var h=(o-a[l])/2;return Object(u.__assign)(Object(u.__assign)({},t),((e={})[i]=r.map(c,(function(t){return h+t})),e))}var f=(o-c)/2;return Object(u.__assign)(Object(u.__assign)({},t),((s={})[i]=[f,c+f],s))}))}))},e.prototype.getXValuesMaxMap=function(t){var e=this,n=this.xField,i=this.yField,a=r.groupBy(t,(function(t){return t[n]}));return r.mapValues(a,(function(t){return e.getDimMaxValue(t,i)}))},e.prototype.getDimMaxValue=function(t,e){var n=r.map(t,(function(t){return r.get(t,e,[])})),i=r.flatten(n);return Math.max.apply(Math,i)},e}(i);s("Dodge",c),s("Jitter",l),s("Stack",f),s("Symmetric",p)},function(t,e,n){"use strict";n.r(e),n.d(e,"getCoordinate",(function(){return h})),n.d(e,"registerCoordinate",(function(){return f})),n.d(e,"Coordinate",(function(){return o}));var r=n(1),i=n(2),a=n(0),o=function(){function t(t){this.type="coordinate",this.isRect=!1,this.isHelix=!1,this.isPolar=!1,this.isReflectX=!1,this.isReflectY=!1;var e=t.start,n=t.end,i=t.matrix,a=void 0===i?[1,0,0,0,1,0,0,0,1]:i,o=t.isTransposed,s=void 0!==o&&o;this.start=e,this.end=n,this.matrix=a,this.originalMatrix=Object(r.__spreadArrays)(a),this.isTransposed=s}return t.prototype.initial=function(){this.center={x:(this.start.x+this.end.x)/2,y:(this.start.y+this.end.y)/2},this.width=Math.abs(this.end.x-this.start.x),this.height=Math.abs(this.end.y-this.start.y)},t.prototype.update=function(t){a.assign(this,t),this.initial()},t.prototype.convertDim=function(t,e){var n,r=this[e],i=r.start,a=r.end;return this.isReflect(e)&&(i=(n=[a,i])[0],a=n[1]),i+t*(a-i)},t.prototype.invertDim=function(t,e){var n,r=this[e],i=r.start,a=r.end;return this.isReflect(e)&&(i=(n=[a,i])[0],a=n[1]),(t-i)/(a-i)},t.prototype.applyMatrix=function(t,e,n){void 0===n&&(n=0);var r=this.matrix,a=[t,e,n];return i.vec3.transformMat3(a,a,r),a},t.prototype.invertMatrix=function(t,e,n){void 0===n&&(n=0);var r=this.matrix,a=i.mat3.invert([],r),o=[t,e,n];return i.vec3.transformMat3(o,o,a),o},t.prototype.convert=function(t){var e=this.convertPoint(t),n=e.x,r=e.y,i=this.applyMatrix(n,r,1);return{x:i[0],y:i[1]}},t.prototype.invert=function(t){var e=this.invertMatrix(t.x,t.y,1);return this.invertPoint({x:e[0],y:e[1]})},t.prototype.rotate=function(t){var e=this.matrix,n=this.center;return i.mat3.translate(e,e,[-n.x,-n.y]),i.mat3.rotate(e,e,t),i.mat3.translate(e,e,[n.x,n.y]),this},t.prototype.reflect=function(t){return"x"===t?this.isReflectX=!this.isReflectX:this.isReflectY=!this.isReflectY,this},t.prototype.scale=function(t,e){var n=this.matrix,r=this.center;return i.mat3.translate(n,n,[-r.x,-r.y]),i.mat3.scale(n,n,[t,e]),i.mat3.translate(n,n,[r.x,r.y]),this},t.prototype.translate=function(t,e){var n=this.matrix;return i.mat3.translate(n,n,[t,e]),this},t.prototype.transpose=function(){return this.isTransposed=!this.isTransposed,this},t.prototype.getCenter=function(){return this.center},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.isReflect=function(t){return"x"===t?this.isReflectX:this.isReflectY},t.prototype.resetMatrix=function(t){this.matrix=t||Object(r.__spreadArrays)(this.originalMatrix)},t}(),s=function(t){function e(e){var n=t.call(this,e)||this;return n.isRect=!0,n.type="cartesian",n.initial(),n}return Object(r.__extends)(e,t),e.prototype.initial=function(){t.prototype.initial.call(this);var e=this.start,n=this.end;this.x={start:e.x,end:n.x},this.y={start:e.y,end:n.y}},e.prototype.convertPoint=function(t){var e,n=t.x,r=t.y;return this.isTransposed&&(n=(e=[r,n])[0],r=e[1]),{x:this.convertDim(n,"x"),y:this.convertDim(r,"y")}},e.prototype.invertPoint=function(t){var e,n=this.invertDim(t.x,"x"),r=this.invertDim(t.y,"y");return this.isTransposed&&(n=(e=[r,n])[0],r=e[1]),{x:n,y:r}},e}(o),u=function(t){function e(e){var n=t.call(this,e)||this;n.isHelix=!0,n.type="helix";var r=e.startAngle,i=void 0===r?1.25*Math.PI:r,a=e.endAngle,o=void 0===a?7.25*Math.PI:a,s=e.innerRadius,u=void 0===s?0:s,c=e.radius;return n.startAngle=i,n.endAngle=o,n.innerRadius=u,n.radius=c,n.initial(),n}return Object(r.__extends)(e,t),e.prototype.initial=function(){t.prototype.initial.call(this);var e=(this.endAngle-this.startAngle)/(2*Math.PI)+1,n=Math.min(this.width,this.height)/2;this.radius&&this.radius>=0&&this.radius<=1&&(n*=this.radius),this.d=Math.floor(n*(1-this.innerRadius)/e),this.a=this.d/(2*Math.PI),this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*n,end:this.innerRadius*n+.99*this.d}},e.prototype.convertPoint=function(t){var e,n=t.x,r=t.y;this.isTransposed&&(n=(e=[r,n])[0],r=e[1]);var i=this.convertDim(n,"x"),a=this.a*i,o=this.convertDim(r,"y");return{x:this.center.x+Math.cos(i)*(a+o),y:this.center.y+Math.sin(i)*(a+o)}},e.prototype.invertPoint=function(t){var e,n=this.d+this.y.start,r=i.vec2.subtract([],[t.x,t.y],[this.center.x,this.center.y]),o=i.vec2.angleTo(r,[1,0],!0),s=o*this.a;i.vec2.length(r)this.width/r?(e=this.width/r,this.circleCenter={x:this.center.x-(.5-a)*this.width,y:this.center.y-(.5-o)*e*i}):(e=this.height/i,this.circleCenter={x:this.center.x-(.5-a)*e*r,y:this.center.y-(.5-o)*this.height}),this.polarRadius=this.radius,this.radius?this.radius>0&&this.radius<=1?this.polarRadius=e*this.radius:(this.radius<=0||this.radius>e)&&(this.polarRadius=e):this.polarRadius=e,this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*this.polarRadius,end:this.polarRadius}},e.prototype.getRadius=function(){return this.polarRadius},e.prototype.convertPoint=function(t){var e,n=this.getCenter(),r=t.x,i=t.y;return this.isTransposed&&(r=(e=[i,r])[0],i=e[1]),r=this.convertDim(r,"x"),i=this.convertDim(i,"y"),{x:n.x+Math.cos(r)*i,y:n.y+Math.sin(r)*i}},e.prototype.invertPoint=function(t){var e=this.getCenter(),n=[t.x-e.x,t.y-e.y],r=[1,0,0,0,1,0,0,0,1];i.mat3.rotate(r,r,this.startAngle);var o=[1,0,0];i.vec3.transformMat3(o,o,r),o=[o[0],o[1]];var s=i.vec2.angleTo(o,n,this.endAngle0?c:-c;var l=this.invertDim(u,"y"),h={x:0,y:0};return h.x=this.isTransposed?l:c,h.y=this.isTransposed?c:l,h},e.prototype.getCenter=function(){return this.circleCenter},e.prototype.getOneBox=function(){var t=this.startAngle,e=this.endAngle;if(Math.abs(e-t)>=2*Math.PI)return{minX:-1,maxX:1,minY:-1,maxY:1};for(var n=[0,Math.cos(t),Math.cos(e)],r=[0,Math.sin(t),Math.sin(e)],i=Math.min(t,e);i 1) { - var group = container.addGroup(); - for (var _i = 0, points_1 = points; _i < points_1.length; _i++) { - var point = points_1[_i]; - group.addShape({ - type: 'marker', - attrs: tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, style), { symbol: marker_1.MarkerSymbols[shapeName] || shapeName }), point), - }); - } - return group; - } - return container.addShape({ - type: 'marker', - attrs: tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, style), { symbol: marker_1.MarkerSymbols[shapeName] || shapeName }), points[0]), - }); -} -exports.drawPoints = drawPoints; -//# sourceMappingURL=util.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2/lib/geometry/shape/util/get-style.js": -/*!********************************************************************!*\ - !*** ./node_modules/@antv/g2/lib/geometry/shape/util/get-style.js ***! - \********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -var util_1 = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/** - * @ignore - * 获取 Shape 的图形属性 - * @param cfg - * @param isStroke 是否需要描边 - * @param isFill 是否需要填充 - * @param [sizeName] 可选,表示图形大小的属性,lineWidth 或者 r - * @returns - */ -function getStyle(cfg, isStroke, isFill, sizeName) { - if (sizeName === void 0) { sizeName = ''; } - var style = cfg.style, defaultStyle = cfg.defaultStyle, color = cfg.color, size = cfg.size; - var attrs = tslib_1.__assign(tslib_1.__assign({}, defaultStyle), style); - if (color) { - if (isStroke) { - if (!util_1.get(style, 'stroke')) { - // 如果用户在 style() 中配置了 stroke,则以用户配置的为准 - attrs.stroke = color; - } - } - if (isFill) { - if (!util_1.get(style, 'fill')) { - // 如果用户在 style() 中配置了 fill - attrs.fill = color; - } - } - } - if (sizeName && util_1.isNil(util_1.get(style, sizeName)) && !util_1.isNil(size)) { - // 如果用户在 style() 中配置了 lineWidth 或者 r 属性 - attrs[sizeName] = size; - } - return attrs; -} -exports.getStyle = getStyle; -//# sourceMappingURL=get-style.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2/lib/util/marker.js": -/*!**************************************************!*\ - !*** ./node_modules/@antv/g2/lib/util/marker.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** @ignore */ -exports.MarkerSymbols = { - hexagon: function (x, y, r) { - var diffX = (r / 2) * Math.sqrt(3); - return [ - ['M', x, y - r], - ['L', x + diffX, y - r / 2], - ['L', x + diffX, y + r / 2], - ['L', x, y + r], - ['L', x - diffX, y + r / 2], - ['L', x - diffX, y - r / 2], - ['Z'], - ]; - }, - bowtie: function (x, y, r) { - var diffY = r - 1.5; - return [['M', x - r, y - diffY], ['L', x + r, y + diffY], ['L', x + r, y - diffY], ['L', x - r, y + diffY], ['Z']]; - }, - cross: function (x, y, r) { - return [ - ['M', x - r, y - r], - ['L', x + r, y + r], - ['M', x + r, y - r], - ['L', x - r, y + r], - ]; - }, - tick: function (x, y, r) { - return [ - ['M', x - r / 2, y - r], - ['L', x + r / 2, y - r], - ['M', x, y - r], - ['L', x, y + r], - ['M', x - r / 2, y + r], - ['L', x + r / 2, y + r], - ]; - }, - plus: function (x, y, r) { - return [ - ['M', x - r, y], - ['L', x + r, y], - ['M', x, y - r], - ['L', x, y + r], - ]; - }, - hyphen: function (x, y, r) { - return [ - ['M', x - r, y], - ['L', x + r, y], - ]; - }, - line: function (x, y, r) { - return [ - ['M', x, y - r], - ['L', x, y + r], - ]; - }, -}; -//# sourceMappingURL=marker.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/base/controller/canvas.js": -/*!*****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/base/controller/canvas.js ***! - \*****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_dom_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/dom-util */ "./node_modules/@antv/dom-util/esm/index.js"); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! resize-observer-polyfill */ "./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js"); -/* harmony import */ var _theme_global__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/global */ "./node_modules/@antv/g2plot/esm/theme/global.js"); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./theme */ "./node_modules/@antv/g2plot/esm/base/controller/theme.js"); - - - - - - -/** - * Canvas controller - * 1. create G.Canvas, destroy G.Canvas - * 2. process auto fit container - * 3. API for G.Canvas - */ -var CanvasController = /** @class */ (function () { - function CanvasController(cfg) { - var _this = this; - /** - * when the container size changed, trigger it after 300ms. - */ - this.onResize = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["debounce"])(function () { - if (_this.plot.destroyed) { - return; - } - var _a = _this.getCanvasSize(), width = _a.width, height = _a.height; - /** height measure不准导致重复 forceFit */ - if (_this.width === width /*&& this.height === height*/) { - return; - } - // got new width, height, re-render the plot - _this.width = width; - _this.height = height; - _this.plot.updateConfig({ width: width, height: height }); - _this.plot.render(); - }, 300); - var containerDOM = cfg.containerDOM, plot = cfg.plot; - this.containerDOM = containerDOM; - this.plot = plot; - this.init(); - } - /** - * get canvas size from props. - * @returns the width, height of canvas - */ - CanvasController.prototype.getCanvasSize = function () { - var theme = Object(_theme_global__WEBPACK_IMPORTED_MODULE_4__["getGlobalTheme"])(); - var width = this.plot.width ? this.plot.width : theme.width; - var height = this.plot.height ? this.plot.height : theme.height; - // if forceFit = true, then use the container's size as default. - if (this.plot.forceFit) { - width = this.containerDOM.offsetWidth ? this.containerDOM.offsetWidth : width; - height = this.containerDOM.offsetHeight ? this.containerDOM.offsetHeight : height; - } - return { width: width, height: height }; - }; - /** - * get the canvas dom - * @returns Canvas DOM - */ - CanvasController.prototype.getCanvasDOM = function () { - return this.canvas.get('container'); - }; - /** - * update the plot size - */ - CanvasController.prototype.updateCanvasSize = function () { - var _a = this.getCanvasSize(), width = _a.width, height = _a.height; - this.width = width; - this.height = height; - this.canvas.changeSize(width, height); - // this.plot.updateRange(); - }; - /** - * 根据主题调整canvas样式 - */ - CanvasController.prototype.updateCanvasTheme = function () { - var theme = this.plot.theme; - var globalTheme = _theme__WEBPACK_IMPORTED_MODULE_5__["default"].getGlobalTheme(theme); - var fill = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["get"])(globalTheme, 'backgroundStyle.fill'); - if (fill) { - this.updateCanvasStyle({ - backgroundColor: fill, - }); - } - }; - /** - * update the canvas dom styles - * @param styles - */ - CanvasController.prototype.updateCanvasStyle = function (styles) { - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_0__["modifyCSS"])(this.getCanvasDOM(), styles); - }; - /** - * destroy the plot, remove resize event. - */ - CanvasController.prototype.destroy = function () { - // remove event - if (this.resizeObserver) { - this.resizeObserver.unobserve(this.containerDOM); - this.resizeObserver.disconnect(); - this.containerDOM = null; - } - // remove G.Canvas - this.canvas.destroy(); - }; - /** - * when forceFit = true, then bind the event to listen the container size change - */ - CanvasController.prototype.bindForceFit = function () { - var forceFit = this.plot.forceFit; - // use ResizeObserver to listen the container size change. - if (forceFit) { - this.resizeObserver = new resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_3__["default"](this.onResize); - this.resizeObserver.observe(this.containerDOM); - } - }; - /** - * init life circle - */ - CanvasController.prototype.init = function () { - this.initGCanvas(); - this.bindForceFit(); - // 追加容器的 css 样式,防止 tooltip 的位置参考点不正确 - this.updateCanvasStyle({ position: 'relative' }); - }; - /** - * init G.Canvas instance - */ - CanvasController.prototype.initGCanvas = function () { - /** 创建canvas */ - var _a = this.plot, _b = _a.renderer, renderer = _b === void 0 ? 'canvas' : _b, pixelRatio = _a.pixelRatio; - var _c = this.getCanvasSize(), width = _c.width, height = _c.height; - var G = renderer === 'canvas' ? _dependents__WEBPACK_IMPORTED_MODULE_1__["Canvas"] : _dependents__WEBPACK_IMPORTED_MODULE_1__["SVG"]; - this.canvas = new G({ - container: this.containerDOM, - width: width, - height: height, - pixelRatio: pixelRatio, - }); - this.width = width; - this.height = height; - this.updateCanvasTheme(); - }; - return CanvasController; -}()); -/* harmony default export */ __webpack_exports__["default"] = (CanvasController); -//# sourceMappingURL=canvas.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/base/controller/event.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/base/controller/event.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -function isSameShape(shape1, shape2) { - if (shape1 && shape2 && shape1 === shape2) { - return true; - } - return false; -} -function isPointInBBox(point, bbox) { - if (point.x >= bbox.minX && point.x <= bbox.maxX && point.y >= bbox.minY && point.y <= bbox.maxY) { - return true; - } - return false; -} -var EventController = /** @class */ (function () { - function EventController(cfg) { - this.plot = cfg.plot; - this.canvas = cfg.canvas; - this.pixelRatio = this.canvas.get('pixelRatio'); - this.eventHandlers = []; - } - EventController.prototype.bindEvents = function () { - this.addEvent(this.canvas, 'mousedown', Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["wrapBehavior"])(this, 'onEvents')); - this.addEvent(this.canvas, 'mousemove', Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["wrapBehavior"])(this, 'onMove')); - this.addEvent(this.canvas, 'mouseup', Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["wrapBehavior"])(this, 'onEvents')); - this.addEvent(this.canvas, 'click', Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["wrapBehavior"])(this, 'onEvents')); - this.addEvent(this.canvas, 'dblclick', Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["wrapBehavior"])(this, 'onEvents')); - this.addEvent(this.canvas, 'contextmenu', Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["wrapBehavior"])(this, 'onEvents')); - this.addEvent(this.canvas, 'wheel', Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["wrapBehavior"])(this, 'onEvents')); - }; - EventController.prototype.clearEvents = function () { - var eventHandlers = this.eventHandlers; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(eventHandlers, function (eh) { - eh.target.off(eh.type, eh.handler); - }); - }; - EventController.prototype.addEvent = function (target, eventType, handler) { - target.on(eventType, handler); - this.eventHandlers.push({ target: target, type: eventType, handler: handler }); - }; - EventController.prototype.onEvents = function (ev) { - var eventObj = this.getEventObj(ev); - var target = ev.target; - // 判断是否拾取到view以外的shape - if (!this.isShapeInView(target) && target.name) { - this.plot.emit(target.name + ":" + ev.type, ev); - } - this.plot.emit("" + ev.type, eventObj); - // layer事件 - var layers = this.plot.getLayers(); - if (layers.length > 0) { - this.onLayerEvent(layers, eventObj, ev.type); - } - }; - EventController.prototype.onMove = function (ev) { - var target = ev.target; - var eventObj = this.getEventObj(ev); - // shape的mouseenter, mouseleave和mousemove事件 - if (!this.isShapeInView(target) && target.name) { - this.plot.emit(target.name + ":" + ev.type, eventObj); - // mouseleave & mouseenter - if (this.lastShape && !isSameShape(target, this.lastShape)) { - if (this.lastShape) { - this.plot.emit(this.lastShape.name + ":mouseleave", eventObj); - } - this.plot.emit(target.name + ":mouseenter", eventObj); - } - this.lastShape = target; - } - this.plot.emit('mousemove', eventObj); - // layer事件 - var layers = this.plot.getLayers(); - if (layers.length > 0) { - this.onLayerEvent(layers, eventObj, 'mousemove'); - } - }; - EventController.prototype.isShapeInView = function (shape) { - var groupName = ['frontgroundGroup', 'backgroundGroup', 'panelGroup']; - var parent = shape.get('parent'); - while (parent) { - var parentName = parent.get('name'); - if (parentName && Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["contains"])(groupName, parentName)) { - return true; - } - parent = parent.get('parent'); - } - return false; - }; - EventController.prototype.getEventObj = function (ev) { - var obj = { - x: ev.x / this.pixelRatio, - y: ev.y / this.pixelRatio, - target: ev.target, - event: ev.event, - }; - return obj; - }; - EventController.prototype.onLayerEvent = function (layers, eventObj, eventName) { - var _this = this; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(layers, function (layer) { - var bbox = layer.getGlobalBBox(); - if (isPointInBBox({ x: eventObj.x, y: eventObj.y }, bbox)) { - layer.emit("" + eventName, eventObj); - var subLayers = layer.layers; - if (subLayers.length > 0) { - _this.onLayerEvent(subLayers, eventObj, eventName); - } - } - }); - }; - return EventController; -}()); -/* harmony default export */ __webpack_exports__["default"] = (EventController); -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/base/controller/padding.js": -/*!******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/base/controller/padding.js ***! - \******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_bbox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/bbox */ "./node_modules/@antv/g2plot/esm/util/bbox.js"); -/* harmony import */ var _util_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/common */ "./node_modules/@antv/g2plot/esm/util/common.js"); - - - -/** - * 处理图表padding的逻辑: - * 注册参与padding的自定义组件 - */ -var PaddingController = /** @class */ (function () { - function PaddingController(cfg) { - this.innerPaddingComponents = []; - this.outerPaddingComponents = []; - this.plot = cfg.plot; - } - PaddingController.prototype.registerPadding = function (component, type, checkIfExist) { - if (type === void 0) { type = 'outer'; } - if (checkIfExist === void 0) { checkIfExist = false; } - if (type === 'inner') { - if (checkIfExist) { - if (!this.innerPaddingComponents.find(function (c) { return c == component; })) { - this.innerPaddingComponents.push(component); - } - } - else { - this.innerPaddingComponents.push(component); - } - } - else { - if (checkIfExist) { - if (!this.outerPaddingComponents.find(function (c) { return c == component; })) { - this.outerPaddingComponents.push(component); - } - } - else { - this.outerPaddingComponents.push(component); - } - } - }; - /** - * 清除已经注册的元素 - */ - PaddingController.prototype.clear = function () { - this.innerPaddingComponents = []; - // 一些组件是在view渲染完成之后渲染初始化的 - // TODO: afterRender的什么时候清除 - this.outerPaddingComponents = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["filter"])(this.outerPaddingComponents, function (component) { return component.afterRender; }); - }; - PaddingController.prototype.clearOuterComponents = function () { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(this.outerPaddingComponents, function (component) { - if (component.afterRender) { - component.destroy(); - } - }); - this.outerPaddingComponents = []; - }; - PaddingController.prototype.getPadding = function () { - var props = this.plot.options; - var padding = props.padding ? props.padding : this.plot.config.theme.padding; - if (padding === 'auto') { - return [0, 0, 0, 0]; - } - return padding; - }; - /** view层的padding计算 */ - PaddingController.prototype.processAutoPadding = function () { - var padding = this._getInnerAutoPadding(); - this.plot.updateConfig({ - padding: padding, - }); - this.plot.render(); - }; - PaddingController.prototype.processOuterPadding = function () { - if (!this.plot.layerBBox) { - this.plot.layerBBox = new _util_bbox__WEBPACK_IMPORTED_MODULE_1__["default"](this.plot.x, this.plot.y, this.plot.width, this.plot.height); - } - var viewMinX = this.plot.layerBBox.minX; - var viewMaxX = this.plot.layerBBox.maxX; - var viewMinY = this.plot.layerBBox.minY; - var viewMaxY = this.plot.layerBBox.maxY; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(this.outerPaddingComponents, function (component) { - var position = component.position; - var _a = component.getBBox(), minX = _a.minX, maxX = _a.maxX, minY = _a.minY, maxY = _a.maxY; - if (maxY >= viewMinY && maxY <= viewMaxY && position === 'top') { - viewMinY = maxY; - } - if (minY >= viewMinY && minY <= viewMaxY && position === 'bottom') { - viewMaxY = minY; - } - if (maxX > viewMinX && maxX <= viewMaxX && position === 'left') { - viewMinX = maxX; - } - if (minX >= viewMinX && maxX <= viewMaxX && position === 'right') { - viewMaxX = minX; - } - }); - return new _util_bbox__WEBPACK_IMPORTED_MODULE_1__["default"](viewMinX, viewMinY, viewMaxX - viewMinX, viewMaxY - viewMinY); - }; - PaddingController.prototype._getInnerAutoPadding = function () { - var props = this.plot.options; - var view = this.plot.view; - var viewRange = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(view.viewBBox); - var minX = viewRange.minX, maxX = viewRange.maxX, minY = viewRange.minY, maxY = viewRange.maxY; - var bleeding = this.plot.config.theme.bleeding; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isArray"])(bleeding)) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(bleeding, function (it, index) { - if (typeof bleeding[index] === 'function') { - bleeding[index] = bleeding[index](props); - } - }); - } - this.plot.config.theme.legend.margin = bleeding; - this.bleeding = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(bleeding); - // 参与auto padding的components: axis legend - var components_bbox; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["has"])(this.plot.options, 'radius')) { - components_bbox = [new _util_bbox__WEBPACK_IMPORTED_MODULE_1__["default"](0, viewRange.minY, viewRange.width, viewRange.height)]; - } - else { - components_bbox = [new _util_bbox__WEBPACK_IMPORTED_MODULE_1__["default"](0, 0, viewRange.width, viewRange.height)]; - } - this._getAxis(view, components_bbox); - var box = this._mergeBBox(components_bbox); - this._getLegend(view, components_bbox, viewRange, this.plot.options); - box = this._mergeBBox(components_bbox); - // 参与auto padding的自定义组件 - var components = this.innerPaddingComponents; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(components, function (obj) { - var component = obj; - var bbox = component.getBBox(); - components_bbox.push(bbox); - }); - box = this._mergeBBox(components_bbox); - var padding = [ - 0 - box.minY + this.bleeding[0], - box.maxX - maxX + this.bleeding[1], - box.maxY - maxY + this.bleeding[2], - 0 - box.minX + this.bleeding[3], - ]; - //this.adjustAxisPadding(view, padding); - // label、annotation等 - var panelPadding = this._getPanel(view, box); - padding[0] += panelPadding[0]; - padding[1] += panelPadding[1]; - padding[2] += panelPadding[2]; - padding[3] += panelPadding[3]; - return padding; - }; - PaddingController.prototype._getAxis = function (view, bboxes) { - var axisShapes = Object(_util_common__WEBPACK_IMPORTED_MODULE_2__["getAxisShapes"])(view); - if (axisShapes.length > 0) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(axisShapes, function (a) { - var bbox = a.getBBox(); - bboxes.push(bbox); - }); - } - }; - PaddingController.prototype._getLegend = function (view, bboxes, viewRange, options) { - var legendContainer = Object(_util_common__WEBPACK_IMPORTED_MODULE_2__["getLegendShapes"])(view)[0]; - if (legendContainer) { - var bbox = legendContainer.getBBox(); - if (options.legend) { - var position = options.legend.position.split('-')[0]; - if (position === 'top') { - bboxes.push(new _util_bbox__WEBPACK_IMPORTED_MODULE_1__["default"](bbox.minX, -bbox.height, bbox.width, bbox.height)); - } - else if (position === 'bottom') { - bboxes.push(new _util_bbox__WEBPACK_IMPORTED_MODULE_1__["default"](bbox.minX, bbox.height + viewRange.height, bbox.width, bbox.height)); - } - else if (position === 'left') { - bboxes.push(new _util_bbox__WEBPACK_IMPORTED_MODULE_1__["default"](bbox.minX - bbox.width, bbox.minY, bbox.width, bbox.height)); - } - else { - bboxes.push(new _util_bbox__WEBPACK_IMPORTED_MODULE_1__["default"](viewRange.maxX, bbox.minY, bbox.width, bbox.height)); - } - } - } - }; - PaddingController.prototype._getPanel = function (view, box) { - var groups = []; - var geoms = view.geometries; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(geoms, function (geom) { - if (geom.labelsContainer) { - groups.push(geom.labelsContainer); - } - }); - var minX = Infinity; - var maxX = -Infinity; - var minY = Infinity; - var maxY = -Infinity; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(groups, function (group) { - var children = group.get('children'); - children.forEach(function (child) { - if (child.type === 'group' && child.get('children').length === 0) { - return; - } - var bbox = child.getBBox(); - if (bbox.minX < minX) { - minX = bbox.minX; - } - if (bbox.maxX > maxX) { - maxX = bbox.maxX; - } - if (bbox.minY < minY) { - minY = bbox.minY; - } - if (bbox.maxY > maxY) { - maxY = bbox.maxY; - } - }); - }); - var panelRange = view.coordinateBBox; - //right - var rightDist = Math.max(maxX - parseFloat(panelRange.maxX), 0); - if (rightDist > 0) { - var ratio = panelRange.width / (panelRange.width + rightDist); - rightDist *= ratio; - } - //left - var leftDist = Math.max(parseFloat(panelRange.minX) - minX, 0); - if (leftDist > 0) { - var ratio = panelRange.width / (panelRange.width + leftDist); - leftDist *= ratio; - } - //top - var topDist = Math.max(parseFloat(panelRange.minY) - minY, 0); - if (topDist > 0) { - var ratio = panelRange.height / (panelRange.height + topDist); - topDist *= ratio; - } - //bottom - var bottomDist = Math.max(maxY - parseFloat(panelRange.maxY), 0); - if (bottomDist > 0) { - var ratio = panelRange.height / (panelRange.height + bottomDist); - bottomDist *= ratio; - } - return [topDist, rightDist, bottomDist, leftDist]; - }; - PaddingController.prototype._mergeBBox = function (bboxes) { - var minX = Infinity; - var maxX = -Infinity; - var minY = Infinity; - var maxY = -Infinity; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(bboxes, function (bbox) { - var box = bbox; - minX = Math.min(box.minX, minX); - maxX = Math.max(box.maxX, maxX); - minY = Math.min(box.minY, minY); - maxY = Math.max(box.maxY, maxY); - }); - return { minX: minX, maxX: maxX, minY: minY, maxY: maxY }; - // return new BBox(minX, minY, maxX - minX, maxY - minY); - }; - PaddingController.prototype._adjustLegend = function (legend, view, box) { - var position = legend.get('position').split('-'); - var container = legend.get('container'); - var bbox = container.getBBox(); - var _a = view.viewBBox, width = _a.width, height = _a.height, maxX = _a.maxX, minX = _a.minX, maxY = _a.maxY, minY = _a.minY; - if (position[0] === 'right') { - container.move(width, minY); - } - if (position[0] === 'left') { - container.move(box.minX - bbox.width, minY); - } - if (position[0] === 'top') { - container.move(0, box.minY - bbox.height); - } - if (position[0] === 'bottom') { - container.move(0, Math.max(maxY, box.maxY)); - } - }; - PaddingController.prototype._getLegendInnerPadding = function (legend) { - var innerPadding = this.plot.theme.legend.innerPadding; - var position = legend.get('position').split('-'); - if (position[0] === 'top') { - return [innerPadding[0], 0, 0, 0]; - } - if (position[0] === 'bottom') { - return [0, 0, innerPadding[2], 0]; - } - if (position[0] === 'left') { - return [0, 0, 0, innerPadding[3]]; - } - if (position[0] === 'right') { - return [0, innerPadding[1], 0, 0]; - } - }; - PaddingController.prototype._mergeBleeding = function (source) { - var target = this.bleeding; - if (source.length !== target.length) { - return; - } - for (var i = 0; i < source.length; i++) { - target[i] += source[i]; - } - }; - return PaddingController; -}()); -/* harmony default export */ __webpack_exports__["default"] = (PaddingController); -//# sourceMappingURL=padding.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/base/controller/state.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/base/controller/state.js ***! - \****************************************************************/ -/*! exports provided: compare, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compare", function() { return compare; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _components_factory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../components/factory */ "./node_modules/@antv/g2plot/esm/components/factory.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony import */ var _util_state_manager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/state-manager */ "./node_modules/@antv/g2plot/esm/util/state-manager.js"); - - - - -function compare(origin, condition) { - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(condition)) { - var name_1 = condition.name, exp = condition.exp; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(exp)) { - return exp(origin[name_1]); - } - return origin[name_1] === exp; - } - return condition(origin); -} -var StateController = /** @class */ (function () { - function StateController(cfg) { - this.shapeContainers = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(this, cfg); - } - StateController.prototype.createStateManager = function (cfg) { - this.stateManager = new _util_state_manager__WEBPACK_IMPORTED_MODULE_3__["default"](cfg); - }; - StateController.prototype.bindStateManager = function (manager, cfg) { - this.stateManager = manager; - if (cfg.setState) { - this._updateStateProcess(cfg.setState); - } - if (cfg.onStateChange) { - this._stateChangeProcess(cfg.onStateChange); - } - }; - StateController.prototype.defaultStates = function (states) { - var _this = this; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(states, function (state, type) { - var condition = state.condition, style = state.style, related = state.related; - _this.setState({ type: type, condition: condition, related: related }); - }); - }; - StateController.prototype.setState = function (cfg) { - var _this = this; - var type = cfg.type, condition = cfg.condition, related = cfg.related; - if (!this.shapes) { - this.shapes = this._getShapes(); - this.originAttrs = this._getOriginAttrs(); - } - // this.resetZIndex(); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(this.shapes, function (shape, index) { - var shapeOrigin = shape.get('origin').data; - var origin = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isArray"])(shapeOrigin) ? shapeOrigin[0] : shapeOrigin; - if (compare(origin, condition)) { - var stateStyle = cfg.style ? cfg.style : _this._getDefaultStateStyle(type, shape); - var originAttr = _this.originAttrs[index]; - var attrs = void 0; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(stateStyle)) { - attrs = stateStyle(originAttr); - } - else { - attrs = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["mix"])({}, originAttr, stateStyle); - } - shape.attr(attrs); - _this.setZIndex(type, shape); - // const canvas = this.plot.canvas; - // canvas.draw(); - } - }); - // 组件与图形对状态量的响应不一定同步 - if (related) { - this._parserRelated(type, related, condition); - } - this.plot.canvas.draw(); - }; - StateController.prototype._updateStateProcess = function (setStateCfg) { - var _this = this; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(setStateCfg, function (cfg) { - var state = cfg.state; - var handler; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(state)) { - handler = function (e) { - var s = state(e); - _this.stateManager.setState(s.name, s.exp); - }; - } - else { - handler = function () { - _this.stateManager.setState(state.name, state.exp); - }; - } - if (cfg.event) { - Object(_util_event__WEBPACK_IMPORTED_MODULE_2__["onEvent"])(_this.plot, _this._eventParser(cfg.event), handler); - } - else { - handler(); - } - }); - }; - StateController.prototype._stateChangeProcess = function (onChangeCfg) { - var _this = this; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(onChangeCfg, function (cfg) { - _this.stateManager.on(cfg.name + ":change", function (props) { - cfg.callback(props, _this.plot); - }); - }); - }; - StateController.prototype._getShapes = function () { - var _this = this; - var shapes = []; - var geoms = this.plot.view.geometries; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(geoms, function (geom) { - var shapeContainer = geom.container; - _this.shapeContainers.push(shapeContainer); - if (!geom.destroyed) { - shapes.push.apply(shapes, geom.getShapes()); - } - }); - return shapes; - }; - StateController.prototype._getOriginAttrs = function () { - var attrs = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(this.shapes, function (shape) { - attrs.push(Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(shape.attr())); - }); - return attrs; - }; - // 将g2 geomtry转为plot层geometry - StateController.prototype._eventParser = function (event) { - var eventCfg = event.split(':'); - var eventTarget = this.plot.geometryParser('g2', eventCfg[0]); - var eventName = eventCfg[1]; - return eventTarget + ":" + eventName; - }; - StateController.prototype._getDefaultStateStyle = function (type, shape) { - var theme = this.plot.theme; - var plotGeomType = this.plot.geometryParser('plot', shape.name); - var styleField = plotGeomType + "Style"; - if (theme[styleField]) { - var style = theme[styleField][type]; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(style)) { - style = style(shape.attr()); - } - return style; - } - return {}; - }; - StateController.prototype._parserRelated = function (type, related, condition) { - var _this = this; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(related, function (r) { - if (_this.plot[r]) { - // fixme: 自定义组件 - // this.plot[r].setState(type, condition); - var method = Object(_components_factory__WEBPACK_IMPORTED_MODULE_1__["getComponentStateMethod"])(r, type); - method(_this.plot, condition); - } - }); - }; - // private set - StateController.prototype.setZIndex = function (stateType, shape) { - if (stateType === 'active' || stateType === 'selected') { - // shape.setZIndex(1); - var children = shape.get('parent').get('children'); - children[children.length - 1].setZIndex(0); - shape.setZIndex(1); - } - }; - StateController.prototype.resetZIndex = function () { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(this.shapeContainers, function (container) { - var children = container.get('children'); - children.sort(function (obj1, obj2) { - return obj1._INDEX - obj2._INDEX; - }); - }); - }; - return StateController; -}()); -/* harmony default export */ __webpack_exports__["default"] = (StateController); -//# sourceMappingURL=state.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/base/controller/theme.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/base/controller/theme.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme */ "./node_modules/@antv/g2plot/esm/theme/index.js"); -/* harmony import */ var _util_responsive_theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/responsive/theme */ "./node_modules/@antv/g2plot/esm/util/responsive/theme.js"); - - - - -/** - * 负责图表theme的管理 - */ -var G2DefaultTheme = Object(_dependents__WEBPACK_IMPORTED_MODULE_0__["getTheme"])(); -var ThemeController = /** @class */ (function () { - function ThemeController() { - } - /** - * 获取指定的全局theme - * @param theme - */ - ThemeController.getGlobalTheme = function (theme) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isString"])(theme)) { - return Object(_theme__WEBPACK_IMPORTED_MODULE_2__["getGlobalTheme"])(theme); - } - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, Object(_theme__WEBPACK_IMPORTED_MODULE_2__["getGlobalTheme"])(), theme); - }; - /** - * 通过 theme 和图表类型,获取当前 plot 对应的主题 - * @param props - * @param type - */ - ThemeController.prototype.getPlotTheme = function (props, type) { - var theme = props.theme; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isString"])(theme)) { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, Object(_theme__WEBPACK_IMPORTED_MODULE_2__["getGlobalTheme"])(theme), Object(_theme__WEBPACK_IMPORTED_MODULE_2__["getTheme"])(type)); - } - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, Object(_theme__WEBPACK_IMPORTED_MODULE_2__["getGlobalTheme"])(), Object(_theme__WEBPACK_IMPORTED_MODULE_2__["getTheme"])(type), theme); - }; - /** - * 获取转化成 G2 的结构主题 - * @param props - * @param type - */ - ThemeController.prototype.getTheme = function (props, type) { - var plotG2Theme = Object(_theme__WEBPACK_IMPORTED_MODULE_2__["convertToG2Theme"])(this.getPlotTheme(props, type)); - var g2Theme = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, G2DefaultTheme, plotG2Theme); - return g2Theme; - }; - ThemeController.prototype.getResponsiveTheme = function (type) { - return Object(_util_responsive_theme__WEBPACK_IMPORTED_MODULE_3__["getResponsiveTheme"])(type) || Object(_util_responsive_theme__WEBPACK_IMPORTED_MODULE_3__["getResponsiveTheme"])('default'); - }; - return ThemeController; -}()); -/* harmony default export */ __webpack_exports__["default"] = (ThemeController); -//# sourceMappingURL=theme.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/base/global.js": -/*!******************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/base/global.js ***! - \******************************************************/ -/*! exports provided: registerPlotType, getPlotType */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerPlotType", function() { return registerPlotType; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPlotType", function() { return getPlotType; }); -/** 所有统计图形 */ -var GLOBAL_PLOT_MAP = {}; -function registerPlotType(name, ctr) { - GLOBAL_PLOT_MAP[name.toLowerCase()] = ctr; -} -function getPlotType(name) { - return GLOBAL_PLOT_MAP[name.toLowerCase()]; -} -//# sourceMappingURL=global.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/base/layer.js": -/*!*****************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/base/layer.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_event_emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/event-emitter */ "./node_modules/@antv/event-emitter/lib/index.js"); -/* harmony import */ var _antv_event_emitter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_antv_event_emitter__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony import */ var _util_bbox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/bbox */ "./node_modules/@antv/g2plot/esm/util/bbox.js"); - - - - - -var Layer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Layer, _super); - /** - * layer base for g2plot - */ - function Layer(props) { - var _this = _super.call(this) || this; - _this.layers = []; - _this.destroyed = false; - _this.visibility = true; - _this.rendered = false; - _this.eventHandlers = []; - _this.options = _this.getOptions(props); - _this.processOptions(_this.options); - return _this; - } - Layer.prototype.processOptions = function (options) { - this.id = options.id; - this.x = options.x; - this.y = options.y; - this.width = options.width; - this.height = options.height; - this.canvas = options.canvas; - this.parent = options.parent; - }; - Layer.prototype.updateConfig = function (cfg) { - this.options = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["deepMix"])({}, this.options, cfg); - this.processOptions(this.options); - }; - Layer.prototype.beforeInit = function () { }; - /** - * init life cycle - */ - Layer.prototype.init = function () { - this.layerBBox = this.getLayerBBox(); - this.layerRegion = this.getLayerRegion(); - this.eachLayer(function (layer) { - layer.init(); - }); - }; - Layer.prototype.afterInit = function () { }; - /** - * render layer recursively - */ - Layer.prototype.render = function () { - // fixme: 等plot不再继承layer,这个就可以挪到构造函数里去,不需要再加是否render过的判断了 - if (!this.rendered) { - this.container = this.parent ? this.parent.container.addGroup() : this.canvas.addGroup(); - } - this.rendered = true; - this.beforeInit(); - this.init(); - this.afterInit(); - //(this.container, [['t', this.x, this.y]]); - this.eachLayer(function (layer) { - layer.render(); - }); - this.canvas.draw(); - }; - /** - * clear layer content - */ - Layer.prototype.clear = function () { - this.eachLayer(function (layer) { - layer.destroy(); - }); - this.layers = []; - this.container.clear(); - }; - /** - * destroy layer recursively, remove the container of layer - */ - Layer.prototype.destroy = function () { - var _this = this; - this.eachLayer(function (layer) { - layer.destroy(); - }); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(this.eventHandlers, function (h) { - _this.off(h.eventName, h.handler); - }); - this.container.remove(true); - this.destroyed = true; - }; - /** - * display layer - */ - Layer.prototype.show = function () { - this.container.attr('visible', true); - this.container.set('visible', true); - this.visibility = true; - this.canvas.draw(); - }; - /** - * hide layer - */ - Layer.prototype.hide = function () { - this.container.attr('visible', false); - this.container.set('visible', false); - this.visibility = false; - this.canvas.draw(); - }; - /** - * add children layer - * @param layer - */ - Layer.prototype.addLayer = function (layer) { - var idx = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["findIndex"])(this.layers, function (item) { return item === layer; }); - if (idx < 0) { - if (layer.parent !== this) { - layer.parent = this; - layer.init(); - } - this.layers.push(layer); - } - }; - /** - * remove children layer - * @param layer - */ - Layer.prototype.removeLayer = function (layer) { - var idx = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["findIndex"])(this.layers, function (item) { return item === layer; }); - if (idx >= 0) { - this.layers.splice(idx, 1); - } - }; - /** - * update layer's display range - * @param props - * @param recursive whether update children layers or not - */ - Layer.prototype.updateBBox = function (props, recursive) { - if (recursive === void 0) { recursive = false; } - var originRange = { - x: this.x, - y: this.y, - width: this.width, - height: this.height, - }; - var newRange = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["deepMix"])({}, originRange, props); - this.x = newRange.x; - this.y = newRange.y; - this.width = newRange.width; - this.height = newRange.height; - this.layerBBox = this.getLayerBBox(); - this.layerRegion = this.getLayerRegion(); - this.render(); - if (recursive) { - this.eachLayer(function (layer) { - layer.updateBBoxByParent(); - layer.render(); - }); - } - this.canvas.draw(); - }; - /** - * update display range according to parent layer's range - */ - Layer.prototype.updateBBoxByParent = function () { - var region = this.layerRegion; - this.x = this.parent.x + this.parent.width * region.start.x; - this.y = this.parent.y + this.parent.height * region.start.y; - this.width = this.parent.width * (region.end.x - region.start.x); - this.height = this.parent.height * (region.end.y - region.start.y); - this.layerBBox = this.getLayerBBox(); - }; - /** - * get global position of layer - */ - Layer.prototype.getGlobalPosition = function () { - var globalX = this.x; - var globalY = this.y; - var parent = this.parent; - while (parent) { - globalX += parent.x; - globalY += parent.y; - parent = parent.parent; - } - return { x: globalX, y: globalY }; - }; - Layer.prototype.getGlobalBBox = function () { - var globalPosition = this.getGlobalPosition(); - return new _util_bbox__WEBPACK_IMPORTED_MODULE_4__["default"](globalPosition.x, globalPosition.y, this.width, this.height); - }; - Layer.prototype.getOptions = function (props) { - var parentWidth = 0; - var parentHeight = 0; - if (props.parent) { - parentWidth = props.parent.width; - parentHeight = props.parent.height; - } - var defaultOptions = { - x: 0, - y: 0, - width: parentWidth, - height: parentHeight, - }; - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["deepMix"])({}, defaultOptions, props); - }; - Layer.prototype.eachLayer = function (cb) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(this.layers, cb); - }; - Layer.prototype.parseEvents = function (eventParser) { - var _this = this; - var eventsName = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["keys"])(_util_event__WEBPACK_IMPORTED_MODULE_3__["LAYER_EVENT_MAP"]); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(eventParser, function (e, k) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["contains"])(eventsName, k) && Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(e)) { - var eventName = _util_event__WEBPACK_IMPORTED_MODULE_3__["LAYER_EVENT_MAP"][k] || k; - var handler = e; - _this.on(eventName, handler); - _this.eventHandlers.push({ name: eventName, handler: handler }); - } - }); - }; - Layer.prototype.getLayerBBox = function () { - return new _util_bbox__WEBPACK_IMPORTED_MODULE_4__["default"](this.x, this.y, this.width, this.height); - }; - Layer.prototype.getLayerRegion = function () { - if (this.parent) { - var parentWidth = this.parent.width; - var parentHeight = this.parent.height; - var parentX = this.parent.x; - var parentY = this.parent.y; - var startX = (this.x - parentX) / parentWidth; - var startY = (this.y - parentY) / parentHeight; - var endX = (this.x + this.width - parentX) / parentWidth; - var endY = (this.y + this.height - parentY) / parentHeight; - return { start: { x: startX, y: startY }, end: { x: endX, y: endY } }; - } - return { start: { x: 0, y: 0 }, end: { x: 1, y: 1 } }; - }; - return Layer; -}(_antv_event_emitter__WEBPACK_IMPORTED_MODULE_1___default.a)); -/* harmony default export */ __webpack_exports__["default"] = (Layer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/base/plot.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/base/plot.js ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_event_emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/event-emitter */ "./node_modules/@antv/event-emitter/lib/index.js"); -/* harmony import */ var _antv_event_emitter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_antv_event_emitter__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _controller_canvas__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./controller/canvas */ "./node_modules/@antv/g2plot/esm/base/controller/canvas.js"); -/* harmony import */ var _controller_event__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./controller/event */ "./node_modules/@antv/g2plot/esm/base/controller/event.js"); -/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/base/layer.js"); -/* harmony import */ var _view_layer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./view-layer */ "./node_modules/@antv/g2plot/esm/base/view-layer.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); - - - - - - - - - -var BasePlot = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(BasePlot, _super); - function BasePlot(container, props) { - var _this = _super.call(this) || this; - _this.containerDOM = typeof container === 'string' ? document.getElementById(container) : container; - _this.forceFit = !Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isNil"])(props.forceFit) ? props.forceFit : Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isNil"])(props.width) && Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isNil"])(props.height); - _this.renderer = props.renderer || 'canvas'; - _this.pixelRatio = props.pixelRatio || null; - _this.width = props.width; - _this.height = props.height; - _this.theme = props.theme; - _this.canvasController = new _controller_canvas__WEBPACK_IMPORTED_MODULE_3__["default"]({ - containerDOM: _this.containerDOM, - plot: _this, - }); - /** update layer properties */ - _this.width = _this.canvasController.width; - _this.height = _this.canvasController.height; - _this.canvas = _this.canvasController.canvas; - _this.layers = []; - _this.destroyed = false; - _this.createLayers(props); - /** bind events */ - _this.eventController = new _controller_event__WEBPACK_IMPORTED_MODULE_4__["default"]({ - plot: _this, - canvas: _this.canvasController.canvas, - }); - _this.eventController.bindEvents(); - _this.parseEvents(props); - return _this; - } - /** 生命周期 */ - BasePlot.prototype.destroy = function () { - this.eachLayer(function (layer) { - layer.destroy(); - }); - this.canvasController.destroy(); - this.eventController.clearEvents(); - this.layers = []; - this.destroyed = true; - }; - /** - * 重新绘制图形 - */ - BasePlot.prototype.repaint = function () { - this.canvasController.canvas.draw(); - }; - BasePlot.prototype.updateConfig = function (config, all) { - if (all === void 0) { all = false; } - if (all) { - this.eachLayer(function (layer) { - if (layer instanceof _view_layer__WEBPACK_IMPORTED_MODULE_7__["default"]) { - layer.updateConfig(config); - } - }); - } - else { - var layer = this.layers[0]; - if (layer instanceof _layer__WEBPACK_IMPORTED_MODULE_6__["default"]) { - layer.updateConfig(config); - } - } - if (config.width) { - this.width = config.width; - } - if (config.height) { - this.height = config.height; - } - if (config.theme) { - this.theme = config.theme; - } - this.canvasController.updateCanvasSize(); - this.canvasController.updateCanvasTheme(); - }; - BasePlot.prototype.changeData = function (data, all) { - if (all === void 0) { all = false; } - if (all) { - this.eachLayer(function (layer) { - if (layer instanceof _view_layer__WEBPACK_IMPORTED_MODULE_7__["default"]) { - layer.changeData(data); - } - }); - } - else { - var layer = this.layers[0]; - if (layer instanceof _view_layer__WEBPACK_IMPORTED_MODULE_7__["default"]) { - layer.changeData(data); - } - } - }; - BasePlot.prototype.getPlotTheme = function () { - var layer = this.layers[0]; - return layer.getPlotTheme(); - }; - BasePlot.prototype.getData = function () { - var layer = this.layers[0]; - return layer.getData(); - }; - /** - * 绑定一个外部的stateManager - * 先直接传递给各个子 Layer - * - * @param stateManager - * @param cfg - */ - BasePlot.prototype.bindStateManager = function (stateManager, cfg) { - this.eachLayer(function (layer) { - if (layer instanceof _view_layer__WEBPACK_IMPORTED_MODULE_7__["default"]) { - layer.bindStateManager(stateManager, cfg); - } - }); - }; - /** - * 响应状态量更新的快捷方法 - * - * @param condition - * @param style - */ - BasePlot.prototype.setActive = function (condition, style) { - this.eachLayer(function (layer) { - if (layer instanceof _view_layer__WEBPACK_IMPORTED_MODULE_7__["default"]) { - layer.setActive(condition, style); - } - }); - }; - BasePlot.prototype.setSelected = function (condition, style) { - this.eachLayer(function (layer) { - if (layer instanceof _view_layer__WEBPACK_IMPORTED_MODULE_7__["default"]) { - layer.setSelected(condition, style); - } - }); - }; - BasePlot.prototype.setDisable = function (condition, style) { - this.eachLayer(function (layer) { - if (layer instanceof _view_layer__WEBPACK_IMPORTED_MODULE_7__["default"]) { - layer.setDisable(condition, style); - } - }); - }; - BasePlot.prototype.setDefault = function (condition, style) { - this.eachLayer(function (layer) { - if (layer instanceof _view_layer__WEBPACK_IMPORTED_MODULE_7__["default"]) { - layer.setDefault(condition, style); - } - }); - }; - /** - * 获取 Plot 的 View - */ - BasePlot.prototype.getView = function () { - // 临时:避免 getLayer 的类型转换问题 - return this.layers[0].view; - }; - /** - * 获取图形下的图层 Layer,默认第一个 Layer - * @param idx - */ - BasePlot.prototype.getLayer = function (idx) { - if (idx === void 0) { idx = 0; } - return this.layers[idx]; - }; - BasePlot.prototype.getCanvas = function () { - return this.canvasController.canvas; - }; - BasePlot.prototype.getLayers = function () { - return this.layers; - }; - BasePlot.prototype.render = function () { - this.eachLayer(function (layer) { return layer.render(); }); - }; - BasePlot.prototype.eachLayer = function (cb) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(this.layers, cb); - }; - /** - * add children layer - * @param layer - */ - BasePlot.prototype.addLayer = function (layer) { - var idx = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["findIndex"])(this.layers, function (item) { return item === layer; }); - if (idx < 0) { - this.layers.push(layer); - } - }; - BasePlot.prototype.createLayers = function (props) { - if (props.layers) { - // TODO: combo plot - } - else if (props.type) { - var viewLayerCtr = Object(_global__WEBPACK_IMPORTED_MODULE_5__["getPlotType"])(props.type); - var viewLayerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["deepMix"])({}, props, { - canvas: this.canvasController.canvas, - x: 0, - y: 0, - width: this.width, - height: this.height, - }); - var viewLayer = new viewLayerCtr(viewLayerProps); - this.addLayer(viewLayer); - } - }; - BasePlot.prototype.parseEvents = function (props) { - var _this = this; - var eventsName = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["keys"])(_util_event__WEBPACK_IMPORTED_MODULE_8__["CANVAS_EVENT_MAP"]); - if (props.events) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(props.events, function (e, k) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["contains"])(eventsName, k) && Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(e)) { - var eventName = _util_event__WEBPACK_IMPORTED_MODULE_8__["CANVAS_EVENT_MAP"][k] || k; - var handler = e; - _this.on(eventName, handler); - } - }); - } - }; - return BasePlot; -}(_antv_event_emitter__WEBPACK_IMPORTED_MODULE_1___default.a)); -/* harmony default export */ __webpack_exports__["default"] = (BasePlot); -//# sourceMappingURL=plot.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/base/view-layer.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/base/view-layer.js ***! - \**********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); -/* harmony import */ var _components_description__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components/description */ "./node_modules/@antv/g2plot/esm/components/description.js"); -/* harmony import */ var _components_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../components/factory */ "./node_modules/@antv/g2plot/esm/components/factory.js"); -/* harmony import */ var _interaction_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../interaction/index */ "./node_modules/@antv/g2plot/esm/interaction/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony import */ var _controller_padding__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./controller/padding */ "./node_modules/@antv/g2plot/esm/base/controller/padding.js"); -/* harmony import */ var _controller_state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./controller/state */ "./node_modules/@antv/g2plot/esm/base/controller/state.js"); -/* harmony import */ var _controller_theme__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./controller/theme */ "./node_modules/@antv/g2plot/esm/base/controller/theme.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/base/layer.js"); -/* harmony import */ var _util_common__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../util/common */ "./node_modules/@antv/g2plot/esm/util/common.js"); - - - - - - - - - - - - -var ViewLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ViewLayer, _super); - function ViewLayer(props) { - var _this = _super.call(this, props) || this; - _this.interactions = []; - _this.options = _this.getOptions(props); - _this.initialOptions = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _this.options); - _this.paddingController = new _controller_padding__WEBPACK_IMPORTED_MODULE_7__["default"]({ - plot: _this, - }); - _this.stateController = new _controller_state__WEBPACK_IMPORTED_MODULE_8__["default"]({ - plot: _this, - }); - _this.themeController = new _controller_theme__WEBPACK_IMPORTED_MODULE_9__["default"](); - return _this; - } - ViewLayer.getDefaultOptions = function (props) { - return { - renderer: 'canvas', - title: { - visible: false, - alignTo: 'left', - text: '', - }, - description: { - visible: false, - text: '', - alignTo: 'left', - }, - padding: 'auto', - legend: { - visible: true, - position: 'bottom', - }, - tooltip: { - visible: true, - shared: true, - showCrosshairs: true, - crosshairs: { - type: 'x', - }, - offset: 20, - }, - xAxis: { - visible: true, - grid: { - visible: false, - }, - line: { - visible: true, - }, - tickLine: { - visible: true, - }, - label: { - visible: true, - autoRotate: true, - autoHide: true, - }, - title: { - visible: false, - offset: 12, - }, - }, - yAxis: { - visible: true, - autoRotateTitle: true, - grid: { - visible: true, - }, - line: { - visible: false, - }, - tickLine: { - visible: false, - }, - label: { - visible: true, - autoHide: true, - autoRotate: false, - }, - title: { - visible: false, - offset: 12, - }, - }, - label: { - visible: false, - }, - interactions: [{ type: 'tooltip' }, { type: 'legend-active' }, { type: 'legend-filter' }], - }; - }; - ViewLayer.prototype.getOptions = function (props) { - var options = _super.prototype.getOptions.call(this, props); - // @ts-ignore - var defaultOptions = this.constructor.getDefaultOptions(props); - // interactions 需要合并去重下 - var interactions = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["reduce"])(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["flatten"])(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["map"])([options, defaultOptions, props], function (src) { return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(src, 'interactions', []); })), function (result, cur) { - var idx = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["findIndex"])(result, function (item) { return item.type === cur.type; }); - if (idx >= 0) { - result.splice(idx, 1); - } - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArrays"])(result, [cur]); - }, []); - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, options, defaultOptions, props, { interactions: interactions }); - }; - ViewLayer.prototype.beforeInit = function () { - _super.prototype.beforeInit.call(this); - }; - ViewLayer.prototype.init = function () { - var _this = this; - _super.prototype.init.call(this); - this.theme = this.themeController.getTheme(this.options, this.type); - this.config = { - data: this.processData(this.options.data), - scales: {}, - legends: {}, - tooltip: { - showTitle: true, - }, - axes: {}, - coordinate: { type: 'cartesian' }, - geometries: [], - annotations: [], - interactions: [], - theme: this.theme, - panelRange: {}, - animate: true, - views: [], - }; - this.paddingController.clear(); - this.drawTitle(); - this.drawDescription(); - // 有些interaction要调整配置项,所以顺序提前 - this.interaction(); - this.coord(); - this.scale(); - this.axis(); - this.tooltip(); - this.legend(); - this.addGeometry(); - this.annotation(); - this.animation(); - this.viewRange = this.getViewRange(); - var region = this.viewRangeToRegion(this.viewRange); - this.view = new _dependents__WEBPACK_IMPORTED_MODULE_2__["View"]({ - parent: null, - canvas: this.canvas, - backgroundGroup: this.container.addGroup(), - middleGroup: this.container.addGroup(), - foregroundGroup: this.container.addGroup(), - padding: this.paddingController.getPadding(), - theme: this.theme, - options: this.config, - region: region, - }); - this.applyInteractions(); - this.view.on('afterrender', function () { - _this.afterRender(); - }); - }; - ViewLayer.prototype.afterInit = function () { - _super.prototype.afterInit.call(this); - if (!this.view || this.view.destroyed) { - return; - } - if (this.options.padding !== 'auto') { - this.parseEvents(); - } - }; - ViewLayer.prototype.afterRender = function () { - if (!this.view || this.view.destroyed) { - return; - } - var options = this.options; - var padding = options.padding ? options.padding : this.config.theme.padding; - /** defaultState */ - if (options.defaultState && padding !== 'auto') { - this.stateController.defaultStates(options.defaultState); - } - /** autopadding */ - if (padding === 'auto') { - this.paddingController.processAutoPadding(); - } - }; - /** 完整生命周期渲染 */ - ViewLayer.prototype.render = function () { - _super.prototype.render.call(this); - var data = this.options.data; - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isEmpty"])(data)) { - this.view.render(); - } - }; - /** 销毁 */ - ViewLayer.prototype.destroy = function () { - this.doDestroy(); - _super.prototype.destroy.call(this); - }; - /** 更新配置项 */ - ViewLayer.prototype.updateConfig = function (cfg) { - this.doDestroy(); - if (!cfg.padding && this.initialOptions.padding && this.initialOptions.padding === 'auto') { - cfg.padding = 'auto'; - } - this.options = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, this.options, cfg); - this.processOptions(this.options); - }; - ViewLayer.prototype.changeData = function (data) { - this.options.data = this.processData(data); - this.view.changeData(this.options.data); - this.view.render(); - }; - // plot 不断销毁重建,需要一个api获取最新的plot - ViewLayer.prototype.getPlot = function () { - return this.view; - }; - // 获取对应的G2 Theme - ViewLayer.prototype.getTheme = function () { - if (!this.theme) { - return this.themeController.getTheme(this.options, this.type); - } - return this.theme; - }; - ViewLayer.prototype.getResponsiveTheme = function () { - return this.themeController.getResponsiveTheme(this.type); - }; - // 获取对应的Plot Theme - ViewLayer.prototype.getPlotTheme = function () { - return this.themeController.getPlotTheme(this.options, this.type); - }; - ViewLayer.prototype.getInteractions = function () { - return this.interactions; - }; - // 绑定一个外部的stateManager - ViewLayer.prototype.bindStateManager = function (stateManager, cfg) { - this.stateController.bindStateManager(stateManager, cfg); - }; - // 响应状态量更新的快捷方法 - ViewLayer.prototype.setActive = function (condition, style) { - this.stateController.setState({ type: 'active', condition: condition, style: style }); - }; - ViewLayer.prototype.setSelected = function (condition, style) { - this.stateController.setState({ type: 'selected', condition: condition, style: style }); - }; - ViewLayer.prototype.setDisable = function (condition, style) { - this.stateController.setState({ type: 'disable', condition: condition, style: style }); - }; - ViewLayer.prototype.setDefault = function (condition, style) { - this.stateController.setState({ type: 'default', condition: condition, style: style }); - }; - // 获取 ViewLayer 的数据项 - ViewLayer.prototype.getData = function (start, end) { - return this.processData((this.options.data || []).slice(start, end)); - }; - ViewLayer.prototype.processData = function (data) { - return data; - }; - ViewLayer.prototype.scale = function () { - /** scale meta配置 */ - // 1. this.config.scales中已有子图形在处理xAxis/yAxis是写入的xField/yField对应的scale信息,这里再检查用户设置的meta,将meta信息合并到默认的scale中 - // 2. 同时xAxis/yAxis中的type优先级更高,覆盖meta中的type配置 - var scaleTypes = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mapValues"])(this.config.scales, function (scaleConfig) { - var type = scaleConfig.type; - return type ? { type: type } : {}; - }); - var scales = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, this.config.scales, this.options.meta || {}, scaleTypes); - this.setConfig('scales', scales); - }; - ViewLayer.prototype.axis = function () { - var xAxis_parser = Object(_components_factory__WEBPACK_IMPORTED_MODULE_4__["getComponent"])('axis', { - plot: this, - dim: 'x', - }); - var yAxis_parser = Object(_components_factory__WEBPACK_IMPORTED_MODULE_4__["getComponent"])('axis', { - plot: this, - dim: 'y', - }); - var axesConfig = {}; - axesConfig[this.options.xField] = xAxis_parser; - axesConfig[this.options.yField] = yAxis_parser; - /** 存储坐标轴配置项到config */ - this.setConfig('axes', axesConfig); - }; - ViewLayer.prototype.tooltip = function () { - if (this.options.tooltip.visible === false) { - this.setConfig('tooltip', false); - return; - } - this.setConfig('tooltip', Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.options, 'tooltip'))); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])(this.config.theme.tooltip, this.options.tooltip.style); - }; - ViewLayer.prototype.getLegendPosition = function (position) { - var positionList = position.split('-'); - // G2 4.0 兼容 XXX-center 到 XXX 的场景 - if (positionList && positionList.length > 1 && positionList[1] === 'center') { - return positionList[0]; - } - return position; - }; - ViewLayer.prototype.legend = function () { - if (this.options.legend.visible === false) { - this.setConfig('legends', false); - return; - } - var flipOption = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.options, 'legend.flipPage'); - var clickable = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.options, 'legend.clickable'); - this.setConfig('legends', { - position: this.getLegendPosition(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.options, 'legend.position')), - formatter: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.options, 'legend.formatter'), - offsetX: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.options, 'legend.offsetX'), - offsetY: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.options, 'legend.offsetY'), - clickable: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isUndefined"])(clickable) ? true : clickable, - // wordSpacing: get(this.options, 'legend.wordSpacing'), - flipPage: flipOption, - marker: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.options, 'legend.marker'), - }); - }; - ViewLayer.prototype.annotation = function () { - var _this = this; - var config = []; - if (this.config.coordinate.type === 'cartesian' && this.options.guideLine) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(this.options.guideLine, function (line) { - var guideLine = Object(_components_factory__WEBPACK_IMPORTED_MODULE_4__["getComponent"])('guideLine', { - plot: _this, - cfg: line, - }); - config.push(guideLine); - }); - } - this.setConfig('annotations', config); - }; - ViewLayer.prototype.interaction = function () { - var _this = this; - var _a = this.options.interactions, interactions = _a === void 0 ? [] : _a; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(interactions, function (interaction) { - var type = interaction.type; - if (type === 'slider' || type === 'scrollbar') { - var axisConfig = { - label: { - autoHide: true, - autoRotate: false, - }, - }; - _this.options.xAxis = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _this.options.xAxis, axisConfig); - } - _this.setConfig('interaction', interaction); - }); - }; - ViewLayer.prototype.animation = function () { - if (this.options.animation === false || this.options.padding === 'auto') { - this.setConfig('animate', false); - } - }; - ViewLayer.prototype.applyInteractions = function () { - var _this = this; - var _a = this.options.interactions, interactions = _a === void 0 ? [] : _a; - if (this.interactions) { - this.interactions.forEach(function (inst) { - inst.destroy(); - }); - } - this.interactions = []; - interactions.forEach(function (interaction) { - var Ctor = _interaction_index__WEBPACK_IMPORTED_MODULE_5__["default"].getInteraction(interaction.type, _this.type); - if (Ctor) { - var inst = new Ctor({ view: _this.view }, _this, Ctor.getInteractionRange(_this.layerBBox, interaction.cfg), interaction.cfg); - _this.interactions.push(inst); - } - }); - }; - /** 设置G2 config,带有类型推导 */ - ViewLayer.prototype.setConfig = function (key, config) { - if (key === 'geometry') { - this.config.geometries.push(config); - return; - } - if (key === 'interaction') { - this.config.interactions.push(config); - return; - } - if (config === false) { - this.config[key] = false; - return; - } - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["assign"])(this.config[key], config); - }; - ViewLayer.prototype.parseEvents = function (eventParser) { - var _this = this; - var options = this.options; - if (options.events) { - _super.prototype.parseEvents.call(this, options.events); - var eventmap_1 = eventParser ? eventParser.EVENT_MAP : _util_event__WEBPACK_IMPORTED_MODULE_6__["EVENT_MAP"]; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(options.events, function (e, k) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(e)) { - var eventName = eventmap_1[k] || k; - var handler = e; - Object(_util_event__WEBPACK_IMPORTED_MODULE_6__["onEvent"])(_this, eventName, handler); - } - }); - } - }; - ViewLayer.prototype.drawTitle = function () { - var props = this.options; - var range = this.layerBBox; - if (this.title) { - this.title.destroy(); - this.title = null; - } - if (Object(_util_common__WEBPACK_IMPORTED_MODULE_11__["isTextUsable"])(props.title)) { - var width = this.width; - var theme = this.config.theme; - var title = new _components_description__WEBPACK_IMPORTED_MODULE_3__["default"]({ - leftMargin: range.minX + theme.title.padding[3], - rightMargin: range.maxX - theme.title.padding[1], - topMargin: range.minY + theme.title.padding[0], - text: props.title.text, - style: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mix"])(theme.title, props.title.style), - wrapperWidth: width - theme.title.padding[3] - theme.title.padding[1], - container: this.container.addGroup(), - theme: theme, - index: Object(_util_common__WEBPACK_IMPORTED_MODULE_11__["isTextUsable"])(props.description) ? 0 : 1, - plot: this, - alignTo: props.title.alignTo, - name: 'title', - }); - this.title = title; - this.paddingController.registerPadding(title, 'outer'); - } - }; - ViewLayer.prototype.drawDescription = function () { - var props = this.options; - var range = this.layerBBox; - if (this.description) { - this.description.destroy(); - this.description = null; - } - if (Object(_util_common__WEBPACK_IMPORTED_MODULE_11__["isTextUsable"])(props.description)) { - var width = this.width; - var theme = this.config.theme; - var topMargin = 0; - if (this.title) { - var titleBBox = this.title.getBBox(); - topMargin += titleBBox.minY + titleBBox.height; - topMargin += theme.description.padding[0]; - } - else { - // 无title的情况下使用title的上padding - topMargin += range.minY + theme.title.padding[0]; - } - var description = new _components_description__WEBPACK_IMPORTED_MODULE_3__["default"]({ - leftMargin: range.minX + theme.description.padding[3], - topMargin: topMargin, - rightMargin: range.maxX - theme.title.padding[1], - text: props.description.text, - style: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mix"])(theme.description, props.description.style), - wrapperWidth: width - theme.description.padding[3] - theme.description.padding[1], - container: this.container.addGroup(), - theme: theme, - index: 1, - plot: this, - alignTo: props.description.alignTo, - name: 'description', - }); - this.description = description; - this.paddingController.registerPadding(description, 'outer'); - } - }; - /** 抽取destroy和updateConfig共有代码为_destroy方法 */ - ViewLayer.prototype.doDestroy = function () { - this.doDestroyInteractions(); - /** 销毁g2.view实例 */ - if (!this.view.destroyed) { - this.view.destroy(); - } - }; - ViewLayer.prototype.doDestroyInteractions = function () { - // 移除注册的 interactions - if (this.interactions) { - this.interactions.forEach(function (inst) { - inst.destroy(); - }); - } - this.interactions = []; - }; - ViewLayer.prototype.getViewRange = function () { - var _this = this; - // 有 Range 的 Interaction 参与 ViewMargin 计算 - var _a = this.options.interactions, interactions = _a === void 0 ? [] : _a; - var layerBBox = this.layerBBox; - interactions.forEach(function (interaction) { - var Ctor = _interaction_index__WEBPACK_IMPORTED_MODULE_5__["default"].getInteraction(interaction.type, _this.type); - var range = Ctor && Ctor.getInteractionRange(layerBBox, interaction.cfg); - var position = ''; - if (range) { - // 先只考虑 Range 靠边的情况 - if (range.maxY === layerBBox.maxY && range.minY > layerBBox.minY) { - // margin[2] += range.height; - position = 'bottom'; - } - else if (range.maxX === layerBBox.maxX && range.minX > layerBBox.minX) { - // margin[1] += range.width; - position = 'right'; - } - else if (range.minX === layerBBox.minX && range.maxX > layerBBox.maxX) { - // margin[3] += range.width; - position = 'left'; - } - else if (range.minY === layerBBox.minY && range.maxY > layerBBox.maxY) { - // margin[0] += range.height; - position = 'top'; - } - _this.paddingController.registerPadding({ - getBBox: function () { - return range; - }, - position: position, - }, 'outer'); - } - }); - var viewRange = this.paddingController.processOuterPadding(); - return viewRange; - }; - ViewLayer.prototype.viewRangeToRegion = function (viewRange) { - var _a = this, width = _a.width, height = _a.height; - var start = { x: 0, y: 0 }, end = { x: 1, y: 1 }; - start.x = viewRange.minX / width; - start.y = viewRange.minY / height; - end.x = viewRange.maxX / width; - end.y = viewRange.maxY / height; - return { - start: start, - end: end, - }; - }; - return ViewLayer; -}(_layer__WEBPACK_IMPORTED_MODULE_10__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (ViewLayer); -//# sourceMappingURL=view-layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/combo-plots/base.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/combo-plots/base.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - - - -var ComboPlot = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ComboPlot, _super); - function ComboPlot() { - return _super !== null && _super.apply(this, arguments) || this; - } - ComboPlot.prototype.getDefaultOptions = function () { - return {}; - }; - ComboPlot.prototype.getGlobalOptions = function (props) { - return { - xAxis: props.xAxis, - yAxis: props.yAxis, - theme: props.theme, - legend: props.legend, - }; - }; - ComboPlot.prototype.createComboLayers = function () { - this.globalOptions = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["deepMix"])({}, this.getDefaultOptions(), this.getGlobalOptions(this.options)); - }; - return ComboPlot; -}(_base_plot__WEBPACK_IMPORTED_MODULE_1__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (ComboPlot); -//# sourceMappingURL=base.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/combo-plots/overlapped.js": -/*!*****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/combo-plots/overlapped.js ***! - \*****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/g2plot/esm/combo-plots/base.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _base_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../base/layer */ "./node_modules/@antv/g2plot/esm/base/layer.js"); -/* harmony import */ var _plots_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../plots/index */ "./node_modules/@antv/g2plot/esm/plots/index.js"); -/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./util */ "./node_modules/@antv/g2plot/esm/combo-plots/util/index.js"); -/* harmony import */ var _util_padding__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./util/padding */ "./node_modules/@antv/g2plot/esm/combo-plots/util/padding.js"); -/* harmony import */ var _theme_global__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../theme/global */ "./node_modules/@antv/g2plot/esm/theme/global.js"); - - - - - - - - - -var OverlappedComboPlot = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(OverlappedComboPlot, _super); - function OverlappedComboPlot(container, props) { - var _this = _super.call(this, container, props) || this; - _this.options = props; - return _this; - } - OverlappedComboPlot.prototype.getDefaultOptions = function () { - return { - xAxis: { - visible: true, - autoHideLabel: false, - autoRotateLabel: false, - autoRotateTitle: false, - grid: { - visible: false, - }, - line: { - visible: true, - }, - tickLine: { - visible: true, - }, - label: { - visible: true, - }, - title: { - visible: false, - offset: 12, - }, - }, - yAxis: { - visible: true, - autoHideLabel: false, - autoRotateLabel: false, - autoRotateTitle: true, - grid: { - visible: true, - }, - line: { - visible: true, - }, - tickLine: { - visible: true, - }, - label: { - visible: true, - }, - title: { - visible: false, - offset: 12, - }, - colorMapping: true, - synchroTick: true, - }, - label: { - visible: false, - }, - tooltip: { - visible: true, - sort: true, - }, - legend: { - visible: true, - position: 'top-left', - }, - }; - }; - OverlappedComboPlot.prototype.createComboLayers = function () { - var _this = this; - _super.prototype.createComboLayers.call(this); - this.legendInfo = []; - this.axisInfo = []; - this.paddingComponents = []; - this.globalComponents = []; - this.singleGeomCount = 0; - this.backLayer = new _base_layer__WEBPACK_IMPORTED_MODULE_4__["default"]({ - canvas: this.getCanvas(), - width: this.width, - height: this.height, - }); - if (this.options.layers.length > 0) { - /** create layers */ - _antv_util__WEBPACK_IMPORTED_MODULE_2__["each"](this.options.layers, function (layerCfg) { - var _a, _b; - var overlapConfig = _this.getOverlappedConfig(layerCfg); - var viewLayerCtr = Object(_base_global__WEBPACK_IMPORTED_MODULE_3__["getPlotType"])(layerCfg.type); - var viewLayerProps = _antv_util__WEBPACK_IMPORTED_MODULE_2__["deepMix"]({}, layerCfg, { - canvas: _this.canvas, - x: 0, - y: 0, - width: _this.width, - height: _this.height, - tooltip: { - domStyles: { - 'g2-tooltip': { - display: 'none', - }, - }, - }, - }, overlapConfig); - var viewLayer = new viewLayerCtr(viewLayerProps); - viewLayer.render(); - viewLayer.hide(); - (_a = _this.axisInfo).push.apply(_a, _util__WEBPACK_IMPORTED_MODULE_6__["getAxisData"](viewLayer, viewLayerProps, _this.globalOptions)); - (_b = _this.legendInfo).push.apply(_b, _util__WEBPACK_IMPORTED_MODULE_6__["getLegendData"](viewLayer, viewLayerProps)); - _this.addLayer(viewLayer); - }); - } - /** add top layer for legend & tooltip */ - this.topLayer = new _base_layer__WEBPACK_IMPORTED_MODULE_4__["default"]({ - canvas: this.getCanvas(), - width: this.width, - height: this.height, - }); - this.topLayer.render(); - }; - /** 图层叠加时的layer config */ - OverlappedComboPlot.prototype.getOverlappedConfig = function (layerCfg) { - var colorCfg = _util__WEBPACK_IMPORTED_MODULE_6__["getColorConfig"](layerCfg.type, layerCfg, this.singleGeomCount); - if (colorCfg && colorCfg.single) { - this.singleGeomCount++; - } - return _antv_util__WEBPACK_IMPORTED_MODULE_2__["deepMix"]({}, { - xAxis: { - visible: false, - }, - yAxis: { - visible: false, - }, - legend: { - visible: false, - }, - /* tooltip: { - visible: false, - },*/ - padding: [0, 0, 0, 0], - color: colorCfg ? colorCfg.color : null, - }); - }; - OverlappedComboPlot.prototype.overlappingLegend = function () { - var legendItems = _util__WEBPACK_IMPORTED_MODULE_6__["mergeLegendData"](this.legendInfo); - this.legendContainer = this.topLayer.container.addGroup(); - return _util__WEBPACK_IMPORTED_MODULE_6__["createLegend"](legendItems, this.width, this.height, this.getCanvas(), this.globalOptions.legend.position); - }; - OverlappedComboPlot.prototype.render = function () { - var _a; - var _this = this; - this.doDestroy(); - this.createComboLayers(); - var bleeding = Object(_theme_global__WEBPACK_IMPORTED_MODULE_8__["getGlobalTheme"])().bleeding; - if (this.globalOptions.legend.visible) { - var legend = this.overlappingLegend(); - this.globalComponents.push({ type: 'legend', component: legend.component }); - this.paddingComponents.push(legend); - } - // 先获取legend的padding - var legendPadding = Object(_util_padding__WEBPACK_IMPORTED_MODULE_7__["getOverlappingPadding"])(this.layers[0], this.paddingComponents); - var axisComponents = _util__WEBPACK_IMPORTED_MODULE_6__["axesLayout"](this.globalOptions, this.axisInfo, legendPadding, this.layers[0], this.width, this.height, this.getCanvas()); - (_a = this.paddingComponents).push.apply(_a, axisComponents); - _antv_util__WEBPACK_IMPORTED_MODULE_2__["each"](axisComponents, function (axis) { - _this.globalComponents.push({ type: 'axis', component: axis.component }); - }); - // 计算padding - var padding = Object(_util_padding__WEBPACK_IMPORTED_MODULE_7__["getOverlappingPadding"])(this.layers[0], this.paddingComponents); - if (!this.globalOptions.xAxis.visible) { - padding[2] += bleeding[2]; - } - // 更新layers - _antv_util__WEBPACK_IMPORTED_MODULE_2__["each"](this.layers, function (layer) { - layer.updateConfig({ - padding: padding, - }); - layer.render(); - layer.show(); - }); - //补画坐标轴grid - if (this.globalOptions.yAxis.grid.visible) { - var leftAxis = axisComponents[0].component; - var containerLayer = this.layers[0]; - var coord = containerLayer.view.geometries[0].coordinate; - var container = containerLayer.view.backgroundGroup; - _util__WEBPACK_IMPORTED_MODULE_6__["drawYGrid"](leftAxis, coord, container, this.globalOptions); - } - this.canvas.draw(); - if (this.globalOptions.tooltip.visible) { - var tooltip = _util__WEBPACK_IMPORTED_MODULE_6__["showTooltip"](this.canvas, this.layers, this.globalOptions.tooltip); - this.globalComponents.push({ type: 'tooltip', component: tooltip }); - } - }; - OverlappedComboPlot.prototype.doDestroy = function () { - this.clearComponents(); - this.eachLayer(function (layer) { - layer.destroy(); - }); - this.layers = []; - }; - OverlappedComboPlot.prototype.clearComponents = function () { - _antv_util__WEBPACK_IMPORTED_MODULE_2__["each"](this.globalComponents, function (c) { - if (c.type === 'legend' || c.type === 'tooltip') { - c.component.destroy(); - } - if (c.type === 'axis') { - c.component.clear(); - } - }); - this.paddingComponents = []; - this.globalComponents = []; - }; - return OverlappedComboPlot; -}(_base__WEBPACK_IMPORTED_MODULE_1__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (OverlappedComboPlot); -//# sourceMappingURL=overlapped.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/combo-plots/util/adjustColorConfig.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/combo-plots/util/adjustColorConfig.js ***! - \*****************************************************************************/ -/*! exports provided: getColorConfig, isSingleGraph */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getColorConfig", function() { return getColorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSingleGraph", function() { return isSingleGraph; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _theme_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/global */ "./node_modules/@antv/g2plot/esm/theme/global.js"); - - -var SINGLE_TYPE = ['line', 'area', 'column', 'bar', 'bubble', 'scatter']; -function getColorConfig(type, props, count) { - if (props.color) { - return { single: false, color: props.color }; - } - var isSingle = isSingleGraph(type, props); - var colors = Object(_theme_global__WEBPACK_IMPORTED_MODULE_1__["getGlobalTheme"])().colors; - if (isSingle && !props.color) { - return { single: true, color: colors[count] }; - } -} -/** 判断是不是单图元类型的图表:单折线图、基础柱状图、散点图、基础面积图等 */ -function isSingleGraph(type, props) { - if (_antv_util__WEBPACK_IMPORTED_MODULE_0__["contains"](SINGLE_TYPE, type)) { - if (type === 'line' && _antv_util__WEBPACK_IMPORTED_MODULE_0__["has"](props, 'seriesField')) { - return false; - } - if (type === 'column' && _antv_util__WEBPACK_IMPORTED_MODULE_0__["has"](props, 'colorField')) { - return false; - } - return true; - } - return false; -} -//# sourceMappingURL=adjustColorConfig.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/combo-plots/util/globalAxis.js": -/*!**********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/combo-plots/util/globalAxis.js ***! - \**********************************************************************/ -/*! exports provided: getAxisData, mergeAxisScale, createAxis, axesLayout, drawYGrid */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAxisData", function() { return getAxisData; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeAxisScale", function() { return mergeAxisScale; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createAxis", function() { return createAxis; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axesLayout", function() { return axesLayout; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawYGrid", function() { return drawYGrid; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _util_bbox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/bbox */ "./node_modules/@antv/g2plot/esm/util/bbox.js"); -/* harmony import */ var _antv_scale__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/scale */ "./node_modules/@antv/scale/esm/index.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme */ "./node_modules/@antv/g2plot/esm/theme/index.js"); -/* harmony import */ var _adjustColorConfig__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./adjustColorConfig */ "./node_modules/@antv/g2plot/esm/combo-plots/util/adjustColorConfig.js"); -/* harmony import */ var _padding__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./padding */ "./node_modules/@antv/g2plot/esm/combo-plots/util/padding.js"); -/* harmony import */ var _components_factory__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../components/factory */ "./node_modules/@antv/g2plot/esm/components/factory.js"); -/* harmony import */ var _util_g_util__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../util/g-util */ "./node_modules/@antv/g2plot/esm/util/g-util.js"); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); - - - - - - - - - - -var AXIS_GAP = 4; -function getAxisData(viewLayer, props, globalOptions) { - var view = viewLayer.view; - var scales = view.geometries[0].scales; - var scalesInfo = []; - var singleGraph = Object(_adjustColorConfig__WEBPACK_IMPORTED_MODULE_5__["isSingleGraph"])(viewLayer.type, props); - // get xscale info - if (props.xField) { - var xscale = scales[props.xField]; - var scaleInfo = { - dim: 'x', - scale: xscale, - originalData: props.data, - }; - scalesInfo.push(scaleInfo); - } - // get yscale info - if (props.yField) { - var yscale = scales[props.yField]; - var scaleInfo = { - dim: 'y', - scale: yscale, - originalData: props.data, - color: singleGraph && globalOptions.yAxis.colorMapping ? props.color : null, - layer: viewLayer, - }; - scalesInfo.push(scaleInfo); - } - return scalesInfo; -} -function mergeAxisScale(axisInfo, dim, axisOptions) { - if (dim === 'x') { - var xAxisInfo = axisInfo.filter(function (axis) { - if (axis.dim === 'x') { - return axis; - } - }); - return mergeXAxis(xAxisInfo); - } - else { - var yAxisInfo = axisInfo.filter(function (axis) { - if (axis.dim === 'y') { - return axis; - } - }); - return mergeYAxis(yAxisInfo, axisOptions.synchroTick); - } -} -function mergeXAxis(axisInfo) { - // 判断是否能够合并度量 - var isSameScale = sameScaleTest(axisInfo); - if (!isSameScale) { - return [axisInfo[0].scale]; - } - if (axisInfo[0].scale.type === 'cat') { - return getCatScale(axisInfo); - } - else { - return getLinearScale(axisInfo, 5); - } -} -function mergeYAxis(axisInfo, synchroTick) { - var isSameScale = sameScaleTest(axisInfo); - // 默认全部采用左轴的tickCount,具体标度对齐逻辑留待以后优化 - var tickCount = axisInfo[0].scale.tickCount; - var LinearScale = Object(_antv_scale__WEBPACK_IMPORTED_MODULE_2__["getScale"])('linear'); - if (!isSameScale) { - return axisInfo.map(function (axis) { - var scale = axis.scale; - var values = calValues(scale, tickCount); - if (synchroTick) { - var linearScale = new LinearScale({ - min: scale.min, - max: scale.max, - ticks: values, - tickCount: tickCount, - color: axis.color, - }); - linearScale.layer = axis.layer; - return linearScale; - } - else { - scale.layer = axis.layer; - scale.color = axis.color; - return scale; - } - }); - } - else { - return getLinearScale(axisInfo, tickCount); - } -} -function getLinearScale(axisInfo, tickCount) { - var scaleMin = axisInfo[0].scale.min; - var scaleMax = axisInfo[0].scale.max; - for (var _i = 0, axisInfo_1 = axisInfo; _i < axisInfo_1.length; _i++) { - var axis = axisInfo_1[_i]; - scaleMin = Math.min(scaleMin, axis.scale.min); - scaleMax = Math.max(scaleMax, axis.scale.max); - } - var LinearScale = Object(_antv_scale__WEBPACK_IMPORTED_MODULE_2__["getScale"])('linear'); - var scale = new LinearScale({ - min: scaleMin, - max: scaleMax, - tickCount: tickCount, - }); - return scale; -} -function getCatScale(axisInfo) { - var scaleValues = []; - for (var _i = 0, axisInfo_2 = axisInfo; _i < axisInfo_2.length; _i++) { - var axis = axisInfo_2[_i]; - scaleValues.push.apply(scaleValues, axis.scale.values); - } - // todo: time cat 重新排序 - var CatScale = Object(_antv_scale__WEBPACK_IMPORTED_MODULE_2__["getScale"])('cat'); - var scale = new CatScale({ - values: _antv_util__WEBPACK_IMPORTED_MODULE_3__["uniq"](scaleValues), - }); - return scale; -} -function sameScaleTest(axisInfo) { - var sampleDataSource = axisInfo[0].originalData; - var sampleField = axisInfo[0].scale.field; - for (var _i = 0, axisInfo_3 = axisInfo; _i < axisInfo_3.length; _i++) { - var axis = axisInfo_3[_i]; - var data = axis.originalData; - var field = axis.scale.field; - // 判断数据源和scale字段 - if (data !== sampleDataSource || field !== sampleField) { - return false; - } - } - return true; -} -function createAxis(scale, dim, canvas, cfg, globalOptions) { - var theme = getTheme(globalOptions); - var isVertical = dim === 'x' ? false : true; - var group; - if (scale.layer) { - group = scale.layer.container.addGroup(); - } - else { - group = canvas.addGroup(); - } - var ticks = getAxisTicks(scale, dim); - var parser = Object(_components_factory__WEBPACK_IMPORTED_MODULE_7__["getComponent"])('axis', { - dim: dim, - plot: { - options: globalOptions, - getPlotTheme: function () { - return Object(_theme__WEBPACK_IMPORTED_MODULE_4__["getGlobalTheme"])(); - }, - }, - }); - var defaultStyle = theme.axis && theme.axis[dim] ? toAxisStyle(theme.axis[dim]) : {}; - if (scale.color) { - defaultStyle = adjustColorStyle(scale.color, parser); - } - var axisConfig = _antv_util__WEBPACK_IMPORTED_MODULE_3__["deepMix"]({}, parser, { - type: 'line', - group: group, - canvas: canvas, - start: cfg.start, - end: cfg.end, - isVertical: isVertical, - verticalFactor: cfg.factor, - ticks: ticks, - label: function (text) { - return { - text: text, - textStyle: parser.label.textStyle, - }; - }, - }, defaultStyle); - var axis = new _dependents__WEBPACK_IMPORTED_MODULE_9__["Axis"].Line(axisConfig); - axis.layer = scale.layer; - axis.render(); - return axis; -} -function getAxisTicks(scale, dim) { - var tickValues = []; - var ticks = scale.ticks, range = scale.range; - var step = (range[1] - range[0]) / (ticks.length - 1); - _antv_util__WEBPACK_IMPORTED_MODULE_3__["each"](ticks, function (tick, index) { - var value = dim === 'y' ? 1.0 - (range[0] + step * index) : range[0] + step * index; - tickValues.push({ name: tick, value: value }); - }); - return tickValues; -} -function calValues(scale, tickCount) { - var values = []; - var min = scale.min, max = scale.max; - var step = (max - min) / tickCount; - for (var i = 0; i < tickCount; i++) { - var value = min + step * i; - values.push(value); - } - return values; -} -function axesLayout(globalOptions, axisInfo, padding, layer, width, height, canvas) { - var bleeding = Object(_theme__WEBPACK_IMPORTED_MODULE_4__["getGlobalTheme"])().bleeding; - // merge padding and bleeding by zero value - _antv_util__WEBPACK_IMPORTED_MODULE_3__["each"](padding, function (p, index) { - if (p === 0) { - padding[index] = bleeding[index]; - } - }); - var paddingComponents = []; - // 创建axis - var axes = []; - var xAxisScale; - var xAxis; - var xAxisHeight = 0; - if (globalOptions.xAxis.visible) { - xAxisScale = mergeAxisScale(axisInfo, 'x'); - xAxis = createAxis(xAxisScale[0], 'x', canvas, { - start: { x: 0, y: 0 }, - end: { x: width, y: 0 }, - factor: -1, - }, globalOptions); - xAxisHeight += xAxis.get('group').getBBox().height; - } - if (globalOptions.yAxis.visible) { - var yAxisScale = mergeAxisScale(axisInfo, 'y', globalOptions.yAxis); - _antv_util__WEBPACK_IMPORTED_MODULE_3__["each"](yAxisScale, function (scale, index) { - var factor = index === 0 ? -1 : 1; - var axis = createAxis(scale, 'y', canvas, { - start: { x: 0, y: padding[0] }, - end: { x: 0, y: height - xAxisHeight - padding[2] }, - factor: factor, - }, globalOptions); - if (index === 0) { - Object(_util_g_util__WEBPACK_IMPORTED_MODULE_8__["translate"])(axis.get('group'), padding[3], 0); - } - axes.push(axis); - }); - axisLayout(axes, paddingComponents, width, padding); - } - if (globalOptions.xAxis.visible) { - var axisPadding = Object(_padding__WEBPACK_IMPORTED_MODULE_6__["getOverlappingPadding"])(layer, paddingComponents); - var ypos = axes.length === 0 ? height - xAxisHeight - padding[2] : axes[0].get('group').getBBox().maxY; - xAxis.destroy(); - xAxis = createAxis(xAxisScale[0], 'x', canvas, { - start: { x: axisPadding[3], y: ypos }, - end: { x: width - axisPadding[1], y: ypos }, - factor: -1, - }, globalOptions); - paddingComponents.push({ - position: 'bottom', - component: xAxis, - getBBox: function () { - var container = xAxis.get('group'); - var bbox = container.getBBox(); - return new _util_bbox__WEBPACK_IMPORTED_MODULE_1__["default"](bbox.minX, bbox.minY, bbox.width, bbox.height); - }, - }); - } - return paddingComponents; -} -function axisLayout(axes, paddingComponents, width, padding) { - // 先处理最左边的 - var leftAxis = axes[0]; - var leftContainer = leftAxis.get('group'); - var leftBbox = leftContainer.getBBox(); - Object(_util_g_util__WEBPACK_IMPORTED_MODULE_8__["translate"])(leftContainer, leftBbox.width, 0); - paddingComponents.push({ - position: 'left', - component: leftAxis, - getBBox: function () { - var matrix = leftContainer.attr('matrix'); - return new _util_bbox__WEBPACK_IMPORTED_MODULE_1__["default"](leftBbox.minX + matrix[6], leftBbox.minY, leftBbox.width, leftBbox.height); - }, - }); - var temp_width = padding[1]; - var _loop_1 = function (i) { - var axis = axes[i]; - var container = axis.get('group'); - var bbox = container.getBBox(); - Object(_util_g_util__WEBPACK_IMPORTED_MODULE_8__["translate"])(container, width - temp_width - bbox.width, 0); - temp_width += bbox.width + AXIS_GAP; - var component = { - position: 'right', - component: axis, - getBBox: function () { - var matrix = container.attr('matrix'); - return new _util_bbox__WEBPACK_IMPORTED_MODULE_1__["default"](bbox.minX + matrix[6], bbox.minY, bbox.width, bbox.height); - }, - }; - paddingComponents.push(component); - }; - // 处理右边的 - for (var i = axes.length - 1; i > 0; i--) { - _loop_1(i); - } -} -function adjustColorStyle(color, options) { - return { - line: options.line - ? { - stroke: color, - lineWidth: 1, - } - : null, - tickLine: options.tickLine - ? { - stroke: color, - lineWidth: 1, - length: 5, - } - : null, - label: options.label - ? { - textStyle: { - fill: color, - }, - } - : null, - }; -} -function drawYGrid(axis, coord, container, globalOptions) { - var theme = getTheme(globalOptions); - var gridCfg = globalOptions.yAxis.grid; - var defaultStyle = theme.axis.y.grid.style; - var style = _antv_util__WEBPACK_IMPORTED_MODULE_3__["deepMix"]({}, defaultStyle, gridCfg.style); - var gridGroup = container.addGroup(); - var labelItems = axis.get('labelItems'); - _antv_util__WEBPACK_IMPORTED_MODULE_3__["each"](labelItems, function (item, index) { - if (index > 0) { - gridGroup.addShape('path', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: [ - ['M', coord.start.x, item.point.y], - ['L', coord.end.x, item.point.y], - ] }, style), - }); - } - }); -} -function toAxisStyle(theme) { - var style = {}; - _antv_util__WEBPACK_IMPORTED_MODULE_3__["each"](theme, function (t, key) { - if (_antv_util__WEBPACK_IMPORTED_MODULE_3__["hasKey"](t, 'style')) { - style[key] = t.style; - } - }); - return style; -} -function getTheme(options) { - var theme = Object(_theme__WEBPACK_IMPORTED_MODULE_4__["getGlobalTheme"])(); - if (options.theme) { - if (_antv_util__WEBPACK_IMPORTED_MODULE_3__["isString"](options.theme)) { - theme = Object(_theme__WEBPACK_IMPORTED_MODULE_4__["getGlobalTheme"])(options.theme); - } - else if (_antv_util__WEBPACK_IMPORTED_MODULE_3__["isObject"](options.theme)) { - theme = options.theme; - } - } - return theme; -} -//# sourceMappingURL=globalAxis.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/combo-plots/util/globalLegend.js": -/*!************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/combo-plots/util/globalLegend.js ***! - \************************************************************************/ -/*! exports provided: getLegendData, mergeLegendData, createLegend */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLegendData", function() { return getLegendData; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeLegendData", function() { return mergeLegendData; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createLegend", function() { return createLegend; }); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); -/* harmony import */ var _util_bbox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/bbox */ "./node_modules/@antv/g2plot/esm/util/bbox.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _theme_global__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/global */ "./node_modules/@antv/g2plot/esm/theme/global.js"); - - - - -function getLegendData(viewLayer, props) { - var legendItems = []; - var view = viewLayer.view; - var geometry = view.geometries[0]; - var colorAttr = geometry.attributes.color; // color和shape决定cat legend的生成,暂时先不考虑shape - var markerCfg = { - isInCircle: false, - color: colorAttr.values[0], - }; - var marker = { - symbol: 'circle', - style: { - r: 4, - fill: markerCfg.fill, - }, - }; - // @ts-ignore - if (geometry.shapeFactory) { - // @ts-ignore - marker = geometry.shapeFactory.getMarker(geometry.type, markerCfg); - } - /** 处理default不生成图例的场景 */ - if (colorAttr.scales.length === 1 && colorAttr.scales[0].type == 'identity') { - legendItems.push({ - value: props.name, - checked: true, - marker: marker, - isSingle: true, - layer: viewLayer, - name: props.name || geometry.type, - }); - } - else { - /** 正常生成图例 */ - var values = colorAttr.scales[0].values; - _antv_util__WEBPACK_IMPORTED_MODULE_2__["each"](values, function (v, index) { - var markerColor = colorAttr.values[index]; - var markerValue = v; - var cfg = { - isInCircle: false, - color: markerColor, - }; - var marker = { - symbol: 'circle', - style: { - r: 4, - fill: markerCfg.color, - }, - }; - // @ts-ignore - if (geometry.shapeFactory) { - // @ts-ignore - marker = geometry.shapeFactory.getMarker(geometry.type, cfg); - } - legendItems.push({ - field: colorAttr.scales[0].field, - value: markerValue, - checked: true, - marker: marker, - isSingle: false, - layer: viewLayer, - name: markerValue, - }); - }); - } - return legendItems; -} -function mergeLegendData(items) { - return items; -} -function createLegend(items, width, height, canvas, position) { - var legendTheme = Object(_theme_global__WEBPACK_IMPORTED_MODULE_3__["getGlobalTheme"])().legend; - var positions = position.split('-'); - var layout = 'horizontal'; - if (positions[0] === 'left' || positions[0] === 'right') { - layout = 'vertical'; - } - var container = canvas.addGroup(); - var legendCfg = { - type: 'category-legend', - items: items, - maxSize: width, - container: container, - group: container, - layout: layout, - textStyle: { - fill: '#8C8C8C', - fontSize: 12, - textAlign: 'start', - textBaseline: 'middle', - lineHeight: 20, - }, - titleDistance: 10, - autoWrap: true, - itemMarginBottom: 4, - backgroundPadding: 0, - maxLength: width, - }; - var legend = new _dependents__WEBPACK_IMPORTED_MODULE_0__["Legend"].Category(legendCfg); - legendLayout(width, height, legend, position); - addLegendInteraction(legend); - /** return legend as a padding component */ - var bbox = legend.get('container').getBBox(); - var paddingBbox; - // merge legend inner padding - var innerPadding = legendTheme.innerPadding; - if (positions[0] === 'left') { - paddingBbox = new _util_bbox__WEBPACK_IMPORTED_MODULE_1__["default"](legend.get('x') + innerPadding[3], legend.get('y'), bbox.width, bbox.height); - } - else if (positions[0] === 'right') { - paddingBbox = new _util_bbox__WEBPACK_IMPORTED_MODULE_1__["default"](legend.get('x') - innerPadding[1], legend.get('y'), bbox.width, bbox.height); - } - else if (positions[0] === 'top') { - paddingBbox = new _util_bbox__WEBPACK_IMPORTED_MODULE_1__["default"](legend.get('x'), legend.get('y') + innerPadding[0], bbox.width, bbox.height); - } - else if (positions[0] === 'bottom') { - paddingBbox = new _util_bbox__WEBPACK_IMPORTED_MODULE_1__["default"](legend.get('x'), legend.get('y') - innerPadding[2], bbox.width, bbox.height); - } - return { - position: positions[0], - component: legend, - getBBox: function () { - return paddingBbox; - }, - }; -} -function addLegendInteraction(legend) { - var filteredValue = []; - legend.get('group').on('click', function (ev) { - var item = ev.target.get('delegateObject').item; - // 如果是单图例模式 - if (item.isSingle) { - if (item.checked) { - ev.target.get('parent').attr('opacity', 0.3); - item.layer.hide(); - item.checked = false; - } - else { - ev.target.get('parent').attr('opacity', 1); - item.layer.show(); - item.checked = true; - } - } - else { - // 正常的图例筛选数据逻辑 - var view = item.layer.view; - if (item.checked) { - ev.target.get('parent').attr('opacity', 0.3); - filteredValue.push(item.value); - view.filter(item.field, function (f) { - return !_antv_util__WEBPACK_IMPORTED_MODULE_2__["contains"](filteredValue, f); - }); - view.render(); - var filteredData = view.filteredData; - if (filteredData.length === 0) { - item.layer.hide(); - } - else if (!item.layer.visibility) { - item.layer.show(); - } - item.checked = false; - } - else { - ev.target.get('parent').attr('opacity', 1); - _antv_util__WEBPACK_IMPORTED_MODULE_2__["pull"](filteredValue, item.value); - view.filter(item.value, function (f) { - return !_antv_util__WEBPACK_IMPORTED_MODULE_2__["contains"](filteredValue, f); - }); - view.render(); - if (!item.layer.visibility) { - item.layer.show(); - } - item.checked = true; - } - } - }); -} -function legendLayout(width, height, legend, position) { - var bleeding = Object(_theme_global__WEBPACK_IMPORTED_MODULE_3__["getGlobalTheme"])().bleeding; - if (_antv_util__WEBPACK_IMPORTED_MODULE_2__["isArray"](bleeding)) { - _antv_util__WEBPACK_IMPORTED_MODULE_2__["each"](bleeding, function (it, index) { - if (typeof bleeding[index] === 'function') { - bleeding[index] = bleeding[index]({}); - } - }); - } - var bbox = legend.get('container').getBBox(); - var x = 0; - var y = 0; - var positions = position.split('-'); - // 先确定x - if (positions[0] === 'left') { - x = bleeding[3]; - } - else if (positions[0] === 'right') { - x = width - bleeding[1] - bbox.width; - } - else if (positions[1] === 'center') { - x = (width - bbox.width) / 2; - } - else if (positions[1] === 'left') { - x = bleeding[3]; - } - else if (positions[1] === 'right') { - x = width - bleeding[1] - bbox.width; - } - // 再确定y - if (positions[0] === 'bottom') { - y = height - bleeding[2] - bbox.height; - } - else if (positions[0] === 'top') { - y = bleeding[0]; - } - else if (positions[1] === 'center') { - y = (height - bbox.height) / 2; - } - else if (positions[1] === 'top') { - y = bleeding[0]; - } - else if (positions[1] === 'bottom') { - y = height - bleeding[2] - bbox.height; - } - //legend.moveTo(x, y); - legend.setLocation({ x: x, y: y }); - legend.render(); - //legend.draw(); -} -//# sourceMappingURL=globalLegend.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/combo-plots/util/globalTooltip.js": -/*!*************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/combo-plots/util/globalTooltip.js ***! - \*************************************************************************/ -/*! exports provided: showTooltip */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showTooltip", function() { return showTooltip; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); -/* harmony import */ var _theme_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/global */ "./node_modules/@antv/g2plot/esm/theme/global.js"); - - - -var TYPE_SHOW_MARKERS = ['line', 'area', 'path', 'areaStack']; -function showTooltip(canvas, layers, tooltipCfg) { - var tooltip = renderTooltip(layers[0], canvas); - tooltip.init(); - canvas.on('mousemove', function (ev) { - var tooltipItems = []; - var point = { x: ev.x, y: ev.y }; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(layers, function (layer) { - var view = layer.view; - if (view && layer.visibility) { - //const coord = view.geometries[0].coordinate; - //const geoms = view.geometries; - tooltipItems.push.apply(tooltipItems, view.getTooltipItems(point)); - /*each(geoms, (geom) => { - const type = geom.type; - const dataArray = geom.dataArray; - if (contains(['area', 'line', 'path', 'interval'], type)) { - const items = getTooltipItems(point, geom, type, dataArray, coord); - tooltipItems.push(...items); - } else {s - const shapeContainer = geom.container; - const shapes = getShapeByX(shapeContainer, point.x); - each(shapes, (shape) => { - if (shape.get('visible') && shape.get('origin')) { - const items = geom.getTooltipItems(shape.get('origin'), null); - tooltipItems.push(...items); - } - }); - } - });*/ - } - }); - //adjustItems(tooltipItems, ev.target, tooltipCfg); - if (tooltipItems.length > 0) { - tooltip.setLocation(point); - tooltip.update({ - items: getUniqueItems(tooltipItems), - domStyles: { - 'g2-tooltip': { - opacity: 1, - }, - }, - }); - tooltip.show(); - } - else if (tooltip.get('visible')) { - tooltip.hide(); - } - }); - return tooltip; -} -function getTooltipItems(point, geom, type, dataArray, coord) { - var items = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(dataArray, function (data) { - var items = geom.findItemsFromView(geom.view, point); - var subItems = geom.getTooltipItems(point, null); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(subItems, function (v) { - // tslint:disable-next-line: no-shadowed-variable - var point = v.point; - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(point) && !Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(point.x) && !Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(point.y)) { - var x = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isArray"])(point.x) ? point.x[point.x.length - 1] : point.x; - var y = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isArray"])(point.y) ? point.y[point.y.length - 1] : point.y; - point = coord.applyMatrix(x, y, 1); - v.x = point[0]; - v.y = point[1]; - v.showMarker = true; - var itemMarker = getItemMarker(geom, v.color); - v.marker = itemMarker; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["indexOf"])(TYPE_SHOW_MARKERS, type) !== -1) { - items.push(v); - } - } - }); - items.push.apply(items, subItems); - }); - return items; -} -function renderTooltip(layer, canvas) { - var tooltipTheme = Object(_theme_global__WEBPACK_IMPORTED_MODULE_2__["getGlobalTheme"])().tooltip; - var options = { - parent: layer.canvas.get('container'), - panelGroup: layer.view.middleGroup, - panelRange: layer.view.coodinateBBox, - capture: false, - canvas: canvas, - frontgroundGroup: layer.view.frontgroundGroup, - theme: tooltipTheme, - backgroundGroup: layer.view.backgroundGroup, - items: [{ name: 0, value: 0 }], - domStyles: { - 'g2-tooltip': { - opacity: 0, - }, - }, - }; - return new _dependents__WEBPACK_IMPORTED_MODULE_1__["Tooltip"].Html(options); -} -function getItemMarker(geom, color) { - var shapeType = geom.get('shapeType') || 'point'; - var shape = geom.getDefaultValue('shape') || 'circle'; - var shapeObject = Object(_dependents__WEBPACK_IMPORTED_MODULE_1__["getShapeFactory"])(shapeType); - var cfg = { color: color, isInPolar: false }; - var marker = shapeObject.getMarker(shape, cfg); - return marker; -} -function getUniqueItems(items) { - var tmp = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(items, function (item) { - var index = indexOfArray(tmp, item); - if (index === -1) { - tmp.push(item); - } - }); - return tmp; -} -function indexOfArray(items, item) { - var rst = -1; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(items, function (sub, index) { - var isEqual = true; - for (var key in item) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["has"])(item, key)) { - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isObject"])(item[key]) && item[key] !== sub[key]) { - isEqual = false; - break; - } - } - } - if (isEqual) { - rst = index; - return false; - } - }); - return rst; -} -function adjustItems(items, target, cfg) { - if (target.get('origin')) { - var data_1; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isArray"])(target.get('origin'))) { - data_1 = getDataByTitle(items[0].title, target.get('origin')).data; - } - else { - data_1 = target.get('origin')._origin; - } - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(items, function (item) { - if (item.point._origin !== data_1) { - item.color = '#ccc'; - } - }); - } - if (cfg.sort) { - items.sort(function (a, b) { - return parseFloat(b.value) - parseFloat(a.value); - }); - } -} -function getDataByTitle(title, data) { - for (var i in data) { - var d = data[i]._origin; - var ks = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["keys"])(d); - for (var j in ks) { - var key = ks[j]; - if (d[key] === title) { - return { data: d, key: key }; - } - } - } -} -function getShapeByX(container, x) { - var shapes = []; - var children = container.get('children'); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(children, function (c) { - var bbox = c.getBBox(); - if (bbox.minX < x && bbox.maxX > x) { - shapes.push(c); - } - }); - return shapes; -} -//# sourceMappingURL=globalTooltip.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/combo-plots/util/index.js": -/*!*****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/combo-plots/util/index.js ***! - \*****************************************************************/ -/*! exports provided: getColorConfig, getLegendData, mergeLegendData, createLegend, getAxisData, mergeAxisScale, createAxis, axesLayout, drawYGrid, showTooltip */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _adjustColorConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adjustColorConfig */ "./node_modules/@antv/g2plot/esm/combo-plots/util/adjustColorConfig.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getColorConfig", function() { return _adjustColorConfig__WEBPACK_IMPORTED_MODULE_0__["getColorConfig"]; }); - -/* harmony import */ var _globalLegend__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./globalLegend */ "./node_modules/@antv/g2plot/esm/combo-plots/util/globalLegend.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getLegendData", function() { return _globalLegend__WEBPACK_IMPORTED_MODULE_1__["getLegendData"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeLegendData", function() { return _globalLegend__WEBPACK_IMPORTED_MODULE_1__["mergeLegendData"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createLegend", function() { return _globalLegend__WEBPACK_IMPORTED_MODULE_1__["createLegend"]; }); - -/* harmony import */ var _globalAxis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./globalAxis */ "./node_modules/@antv/g2plot/esm/combo-plots/util/globalAxis.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getAxisData", function() { return _globalAxis__WEBPACK_IMPORTED_MODULE_2__["getAxisData"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeAxisScale", function() { return _globalAxis__WEBPACK_IMPORTED_MODULE_2__["mergeAxisScale"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createAxis", function() { return _globalAxis__WEBPACK_IMPORTED_MODULE_2__["createAxis"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axesLayout", function() { return _globalAxis__WEBPACK_IMPORTED_MODULE_2__["axesLayout"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "drawYGrid", function() { return _globalAxis__WEBPACK_IMPORTED_MODULE_2__["drawYGrid"]; }); - -/* harmony import */ var _globalTooltip__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./globalTooltip */ "./node_modules/@antv/g2plot/esm/combo-plots/util/globalTooltip.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "showTooltip", function() { return _globalTooltip__WEBPACK_IMPORTED_MODULE_3__["showTooltip"]; }); - - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/combo-plots/util/padding.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/combo-plots/util/padding.js ***! - \*******************************************************************/ -/*! exports provided: getOverlappingPadding */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOverlappingPadding", function() { return getOverlappingPadding; }); -/* harmony import */ var _util_bbox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/bbox */ "./node_modules/@antv/g2plot/esm/util/bbox.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _theme_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/global */ "./node_modules/@antv/g2plot/esm/theme/global.js"); - - - -function getOverlappingPadding(layer, components) { - var bleeding = Object(_theme_global__WEBPACK_IMPORTED_MODULE_2__["getGlobalTheme"])().bleeding; - if (_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"](bleeding)) { - _antv_util__WEBPACK_IMPORTED_MODULE_1__["each"](bleeding, function (it, index) { - if (typeof bleeding[index] === 'function') { - bleeding[index] = bleeding[index]({}); - } - }); - } - var viewMinX = layer.layerBBox.minX; - var viewMaxX = layer.layerBBox.maxX; - var viewMinY = _antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"](layer.layerBBox.minY); - var viewMaxY = layer.layerBBox.maxY; - _antv_util__WEBPACK_IMPORTED_MODULE_1__["each"](components, function (component) { - var position = component.position; - var _a = component.getBBox(), minX = _a.minX, maxX = _a.maxX, minY = _a.minY, maxY = _a.maxY; - if (maxY > viewMinY && maxY < viewMaxY && position === 'top') { - viewMinY = maxY; - } - if (minY > viewMinY && maxY > viewMaxY && position === 'bottom') { - viewMaxY = minY; - } - if (minY > viewMinY && minY <= viewMaxY && position === 'bottom') { - viewMaxY = minY; - } - if (maxX > viewMinX && maxX < viewMaxX && position === 'left') { - viewMinX = maxX; - } - if (minX > viewMinX && maxX < viewMaxX && position === 'right') { - viewMaxX = minX; - } - }); - var range = new _util_bbox__WEBPACK_IMPORTED_MODULE_0__["default"](viewMinX, viewMinY, viewMaxX - viewMinX, viewMaxY - viewMinY); - var top_padding = range.minY - layer.layerBBox.minY; - if (top_padding === 0) { - top_padding = bleeding[0]; - } - var right_padding = layer.layerBBox.maxX - range.maxX; - var bottom_padding = layer.layerBBox.maxY - range.maxY; - var left_padding = range.minX - layer.layerBBox.minX; - return [top_padding, right_padding, bottom_padding, left_padding]; -} -//# sourceMappingURL=padding.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/components/axis/parser.js": -/*!*****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/components/axis/parser.js ***! - \*****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_formatter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/formatter */ "./node_modules/@antv/g2plot/esm/util/formatter.js"); - - - -function propertyMapping(source, target, field) { - if (source[field]) { - target[field] = source[field]; - } -} -var AxisParser = /** @class */ (function () { - function AxisParser(cfg) { - this.config = false; - this.plot = cfg.plot; - this.dim = cfg.dim; - this.init(); - } - AxisParser.prototype.init = function () { - this.config = false; - var theme = this.plot.getPlotTheme(); - this.themeConfig = theme && theme.axis && theme.axis[this.dim]; - if (this._needDraw()) { - this._styleParser(); - } - }; - AxisParser.prototype._styleParser = function () { - this.config = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this.localProps); - this._isVisible('line') ? this._lineParser() : (this.config.line = null); - this._isVisible('grid') ? this._gridParser() : (this.config.grid = null); - this._isVisible('tickLine') ? this._tickLineParser() : (this.config.tickLine = null); - this._isVisible('label') ? this._labelParser() : (this.config.label = null); - this._isVisible('title') ? this._titleParser() : (this.config.title = null); - propertyMapping(this.localProps, this.config, 'autoHideLabel'); - propertyMapping(this.localProps, this.config, 'autoRotateLabel'); - propertyMapping(this.localProps, this.config, 'autoRotateTitle'); - }; - AxisParser.prototype._needDraw = function () { - /** 如果在图表配置项里没有设置坐标轴整体的visibility则去对应的theme取 */ - var propos = this.plot.options; - var propsConfig = propos[this.dim + "Axis"] ? propos[this.dim + "Axis"] : {}; - var config = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, this.themeConfig, propsConfig); - this.localProps = config; - if (config.visible) { - return true; - } - return false; - }; - AxisParser.prototype._lineParser = function () { - this.config.line = this.localProps.line; - if (this.localProps.line.style) { - this.config.line = { style: this.localProps.line.style }; - } - this.applyThemeConfig('line'); - }; - AxisParser.prototype._gridParser = function () { - var _this = this; - var _a, _b, _c, _d, _e; - var gridCfg = this.localProps.grid; - var style = (_b = (_a = this.localProps.grid) === null || _a === void 0 ? void 0 : _a.line) === null || _b === void 0 ? void 0 : _b.style; - var type = (_d = (_c = this.localProps.grid) === null || _c === void 0 ? void 0 : _c.line) === null || _d === void 0 ? void 0 : _d.type; - var alternateColor = (_e = this.localProps.grid) === null || _e === void 0 ? void 0 : _e.alternateColor; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(style)) { - this.config.grid = function (text, index, count) { - var cfg = style(text, index, count); - return { - line: { - type: type, - style: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(_this.themeConfig, "grid.line.style"), cfg), - }, - alternateColor: alternateColor, - }; - }; - } - else if (style) { - this.config.grid = { - line: { - type: type, - style: style, - }, - alternateColor: alternateColor, - }; - this.applyThemeConfig('grid'); - } - }; - AxisParser.prototype._tickLineParser = function () { - this.config.tickLine = this.localProps.tickLine; - if (this.localProps.tickLine.style) { - this.config.tickLine = { style: this.localProps.tickLine.style }; - } - this.applyThemeConfig('tickLine'); - }; - AxisParser.prototype._labelParser = function () { - var _a = this.localProps.label, style = _a.style, restLabelProps = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__rest"])(_a, ["style"]); - var labelConfig = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, restLabelProps); - if (style) { - labelConfig.style = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this.localProps.label.style); - } - labelConfig.style = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.themeConfig, 'label.style'), labelConfig.style); - var formatter = this.parseFormatter(labelConfig); - labelConfig.formatter = formatter; - this.config.label = labelConfig; - }; - AxisParser.prototype._titleParser = function () { - var titleConfig = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this.localProps.title); - var _a = this.localProps.title, visible = _a.visible, style = _a.style, text = _a.text; - if (!visible) { - this.config.showTitle = false; - } - else { - this.config.showTitle = true; - if (style) { - titleConfig.style = style; - } - titleConfig.style = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.config, 'title.style'), titleConfig.textStyle); - if (text) { - titleConfig.text = text; - } - } - this.config.title = titleConfig; - }; - AxisParser.prototype._isVisible = function (name) { - if (this.localProps[name] && this.localProps[name].visible) { - return true; - } - return false; - }; - AxisParser.prototype.applyThemeConfig = function (type) { - this.config[type] = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.themeConfig, type + ".style"), this.config[type]); - }; - AxisParser.prototype.parseFormatter = function (labelConfig) { - var formatter = Object(_util_formatter__WEBPACK_IMPORTED_MODULE_2__["combineFormatter"])(Object(_util_formatter__WEBPACK_IMPORTED_MODULE_2__["getNoopFormatter"])(), Object(_util_formatter__WEBPACK_IMPORTED_MODULE_2__["getPrecisionFormatter"])(labelConfig.precision), Object(_util_formatter__WEBPACK_IMPORTED_MODULE_2__["getSuffixFormatter"])(labelConfig.suffix)); - if (labelConfig.formatter) { - formatter = Object(_util_formatter__WEBPACK_IMPORTED_MODULE_2__["combineFormatter"])(formatter, labelConfig.formatter); - } - return formatter; - }; - return AxisParser; -}()); -/* harmony default export */ __webpack_exports__["default"] = (AxisParser); -//# sourceMappingURL=parser.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/components/axis/state.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/components/axis/state.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -// import { compare } from '../../base/controller/state'; -// 对axis label和label样式进行缓存 -var labels; -var originAttrs; -function onActive(plot, condition) { - if (!labels) { - getAllAxisLabels(plot); - } - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(labels, function (label, index) { - var _a = beforeCompare(label, condition), labelData = _a.labelData, con = _a.con; - if (compare(labelData, con)) { - var originAttr = originAttrs[index]; - var disableStyle = labelActiveStyle(originAttr); - label.shape.attr(disableStyle); - } - }); -} -function onDisable(plot, condition) { - if (!labels) { - getAllAxisLabels(plot); - } - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(labels, function (label, index) { - var _a = beforeCompare(label, condition), labelData = _a.labelData, con = _a.con; - if (compare(labelData, con)) { - var originAttr = originAttrs[index]; - var disableStyle = labelDisableStyle(originAttr); - label.shape.attr(disableStyle); - } - }); -} -function getAllAxisLabels(plot) { - labels = []; - originAttrs = []; - var axes = plot.view.getController('axis').getComponents(); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(axes, function (axisComponentOption) { - var axis = axisComponentOption.component; - var labelArr = []; - var scale = getScale(plot, axis); - var labelShapes = axis - .get('labelRenderer') - .get('group') - .get('children'); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(labelShapes, function (shape) { - if (shape.type === 'text') { - labelArr.push({ shape: shape }); - originAttrs.push(shape.attr()); - } - }); - if (scale) { - // 取到scale values作为原始数据,避免被label format的影响 - var ticks_1 = scale.ticks, field_1 = scale.field; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(labelArr, function (label, index) { - label.value = ticks_1[index]; - label.scaleField = field_1; - label.type = scale.type; - }); - } - labels.push.apply(labels, labelArr); - }); -} -// 获取坐标轴对应的scale -function getScale(plot, axis) { - var props = plot.options; - var dim = 'y'; - var position = axis.get('position'); - if (position === 'bottom' || position === 'top') { - dim = 'x'; - } - var scaleField = props[dim + "Field"]; - return plot.view.get('scales')[scaleField]; -} -function beforeCompare(label, condition) { - var _a; - var labelData = (_a = {}, _a[label.scaleField] = label.value, _a); - var con = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(condition); - if (label.type === 'time' && Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isObject"])(condition) && !Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(con.exp)) { - con.exp = new Date(con.exp).getTime(); - } - return { labelData: labelData, con: con }; -} -function labelDisableStyle(style) { - var opacity = style.opacity || 1; - return { opacity: opacity * 0.2 }; -} -function labelActiveStyle(style) { - return { opacity: 1, fontWeight: 600, fill: 'red' }; -} -function compare(origin, condition) { - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(condition)) { - var name_1 = condition.name, exp = condition.exp; - if (!origin[name_1]) { - return false; - } - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(exp)) { - return exp(origin[name_1]); - } - return origin[name_1] === exp; - } - return condition(origin); -} -/* harmony default export */ __webpack_exports__["default"] = ({ - active: onActive, - selected: onActive, - disable: onDisable, -}); -//# sourceMappingURL=state.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/components/base.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/components/base.js ***! - \**********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_event_emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/event-emitter */ "./node_modules/@antv/event-emitter/lib/index.js"); -/* harmony import */ var _antv_event_emitter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_antv_event_emitter__WEBPACK_IMPORTED_MODULE_1__); - - -var BaseComponent = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(BaseComponent, _super); - function BaseComponent(config) { - var _this = _super.call(this) || this; - _this.container = config.container; - _this.destroyed = false; - _this.group = _this.container.addGroup(); - _this.config = config; - _this.init(config); - return _this; - } - BaseComponent.prototype.getGroup = function () { - return this.group; - }; - BaseComponent.prototype.getBBox = function () { - return this.getGroup().getBBox(); - }; - BaseComponent.prototype.render = function () { - this.renderInner(this.group); - this.getCanvas().draw(); - }; - BaseComponent.prototype.update = function (config) { - this.config = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this.config), config); - this.init(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this.config), { config: config })); - this.group.clear(); - this.renderInner(this.group); - this.getCanvas().draw(); - }; - BaseComponent.prototype.destroy = function () { - this.group.remove(true); - this.destroyed = true; - }; - BaseComponent.prototype.getCanvas = function () { - return this.container.get('canvas'); - }; - BaseComponent.prototype.init = function (config) { }; - BaseComponent.prototype.renderInner = function (group) { }; - return BaseComponent; -}(_antv_event_emitter__WEBPACK_IMPORTED_MODULE_1___default.a)); -/* harmony default export */ __webpack_exports__["default"] = (BaseComponent); -//# sourceMappingURL=base.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/components/breadcrumb.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/components/breadcrumb.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/g2plot/esm/components/base.js"); -/* harmony import */ var _util_g_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/g-util */ "./node_modules/@antv/g2plot/esm/util/g-util.js"); - - - -var Breadcrumb = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Breadcrumb, _super); - function Breadcrumb() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.listeners = []; - _this.onItemGroupToggleActive = function (itemGroup, active) { return function () { - var rectShape = itemGroup.get('children').find(function (item) { return item.get('class') === 'item-background'; }); - if (rectShape) { - rectShape.attr(active ? _this.itemActiveBackgroundStyle : _this.itemBackgroundStyle); - } - _this.getCanvas().draw(); - }; }; - return _this; - } - Breadcrumb.prototype.destroy = function () { - this.offEvents(); - _super.prototype.destroy.call(this); - }; - Breadcrumb.prototype.init = function (config) { - this.x = config.x; - this.y = config.y; - this.items = config.items || []; - this.itemPadding = config.itemPadding || [2, 8, 2, 8]; - this.backgroundStyle = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ lineWidth: 1, stroke: '#ffffff' }, (config.backgroundStyle || {})); - this.itemBackgroundStyle = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ fill: '#fff' }, (config.itemBackgroundStyle || {})); - this.itemActiveBackgroundStyle = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ fill: '#ccc', opacity: 0.2 }, (config.itemActiveBackgroundStyle || {})); - this.separator = config.separator || '/'; - this.separatorStyle = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ textBaseline: 'top', fill: '#000000', opacity: 0.45 }, (config.separatorStyle || {})); - this.itemWidth = config.itemWidth; - this.itemHeight = config.itemHeight; - this.maxItemWidth = config.maxItemWidth; - this.textStyle = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ textBaseline: 'top', fill: '#000000', opacity: 0.45 }, (config.textStyle || {})); - }; - Breadcrumb.prototype.renderInner = function (group) { - var startX = 0; - var startY = 0; - this.offEvents(); - this.renderItems(group, startX, startY); - //this.bindEvents(group); - Object(_util_g_util__WEBPACK_IMPORTED_MODULE_2__["move"])(this.group, this.x, this.y); - }; - Breadcrumb.prototype.renderItems = function (group, startX, startY) { - var _this = this; - var _a = this.itemPadding, topPadding = _a[0], rightPadding = _a[1], bottomPadding = _a[2], leftPadding = _a[3]; - var itemHeight; - // background - var backgroundRect = group.addShape('rect', { - class: 'breadcrumb-background', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: startX, y: startY, width: 1, height: 1 }, this.backgroundStyle), - }); - this.items.forEach(function (item, idx) { - // item group - var itemGroup = group.addGroup({ - id: "item-group-" + item.key, - // data: item.key, - data: item, - class: 'item-group', - attrs: { - cursor: 'pointer', - }, - }); - // background rect - var rectShape = itemGroup.addShape('rect', { - id: "item-background-" + item.key, - class: 'item-background', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: startX, y: startY, width: leftPadding + rightPadding, height: topPadding + bottomPadding }, _this.itemBackgroundStyle), { cursor: 'pointer' }), - }); - rectShape.name = 'breadcrumb'; - // text shape - var textShape = itemGroup.addShape('text', { - id: "item-text-" + item.key, - class: 'item-text', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: startX + leftPadding, y: startY + topPadding, text: item.text }, _this.textStyle), { cursor: 'pointer' }), - }); - textShape.name = 'breadcrumb'; - var textShapeBBox = textShape.getBBox(); - itemHeight = _this.itemHeight || textShapeBBox.height; - var itemWidth = _this.itemWidth || textShapeBBox.width; - if (_this.maxItemWidth) { - itemWidth = Math.min(itemWidth, _this.maxItemWidth); - } - // update background rect - var backgroundRectAttr = { - x: startX, - y: startY, - width: itemWidth + leftPadding + rightPadding, - height: itemHeight + topPadding + bottomPadding, - }; - rectShape.attr('width', backgroundRectAttr.width); - rectShape.attr('height', backgroundRectAttr.height); - // clip - itemGroup.setClip({ - type: 'rect', - attrs: backgroundRectAttr, - }); - startX += backgroundRectAttr.width; - // separator - if (idx !== _this.items.length - 1) { - var sepShape = group.addShape('text', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: startX, y: startY + topPadding, text: _this.separator }, _this.separatorStyle), - class: 'separator', - }); - startX += sepShape.getBBox().width; - } - }); - // update background - backgroundRect.attr({ - width: startX, - height: itemHeight + topPadding + bottomPadding, - }); - }; - Breadcrumb.prototype.bindEvents = function (group) { - var _this = this; - var items = this.items; - var itemGroups = group.get('children').filter(function (item) { return item.get('class') === 'item-group'; }); - var callback = function (event, itemGroup, emitEventName) { return function () { - var key = itemGroup.get('data'); - var item = items.find(function (val) { return val.key === key; }); - _this.emit(emitEventName, { - item: item, - }); - }; }; - itemGroups.forEach(function (itemGroup) { - var clickCallback = callback('click', itemGroup, 'onItemClick'); - var dblclickCallback = callback('dblclick', itemGroup, 'onItemDblclick'); - var mouseEnterCallback = _this.onItemGroupToggleActive(itemGroup, true); - var mouseLeaveCallback = _this.onItemGroupToggleActive(itemGroup, false); - itemGroup.on('click', clickCallback); - itemGroup.on('dblclick', dblclickCallback); - itemGroup.on('mouseenter', mouseEnterCallback); - itemGroup.on('mouseleave', mouseLeaveCallback); - _this.listeners.push({ target: itemGroup, event: 'click', callback: clickCallback }); - _this.listeners.push({ target: itemGroup, event: 'dblclick', callback: dblclickCallback }); - _this.listeners.push({ target: itemGroup, event: 'mouseenter', callback: mouseEnterCallback }); - _this.listeners.push({ target: itemGroup, event: 'mouseleave', callback: mouseLeaveCallback }); - }); - }; - Breadcrumb.prototype.offEvents = function () { - if (this.listeners) { - this.listeners.forEach(function (_a) { - var target = _a.target, event = _a.event, callback = _a.callback; - target.off(event, callback); - }); - } - this.listeners = []; - }; - return Breadcrumb; -}(_base__WEBPACK_IMPORTED_MODULE_1__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Breadcrumb); -//# sourceMappingURL=breadcrumb.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/components/connected-area.js": -/*!********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/components/connected-area.js ***! - \********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_controller_state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base/controller/state */ "./node_modules/@antv/g2plot/esm/base/controller/state.js"); -/** - * 区域连接组件,用于堆叠柱状图和堆叠条形图 - */ - - -function parsePoints(shape, coord) { - var parsedPoints = []; - var points = shape.get('origin').points; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(points, function (p) { - parsedPoints.push(coord.convertPoint(p)); - }); - return parsedPoints; -} -function getDefaultStyle() { - return { - areaStyle: { - opacity: 0.2, - }, - lineStyle: { - lineWidth: 2, - opacity: 0.1, - }, - }; -} -var ConnectedArea = /** @class */ (function () { - function ConnectedArea(cfg) { - this.areas = []; - this.lines = []; - this._areaStyle = {}; - this._lineStyle = {}; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(this, cfg); - this._init(); - } - ConnectedArea.prototype.draw = function () { - var _this = this; - var groupedShapes = this._getGroupedShapes(); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(groupedShapes, function (shapes, name) { - if (shapes.length > 0) { - _this._drawConnection(shapes, name); - } - }); - if (this.triggerOn) { - this._addInteraction(); - } - else if (this.animation) { - // 如果定义了triggerOn的方式,则组件是响应交互的,初始化为不可见状态,因此无需动画 - this._initialAnimation(); - } - }; - ConnectedArea.prototype.clear = function () { - if (this.container) { - this.container.clear(); - } - this.areas = []; - this.lines = []; - }; - ConnectedArea.prototype.destory = function () { - if (this.container) { - this.container.remove(); - } - }; - ConnectedArea.prototype.setState = function (state, condition) { - if (state === 'active') { - this._onActive(condition); - } - if (state === 'disabled') { - this._onDisabled(condition); - } - if (state === 'selected') { - this._onSelected(condition); - } - }; - ConnectedArea.prototype._init = function () { - var _this = this; - var layer = this.view.backgroundGroup; - this.container = layer.addGroup(); - this.draw(); - this.view.on('beforerender', function () { - _this.clear(); - }); - }; - ConnectedArea.prototype._getGroupedShapes = function () { - var _this = this; - // 根据堆叠字段对shape进行分组 - var values = this.view.getScaleByField(this.field).values; - var geometry = this.view.geometries[0]; - var shapes = geometry.getShapes(); - // 创建分组 - var groups = {}; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(values, function (v) { - groups[v] = []; - }); - // 执行分组 - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(shapes, function (shape) { - var origin = shape.get('origin').data; - var key = origin[_this.field]; - groups[key].push(shape); - }); - return groups; - }; - ConnectedArea.prototype._drawConnection = function (shapes, name) { - // tslint:disable-next-line: prefer-for-of - var originColor = shapes[0].attr('fill'); - this._areaStyle[name] = this._getShapeStyle(originColor, 'area'); - this._lineStyle[name] = this._getShapeStyle(originColor, 'line'); - var coord = this.view.geometries[0].coordinate; - for (var i = 0; i < shapes.length - 1; i++) { - var current = parsePoints(shapes[i], coord); - var next = parsePoints(shapes[i + 1], coord); - var areaStyle = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["mix"])({}, this._areaStyle[name]); - var lineStyle = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["mix"])({}, this._lineStyle[name]); - if (this.triggerOn) { - areaStyle.opacity = 0; - lineStyle.opacity = 0; - } - var area = this.container.addShape('path', { - attrs: Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["mix"])({}, areaStyle, { - path: [ - ['M', current[2].x, current[2].y], - ['L', next[1].x, next[1].y], - ['L', next[0].x, next[0].y], - ['L', current[3].x, current[3].y], - ], - }), - name: 'connectedArea', - }); - var line = this.container.addShape('path', { - attrs: Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["mix"])({}, lineStyle, { - path: [ - ['M', current[2].x, current[2].y], - ['L', next[1].x, next[1].y], - ], - }), - name: 'connectedArea', - }); - // 在辅助图形上记录数据,用以交互和响应状态量 - var originData = shapes[i].get('origin').data; - area.set('data', originData); - line.set('data', originData); - this.areas.push(area); - this.lines.push(line); - } - }; - ConnectedArea.prototype._getShapeStyle = function (originColor, shapeType) { - var styleName = shapeType + "Style"; - // 如果用户自己指定了样式,则不采用默认颜色映射 - if (this[styleName]) { - return this[styleName]; - } - var defaultStyle = getDefaultStyle()[styleName]; - var mappedStyle = { fill: originColor }; - if (shapeType === 'line') { - mappedStyle = { stroke: originColor }; - } - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["mix"])(defaultStyle, mappedStyle); - }; - ConnectedArea.prototype._addInteraction = function () { - var _this = this; - var eventName = this.triggerOn; - this.view.on("interval:" + eventName, function (e) { - var origin = e.target.get('origin').data[_this.field]; - _this.setState('active', { - name: _this.field, - exp: origin, - }); - _this.setState('disabled', { - name: _this.field, - exp: function (d) { - return d !== origin; - }, - }); - _this.view.canvas.draw(); - }); - // 当鼠标移动到其他区域时取消显示 - this.view.on('mousemove', function (e) { - if (e.gEvent.target.get('name') !== 'interval') { - _this.setState('disabled', { - name: _this.field, - exp: function () { - return true; - }, - }); - } - }); - }; - ConnectedArea.prototype._initialAnimation = function () { - // clipIn动画 - var _a = this.view.coordinateBBox, x = _a.x, y = _a.y, width = _a.width, height = _a.height; - this.container.setClip({ - type: 'rect', - attrs: { - x: x, - y: y, - width: 0, - height: height, - }, - }); - this.container.set('animating', true); - this.container.getClip().animate({ - width: width, - }, 600, 'easeQuadOut', function () { }, 400); - }; - ConnectedArea.prototype._onActive = function (condition) { - var _this = this; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(this.areas, function (area) { - var shapeData = area.get('data'); - var styleField = shapeData[_this.field]; - if (Object(_base_controller_state__WEBPACK_IMPORTED_MODULE_1__["compare"])(shapeData, condition)) { - var opacity = _this._areaStyle[styleField].opacity || 1; - // area.attr('opacity',this._areaStyle[styleField].opacity || 1); - area.stopAnimate(); - area.animate({ opacity: opacity }, 400, 'easeQuadOut'); - } - }); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(this.lines, function (line) { - var shapeData = line.get('data'); - var styleField = shapeData[_this.field]; - if (Object(_base_controller_state__WEBPACK_IMPORTED_MODULE_1__["compare"])(shapeData, condition)) { - var opacity = _this._lineStyle[styleField].opacity || 1; - // line.attr('opacity',this._lineStyle[styleField].opacity || 1); - line.stopAnimate(); - line.animate({ opacity: opacity }, 400, 'easeQuadOut'); - } - }); - }; - ConnectedArea.prototype._onDisabled = function (condition) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(this.areas, function (area) { - var shapeData = area.get('data'); - if (Object(_base_controller_state__WEBPACK_IMPORTED_MODULE_1__["compare"])(shapeData, condition)) { - // area.attr('opacity',0); - area.stopAnimate(); - area.animate({ - opacity: 0, - }, 400, 'easeQuadOut'); - } - }); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(this.lines, function (line) { - var shapeData = line.get('data'); - if (Object(_base_controller_state__WEBPACK_IMPORTED_MODULE_1__["compare"])(shapeData, condition)) { - // line.attr('opacity',0); - line.stopAnimate(); - line.animate({ - opacity: 0, - }, 400, 'easeQuadOut'); - } - }); - }; - ConnectedArea.prototype._onSelected = function (condition) { - this._onActive(condition); - }; - ConnectedArea.prototype.getGeometry = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["find"])(this.view.geometries, function (geom) { return geom.type === 'interval'; }); - }; - return ConnectedArea; -}()); -/* harmony default export */ __webpack_exports__["default"] = (ConnectedArea); -//# sourceMappingURL=connected-area.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/components/conversion-tag.js": -/*!********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/components/conversion-tag.js ***! - \********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_g2_lib_animate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/g2/lib/animate */ "./node_modules/@antv/g2/lib/animate/index.js"); -/* harmony import */ var _antv_g2_lib_animate__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_antv_g2_lib_animate__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - - - -function parsePoints(shape, coord) { - var parsedPoints = []; - var points = shape.get('origin').points; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(points, function (p) { - parsedPoints.push(coord.convertPoint(p)); - }); - return parsedPoints; -} -var ConversionTag = /** @class */ (function () { - function ConversionTag(cfg) { - // @ts-ignore - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["deepMix"])(this, this.constructor.getDefaultOptions(cfg), cfg); - this._init(); - } - ConversionTag.getDefaultOptions = function (_a) { - var transpose = _a.transpose; - return { - visible: true, - size: transpose ? 32 : 80, - spacing: transpose ? 8 : 12, - offset: transpose ? 32 : 0, - arrow: { - visible: true, - headSize: 12, - style: { - fill: 'rgba(0, 0, 0, 0.05)', - }, - }, - value: { - visible: true, - style: { - fontSize: 12, - fill: 'rgba(0, 0, 0, 0.85)', - }, - formatter: function (valueUpper, valueLower) { return ((100 * valueLower) / valueUpper).toFixed(2) + "%"; }, - }, - animation: Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["deepMix"])({}, _antv_g2_lib_animate__WEBPACK_IMPORTED_MODULE_1__["DEFAULT_ANIMATE_CFG"]), - }; - }; - ConversionTag.prototype._init = function () { - var _this = this; - var layer = this.view.backgroundGroup; - this.container = layer.addGroup(); - this.draw(); - this.view.on('beforerender', function () { - _this.clear(); - }); - }; - ConversionTag.prototype.draw = function () { - var _this = this; - var transpose = this.transpose; - var values = this.view.getScaleByField(this.field).values; - var geometry = this.view.geometries[0]; - var shapes = geometry.getShapes(); - var shapeLower, valueLower, shapeUpper, valueUpper; - if (transpose) { - shapes.forEach(function (shapeLower, i) { - valueLower = values[i]; - if (i++ > 0) { - _this._drawTag(shapeUpper, valueUpper, shapeLower, valueLower); - } - valueUpper = valueLower; - shapeUpper = shapeLower; - }); - } - else { - shapes.forEach(function (shapeUpper, i) { - valueUpper = values[i]; - if (i++ > 0) { - _this._drawTag(shapeUpper, valueUpper, shapeLower, valueLower); - } - valueLower = valueUpper; - shapeLower = shapeUpper; - }); - } - }; - ConversionTag.prototype.clear = function () { - if (this.container) { - this.container.clear(); - } - }; - ConversionTag.prototype.destory = function () { - if (this.container) { - this.container.remove(); - } - }; - ConversionTag.prototype._drawTag = function (shapeUpper, valueUpper, shapeLower, valueLower) { - var transpose = this.transpose; - var coord = this.view.geometries[0].coordinate; - var pointUpper = parsePoints(shapeUpper, coord)[transpose ? 3 : 0]; - var pointLower = parsePoints(shapeLower, coord)[transpose ? 0 : 3]; - this._drawTagArrow(pointUpper, pointLower); - this._drawTagValue(pointUpper, valueUpper, pointLower, valueLower); - }; - ConversionTag.prototype._drawTagArrow = function (pointUpper, pointLower) { - var spacing = this.spacing; - var _a = this, size = _a.size, offset = _a.offset, animation = _a.animation, transpose = _a.transpose; - var headSize = this.arrow.headSize; - var totalHeight = pointLower.y - pointUpper.y; - var totalWidth = pointLower.x - pointUpper.x; - var points; - if (transpose) { - if ((totalWidth - headSize) / 2 < spacing) { - // 当柱间距不足容纳箭头尖与间隔时,画三角并挤占间隔 - spacing = Math.max(1, (totalWidth - headSize) / 2); - points = [ - [pointUpper.x + spacing, pointUpper.y - offset], - [pointUpper.x + spacing, pointUpper.y - offset - size], - [pointLower.x - spacing, pointLower.y - offset - size / 2], - ]; - } - else { - // 当柱间距足够时,画完整图形并留出间隔。 - points = [ - [pointUpper.x + spacing, pointUpper.y - offset], - [pointUpper.x + spacing, pointUpper.y - offset - size], - [pointLower.x - spacing - headSize, pointLower.y - offset - size], - [pointLower.x - spacing, pointLower.y - offset - size / 2], - [pointLower.x - spacing - headSize, pointLower.y - offset], - ]; - } - } - else { - if ((totalHeight - headSize) / 2 < spacing) { - // 当柱间距不足容纳箭头尖与间隔时,画三角并挤占间隔 - spacing = Math.max(1, (totalHeight - headSize) / 2); - points = [ - [pointUpper.x + offset, pointUpper.y + spacing], - [pointUpper.x + offset + size, pointUpper.y + spacing], - [pointLower.x + offset + size / 2, pointLower.y - spacing], - ]; - } - else { - // 当柱间距足够时,画完整图形并留出间隔。 - points = [ - [pointUpper.x + offset, pointUpper.y + spacing], - [pointUpper.x + offset + size, pointUpper.y + spacing], - [pointLower.x + offset + size, pointLower.y - spacing - headSize], - [pointLower.x + offset + size / 2, pointLower.y - spacing], - [pointLower.x + offset, pointLower.y - spacing - headSize], - ]; - } - } - var tagArrow = this.container.addShape('polygon', { - name: 'arrow', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this.arrow.style), { points: points }), - }); - if (animation !== false) { - this._fadeInTagShape(tagArrow); - } - }; - ConversionTag.prototype._drawTagValue = function (pointUpper, valueUpper, pointLower, valueLower) { - var _a = this, size = _a.size, offset = _a.offset, animation = _a.animation, transpose = _a.transpose; - var text = this.value.formatter(valueUpper, valueLower); - var tagValue = this.container.addShape('text', { - name: 'value', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this.value.style), { text: text, x: transpose ? (pointUpper.x + pointLower.x) / 2 : pointUpper.x + offset + size / 2, y: transpose ? pointUpper.y - offset - size / 2 : (pointUpper.y + pointLower.y) / 2, textAlign: 'center', textBaseline: 'middle' }), - }); - if (transpose) { - var totalWidth = pointLower.x - pointUpper.x; - var textWidth = tagValue.getBBox().width; - if (textWidth > totalWidth) { - var cWidth = textWidth / text.length; - var cEnd = Math.max(1, Math.ceil(totalWidth / cWidth) - 1); - var textAdjusted = text.slice(0, cEnd) + "..."; - tagValue.attr('text', textAdjusted); - } - } - if (animation !== false) { - this._fadeInTagShape(tagValue); - } - }; - ConversionTag.prototype._fadeInTagShape = function (shape) { - var animation = this.animation; - var opacity = shape.attr('opacity'); - shape.attr('opacity', 0); - var duration = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["get"])(animation, 'appear', _antv_g2_lib_animate__WEBPACK_IMPORTED_MODULE_1__["DEFAULT_ANIMATE_CFG"].appear).duration; - shape.animate({ opacity: opacity }, duration); - }; - return ConversionTag; -}()); -/* harmony default export */ __webpack_exports__["default"] = (ConversionTag); -//# sourceMappingURL=conversion-tag.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/components/description.js": -/*!*****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/components/description.js ***! - \*****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/common */ "./node_modules/@antv/g2plot/esm/util/common.js"); -/* harmony import */ var _util_bbox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/bbox */ "./node_modules/@antv/g2plot/esm/util/bbox.js"); - - - - -/** - * 图表的文字描述,一般用于生成图表的标题和副标题 - */ -var TextDescription = /** @class */ (function () { - function TextDescription(cfg) { - this.position = 'top'; - this.destroyed = false; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["assign"])(this, cfg); - this.init(); - } - TextDescription.prototype.getBBox = function () { - var _this = this; - if (this.shape) { - // @ts-ignore - var bbox = this.shape.getBBox(); - if (this.index === 0) { - return _util_bbox__WEBPACK_IMPORTED_MODULE_3__["default"].fromBBoxObject(bbox); - } - var padding_1 = this.plot.theme.description.padding; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(padding_1)) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(padding_1, function (it, index) { - if (typeof padding_1[index] === 'function') { - padding_1[index] = padding_1[index](_this.plot.options.legend.position); - } - }); - } - return new _util_bbox__WEBPACK_IMPORTED_MODULE_3__["default"](bbox.maxX, bbox.minY, bbox.width, bbox.height + padding_1[2]); - } - return null; - }; - TextDescription.prototype.clear = function () { - if (this.shape) { - // @ts-ignore - this.shape.attr('text', ''); - } - }; - TextDescription.prototype.destroy = function () { - if (this.shape) { - this.shape.remove(); - } - this.destroyed = true; - }; - TextDescription.prototype.init = function () { - var content = this.textWrapper(); - this.shape = this.container.addShape('text', { - attrs: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mix"])({ - x: this.leftMargin, - y: this.topMargin, - text: content, - }, this.style), - }); - // @ts-ignore - this.shape.name = this.name; - }; - TextDescription.prototype.getPosition = function () { - if (this.alignTo === 'left') { - return { x: this.leftMargin, y: this.topMargin }; - } - else if (this.alignTo === 'middle') { - return { x: this.leftMargin + this.wrapperWidth / 2, y: this.topMargin }; - } - else { - return { x: this.rightMargin, y: this.topMargin }; - } - }; - TextDescription.prototype.getTextAlign = function () { - if (this.alignTo === 'left') { - return 'left'; - } - else if (this.alignTo === 'middle') { - return 'center'; - } - else { - return 'right'; - } - }; - /** - * 当text过长时,默认换行 - * 1. 注意初始text带换行符的场景 - */ - TextDescription.prototype.textWrapper = function () { - var width = this.wrapperWidth; - var style = this.style; - var textContent = this.text; - var tShape = this.container.addShape('text', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ text: '', x: 0, y: 0 }, style), - }); - var textArr = textContent.split('\n'); - var wrappedTextArr = textArr.map(function (wrappedText) { - var text = ''; - var chars = wrappedText.split(''); - var breakIndex = []; - for (var i = 0; i < chars.length; i++) { - var item = chars[i]; - tShape.attr('text', (text += item)); - var currentWidth = tShape.getBBox().width - 1; - if (currentWidth > width) { - // 如果是第一个字符就大于宽度不做任何换行处理 - if (i === 0) { - break; - } - breakIndex.push(i); - text = ''; - } - } - return Object(_util_common__WEBPACK_IMPORTED_MODULE_2__["breakText"])(chars, breakIndex); - }); - tShape.remove(); - return wrappedTextArr.join('\n'); - }; - return TextDescription; -}()); -/* harmony default export */ __webpack_exports__["default"] = (TextDescription); -//# sourceMappingURL=description.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/components/factory.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/components/factory.js ***! - \*************************************************************/ -/*! exports provided: getComponent, getComponentStateMethod */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getComponent", function() { return getComponent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getComponentStateMethod", function() { return getComponentStateMethod; }); -/* harmony import */ var _axis_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./axis/parser */ "./node_modules/@antv/g2plot/esm/components/axis/parser.js"); -/* harmony import */ var _guide_line__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./guide-line */ "./node_modules/@antv/g2plot/esm/components/guide-line.js"); -/* harmony import */ var _label_parser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./label/parser */ "./node_modules/@antv/g2plot/esm/components/label/parser.js"); -/* harmony import */ var _axis_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./axis/state */ "./node_modules/@antv/g2plot/esm/components/axis/state.js"); -/* harmony import */ var _label_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./label/state */ "./node_modules/@antv/g2plot/esm/components/label/state.js"); -/* harmony import */ var _tooltip_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./tooltip/state */ "./node_modules/@antv/g2plot/esm/components/tooltip/state.js"); -// components parser - - - -// components state methods - - - -var COMPONENT_MAPPER = { - axis: _axis_parser__WEBPACK_IMPORTED_MODULE_0__["default"], - label: _label_parser__WEBPACK_IMPORTED_MODULE_2__["default"], - guideLine: _guide_line__WEBPACK_IMPORTED_MODULE_1__["default"], -}; -var STATE_MAPPER = { - tooltip: _tooltip_state__WEBPACK_IMPORTED_MODULE_5__["default"], - label: _label_state__WEBPACK_IMPORTED_MODULE_4__["default"], - axis: _axis_state__WEBPACK_IMPORTED_MODULE_3__["default"], -}; -function getComponent(name, cfg) { - var Components = COMPONENT_MAPPER[name]; - return new Components(cfg).config; -} -function getComponentStateMethod(name, type) { - return STATE_MAPPER[name][type]; -} -//# sourceMappingURL=factory.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/components/guide-line.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/components/guide-line.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_scale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/scale */ "./node_modules/@antv/scale/esm/index.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/math */ "./node_modules/@antv/g2plot/esm/util/math.js"); - - - -var GuideLine = /** @class */ (function () { - function GuideLine(cfg) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["assign"])(this, cfg); - this._init(); - } - GuideLine.prototype._init = function () { - var props = this.plot.options; - var defaultStyle = this.getDefaultStyle(); - var baseConfig = { - type: 'line', - top: true, - start: this.cfg.start, - end: this.cfg.end, - }; - baseConfig.style = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, defaultStyle.line.style, this.cfg.lineStyle); - baseConfig.text = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, defaultStyle.text, this.cfg.text); - if (this.cfg.type) { - var stateValue = this._getState(this.cfg.type); - var scale = this.getYScale(); - var percent = (1.0 - scale.scale(stateValue)) * 100 + "%"; - var start = ['0%', percent]; - var end = ['100%', percent]; - this.config = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mix"])({ - start: start, - end: end, - }, baseConfig); - } - else { - var _a = this.cfg, start_1 = _a.start, end_1 = _a.end; - this.config = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(baseConfig); - var xScale_1 = this.getXScale(); - var yScale_1 = this.getYScale(); - var startData_1 = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(start_1); - var endData_1 = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(end_1); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(start_1, function (value, index) { - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["contains"])(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["toArray"])(start_1[index]), '%') || Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(start_1[index])) { - if (index === 0) { - startData_1[index] = xScale_1.scale(start_1[0]) * 100 + "%"; - } - else { - startData_1[index] = (1.0 - yScale_1.scale(start_1[1])) * 100 + "%"; - } - } - }); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(end_1, function (value, index) { - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["contains"])(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["toArray"])(end_1[index]), '%') || Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(end_1[index])) { - if (index === 0) { - endData_1[index] = xScale_1.scale(end_1[0]) * 100 + "%"; - } - else { - endData_1[index] = (1.0 - yScale_1.scale(end_1[1])) * 100 + "%"; - } - } - }); - this.config.start = startData_1; - this.config.end = endData_1; - } - }; - GuideLine.prototype.getYScale = function () { - var minValue = this._getState('min'); - var maxValue = this._getState('max'); - var Scale = Object(_antv_scale__WEBPACK_IMPORTED_MODULE_0__["getScale"])('linear'); - // 重新组织scale并使用scale的min和max来计算guide point的百分比位置,以避免受nice的影响 - var scale = new Scale(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mix"])({}, { - min: this.plot.type === 'column' ? 0 : minValue, - max: maxValue, - nice: true, - values: this.values, - }, this.plot.config.scales[this.plot.options.yField])); - return scale; - }; - GuideLine.prototype.getXScale = function () { - var values = this.extractXValue(); - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isString"])(values[0])) { - var Scale = Object(_antv_scale__WEBPACK_IMPORTED_MODULE_0__["getScale"])('cat'); - var scale = new Scale(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mix"])({}, { - values: values, - }, this.plot.config.scales[this.plot.options.xField])); - return scale; - } - else { - var min = Math.min.apply(Math, values); - var max = Math.max.apply(Math, values); - var Scale = Object(_antv_scale__WEBPACK_IMPORTED_MODULE_0__["getScale"])('linear'); - var scale = new Scale(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mix"])({}, { - min: min, - max: max, - nice: true, - values: values, - }, this.plot.config.scales[this.plot.options.xField])); - return scale; - } - }; - GuideLine.prototype._getState = function (type) { - this.values = this._extractValues(); - if (type === 'median') { - return Object(_util_math__WEBPACK_IMPORTED_MODULE_2__["getMedian"])(this.values); - } - if (type === 'mean') { - return Object(_util_math__WEBPACK_IMPORTED_MODULE_2__["getMean"])(this.values); - } - if (type === 'max') { - return Math.max.apply(Math, this.values); - } - if (type === 'min') { - return Math.min.apply(Math, this.values); - } - }; - GuideLine.prototype._extractValues = function () { - var props = this.plot.options; - var field = props.yField; - var values = []; - var data = this.plot.processData(props.data); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(data, function (d) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(d[field])) { - values.push.apply(values, d[field]); - } - else { - values.push(d[field]); - } - }); - return values; - }; - GuideLine.prototype.extractXValue = function () { - var props = this.plot.options; - var field = props.xField; - var values = []; - var data = this.plot.processData(props.data); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(data, function (d) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(d[field])) { - values.push.apply(values, d[field]); - } - else { - values.push(d[field]); - } - }); - return values; - }; - GuideLine.prototype.getDefaultStyle = function () { - this.getDefaultTextAlign(); - return { - line: { - style: { - lineWidth: 2, - stroke: '#333333', - opacity: 0.7, - lineDash: [0, 0], - }, - }, - text: { - offsetY: -5, - style: { - fontSize: 14, - stroke: 'white', - lineWidth: 2, - textAlign: this.getDefaultTextAlign(), - }, - }, - }; - }; - GuideLine.prototype.getDefaultTextAlign = function () { - var textConfig = this.cfg.text; - if (textConfig) { - if (!textConfig.position || textConfig.position === 'start') { - return 'left'; - } - if (textConfig.position === 'center') { - return 'center'; - } - if (textConfig.position === 'end') { - return 'right'; - } - } - }; - return GuideLine; -}()); -/* harmony default export */ __webpack_exports__["default"] = (GuideLine); -//# sourceMappingURL=guide-line.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/components/label/parser.js": -/*!******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/components/label/parser.js ***! - \******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_formatter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/formatter */ "./node_modules/@antv/g2plot/esm/util/formatter.js"); - - - -var LabelParser = /** @class */ (function () { - function LabelParser(cfg) { - this.config = {}; - var plot = cfg.plot, rest = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__rest"])(cfg, ["plot"]); - this.plot = plot; - this.originConfig = rest; - this.init(cfg); - } - LabelParser.prototype.getConfig = function () { - return this.config; - }; - LabelParser.prototype.init = function (cfg) { - var _this = this; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["assign"])(this.config, cfg); - this.config.callback = function (val) { - var restArgs = []; - for (var _i = 1; _i < arguments.length; _i++) { - restArgs[_i - 1] = arguments[_i]; - } - return _this.parseCallBack.apply(_this, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArrays"])([val], restArgs)); - }; - }; - LabelParser.prototype.parseCallBack = function (val) { - var restArgs = []; - for (var _i = 1; _i < arguments.length; _i++) { - restArgs[_i - 1] = arguments[_i]; - } - var labelProps = this.originConfig; - var theme = this.plot.getPlotTheme(); - var config = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, labelProps); - this.parseOffset(labelProps, config); - if (labelProps.position) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(labelProps.position)) { - config.position = labelProps.position(val); - } - else { - config.position = labelProps.position; - } - } - this.parseFormatter.apply(this, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArrays"])([config, val], restArgs)); - if (labelProps.style) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(labelProps.style)) { - config.textStyle = labelProps.style(val); - } - else { - config.textStyle = labelProps.style; - } - } - config.textStyle = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(theme, 'label.style'), config.textStyle); - if (labelProps.autoRotate) { - config.autoRotate = labelProps.autoRotate; - } - return config; - }; - LabelParser.prototype.parseOffset = function (props, config) { - var mapper = ['offset', 'offsetX', 'offsetY']; - var count = 0; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(mapper, function (m) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(props, m)) { - config[m] = props[m]; - count++; - } - }); - // 如用户没有设置offset,而label position又为middle时,则默认设置offset为0 - if (count === 0 && Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(props, 'position') === 'middle') { - config.offset = 0; - } - }; - LabelParser.prototype.parseFormatter = function (config) { - var values = []; - for (var _i = 1; _i < arguments.length; _i++) { - values[_i - 1] = arguments[_i]; - } - var labelProps = this.originConfig; - config.content = function (data, mappingData, index) { - // @ts-ignore - var text = data[labelProps.fields[0]]; - return Object(_util_formatter__WEBPACK_IMPORTED_MODULE_2__["combineFormatter"])(Object(_util_formatter__WEBPACK_IMPORTED_MODULE_2__["getNoopFormatter"])(), Object(_util_formatter__WEBPACK_IMPORTED_MODULE_2__["getPrecisionFormatter"])(labelProps.precision), Object(_util_formatter__WEBPACK_IMPORTED_MODULE_2__["getSuffixFormatter"])(labelProps.suffix), labelProps.formatter - ? labelProps.formatter - : Object(_util_formatter__WEBPACK_IMPORTED_MODULE_2__["getNoopFormatter"])())(text, data, index); - }; - }; - return LabelParser; -}()); -/* harmony default export */ __webpack_exports__["default"] = (LabelParser); -//# sourceMappingURL=parser.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/components/label/state.js": -/*!*****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/components/label/state.js ***! - \*****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_controller_state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../base/controller/state */ "./node_modules/@antv/g2plot/esm/base/controller/state.js"); - - -// 对label和label样式进行缓存 -var labels; -var originAttrs; -function onActive(plot, condition) { - if (!labels) { - getAllLabels(plot); - } - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(labels, function (label, index) { - var origin = label.get('origin'); - if (Object(_base_controller_state__WEBPACK_IMPORTED_MODULE_1__["compare"])(origin, condition)) { - var originAttr = originAttrs[index]; - var style = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["mix"])({}, originAttr, { opacity: 1 }); - label.attr(style); - } - }); -} -function onDisable(plot, condition) { - if (!labels) { - getAllLabels(plot); - } - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(labels, function (label, index) { - var origin = label.get('origin'); - if (Object(_base_controller_state__WEBPACK_IMPORTED_MODULE_1__["compare"])(origin, condition)) { - var originAttr = originAttrs[index]; - var disableStyle = labelDisableStyle(originAttr); - label.attr(disableStyle); - } - }); -} -function getAllLabels(plot) { - labels = []; - originAttrs = []; - var geoms = plot.view.get('elements'); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(geoms, function (geom) { - var geomLabels = geom.get('labels'); - if (geomLabels) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(geomLabels, function (label) { - labels.push(label); - originAttrs.push(label.attr()); - }); - } - }); -} -function labelDisableStyle(style) { - var opacity = style.opacity || 1; - return { opacity: opacity * 0.2 }; -} -/* harmony default export */ __webpack_exports__["default"] = ({ - active: onActive, - selected: onActive, - disable: onDisable, -}); -//# sourceMappingURL=state.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/components/tooltip/state.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/components/tooltip/state.js ***! - \*******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_controller_state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../base/controller/state */ "./node_modules/@antv/g2plot/esm/base/controller/state.js"); - - -var POSITION_MAPPER = ['xField', 'yField', 'angleField']; -function onActive(plot, condition) { - var props = plot.options; - // 获取state condition对应在画布的位置,只有在state condition对应字段为位置映射字段时,tooltip才会对齐进行响应 - if (shouldActive(props, condition)) { - var data = props.data; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(data, function (d) { - if (Object(_base_controller_state__WEBPACK_IMPORTED_MODULE_1__["compare"])(d, condition)) { - var point = plot.view.getXY(d); - // 调用showTooltip方法 - plot.view.on('tooltip:create', function (e) { - processState(condition, e, false); - }); - plot.view.showTooltip(point); - } - }); - } -} -function onDisable(plot, condition) { - plot.view.on('tooltip:change', function (e) { - processState(condition, e, true); - }); -} -function processState(condition, e, inverse) { - var expected = inverse ? false : true; - var originItems = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(e.items); - e.items.splice(0); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(originItems, function (item) { - var origin = item.point._origin; - if (Object(_base_controller_state__WEBPACK_IMPORTED_MODULE_1__["compare"])(origin, condition) === expected) { - e.items.push(item); - } - }); -} -function shouldActive(props, condition) { - var fields = getPositionField(props); - return !Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(condition) && fields.indexOf(condition.name); -} -function getPositionField(props) { - var fields = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(POSITION_MAPPER, function (v) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["has"])(props, v)) { - fields.push(v); - } - }); - return fields; -} -/* harmony default export */ __webpack_exports__["default"] = ({ - active: onActive, - selected: onActive, - disable: onDisable, -}); -//# sourceMappingURL=state.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/dependents.js": -/*!*****************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/dependents.js ***! - \*****************************************************/ -/*! exports provided: Canvas, SVG, View, registerAnimation, registerGeometry, Geometry, Interaction, registerInteraction, registerShape, getTheme, Util, getShapeFactory, VIEW_LIFE_CIRCLE, DEFAULT_ANIMATE_CFG, HtmlTooltip, HtmlTooltipTheme, TooltipCssConst, Axis, Legend, Tooltip, Slider, Scrollbar */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_g_canvas__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/g-canvas */ "./node_modules/@antv/g-canvas/dist/g.min.js"); -/* harmony import */ var _antv_g_canvas__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_antv_g_canvas__WEBPACK_IMPORTED_MODULE_0__); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Canvas", function() { return _antv_g_canvas__WEBPACK_IMPORTED_MODULE_0__["Canvas"]; }); - -/* harmony import */ var _antv_g_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/g-svg */ "./node_modules/@antv/g-svg/dist/g.min.js"); -/* harmony import */ var _antv_g_svg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_antv_g_svg__WEBPACK_IMPORTED_MODULE_1__); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SVG", function() { return _antv_g_svg__WEBPACK_IMPORTED_MODULE_1__["Canvas"]; }); - -/* harmony import */ var _antv_g2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/g2 */ "./node_modules/@antv/g2/dist/g2.min.js"); -/* harmony import */ var _antv_g2__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_antv_g2__WEBPACK_IMPORTED_MODULE_2__); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "View", function() { return _antv_g2__WEBPACK_IMPORTED_MODULE_2__["View"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "registerAnimation", function() { return _antv_g2__WEBPACK_IMPORTED_MODULE_2__["registerAnimation"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "registerGeometry", function() { return _antv_g2__WEBPACK_IMPORTED_MODULE_2__["registerGeometry"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Geometry", function() { return _antv_g2__WEBPACK_IMPORTED_MODULE_2__["Geometry"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Interaction", function() { return _antv_g2__WEBPACK_IMPORTED_MODULE_2__["Interaction"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "registerInteraction", function() { return _antv_g2__WEBPACK_IMPORTED_MODULE_2__["registerInteraction"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "registerShape", function() { return _antv_g2__WEBPACK_IMPORTED_MODULE_2__["registerShape"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getTheme", function() { return _antv_g2__WEBPACK_IMPORTED_MODULE_2__["getTheme"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Util", function() { return _antv_g2__WEBPACK_IMPORTED_MODULE_2__["Util"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getShapeFactory", function() { return _antv_g2__WEBPACK_IMPORTED_MODULE_2__["getShapeFactory"]; }); - -/* harmony import */ var _antv_g2_lib_constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @antv/g2/lib/constant */ "./node_modules/@antv/g2/lib/constant.js"); -/* harmony import */ var _antv_g2_lib_constant__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_antv_g2_lib_constant__WEBPACK_IMPORTED_MODULE_3__); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VIEW_LIFE_CIRCLE", function() { return _antv_g2_lib_constant__WEBPACK_IMPORTED_MODULE_3__["VIEW_LIFE_CIRCLE"]; }); - -/* harmony import */ var _antv_g2_lib_animate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @antv/g2/lib/animate */ "./node_modules/@antv/g2/lib/animate/index.js"); -/* harmony import */ var _antv_g2_lib_animate__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_antv_g2_lib_animate__WEBPACK_IMPORTED_MODULE_4__); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_ANIMATE_CFG", function() { return _antv_g2_lib_animate__WEBPACK_IMPORTED_MODULE_4__["DEFAULT_ANIMATE_CFG"]; }); - -/* harmony import */ var _antv_component_lib_tooltip_html__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @antv/component/lib/tooltip/html */ "./node_modules/@antv/component/lib/tooltip/html.js"); -/* harmony import */ var _antv_component_lib_tooltip_html__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_antv_component_lib_tooltip_html__WEBPACK_IMPORTED_MODULE_5__); -/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, "HtmlTooltip", function() { return _antv_component_lib_tooltip_html__WEBPACK_IMPORTED_MODULE_5___default.a; }); -/* harmony import */ var _antv_component_lib_tooltip_html_theme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @antv/component/lib/tooltip/html-theme */ "./node_modules/@antv/component/lib/tooltip/html-theme.js"); -/* harmony import */ var _antv_component_lib_tooltip_html_theme__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_antv_component_lib_tooltip_html_theme__WEBPACK_IMPORTED_MODULE_6__); -/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, "HtmlTooltipTheme", function() { return _antv_component_lib_tooltip_html_theme__WEBPACK_IMPORTED_MODULE_6___default.a; }); -/* harmony import */ var _antv_component_lib_tooltip_css_const__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @antv/component/lib/tooltip/css-const */ "./node_modules/@antv/component/lib/tooltip/css-const.js"); -/* harmony import */ var _antv_component_lib_tooltip_css_const__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_antv_component_lib_tooltip_css_const__WEBPACK_IMPORTED_MODULE_7__); -/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, "TooltipCssConst", function() { return _antv_component_lib_tooltip_css_const__WEBPACK_IMPORTED_MODULE_7___default.a; }); -/* harmony import */ var _antv_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @antv/component */ "./node_modules/@antv/component/esm/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Axis", function() { return _antv_component__WEBPACK_IMPORTED_MODULE_8__["Axis"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Legend", function() { return _antv_component__WEBPACK_IMPORTED_MODULE_8__["Legend"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Tooltip", function() { return _antv_component__WEBPACK_IMPORTED_MODULE_8__["Tooltip"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Slider", function() { return _antv_component__WEBPACK_IMPORTED_MODULE_8__["Slider"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scrollbar", function() { return _antv_component__WEBPACK_IMPORTED_MODULE_8__["Scrollbar"]; }); - - - -// G2 - - - -// Component - - - - - -//# sourceMappingURL=dependents.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/geoms/area/index.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/geoms/area/index.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _main__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./main */ "./node_modules/@antv/g2plot/esm/geoms/area/main.js"); -/* harmony import */ var _mini__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mini */ "./node_modules/@antv/g2plot/esm/geoms/area/mini.js"); - - -/* harmony default export */ __webpack_exports__["default"] = ({ - main: _main__WEBPACK_IMPORTED_MODULE_0__["default"], - mini: _mini__WEBPACK_IMPORTED_MODULE_1__["default"], -}); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/geoms/area/main.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/geoms/area/main.js ***! - \**********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base */ "./node_modules/@antv/g2plot/esm/geoms/base.js"); - - - -var AreaParser = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(AreaParser, _super); - function AreaParser() { - return _super !== null && _super.apply(this, arguments) || this; - } - AreaParser.prototype.init = function () { - var props = this.plot.options; - this.config = { - type: 'area', - position: { - fields: [props.xField, props.yField], - }, - connectNulls: props.connectNulls || false, - }; - if (props.smooth) { - this.config.shape = { values: ['smooth'] }; - } - if (this._getColorMappingField() || props.color) { - this.parseColor(); - } - if (props.areaStyle || (props.area && props.area.style)) { - this.parseStyle(); - } - }; - AreaParser.prototype.parseColor = function () { - var props = this.plot.options; - var config = {}; - var colorMappingField = this._getColorMappingField(); - if (colorMappingField) { - config.fields = colorMappingField; - } - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(props, 'color')) { - var color = props.color; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isString"])(color)) { - config.values = [color]; - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(color)) { - config.callback = color; - } - else { - config.values = color; - } - } - this.config.color = config; - }; - AreaParser.prototype.parseStyle = function () { - var props = this.plot.options; - var styleProps = props.areaStyle ? props.areaStyle : props.area.style; - var config = {}; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(styleProps) && props.seriesField) { - config.fields = [props.seriesField]; - config.callback = styleProps; - } - else { - config.cfg = styleProps; - } - this.config.style = config; - }; - AreaParser.prototype._getColorMappingField = function () { - var props = this.plot.options; - var colorMapper = ['stackField', 'seriesField']; - for (var _i = 0, colorMapper_1 = colorMapper; _i < colorMapper_1.length; _i++) { - var m = colorMapper_1[_i]; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(props, m)) { - return [props[m]]; - } - } - }; - return AreaParser; -}(_base__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (AreaParser); -//# sourceMappingURL=main.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/geoms/area/mini.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/geoms/area/mini.js ***! - \**********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/math */ "./node_modules/@antv/g2plot/esm/util/math.js"); -/* harmony import */ var _util_path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/path */ "./node_modules/@antv/g2plot/esm/util/path.js"); -/* harmony import */ var _main__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./main */ "./node_modules/@antv/g2plot/esm/geoms/area/main.js"); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../theme */ "./node_modules/@antv/g2plot/esm/theme/index.js"); - -/** 简化折线点 */ - - - - - - -Object(_dependents__WEBPACK_IMPORTED_MODULE_1__["registerShape"])('area', 'miniArea', { - draw: function (cfg, container) { - var opacity = cfg.style ? cfg.style.opacity : null; - var path = getPath(cfg, this, false); - var style = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["deepMix"])({}, { - lineJoin: 'round', - lineCap: 'round', - }, cfg.style); - var shape = container.addShape('path', { - attrs: { - path: path, - fill: parseGradient(cfg.color || Object(_theme__WEBPACK_IMPORTED_MODULE_6__["getGlobalTheme"])().defaultColor), - opacity: opacity || 0.4, - }, - style: style, - }); - return shape; - }, -}); -Object(_dependents__WEBPACK_IMPORTED_MODULE_1__["registerShape"])('area', 'miniAreaSmooth', { - draw: function (cfg, container) { - var opacity = cfg.style ? cfg.style.opacity : null; - var path = getPath(cfg, this, true); - var shape = container.addShape('path', { - attrs: { - path: path, - fill: parseGradient(cfg.color || Object(_theme__WEBPACK_IMPORTED_MODULE_6__["getGlobalTheme"])().defaultColor), - opacity: opacity || 0.5, - }, - }); - return shape; - }, -}); -function getPath(cfg, shape, isSmooth) { - var constraint = [ - [0, 0], - [1, 1], - ]; - var topLinePoints = []; - var bottomLinePoints = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(cfg.points, function (point) { - topLinePoints.push(point[1]); - bottomLinePoints.push(point[0]); - }); - bottomLinePoints = shape.parsePoints(bottomLinePoints.reverse()); - topLinePoints = Object(_util_math__WEBPACK_IMPORTED_MODULE_3__["lineSimplification"])(shape.parsePoints(topLinePoints)); - var topPath = isSmooth ? Object(_util_path__WEBPACK_IMPORTED_MODULE_4__["getSplinePath"])(topLinePoints, false, constraint) : getStraightPath(topLinePoints); - var bottomPath = getStraightPath(bottomLinePoints); - bottomPath[0][0] = 'L'; - var path = topPath.concat(bottomPath); - return path; -} -function getStraightPath(points) { - var path = []; - for (var i = 0; i < points.length; i++) { - var p = points[i]; - var flag = i === 0 ? 'M' : 'L'; - path.push([flag, p.x, p.y]); - } - return path; -} -function parseGradient(color) { - return "l(90) 0:" + color + " 1:#ffffff"; -} -var MiniAreaParser = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MiniAreaParser, _super); - function MiniAreaParser() { - return _super !== null && _super.apply(this, arguments) || this; - } - MiniAreaParser.prototype.init = function () { - _super.prototype.init.call(this); - this.parseShape(); - }; - MiniAreaParser.prototype.parseShape = function () { - var props = this.plot.options; - if (props.smooth) { - this.config.shape = { values: ['miniAreaSmooth'] }; - } - else { - this.config.shape = { values: ['miniArea'] }; - } - }; - return MiniAreaParser; -}(_main__WEBPACK_IMPORTED_MODULE_5__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (MiniAreaParser); -//# sourceMappingURL=mini.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/geoms/base.js": -/*!*****************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/geoms/base.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -var ElementParser = /** @class */ (function () { - function ElementParser(cfg) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(this, cfg); - this.init(); - } - ElementParser.prototype.init = function () { - this.config = { - type: this.type, - position: { - fields: this.positionFields, - }, - }; - }; - return ElementParser; -}()); -/* harmony default export */ __webpack_exports__["default"] = (ElementParser); -//# sourceMappingURL=base.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/geoms/factory.js": -/*!********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/geoms/factory.js ***! - \********************************************************/ -/*! exports provided: getGeom */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getGeom", function() { return getGeom; }); -/* harmony import */ var _area_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./area/index */ "./node_modules/@antv/g2plot/esm/geoms/area/index.js"); -/* harmony import */ var _interval_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interval/index */ "./node_modules/@antv/g2plot/esm/geoms/interval/index.js"); -/* harmony import */ var _line_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line/index */ "./node_modules/@antv/g2plot/esm/geoms/line/index.js"); -/* harmony import */ var _point_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./point/index */ "./node_modules/@antv/g2plot/esm/geoms/point/index.js"); - - - - -/** - * 将element的配置逻辑拆离出来,并将每类element细分为主体图形、辅助图形、mini图形三种 - * 这样也方便未来更灵活的调用和组装g2的element模块 - */ -var GEOMETRY_MAP = { - area: _area_index__WEBPACK_IMPORTED_MODULE_0__["default"], - line: _line_index__WEBPACK_IMPORTED_MODULE_2__["default"], - point: _point_index__WEBPACK_IMPORTED_MODULE_3__["default"], - interval: _interval_index__WEBPACK_IMPORTED_MODULE_1__["default"], -}; -function getGeom(name, type, cfg) { - var Geom = GEOMETRY_MAP[name][type]; - return new Geom(cfg).config; -} -//# sourceMappingURL=factory.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/geoms/heatmap/linear.js": -/*!***************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/geoms/heatmap/linear.js ***! - \***************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/color */ "./node_modules/@antv/g2plot/esm/util/color.js"); - - - - -var GAUSS_COEF = 0.3989422804014327; -var ZERO = 1.0 / 255.0 / 16.0; -var ORIGIN_FIELD = '_origin'; -var LinearHeatmap = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LinearHeatmap, _super); - function LinearHeatmap(cfg) { - var _this = _super.call(this, cfg) || this; - _this.type = 'heatmap'; - _this.paletteCache = {}; - _this.intensity = cfg.intensity; - _this.radius = cfg.radius; - return _this; - } - LinearHeatmap.prototype.createElements = function (mappingData, isUpdate) { - if (isUpdate === void 0) { isUpdate = false; } - var range = this.prepareRange(mappingData); - this.prepareSize(); - this.prepareBlur(); - this.prepareGreyScaleBlurredCircle(this.radius); - this.drawWithRange(mappingData, range); - return null; - }; - LinearHeatmap.prototype.clear = function () { - this.clearShadowCanvasCtx(); - _super.prototype.clear.call(this); - }; - LinearHeatmap.prototype.prepareRange = function (data) { - var colorAttr = this.getAttribute('color'); - var colorField = colorAttr.getFields()[0]; - var min = Infinity; - var max = -Infinity; - data.forEach(function (row) { - var value = row[ORIGIN_FIELD][colorField]; - if (value > max) { - max = value; - } - if (value < min) { - min = value; - } - }); - if (min === max) { - min = max - 1; - } - return [min, max]; - }; - LinearHeatmap.prototype.prepareSize = function () { - var radius = this.radius; - if (!this.radius) { - radius = this.getDefaultValue('size'); - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isNumber"])(radius)) { - radius = this.getDefaultSize(); - } - this.radius = radius; - } - }; - LinearHeatmap.prototype.prepareBlur = function () { - var blur = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["get"])(this.styleOption, ['style', 'shadowBlur']); - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isNumber"])(blur)) { - blur = this.radius / 2; - } - this.blur = blur; - }; - LinearHeatmap.prototype.getDefaultSize = function () { - var position = this.getAttribute('position'); - var coord = this.coordinate; - var radius = Math.min(coord.getWidth() / (position.scales[0].ticks.length * 4), coord.getHeight() / (position.scales[1].ticks.length * 4)); - return radius; - }; - LinearHeatmap.prototype.colorize = function (img) { - var colorAttr = this.getAttribute('color'); - var pixels = img.data; - var paletteCache = this.paletteCache; - for (var i = 3; i < pixels.length; i += 4) { - var alpha = pixels[i]; // get gradient color from opacity value - if (alpha) { - var palette = void 0; - if (paletteCache[alpha]) { - palette = paletteCache[alpha]; - } - else { - palette = _util_color__WEBPACK_IMPORTED_MODULE_3__["rgb2arr"](colorAttr.gradient(alpha / 256)); - paletteCache[alpha] = palette; - } - // const palette = colorUtil.rgb2arr(colorAttr.gradient(alpha / 256)); - pixels[i - 3] = palette[0]; - pixels[i - 2] = palette[1]; - pixels[i - 1] = palette[2]; - pixels[i] = alpha; - } - } - }; - LinearHeatmap.prototype.prepareGreyScaleBlurredCircle = function (r) { - var circleCanvas = this.grayScaleCanvas; - if (!circleCanvas) { - circleCanvas = document.createElement('canvas'); - this.grayScaleCanvas = circleCanvas; - } - var intensity = this.intensity ? this.intensity : 2; - var circleRadius = (Math.sqrt(-2.0 * Math.log(ZERO / r / intensity / GAUSS_COEF)) / 3.0) * r; - var blur = circleRadius - r; - var r2 = circleRadius + blur; - var ctx = circleCanvas.getContext('2d'); - circleCanvas.width = circleCanvas.height = r2 * 2; - ctx.clearRect(0, 0, circleCanvas.width, circleCanvas.height); - ctx.shadowOffsetX = ctx.shadowOffsetY = r2 * 2; - ctx.shadowBlur = blur; - ctx.shadowColor = 'black'; - ctx.beginPath(); - ctx.arc(-r2, -r2, r, 0, Math.PI * 2, true); - ctx.closePath(); - ctx.fill(); - }; - LinearHeatmap.prototype.drawGrayScaleBlurredCircle = function (x, y, r, alpha, ctx) { - var circleCanvas = this.grayScaleCanvas; - ctx.globalAlpha = alpha; - ctx.drawImage(circleCanvas, x - r, y - r); - }; - LinearHeatmap.prototype.getShadowCanvasCtx = function () { - var canvas = this.shadowCanvas; - if (!canvas) { - canvas = document.createElement('canvas'); - this.shadowCanvas = canvas; - } - canvas.width = this.coordinate.getWidth(); - canvas.height = this.coordinate.getHeight(); - var context = canvas.getContext('2d'); - context.globalCompositeOperation = 'lighter'; - return context; - }; - LinearHeatmap.prototype.clearShadowCanvasCtx = function () { - var ctx = this.getShadowCanvasCtx(); - ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); - }; - LinearHeatmap.prototype.getImageShape = function () { - var imageShape = this.imageShape; - if (imageShape) { - return imageShape; - } - var container = this.container; - imageShape = container.addShape({ - type: 'image', - attrs: {}, - }); - this.imageShape = imageShape; - }; - LinearHeatmap.prototype.drawWithRange = function (data, range) { - // canvas size - var _a = this.coordinate, start = _a.start, end = _a.end; - var width = this.coordinate.getWidth(); - var height = this.coordinate.getHeight(); - // value, range, etc - var colorAttr = this.getAttribute('color'); - var valueField = colorAttr.getFields()[0]; - // prepare shadow canvas context - this.clearShadowCanvasCtx(); - var ctx = this.getShadowCanvasCtx(); - // filter data - if (range) { - data = data.filter(function (row) { - return row[ORIGIN_FIELD][valueField] <= range[1] && row[ORIGIN_FIELD][valueField] >= range[0]; - }); - } - // step1. draw points with shadow - var scale = this.scales[valueField]; - for (var i = 0; i < data.length; i++) { - var obj = data[i]; - var cfg = this.getDrawCfg(obj); - var alpha = scale.scale(obj[ORIGIN_FIELD][valueField]); - // @ts-ignore - this.drawGrayScaleBlurredCircle(cfg.x - start.x, cfg.y - end.y, this.radius + this.blur, alpha, ctx); - } - // step2. convert pixels - var colored = ctx.getImageData(0, 0, width, height); - this.clearShadowCanvasCtx(); - this.colorize(colored); - ctx.putImageData(colored, 0, 0); - var image = new Image(); - image.src = ctx.canvas.toDataURL('image/png'); - this.getImageShape(); - this.imageShape.attr('x', start.x); - this.imageShape.attr('y', end.y); - this.imageShape.attr('width', width); - this.imageShape.attr('height', height); - this.imageShape.attr('img', ctx.canvas); - this.imageShape.set('origin', this.getShapeInfo(data)); // 存储绘图信息数据 - }; - LinearHeatmap.prototype.getShapeInfo = function (mappingData) { - var shapeCfg = this.getDrawCfg(mappingData[0]); - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, shapeCfg), { mappingData: mappingData, data: this.getData(mappingData) }); - }; - LinearHeatmap.prototype.getData = function (mappingData) { - return mappingData.map(function (obj) { - return obj[ORIGIN_FIELD]; - }); - }; - return LinearHeatmap; -}(_dependents__WEBPACK_IMPORTED_MODULE_1__["Geometry"])); -Object(_dependents__WEBPACK_IMPORTED_MODULE_1__["registerGeometry"])('linearHeatmap', LinearHeatmap); -//# sourceMappingURL=linear.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/geoms/interval/index.js": -/*!***************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/geoms/interval/index.js ***! - \***************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _main__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./main */ "./node_modules/@antv/g2plot/esm/geoms/interval/main.js"); - -/* harmony default export */ __webpack_exports__["default"] = ({ - main: _main__WEBPACK_IMPORTED_MODULE_0__["default"], -}); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/geoms/interval/main.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/geoms/interval/main.js ***! - \**************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base */ "./node_modules/@antv/g2plot/esm/geoms/base.js"); - - - -var COLOR_MAPPER = ['colorField', 'stackField', 'groupField']; -var IntervalParser = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(IntervalParser, _super); - function IntervalParser() { - return _super !== null && _super.apply(this, arguments) || this; - } - IntervalParser.prototype.init = function () { - this.type = 'interval'; - _super.prototype.init.call(this); - var props = this.plot.options; - if (this._needParserColor()) { - this.parseColor(); - } - if (!this.config.color) { - this.config.color = { values: ['#5b8ff9'] }; - } - var sizeProps = this._getSizeProps(props); - if (sizeProps) { - this.parseSize(sizeProps); - } - var styleProps = this._getStyleProps(props); - if (styleProps) { - this.parseStyle(styleProps); - } - }; - IntervalParser.prototype.parseColor = function () { - var props = this.plot.options; - var colorField = this._getColorMappingField(props); - var config = {}; - if (colorField) { - config.fields = colorField; - } - if (props.color) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isString"])(props.color)) { - config.values = [props.color]; - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(props.color)) { - config.callback = props.color; - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(props.color)) { - config.values = props.color; - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isObject"])(props.color)) { - config.fields = colorField; - config.callback = function (d) { - return props.color[d]; - }; - } - } - this.config.color = config; - }; - IntervalParser.prototype.parseSize = function (sizeProps) { - var props = this.plot.options; - var config = {}; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(props[sizeProps])) { - config.fields = [this.config.position.fields]; - config.callback = props[sizeProps]; - } - else { - config.values = [props[sizeProps]]; - } - this.config.size = config; - }; - IntervalParser.prototype.parseStyle = function (styleProps) { - var props = this.plot.options; - var color = this.config.color; - var style = this.plot.options[styleProps]; - var config = {}; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(style)) { - config.fields = (color === null || color === void 0 ? void 0 : color.fields) || [props.xField, props.yField]; - config.callback = style; - } - else { - config.cfg = style; - } - this.config.style = config; - }; - IntervalParser.prototype._getSizeProps = function (props) { - var sizeMapper = ['columnSize', 'barSize']; - for (var _i = 0, sizeMapper_1 = sizeMapper; _i < sizeMapper_1.length; _i++) { - var m = sizeMapper_1[_i]; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(props, m)) { - return m; - } - } - }; - IntervalParser.prototype._getStyleProps = function (props) { - var sizeMapper = ['columnStyle', 'barStyle', 'pieStyle', 'ringStyle']; - for (var _i = 0, sizeMapper_2 = sizeMapper; _i < sizeMapper_2.length; _i++) { - var m = sizeMapper_2[_i]; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(props, m)) { - return m; - } - } - }; - IntervalParser.prototype._getColorMappingField = function (props) { - /**如果有colorFiled或stackField配置项(后者为堆叠interval),则参与colorMapping的字段为对应值 - * 如没有特别设定,则一般是callback中的传参,传入位置映射的字段 - */ - for (var _i = 0, COLOR_MAPPER_1 = COLOR_MAPPER; _i < COLOR_MAPPER_1.length; _i++) { - var m = COLOR_MAPPER_1[_i]; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(props, m)) { - return [props[m]]; - } - } - }; - IntervalParser.prototype._needParserColor = function () { - var props = this.plot.options; - if (props.color) { - return true; - } - for (var _i = 0, COLOR_MAPPER_2 = COLOR_MAPPER; _i < COLOR_MAPPER_2.length; _i++) { - var m = COLOR_MAPPER_2[_i]; - if (props[m]) { - return true; - } - } - return false; - }; - return IntervalParser; -}(_base__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (IntervalParser); -//# sourceMappingURL=main.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/geoms/line/guide.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/geoms/line/guide.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _main__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./main */ "./node_modules/@antv/g2plot/esm/geoms/line/main.js"); - - - -var GuideLineParser = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GuideLineParser, _super); - function GuideLineParser() { - return _super !== null && _super.apply(this, arguments) || this; - } - GuideLineParser.prototype.init = function () { - var props = this.plot.options; - if (!props.xField || !props.yField) { - return; - } - this.config = { - type: 'line', - position: { - fields: [props.xField, props.yField], - }, - tooltip: false, - }; - if (this._getColorMappingField() || this._needParseAttribute('color')) { - this.parseColor(); - } - if (this._needParseAttribute('size')) { - this.parseSize(); - } - if (props.line.style) { - this.parseStyle(); - } - if (props.smooth) { - this.config.shape = { values: ['smooth'] }; - } - }; - GuideLineParser.prototype.parseSize = function () { - var props = this.plot.options; - var config = {}; - if (props.line.size) { - config.values = [props.line.size]; - } - else { - // line作为辅助图形没有在style里指定size属性的情况下,设置默认值 - config.values = [2]; - } - this.config.size = config; - }; - GuideLineParser.prototype.parseColor = function () { - var props = this.plot.options; - var config = {}; - var colorField = this._getColorMappingField(); - if (colorField) { - config.fields = colorField; - } - if (props.line.color) { - config.values = [props.line.color]; - } - else { - if (!colorField) { - colorField = this.config.position.fields; - } - // line作为辅助图形没有在style里指定color属性的情况下,默认接受主体图形的透传 - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isString"])(props.color)) { - config.values = [props.color]; - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(props.color)) { - config.fields = colorField; - config.callback = props.color; - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(props.color)) { - config.fields = colorField; - config.values = props.color; - } - } - this.config.color = config; - }; - GuideLineParser.prototype.parseStyle = function () { - var props = this.plot.options; - var styleProps = props.line.style; - var config = {}; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(styleProps)) { - config.fields = this.config.position.fields; - config.callback = styleProps; - } - else { - config.cfg = styleProps; - } - this.config.style = config; - }; - GuideLineParser.prototype._needParseAttribute = function (attr) { - var props = this.plot.options; - if (props[attr]) { - return true; - } - else if (props.line[attr]) { - return true; - } - return false; - }; - GuideLineParser.prototype._getColorMappingField = function () { - var props = this.plot.options; - var colorMapper = ['stackField', 'seriesField']; - for (var _i = 0, colorMapper_1 = colorMapper; _i < colorMapper_1.length; _i++) { - var m = colorMapper_1[_i]; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(props, m)) { - return [props[m]]; - } - } - }; - return GuideLineParser; -}(_main__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (GuideLineParser); -//# sourceMappingURL=guide.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/geoms/line/index.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/geoms/line/index.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _guide__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./guide */ "./node_modules/@antv/g2plot/esm/geoms/line/guide.js"); -/* harmony import */ var _main__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./main */ "./node_modules/@antv/g2plot/esm/geoms/line/main.js"); -/* harmony import */ var _mini__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mini */ "./node_modules/@antv/g2plot/esm/geoms/line/mini.js"); - - - -/* harmony default export */ __webpack_exports__["default"] = ({ - main: _main__WEBPACK_IMPORTED_MODULE_1__["default"], - guide: _guide__WEBPACK_IMPORTED_MODULE_0__["default"], - mini: _mini__WEBPACK_IMPORTED_MODULE_2__["default"], -}); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/geoms/line/main.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/geoms/line/main.js ***! - \**********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base */ "./node_modules/@antv/g2plot/esm/geoms/base.js"); - - - -var LineParser = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LineParser, _super); - function LineParser() { - return _super !== null && _super.apply(this, arguments) || this; - } - LineParser.prototype.init = function () { - var props = this.plot.options; - this.config = { - type: 'line', - position: { - fields: [props.xField, props.yField], - }, - connectNulls: props.connectNulls, - }; - if (props.lineSize) { - this.parseSize(); - } - if (props.smooth) { - this.config.shape = { values: ['smooth'] }; - } - if (props.step) { - this.config.shape = { values: [props.step] }; - } - if (props.seriesField || props.color) { - this.parseColor(); - } - if (props.lineStyle) { - this.parseStyle(); - } - }; - LineParser.prototype.parseSize = function () { - var sizeProps = this.plot.options.lineSize; - var config = {}; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(sizeProps)) { - config.callback = sizeProps; - } - else { - config.values = [sizeProps]; - } - this.config.size = config; - }; - LineParser.prototype.parseColor = function () { - var props = this.plot.options; - var config = {}; - if (props.seriesField) { - config.fields = [props.seriesField]; - } - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(props, 'color')) { - var color = props.color; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isString"])(color)) { - config.values = [color]; - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(color)) { - config.callback = color; - } - else { - config.values = color; - } - } - this.config.color = config; - }; - LineParser.prototype.parseStyle = function () { - var props = this.plot.options; - var styleProps = props.lineStyle; - var config = { - fields: null, - callback: null, - cfg: null, - }; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(styleProps) && props.seriesField) { - config.fields = [props.seriesField]; - config.callback = styleProps; - } - else { - config.cfg = styleProps; - } - this.config.style = config; - }; - return LineParser; -}(_base__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (LineParser); -//# sourceMappingURL=main.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/geoms/line/mini.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/geoms/line/mini.js ***! - \**********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/math */ "./node_modules/@antv/g2plot/esm/util/math.js"); -/* harmony import */ var _util_path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/path */ "./node_modules/@antv/g2plot/esm/util/path.js"); -/* harmony import */ var _main__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./main */ "./node_modules/@antv/g2plot/esm/geoms/line/main.js"); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../theme */ "./node_modules/@antv/g2plot/esm/theme/index.js"); - -/** 简化折线点 */ - - - - - - -Object(_dependents__WEBPACK_IMPORTED_MODULE_1__["registerShape"])('line', 'miniLine', { - draw: function (cfg, container) { - var points = Object(_util_math__WEBPACK_IMPORTED_MODULE_3__["lineSimplification"])(cfg.points); - var path = []; - for (var i = 0; i < points.length; i++) { - var p = points[i]; - var flag = i === 0 ? 'M' : 'L'; - path.push([flag, p.x, p.y]); - } - var style = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["deepMix"])({}, { - lineJoin: 'round', - lineCap: 'round', - }, cfg.style); - var shape = container.addShape('path', { - attrs: Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["mix"])({ - path: path, - stroke: cfg.color || Object(_theme__WEBPACK_IMPORTED_MODULE_6__["getGlobalTheme"])().defaultColor, - lineWidth: cfg.size || 2, - }, style), - }); - return shape; - }, -}); -Object(_dependents__WEBPACK_IMPORTED_MODULE_1__["registerShape"])('line', 'miniLineSmooth', { - draw: function (cfg, container) { - var points = Object(_util_math__WEBPACK_IMPORTED_MODULE_3__["lineSimplification"])(cfg.points); - var constraint = [ - [0, 0], - [1, 1], - ]; - var path = Object(_util_path__WEBPACK_IMPORTED_MODULE_4__["getSplinePath"])(points, false, constraint); - var shape = container.addShape('path', { - attrs: Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["mix"])({ - path: path, - stroke: cfg.color || Object(_theme__WEBPACK_IMPORTED_MODULE_6__["getGlobalTheme"])().defaultColor, - lineWidth: cfg.size || 2, - }, cfg.style), - }); - return shape; - }, -}); -var MiniLineParser = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MiniLineParser, _super); - function MiniLineParser() { - return _super !== null && _super.apply(this, arguments) || this; - } - MiniLineParser.prototype.init = function () { - _super.prototype.init.call(this); - this.parseShape(); - }; - MiniLineParser.prototype.parseShape = function () { - var props = this.plot.options; - if (props.smooth) { - this.config.shape = { values: ['miniLineSmooth'] }; - } - else { - this.config.shape = { values: ['miniLine'] }; - } - }; - return MiniLineParser; -}(_main__WEBPACK_IMPORTED_MODULE_5__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (MiniLineParser); -//# sourceMappingURL=mini.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/geoms/point/circle.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/geoms/point/circle.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base */ "./node_modules/@antv/g2plot/esm/geoms/base.js"); - - - -var CircleParser = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CircleParser, _super); - function CircleParser() { - return _super !== null && _super.apply(this, arguments) || this; - } - CircleParser.prototype.init = function () { - var props = this.plot.options; - this.style = props.pointStyle; - if (!props.xField || !props.yField) { - return; - } - this.config = { - type: 'point', - position: { - fields: [props.xField, props.yField], - }, - }; - this.parseColor(); - this.parseSize(); - if (props.shape) { - this.parseShape(props.shape); - } - if (props.pointStyle) { - this.parseStyle(); - } - }; - CircleParser.prototype.parseColor = function () { - var props = this.plot.options; - var config = {}; - var colorField = props.colorField; - if (colorField) { - config.fields = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(colorField) ? colorField : [colorField]; - } - if (props.color) { - this._parseColor(props, config); - } - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isEmpty"])(config)) { - this.config.color = config; - } - }; - CircleParser.prototype.parseSize = function () { - var props = this.plot.options; - var config = {}; - if (props.sizeField) { - config.fields = [props.sizeField]; - } - if (props.pointSize) { - config.values = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(props.pointSize) ? props.pointSize : [props.pointSize]; - } - this.config.size = config; - }; - CircleParser.prototype.parseShape = function (shapeName) { - this.config.shape = shapeName; - }; - CircleParser.prototype.parseStyle = function () { - var props = this.plot.options; - var styleProps = props.pointStyle; - var config = { - fields: null, - callback: null, - cfg: null, - }; - var xField = props.xField, yField = props.yField, colorField = props.colorField; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(styleProps)) { - if (colorField) { - config.fields = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(colorField) - ? [xField, yField, colorField].concat(colorField) - : [xField, yField, colorField]; - } - else { - config.fields = [xField, yField]; - } - config.callback = styleProps; - } - else { - config.cfg = styleProps; - // opacity 与 fillOpacity 兼容 - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNil"])(styleProps.opacity)) { - config.cfg.fillOpacity = styleProps.opacity; - } - } - this.config.style = config; - }; - CircleParser.prototype._parseColor = function (props, config) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isString"])(props.color)) { - config.values = [props.color]; - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(props.color)) { - config.callback = props.color; - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(props.color)) { - config.values = props.color; - } - }; - return CircleParser; -}(_base__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (CircleParser); -//# sourceMappingURL=circle.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/geoms/point/guide.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/geoms/point/guide.js ***! - \************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base */ "./node_modules/@antv/g2plot/esm/geoms/base.js"); - - - -function getValuesByField(field, data) { - var values = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(data, function (d) { - var v = d[field]; - values.push(v); - }); - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["uniq"])(values); -} -var COLOR_MAPPER = ['seriesField', 'stackField']; -var GuidePointParser = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GuidePointParser, _super); - function GuidePointParser() { - return _super !== null && _super.apply(this, arguments) || this; - } - GuidePointParser.prototype.init = function () { - var props = this.plot.options; - this.style = props.point.style; - if (!props.xField || !props.yField) { - return; - } - this.config = { - type: 'point', - position: { - fields: [props.xField, props.yField], - }, - tooltip: false, - }; - // if (this._needParseAttribute('color')) { - this.parseColor(); - // } - if (this._needParseAttribute('size')) { - this.parseSize(); - } - if (props.point.shape) { - this.parseShape(props.point.shape); - } - if (props.point.style) { - this.parseStyle(); - } - }; - GuidePointParser.prototype.parseColor = function () { - var props = this.plot.options; - var config = {}; - var mappingField = this._getColorMappingField(props); - if (mappingField) { - this._parseColorByField(props, config, mappingField); - } - else { - if (props.point && props.point.color) { - config.values = [props.point.color]; - } - else if (props.color) { - this._parseColor(props, config); - } - } - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["keys"])(config).length > 0) { - this.config.color = config; - } - }; - GuidePointParser.prototype.parseSize = function () { - var props = this.plot.options; - var config = {}; - config.values = [props.point.size]; - this.config.size = config; - }; - GuidePointParser.prototype.parseShape = function (shapeName) { - var config = { - values: [shapeName], - }; - this.config.shape = config; - }; - GuidePointParser.prototype.parseStyle = function () { - var props = this.plot.options; - var styleProps = props.point && props.point.style; - var config = { - fields: null, - callback: null, - cfg: null, - }; - var field = this._getColorMappingField(props); - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(styleProps) && field) { - config.fields = [field]; - config.callback = styleProps; - } - else { - config.cfg = styleProps; - } - this.config.style = config; - }; - GuidePointParser.prototype._parseColorByField = function (props, config, field) { - config.fields = [field]; - if (props.point.color) { - var count = getValuesByField(field, props.data).length; - var values = []; - for (var i = 0; i < count; i++) { - values.push(props.point.color); - } - config.values = values; - } - else if (props.color) { - this._parseColor(props, config); - } - }; - GuidePointParser.prototype._parseColor = function (props, config) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isString"])(props.color)) { - config.values = [props.color]; - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(props.color)) { - config.callback = props.color; - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(props.color)) { - config.values = props.color; - } - }; - GuidePointParser.prototype._needParseAttribute = function (attr) { - var props = this.plot.options; - var condition = props.point && Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(props.point, attr); - return condition; - // const condition = !this.style || this.style[attr]; - // return condition; - }; - GuidePointParser.prototype._getColorMappingField = function (props) { - for (var _i = 0, COLOR_MAPPER_1 = COLOR_MAPPER; _i < COLOR_MAPPER_1.length; _i++) { - var m = COLOR_MAPPER_1[_i]; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(props, m)) { - return [props[m]]; - } - } - }; - return GuidePointParser; -}(_base__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (GuidePointParser); -//# sourceMappingURL=guide.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/geoms/point/index.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/geoms/point/index.js ***! - \************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _circle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./circle */ "./node_modules/@antv/g2plot/esm/geoms/point/circle.js"); -/* harmony import */ var _guide__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./guide */ "./node_modules/@antv/g2plot/esm/geoms/point/guide.js"); - - -/* harmony default export */ __webpack_exports__["default"] = ({ - guide: _guide__WEBPACK_IMPORTED_MODULE_1__["default"], - circle: _circle__WEBPACK_IMPORTED_MODULE_0__["default"], -}); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/index.js": -/*!************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/index.js ***! - \************************************************/ -/*! exports provided: timeIntervals, Layer, ViewLayer, Base, Line, Treemap, StepLine, Bar, StackedBar, GroupedBar, PercentStackedBar, RangeBar, Area, StackedArea, PercentStackedArea, Column, GroupedColumn, StackedColumn, RangeColumn, PercentStackedColumn, Pie, DensityHeatmap, Heatmap, WordCloud, Rose, Funnel, StackedRose, GroupedRose, Radar, Liquid, Histogram, Density, Donut, Waterfall, Scatter, Bubble, Bullet, Calendar, Gauge, FanGauge, MeterGauge, Ring, GroupColumn, GroupBar, PercentageStackArea, PercentageStackBar, PercentageStackColumn, StackArea, StackBar, StackColumn, Progress, RingProgress, TinyColumn, TinyArea, TinyLine, OverlappedComboPlot, registerTheme, registerGlobalTheme, registerResponsiveConstraint, registerResponsiveRule, registerResponsiveTheme, getResponsiveTheme, StateManager */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _interface_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interface/config */ "./node_modules/@antv/g2plot/esm/interface/config.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeIntervals", function() { return _interface_config__WEBPACK_IMPORTED_MODULE_0__["timeIntervals"]; }); - -/* harmony import */ var _base_layer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base/layer */ "./node_modules/@antv/g2plot/esm/base/layer.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Layer", function() { return _base_layer__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - -/* harmony import */ var _base_view_layer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base/view-layer */ "./node_modules/@antv/g2plot/esm/base/view-layer.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ViewLayer", function() { return _base_view_layer__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Base", function() { return _base_plot__WEBPACK_IMPORTED_MODULE_3__["default"]; }); - -/* harmony import */ var _plots__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./plots */ "./node_modules/@antv/g2plot/esm/plots/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Line", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["Line"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Treemap", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["Treemap"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StepLine", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["StepLine"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Bar", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["Bar"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackedBar", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["StackedBar"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupedBar", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["GroupedBar"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PercentStackedBar", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["PercentStackedBar"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeBar", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["RangeBar"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Area", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["Area"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackedArea", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["StackedArea"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PercentStackedArea", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["PercentStackedArea"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Column", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["Column"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupedColumn", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["GroupedColumn"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackedColumn", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["StackedColumn"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeColumn", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["RangeColumn"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PercentStackedColumn", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["PercentStackedColumn"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Pie", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["Pie"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DensityHeatmap", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["DensityHeatmap"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Heatmap", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["Heatmap"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WordCloud", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["WordCloud"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Rose", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["Rose"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Funnel", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["Funnel"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackedRose", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["StackedRose"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupedRose", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["GroupedRose"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Radar", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["Radar"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Liquid", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["Liquid"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Histogram", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["Histogram"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Density", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["Density"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Donut", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["Donut"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Waterfall", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["Waterfall"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scatter", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["Scatter"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Bubble", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["Bubble"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Bullet", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["Bullet"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Calendar", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["Calendar"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Gauge", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["Gauge"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FanGauge", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["FanGauge"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MeterGauge", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["MeterGauge"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Ring", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["Ring"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupColumn", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["GroupColumn"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupBar", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["GroupBar"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PercentageStackArea", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["PercentageStackArea"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PercentageStackBar", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["PercentageStackBar"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PercentageStackColumn", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["PercentageStackColumn"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackArea", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["StackArea"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackBar", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["StackBar"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackColumn", function() { return _plots__WEBPACK_IMPORTED_MODULE_4__["StackColumn"]; }); - -/* harmony import */ var _sparkline_progress__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./sparkline/progress */ "./node_modules/@antv/g2plot/esm/sparkline/progress/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Progress", function() { return _sparkline_progress__WEBPACK_IMPORTED_MODULE_5__["default"]; }); - -/* harmony import */ var _sparkline_ring_progress__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./sparkline/ring-progress */ "./node_modules/@antv/g2plot/esm/sparkline/ring-progress/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RingProgress", function() { return _sparkline_ring_progress__WEBPACK_IMPORTED_MODULE_6__["default"]; }); - -/* harmony import */ var _sparkline_tiny_column__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./sparkline/tiny-column */ "./node_modules/@antv/g2plot/esm/sparkline/tiny-column/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TinyColumn", function() { return _sparkline_tiny_column__WEBPACK_IMPORTED_MODULE_7__["default"]; }); - -/* harmony import */ var _sparkline_tiny_area__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./sparkline/tiny-area */ "./node_modules/@antv/g2plot/esm/sparkline/tiny-area/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TinyArea", function() { return _sparkline_tiny_area__WEBPACK_IMPORTED_MODULE_8__["default"]; }); - -/* harmony import */ var _sparkline_tiny_line__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./sparkline/tiny-line */ "./node_modules/@antv/g2plot/esm/sparkline/tiny-line/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TinyLine", function() { return _sparkline_tiny_line__WEBPACK_IMPORTED_MODULE_9__["default"]; }); - -/* harmony import */ var _combo_plots_overlapped__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./combo-plots/overlapped */ "./node_modules/@antv/g2plot/esm/combo-plots/overlapped.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "OverlappedComboPlot", function() { return _combo_plots_overlapped__WEBPACK_IMPORTED_MODULE_10__["default"]; }); - -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./theme */ "./node_modules/@antv/g2plot/esm/theme/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "registerTheme", function() { return _theme__WEBPACK_IMPORTED_MODULE_11__["registerTheme"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "registerGlobalTheme", function() { return _theme__WEBPACK_IMPORTED_MODULE_11__["registerGlobalTheme"]; }); - -/* harmony import */ var _util_responsive_constraints__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./util/responsive/constraints */ "./node_modules/@antv/g2plot/esm/util/responsive/constraints/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "registerResponsiveConstraint", function() { return _util_responsive_constraints__WEBPACK_IMPORTED_MODULE_12__["registerResponsiveConstraint"]; }); - -/* harmony import */ var _util_responsive_rules__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./util/responsive/rules */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "registerResponsiveRule", function() { return _util_responsive_rules__WEBPACK_IMPORTED_MODULE_13__["registerResponsiveRule"]; }); - -/* harmony import */ var _util_responsive_theme__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./util/responsive/theme */ "./node_modules/@antv/g2plot/esm/util/responsive/theme.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "registerResponsiveTheme", function() { return _util_responsive_theme__WEBPACK_IMPORTED_MODULE_14__["registerResponsiveTheme"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getResponsiveTheme", function() { return _util_responsive_theme__WEBPACK_IMPORTED_MODULE_14__["getResponsiveTheme"]; }); - -/* harmony import */ var _util_state_manager__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./util/state-manager */ "./node_modules/@antv/g2plot/esm/util/state-manager.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StateManager", function() { return _util_state_manager__WEBPACK_IMPORTED_MODULE_15__["default"]; }); - -// 通用配置 - - - - -// 图形 - - - - - - -// 混合图形 - -// 主题 - - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/interaction/base.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/interaction/base.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./core */ "./node_modules/@antv/g2plot/esm/interaction/core.js"); - - -var BaseInteraction = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(BaseInteraction, _super); - function BaseInteraction(cfg, viewLayer, interactionRange, interaction) { - var _this = _super.call(this, cfg) || this; - _this.viewLayer = viewLayer; - _this.interactionRange = interactionRange; - _this.interactionConfig = interaction; - _this.render(); - return _this; - } - BaseInteraction.registerInteraction = function (type, ctor) { - BaseInteraction.GLOBAL_INTERACTION_MAP[type] = ctor; - }; - BaseInteraction.registerPlotInteraction = function (plotType, type, ctor) { - if (!BaseInteraction.PLOT_INTERACTION_MAP[plotType]) { - BaseInteraction.PLOT_INTERACTION_MAP[plotType] = {}; - } - BaseInteraction.PLOT_INTERACTION_MAP[plotType][type] = ctor; - }; - BaseInteraction.getInteraction = function (type, plotType) { - if (plotType && BaseInteraction.PLOT_INTERACTION_MAP[plotType] && BaseInteraction[plotType][type]) { - return BaseInteraction.PLOT_INTERACTION_MAP[plotType][type]; - } - return BaseInteraction.GLOBAL_INTERACTION_MAP[type]; - }; - BaseInteraction.getInteractionRange = function (layerRange, interaction) { - return undefined; - }; - BaseInteraction.prototype.destroy = function () { - this.clear(); - _super.prototype.destroy.call(this); - }; - BaseInteraction.prototype.getViewLayer = function () { - return this.viewLayer; - }; - BaseInteraction.prototype.getRange = function () { - return this.interactionRange; - }; - BaseInteraction.prototype.getInteractionConfig = function () { - return this.interactionConfig; - }; - BaseInteraction.prototype.render = function () { }; - BaseInteraction.prototype.clear = function () { }; - BaseInteraction.GLOBAL_INTERACTION_MAP = {}; - BaseInteraction.PLOT_INTERACTION_MAP = {}; - return BaseInteraction; -}(_core__WEBPACK_IMPORTED_MODULE_1__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (BaseInteraction); -//# sourceMappingURL=base.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/interaction/core.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/interaction/core.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -var EVENT_TYPES = ['start', 'process', 'end', 'reset']; -var Interaction = /** @class */ (function () { - function Interaction(cfg) { - var defaultCfg = this._getDefaultCfg(); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(this, defaultCfg, cfg); - this.canvas = this.view.canvas; - this._eventHandlers = []; - this._bindEvents(); - } - Interaction.prototype._getDefaultCfg = function () { - return { - startEvent: 'mousedown', - processEvent: 'mousemove', - endEvent: 'mouseup', - resetEvent: 'dblclick', - }; - }; - Interaction.prototype._start = function (ev) { - this.preStart(ev); - this.start(ev); - this.afterStart(ev); - }; - Interaction.prototype.preStart = function (ev) { }; - Interaction.prototype.start = function (ev) { }; - Interaction.prototype.afterStart = function (ev) { }; - Interaction.prototype._process = function (ev) { - this.preProcess(ev); - this.process(ev); - this.afterProcess(ev); - }; - Interaction.prototype.preProcess = function (ev) { }; - Interaction.prototype.process = function (ev) { }; - Interaction.prototype.afterProcess = function (ev) { }; - Interaction.prototype._end = function (ev) { - this.preEnd(ev); - this.end(ev); - this.afterEnd(ev); - }; - Interaction.prototype.preEnd = function (ev) { }; - Interaction.prototype.end = function (ev) { }; - Interaction.prototype.afterEnd = function (ev) { }; - Interaction.prototype._reset = function (ev) { - this.preReset(ev); - this.reset(ev); - this.afterReset(ev); - }; - Interaction.prototype.preReset = function (ev) { }; - Interaction.prototype.reset = function (ev) { }; - Interaction.prototype.afterReset = function (ev) { }; - Interaction.prototype._bindEvents = function () { - var _this = this; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(EVENT_TYPES, function (type) { - var eventName = _this[type + "Event"]; - var handler = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["wrapBehavior"])(_this, "_" + type); - _this.view.on(eventName, handler); - _this._eventHandlers.push({ type: eventName, handler: handler }); - }); - }; - Interaction.prototype._unbindEvents = function () { - var _this = this; - var eventHandlers = this._eventHandlers; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(eventHandlers, function (eh) { - _this.view.off(eh.type, eh.handler); - }); - }; - Interaction.prototype.destroy = function () { - this._unbindEvents(); - this._reset(); - }; - return Interaction; -}()); -/* harmony default export */ __webpack_exports__["default"] = (Interaction); -//# sourceMappingURL=core.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/interaction/helper/data-range.js": -/*!************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/interaction/helper/data-range.js ***! - \************************************************************************/ -/*! exports provided: getDataByScaleRange */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDataByScaleRange", function() { return getDataByScaleRange; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -/** - * 按照scale字段values中的start和end信息从全部数据中取出对应的部分 - * - * @param field scale field - * @param values scale values - * @param data original data - * @param range range start & end - */ -var getDataByScaleRange = function (field, values, data, _a, vertical) { - var start = _a[0], end = _a[1]; - if (vertical === void 0) { vertical = false; } - var groupedData = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["groupBy"])(data, field); - var newValues = vertical ? values.slice(values.length - end, values.length - start) : values.slice(start, end); - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["flatten"])(Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["map"])(newValues, function (value) { return groupedData[value] || []; })); -}; -//# sourceMappingURL=data-range.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/interaction/index.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/interaction/index.js ***! - \************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/g2plot/esm/interaction/base.js"); -/* harmony import */ var _scrollbar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./scrollbar */ "./node_modules/@antv/g2plot/esm/interaction/scrollbar.js"); -/* harmony import */ var _slider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./slider */ "./node_modules/@antv/g2plot/esm/interaction/slider.js"); -/* empty/unused harmony star reexport */ - - -_base__WEBPACK_IMPORTED_MODULE_0__["default"].registerInteraction('slider', _slider__WEBPACK_IMPORTED_MODULE_2__["default"]); -_base__WEBPACK_IMPORTED_MODULE_0__["default"].registerInteraction('scrollbar', _scrollbar__WEBPACK_IMPORTED_MODULE_1__["default"]); - -/* harmony default export */ __webpack_exports__["default"] = (_base__WEBPACK_IMPORTED_MODULE_0__["default"]); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/interaction/scrollbar.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/interaction/scrollbar.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); -/* harmony import */ var _util_bbox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/bbox */ "./node_modules/@antv/g2plot/esm/util/bbox.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/g2plot/esm/interaction/base.js"); -/* harmony import */ var _helper_data_range__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./helper/data-range */ "./node_modules/@antv/g2plot/esm/interaction/helper/data-range.js"); - - - - - - -var DEFAULT_PADDING = 4; -var DEFAULT_SIZE = 8; -var DEFAULT_CATEGORY_SIZE = 32; -var MIN_THUMB_LENGTH = 20; -var SCROLL_BAR_Z_INDEX = 999; -var getValidScrollbarConfig = function (cfg) { - if (cfg === void 0) { cfg = {}; } - var _cfg = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ type: 'horizontal', categorySize: DEFAULT_CATEGORY_SIZE, width: DEFAULT_SIZE, height: DEFAULT_SIZE, padding: [0, 0, 0, 0] }, cfg); - // default padding - if (!cfg.padding) { - _cfg.padding = - _cfg.type === 'horizontal' ? [DEFAULT_PADDING, 0, DEFAULT_PADDING, 0] : [0, DEFAULT_PADDING, 0, DEFAULT_PADDING]; - } - return _cfg; -}; -var ScrollbarInteraction = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ScrollbarInteraction, _super); - function ScrollbarInteraction() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.onChangeFn = Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["throttle"])(_this.onChange.bind(_this), 20, { - leading: true, - }); - return _this; - } - ScrollbarInteraction.getInteractionRange = function (layerRange, interaction) { - var config = getValidScrollbarConfig(interaction); - var _a = config.padding, paddingTop = _a[0], paddingRight = _a[1], paddingBottom = _a[2], paddingLeft = _a[3]; - if (config.type === 'horizontal') { - return new _util_bbox__WEBPACK_IMPORTED_MODULE_2__["default"](layerRange.minX, layerRange.maxY - config.height - paddingTop - paddingBottom, layerRange.width, config.height + paddingTop + paddingBottom); - } - else { - return new _util_bbox__WEBPACK_IMPORTED_MODULE_2__["default"](layerRange.maxX - config.width - paddingLeft - paddingRight, layerRange.minY, config.width + paddingLeft + paddingRight, layerRange.height); - } - }; - ScrollbarInteraction.prototype.render = function () { - var _this = this; - var view = this.view; - this.ratio = 0; - this.thumbOffset = 0; - view.on('afterrender', function () { - var padding = _this.view.padding; - // if we're not in `auto padding` process - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["isEqual"])([0, 0, 0, 0], padding)) { - if (!_this.trackLen) { - _this.measureScrollBar(); - _this.changeViewData(_this.getScrollRange()); - } - else { - _this.renderScrollbar(); - } - } - }); - }; - ScrollbarInteraction.prototype.clear = function () { - if (this.scrollbar) { - this.scrollbar.destroy(); - this.scrollbar = null; - } - if (this.container) { - this.container.remove(true); - this.container = null; - } - this.trackLen = null; - this.thumbLen = null; - }; - ScrollbarInteraction.prototype.renderScrollbar = function () { - var config = getValidScrollbarConfig(this.getInteractionConfig()); - var range = this.getRange(); - var isHorizontal = config.type !== 'vertical'; - var panelRange = this.view.coordinateBBox; - var _a = config.padding, paddingTop = _a[0], paddingLeft = _a[3]; - var position = isHorizontal - ? { x: panelRange.minX + paddingLeft, y: range.minY + paddingTop } - : { x: range.minX + paddingLeft, y: panelRange.minY + paddingTop }; - if (!this.scrollbar) { - this.container = this.canvas.addGroup(); - this.scrollbar = new _dependents__WEBPACK_IMPORTED_MODULE_1__["Scrollbar"]({ - container: this.container, - x: position.x, - y: position.y, - isHorizontal: isHorizontal, - trackLen: this.trackLen, - thumbLen: this.thumbLen, - thumbOffset: this.ratio * this.trackLen, - }); - this.scrollbar.init(); - this.scrollbar.render(); - this.scrollbar.get('group').set('zIndex', SCROLL_BAR_Z_INDEX); - this.scrollbar.on('scrollchange', this.onChangeFn); - } - else { - this.scrollbar.update({ - trackLen: this.trackLen, - thumbLen: this.thumbLen, - thumbOffset: this.thumbOffset, - x: position.x, - y: position.y, - }); - this.scrollbar.render(); - } - }; - ScrollbarInteraction.prototype.measureScrollBar = function () { - var config = getValidScrollbarConfig(this.getInteractionConfig()); - var _a = config.padding, paddingTop = _a[0], paddingRight = _a[1], paddingBottom = _a[2], paddingLeft = _a[3]; - var isHorizontal = config.type !== 'vertical'; - var panelRange = this.view.coordinateBBox; - var xScale = this.view.getXScale(); - var yScales = this.view.getYScales(); - this.cnt = xScale.values.length; - this.xScaleCfg = { field: xScale.field, values: xScale.values || [] }; - this.yScalesCfg = Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["map"])(yScales, function (item) { return ({ - field: item.field, - type: item.type, - min: item.min, - max: item.max, - ticks: item.ticks, - formatter: item.formatter, - }); }); - this.step = Math.floor((isHorizontal ? panelRange.width : panelRange.height) / config.categorySize); - this.trackLen = isHorizontal - ? panelRange.width - paddingLeft - paddingRight - : panelRange.height - paddingTop - paddingBottom; - this.thumbLen = Math.max(this.trackLen * Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["clamp"])(this.step / xScale.values.length, 0, 1), MIN_THUMB_LENGTH); - }; - ScrollbarInteraction.prototype.getScrollRange = function () { - var startIdx = Math.floor((this.cnt - this.step) * Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["clamp"])(this.ratio, 0, 1)); - var endIdx = Math.min(startIdx + this.step, this.cnt); - return [startIdx, endIdx]; - }; - ScrollbarInteraction.prototype.changeViewData = function (_a) { - var _this = this; - var startIdx = _a[0], endIdx = _a[1]; - var config = getValidScrollbarConfig(this.getInteractionConfig()); - var viewLayer = this.getViewLayer(); - var meta = viewLayer.options.meta; - var origData = viewLayer.getData(); - var newData = Object(_helper_data_range__WEBPACK_IMPORTED_MODULE_5__["getDataByScaleRange"])(this.xScaleCfg.field, this.xScaleCfg.values, origData, [startIdx, endIdx], config.type === 'vertical'); - // ScrollBar在滚动过程中保持Y轴上scale配置: min/max/ticks - this.yScalesCfg.forEach(function (cfg) { - var metaCfg = Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["get"])(meta, cfg.field) || {}; - _this.view.scale(cfg.field, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ formatter: cfg.formatter }, metaCfg), { type: cfg.type, min: cfg.min, max: cfg.max })); - }); - this.view.data(newData); - this.view.render(); - }; - ScrollbarInteraction.prototype.onChange = function (_a) { - var ratio = _a.ratio, thumbOffset = _a.thumbOffset; - this.ratio = ratio; - this.thumbOffset = thumbOffset; - var origAnimate = this.view.getOptions().animate; - this.view.animate(false); - this.changeViewData(this.getScrollRange()); - this.view.animate(origAnimate); - }; - return ScrollbarInteraction; -}(_base__WEBPACK_IMPORTED_MODULE_4__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (ScrollbarInteraction); -//# sourceMappingURL=scrollbar.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/interaction/slider.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/interaction/slider.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); -/* harmony import */ var _util_bbox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/bbox */ "./node_modules/@antv/g2plot/esm/util/bbox.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/g2plot/esm/interaction/base.js"); -/* harmony import */ var _helper_data_range__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./helper/data-range */ "./node_modules/@antv/g2plot/esm/interaction/helper/data-range.js"); - - - - - - -var DEFAULT_PADDING = 4; -var DEFAULT_SIZE = 16; -var getValidSliderConfig = function (cfg) { - if (cfg === void 0) { cfg = {}; } - var _cfg = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ type: 'horizontal', start: 0, end: 1, width: undefined, height: undefined, padding: [0, 0, 0, 0], backgroundStyle: undefined, foregroundStyle: undefined, handlerStyle: undefined, textStyle: undefined, trendCfg: undefined }, cfg); - // default padding - if (!cfg.padding) { - _cfg.padding = - _cfg.type === 'horizontal' ? [DEFAULT_PADDING, 0, DEFAULT_PADDING, 0] : [0, DEFAULT_PADDING, 0, DEFAULT_PADDING]; - } - // default size - if (!cfg.height) { - _cfg.height = DEFAULT_SIZE; - } - if (!cfg.width) { - _cfg.width = DEFAULT_SIZE; - } - // start & end - var start = Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["clamp"])(Math.min(_cfg.start, _cfg.end), 0, 1); - var end = Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["clamp"])(Math.max(_cfg.start, _cfg.end), 0, 1); - _cfg.start = start; - _cfg.end = end; - return _cfg; -}; -var SliderInteraction = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SliderInteraction, _super); - function SliderInteraction() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.onChangeFn = Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["throttle"])(_this.onChange.bind(_this), 20, { leading: true }); - return _this; - } - SliderInteraction.getInteractionRange = function (layerRange, interaction) { - var config = getValidSliderConfig(interaction); - var _a = config.padding || [0, 0, 0, 0], paddingTop = _a[0], paddingRight = _a[1], paddingBottom = _a[2], paddingLeft = _a[3]; - if (config.type === 'horizontal') { - var bbox = new _util_bbox__WEBPACK_IMPORTED_MODULE_2__["default"](layerRange.minX, layerRange.maxY - config.height - paddingTop - paddingBottom, layerRange.width, config.height + paddingTop + paddingBottom); - return bbox; - } - else { - return new _util_bbox__WEBPACK_IMPORTED_MODULE_2__["default"](layerRange.maxX - config.width - paddingLeft - paddingRight, layerRange.minY, config.width + paddingLeft + paddingRight, layerRange.height); - } - }; - SliderInteraction.prototype.render = function () { - var _this = this; - // 设置初始化的 start/end - var config = getValidSliderConfig(this.getInteractionConfig()); - this.curStart = config.start; - this.curEnd = config.end; - this.xScaleCfg = undefined; - // 等待 view 每次 render 完成后更新 slider 组件 - this.view.on('afterrender', function () { - if (!_this.xScaleCfg) { - // 初始化配置和数据 - var xScale = _this.view.getXScale(); - _this.xScaleCfg = { - field: xScale.field, - values: xScale.values || [], - }; - // 初始化 data - _this.view.data(_this.getSliderData(_this.curStart, _this.curEnd)); - _this.view.render(); - } - else { - _this.renderSlider(); - } - }); - }; - SliderInteraction.prototype.clear = function () { - if (this.slider) { - this.slider.destroy(); - this.slider = null; - } - if (this.container) { - this.container.remove(true); - this.container = null; - } - }; - SliderInteraction.prototype.renderSlider = function () { - if (!this.slider) { - this.container = this.canvas.addGroup(); - this.slider = new _dependents__WEBPACK_IMPORTED_MODULE_1__["Slider"](Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this.getSliderConfig()), { container: this.container })); - this.slider.init(); - this.slider.render(); - this.slider.on('sliderchange', this.onChangeFn); - } - else { - this.slider.update(this.getSliderConfig()); - this.slider.render(); - } - }; - SliderInteraction.prototype.getSliderConfig = function () { - var view = this.view; - var panelRange = view.coordinateBBox; - var range = this.getRange(); - var config = getValidSliderConfig(this.getInteractionConfig()); - var _a = config || {}, _b = _a.padding, padding = _b === void 0 ? [0, 0, 0, 0] : _b, backgroundStyle = _a.backgroundStyle, foregroundStyle = _a.foregroundStyle, handlerStyle = _a.handlerStyle, textStyle = _a.textStyle, _c = _a.trendCfg, trendCfg = _c === void 0 ? {} : _c; - var paddingTop = padding[0], paddingRight = padding[1], paddingBottom = padding[2], paddingLeft = padding[3]; - var _d = this.getSliderMinMaxText(this.curStart, this.curEnd), minText = _d.minText, maxText = _d.maxText; - var cfg = { - x: panelRange.minX + paddingLeft, - y: range.minY + paddingTop, - width: panelRange.width - paddingLeft - paddingRight, - height: range.height - paddingTop - paddingBottom, - start: this.curStart, - end: this.curEnd, - minText: minText, - maxText: maxText, - backgroundStyle: backgroundStyle, - foregroundStyle: foregroundStyle, - handlerStyle: handlerStyle, - textStyle: textStyle, - trendCfg: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ isArea: false, smooth: false }, trendCfg), { data: this.getSliderTrendData() }), - }; - return cfg; - }; - SliderInteraction.prototype.getSliderTrendData = function () { - var _a = this.getViewLayer().options, data = _a.data, yField = _a.yField; - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["map"])(data, function (item) { return item[yField]; }); - }; - SliderInteraction.prototype.getSliderData = function (start, end) { - var origData = this.getViewLayer().getData(); - var length = Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["size"])(this.xScaleCfg.values); - var startIdx = Math.round(start * length); - var endIdx = Math.max(startIdx + 1, Math.round(end * length)); - return Object(_helper_data_range__WEBPACK_IMPORTED_MODULE_5__["getDataByScaleRange"])(this.xScaleCfg.field, this.xScaleCfg.values, origData, [startIdx, endIdx]); - }; - SliderInteraction.prototype.getSliderMinMaxText = function (start, end) { - var _a = this.getViewLayer().options, _b = _a.data, data = _b === void 0 ? [] : _b, xField = _a.xField; - var length = Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["size"])(data); - var startIdx = Math.round(start * length); - var endIdx = Math.max(startIdx + 1, Math.round(end * length)); - var newData = data.slice(startIdx, endIdx); - return { - minText: Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["head"])(newData)[xField], - maxText: Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["last"])(newData)[xField], - }; - }; - SliderInteraction.prototype.onChange = function (range) { - var view = this.view; - var start = Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["clamp"])(Math.min(range[0], range[1]), 0, 1); - var end = Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["clamp"])(Math.max(range[0], range[1]), 0, 1); - var data = this.getSliderData(start, end); - var _a = this.getSliderMinMaxText(start, end), minText = _a.minText, maxText = _a.maxText; - this.curStart = start; - this.curEnd = end; - this.slider.update({ - start: start, - end: end, - minText: minText, - maxText: maxText, - }); - this.slider.render(); - var origAnimate = view.getOptions().animate; - view.animate(false); - view.changeData(data); - view.animate(origAnimate); - }; - return SliderInteraction; -}(_base__WEBPACK_IMPORTED_MODULE_4__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (SliderInteraction); -//# sourceMappingURL=slider.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/interface/config.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/interface/config.js ***! - \***********************************************************/ -/*! exports provided: timeIntervals */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeIntervals", function() { return timeIntervals; }); -var SECOND = 1000; -var MINUTE = 60 * SECOND; -var HOUR = 60 * MINUTE; -var DAY = 24 * HOUR; -var WEEK = DAY * 7; -var MONTH = DAY * 30; -var YEAR = DAY * 365; -var timeIntervals = { - second: { value: SECOND, format: 'HH:mm:ss' }, - miniute: { value: MINUTE, format: 'HH:mm' }, - hour: { value: HOUR, format: 'HH' }, - day: { value: DAY, format: 'YYYY-MM-DD' }, - week: { value: WEEK, format: 'YYYY-MM-DD' }, - month: { value: MONTH, format: 'YYYY-MM' }, - year: { value: YEAR, format: 'YYYY' }, -}; -//# sourceMappingURL=config.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/area/apply-responsive/axis.js": -/*!***************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/area/apply-responsive/axis.js ***! - \***************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return responsiveAxis; }); -/* harmony import */ var _util_responsive_apply_axis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/responsive/apply/axis */ "./node_modules/@antv/g2plot/esm/util/responsive/apply/axis.js"); - -function responsiveAxis(layer) { - var responsiveTheme = layer.getResponsiveTheme(); - var canvas = layer.canvas; - // x-axis - var x_responsiveAxis = new _util_responsive_apply_axis__WEBPACK_IMPORTED_MODULE_0__["default"]({ - plot: layer, - responsiveTheme: responsiveTheme, - dim: 'x', - }); - // y-axis - var y_responsiveAxis = new _util_responsive_apply_axis__WEBPACK_IMPORTED_MODULE_0__["default"]({ - plot: layer, - responsiveTheme: responsiveTheme, - dim: 'y', - }); - canvas.draw(); -} -//# sourceMappingURL=axis.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/area/apply-responsive/index.js": -/*!****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/area/apply-responsive/index.js ***! - \****************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _axis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./axis */ "./node_modules/@antv/g2plot/esm/plots/area/apply-responsive/axis.js"); - -var preRenderResponsive = []; -var afterRenderResponsive = [{ name: 'responsiveAxis', method: _axis__WEBPACK_IMPORTED_MODULE_0__["default"] }]; -/* harmony default export */ __webpack_exports__["default"] = ({ - preRender: preRenderResponsive, - afterRender: afterRenderResponsive, -}); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/area/event.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/area/event.js ***! - \***********************************************************/ -/*! exports provided: EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["onEvent"]; }); - - - -var SHAPE_EVENT_MAP = { - onAreaClick: 'area:click', - onAreaDblclick: 'area:dblclick', - onAreaMousemove: 'area:mousemove', - onAreaMouseenter: 'area:mouseenter', - onAreaMouseleave: 'area:mouseleave', - onAreaMousedown: 'area:mousedown', - onAreaMouseup: 'area:mouseup', - onAreaContextmenu: 'area:contextmenu', - onLineClick: 'line:click', - onLineDblclick: 'line:dblclick', - onLineMousemove: 'line:mousemove', - onLineMouseenter: 'line:mouseenter', - onLineMouseleave: 'line:mouseleave', - onLineMousedown: 'line:mousedown', - onLineMouseup: 'line:mouseup', - onLineContextmenu: 'line:contextmenu', - onPointClick: 'point:click', - onPointDblclick: 'point:dblclick', - onPointMousemove: 'point:mousemove', - onPointMouseenter: 'point:mouseenter', - onPointMouseleave: 'point:mouseleave', - onPointMousedown: 'point:mousedown', - onPointMouseup: 'point:mouseup', - onPointContextmenu: 'point:contextmenu', -}; -Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(_util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"], SHAPE_EVENT_MAP); - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/area/index.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/area/index.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/area/layer.js"); - - - - -var Area = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Area, _super); - function Area() { - return _super !== null && _super.apply(this, arguments) || this; - } - Area.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'area'; - _super.prototype.createLayers.call(this, layerProps); - }; - Area.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return Area; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Area); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/area/layer.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/area/layer.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _base_view_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/view-layer */ "./node_modules/@antv/g2plot/esm/base/view-layer.js"); -/* harmony import */ var _components_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../components/factory */ "./node_modules/@antv/g2plot/esm/components/factory.js"); -/* harmony import */ var _geoms_factory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../geoms/factory */ "./node_modules/@antv/g2plot/esm/geoms/factory.js"); -/* harmony import */ var _util_scale__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../util/scale */ "./node_modules/@antv/g2plot/esm/util/scale.js"); -/* harmony import */ var _apply_responsive__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./apply-responsive */ "./node_modules/@antv/g2plot/esm/plots/area/apply-responsive/index.js"); -/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./event */ "./node_modules/@antv/g2plot/esm/plots/area/event.js"); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./theme */ "./node_modules/@antv/g2plot/esm/plots/area/theme.js"); - - - - - - - - - - -var GEOM_MAP = { - area: 'area', - line: 'line', - point: 'point', -}; -var AreaLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(AreaLayer, _super); - function AreaLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'area'; - return _this; - } - AreaLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - smooth: false, - areaStyle: { - opacity: 0.25, - }, - line: { - visible: true, - size: 2, - style: { - opacity: 1, - lineJoin: 'round', - lineCap: 'round', - }, - }, - point: { - visible: false, - size: 4, - shape: 'point', - }, - label: { - visible: false, - type: 'point', - }, - legend: { - visible: true, - position: 'top-left', - wordSpacing: 4, - }, - tooltip: { - visible: true, - shared: true, - showCrosshairs: true, - crosshairs: { - type: 'x', - }, - offset: 20, - }, - }); - }; - AreaLayer.prototype.beforeInit = function () { - _super.prototype.beforeInit.call(this); - /** 响应式图形 */ - if (this.options.responsive && this.options.padding !== 'auto') { - this.applyResponsive('preRender'); - } - }; - AreaLayer.prototype.afterRender = function () { - /** 响应式 */ - if (this.options.responsive && this.options.padding !== 'auto') { - this.applyResponsive('afterRender'); - } - _super.prototype.afterRender.call(this); - }; - AreaLayer.prototype.geometryParser = function (dim, type) { - return GEOM_MAP[type]; - }; - AreaLayer.prototype.scale = function () { - var props = this.options; - var scales = {}; - /** 配置x-scale */ - scales[props.xField] = { - type: 'cat', - }; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(props, 'xAxis')) { - Object(_util_scale__WEBPACK_IMPORTED_MODULE_6__["extractScale"])(scales[props.xField], props.xAxis); - } - /** 配置y-scale */ - scales[props.yField] = {}; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(props, 'yAxis')) { - Object(_util_scale__WEBPACK_IMPORTED_MODULE_6__["extractScale"])(scales[props.yField], props.yAxis); - } - this.setConfig('scales', scales); - _super.prototype.scale.call(this); - }; - AreaLayer.prototype.coord = function () { }; - AreaLayer.prototype.addGeometry = function () { - var props = this.options; - var area = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_5__["getGeom"])('area', 'main', { - plot: this, - }); - this.area = area; - if (props.label) { - this.label(); - } - if (props.tooltip && (props.tooltip.fields || props.tooltip.formatter)) { - this.geometryTooltip(); - } - this.adjustArea(area); - this.setConfig('geometry', area); - this.addLine(); - this.addPoint(); - }; - AreaLayer.prototype.adjustArea = function (area) { - return; - }; - AreaLayer.prototype.adjustLine = function (line) { - return; - }; - AreaLayer.prototype.adjustPoint = function (point) { - return; - }; - AreaLayer.prototype.addLine = function () { - var props = this.options; - var lineConfig = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props.line); - if (lineConfig.visible) { - var line = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_5__["getGeom"])('line', 'guide', { - type: 'line', - plot: this, - line: lineConfig, - }); - this.adjustLine(line); - this.setConfig('geometry', line); - this.line = line; - } - }; - AreaLayer.prototype.addPoint = function () { - var props = this.options; - var pointConfig = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props.point); - if (pointConfig.visible) { - var point = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_5__["getGeom"])('point', 'guide', { - plot: this, - }); - this.adjustPoint(point); - this.setConfig('geometry', point); - this.point = point; - } - }; - AreaLayer.prototype.animation = function () { - _super.prototype.animation.call(this); - var props = this.options; - if (props.animation === false) { - // 关闭动画 - this.area.animate = false; - if (this.line) - this.line.animate = false; - if (this.point) - this.point.animate = false; - } - }; - AreaLayer.prototype.label = function () { - var props = this.options; - var label = props.label; - if (label.visible === false) { - if (this.line) { - this.line.label = false; - } - this.area.label = false; - return; - } - this.area.label = Object(_components_factory__WEBPACK_IMPORTED_MODULE_4__["getComponent"])('label', { - fields: [props.yField], - plot: this, - }); - }; - AreaLayer.prototype.geometryTooltip = function () { - this.area.tooltip = {}; - var tooltipOptions = this.options.tooltip; - if (tooltipOptions.fields) { - this.area.tooltip.fields = tooltipOptions.fields; - } - if (tooltipOptions.formatter) { - this.area.tooltip.callback = tooltipOptions.formatter; - if (!tooltipOptions.fields) { - this.area.tooltip.fields = [this.options.xField, this.options.yField]; - if (this.options.seriesField) { - this.area.tooltip.fields.push(this.options.seriesField); - } - } - } - }; - AreaLayer.prototype.parseEvents = function (eventParser) { - _super.prototype.parseEvents.call(this, _event__WEBPACK_IMPORTED_MODULE_8__); - }; - AreaLayer.prototype.applyResponsive = function (stage) { - var _this = this; - var methods = _apply_responsive__WEBPACK_IMPORTED_MODULE_7__["default"][stage]; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(methods, function (r) { - var responsive = r; - responsive.method(_this); - }); - }; - return AreaLayer; -}(_base_view_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (AreaLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('area', AreaLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/area/theme.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/area/theme.js ***! - \***********************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme */ "./node_modules/@antv/g2plot/esm/theme/index.js"); - -var AREA_ACTIVE_STYLE = function (style) { - var opacity = style.opacity || 1; - return { opacity: opacity }; -}; -var AREA_DISABLE_STYLE = function (style) { - var opacity = style.opacity || 1; - return { opacity: opacity * 0.5 }; -}; -var LINE_ACTIVE_STYLE = function (style) { - var opacity = style.opacity || 1; - return { opacity: opacity }; -}; -var LINE_DISABLE_STYLE = function (style) { - var opacity = style.opacity || 1; - return { opacity: opacity * 0.5 }; -}; -var LINE_SELECTED_STYLE = function (style) { - var lineWidth = style.lineWidth || 1; - return { lineWidth: lineWidth + 2 }; -}; -var POINT_ACTIVE_STYLE = function (style) { - var color = style.fill || style.fillStyle; - var radius = style.size || style.radius; - return { - radius: radius + 1, - shadowBlur: radius, - shadowColor: color, - stroke: color, - strokeOpacity: 1, - lineWidth: 1, - }; -}; -var POINT_SELECTED_STYLE = function (style) { - var color = style.fill || style.fillStyle; - var radius = style.size || style.radius; - return { - radius: radius + 2, - shadowBlur: radius, - shadowColor: color, - stroke: color, - strokeOpacity: 1, - lineWidth: 2, - }; -}; -var POINT_DISABLED_STYLE = function (style) { - var opacity = style.opacity || style.fillOpacity || 1; - return { opacity: opacity * 0.5 }; -}; -Object(_theme__WEBPACK_IMPORTED_MODULE_0__["registerTheme"])('area', { - areaStyle: { - normal: {}, - active: AREA_ACTIVE_STYLE, - disable: AREA_DISABLE_STYLE, - selected: { lineWidth: 1, stroke: '#333333' }, - }, - lineStyle: { - normal: {}, - active: LINE_ACTIVE_STYLE, - disable: LINE_DISABLE_STYLE, - selected: LINE_SELECTED_STYLE, - }, - pointStyle: { - normal: {}, - active: POINT_ACTIVE_STYLE, - disable: POINT_DISABLED_STYLE, - selected: POINT_SELECTED_STYLE, - }, -}); -//# sourceMappingURL=theme.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/bar/apply-responsive/axis.js": -/*!**************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/bar/apply-responsive/axis.js ***! - \**************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return responsiveAxis; }); -/* harmony import */ var _util_responsive_apply_axis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/responsive/apply/axis */ "./node_modules/@antv/g2plot/esm/util/responsive/apply/axis.js"); - -function responsiveAxis(layer) { - var responsiveTheme = layer.getResponsiveTheme(); - var canvas = layer.canvas; - // x-axis - var x_responsiveAxis = new _util_responsive_apply_axis__WEBPACK_IMPORTED_MODULE_0__["default"]({ - plot: layer, - responsiveTheme: responsiveTheme, - dim: 'x', - }); - // y-axis - var y_responsiveAxis = new _util_responsive_apply_axis__WEBPACK_IMPORTED_MODULE_0__["default"]({ - plot: layer, - responsiveTheme: responsiveTheme, - dim: 'y', - }); - canvas.draw(); -} -//# sourceMappingURL=axis.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/bar/apply-responsive/index.js": -/*!***************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/bar/apply-responsive/index.js ***! - \***************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _axis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./axis */ "./node_modules/@antv/g2plot/esm/plots/bar/apply-responsive/axis.js"); - -var preRenderResponsive = []; -var afterRenderResponsive = [{ name: 'responsiveAxis', method: _axis__WEBPACK_IMPORTED_MODULE_0__["default"] }]; -/* harmony default export */ __webpack_exports__["default"] = ({ - preRender: preRenderResponsive, - afterRender: afterRenderResponsive, -}); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/bar/component/label.js": -/*!********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/bar/component/label.js ***! - \********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/color */ "./node_modules/@antv/g2plot/esm/util/color.js"); -/* harmony import */ var _util_bbox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/bbox */ "./node_modules/@antv/g2plot/esm/util/bbox.js"); - - - -var DEFAULT_OFFSET = 8; -var BarLabel = /** @class */ (function () { - function BarLabel(cfg) { - this.destroyed = false; - this.view = cfg.view; - this.plot = cfg.plot; - var defaultOptions = this.getDefaultOptions(); - this.options = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])(defaultOptions, cfg, {}); - this.init(); - } - BarLabel.prototype.init = function () { - var _this = this; - this.container = this.getGeometry().labelsContainer; - this.view.on('beforerender', function () { - _this.clear(); - _this.plot.canvas.draw(); - }); - }; - BarLabel.prototype.render = function () { - var _this = this; - var _a = this.getGeometry(), elements = _a.elements, coordinate = _a.coordinate; - this.coord = coordinate; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(elements, function (ele) { - var shape = ele.shape; - var style = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(_this.options.style); - var value = _this.getValue(shape); - var position = _this.getPosition(shape, value); - var textAlign = _this.getTextAlign(value); - var color = _this.getTextColor(shape); - if (_this.options.position !== 'right' && _this.options.adjustColor && color !== 'black') { - style.stroke = null; - } - var formatter = _this.options.formatter; - var content = formatter ? formatter(value) : value; - var label = _this.container.addShape('text', { - attrs: Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])({}, style, { - x: position.x, - y: position.y, - text: content, - fill: color, - textAlign: textAlign, - textBaseline: 'middle', - }), - name: 'label', - }); - _this.adjustLabel(label, shape); - }); - }; - BarLabel.prototype.clear = function () { - if (this.container) { - this.container.clear(); - } - }; - BarLabel.prototype.hide = function () { - this.container.set('visible', false); - this.plot.canvas.draw(); - }; - BarLabel.prototype.show = function () { - this.container.set('visible', true); - this.plot.canvas.draw(); - }; - BarLabel.prototype.destroy = function () { - if (this.container) { - this.container.remove(); - } - this.destroyed = true; - }; - BarLabel.prototype.getBBox = function () { }; - BarLabel.prototype.getPosition = function (shape, value) { - var bbox = this.getShapeBbox(shape); - var minX = bbox.minX, maxX = bbox.maxX, minY = bbox.minY, height = bbox.height, width = bbox.width; - var _a = this.options, offsetX = _a.offsetX, offsetY = _a.offsetY, position = _a.position; - var y = minY + height / 2 + offsetY; - var dir = value < 0 ? -1 : 1; - var x; - if (position === 'left') { - var root = value > 0 ? minX : maxX; - x = root + offsetX * dir; - } - else if (position === 'right') { - x = maxX + offsetX * dir; - } - else { - x = minX + width / 2 + offsetX; - } - return { x: x, y: y }; - }; - BarLabel.prototype.getTextColor = function (shape) { - if (this.options.adjustColor && this.options.position !== 'right') { - var shapeColor = shape.attr('fill'); - var shapeOpacity = shape.attr('opacity') ? shape.attr('opacity') : 1; - var rgb = Object(_util_color__WEBPACK_IMPORTED_MODULE_1__["rgb2arr"])(shapeColor); - var gray = Math.round(rgb[0] * 0.299 + rgb[1] * 0.587 + rgb[2] * 0.114) / shapeOpacity; - var colorBand = [ - { from: 0, to: 85, color: 'white' }, - { from: 85, to: 170, color: '#F6F6F6' }, - { from: 170, to: 255, color: 'black' }, - ]; - var reflect = Object(_util_color__WEBPACK_IMPORTED_MODULE_1__["mappingColor"])(colorBand, gray); - return reflect; - } - var defaultColor = this.options.style.fill; - return defaultColor; - }; - BarLabel.prototype.getTextAlign = function (value) { - var position = this.options.position; - var alignOptions = { - right: 'left', - left: 'left', - middle: 'center', - }; - var alignOptionsReverse = { - right: 'right', - left: 'right', - middle: 'center', - }; - if (value < 0) { - return alignOptionsReverse[position]; - } - return alignOptions[position]; - }; - BarLabel.prototype.getValue = function (shape) { - var data = shape.get('origin').data; - return data[this.plot.options.xField]; - }; - BarLabel.prototype.adjustLabel = function (label, shape) { - if (this.options.adjustPosition && this.options.position !== 'right') { - var labelRange = label.getBBox(); - var shapeRange = shape.getBBox(); - if (shapeRange.width <= labelRange.width) { - var xPosition = shapeRange.maxX + this.options.offsetX; - label.attr('x', xPosition); - label.attr('fill', this.options.style.fill); - } - } - }; - BarLabel.prototype.getDefaultOptions = function () { - var theme = this.plot.theme; - var labelStyle = theme.label.style; - return { - offsetX: DEFAULT_OFFSET, - offsetY: 0, - style: Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(labelStyle), - adjustPosition: true, - }; - }; - BarLabel.prototype.getShapeBbox = function (shape) { - var _this = this; - var points = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(shape.get('origin').points, function (p) { - points.push(_this.coord.convertPoint(p)); - }); - var bbox = new _util_bbox__WEBPACK_IMPORTED_MODULE_2__["default"](points[0].x, points[2].y, Math.abs(points[1].x - points[0].x), Math.abs(points[0].y - points[2].y)); - return bbox; - }; - BarLabel.prototype.getGeometry = function () { - var geometries = this.view.geometries; - var lineGeom; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(geometries, function (geom) { - if (geom.type === 'interval') { - lineGeom = geom; - } - }); - return lineGeom; - }; - return BarLabel; -}()); -/* harmony default export */ __webpack_exports__["default"] = (BarLabel); -//# sourceMappingURL=label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/bar/event.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/bar/event.js ***! - \**********************************************************/ -/*! exports provided: EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["onEvent"]; }); - - - -var SHAPE_EVENT_MAP = { - onBarClick: 'interval:click', - onBarDblclick: 'interval:dblclick', - onBarMousemove: 'interval:mousemove', - onBarMouseenter: 'interval:mouseenter', - onBarMouseleave: 'interval:mouseleave', - onBarMousedown: 'interval:mousedown', - onBarMouseup: 'interval:mouseup', - onBarContextmenu: 'interval:contextmenu', -}; -Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(_util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"], SHAPE_EVENT_MAP); - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/bar/index.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/bar/index.js ***! - \**********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/bar/layer.js"); - - - - -var Bar = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Bar, _super); - function Bar() { - return _super !== null && _super.apply(this, arguments) || this; - } - Bar.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'bar'; - _super.prototype.createLayers.call(this, layerProps); - }; - Bar.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return Bar; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Bar); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/bar/layer.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/bar/layer.js ***! - \**********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _base_view_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/view-layer */ "./node_modules/@antv/g2plot/esm/base/view-layer.js"); -/* harmony import */ var _components_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../components/factory */ "./node_modules/@antv/g2plot/esm/components/factory.js"); -/* harmony import */ var _components_conversion_tag__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../components/conversion-tag */ "./node_modules/@antv/g2plot/esm/components/conversion-tag.js"); -/* harmony import */ var _geoms_factory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../geoms/factory */ "./node_modules/@antv/g2plot/esm/geoms/factory.js"); -/* harmony import */ var _util_scale__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../util/scale */ "./node_modules/@antv/g2plot/esm/util/scale.js"); -/* harmony import */ var _apply_responsive__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./apply-responsive */ "./node_modules/@antv/g2plot/esm/plots/bar/apply-responsive/index.js"); -/* harmony import */ var _component_label__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./component/label */ "./node_modules/@antv/g2plot/esm/plots/bar/component/label.js"); -/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./event */ "./node_modules/@antv/g2plot/esm/plots/bar/event.js"); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./theme */ "./node_modules/@antv/g2plot/esm/plots/bar/theme.js"); - - - - - - - - - - - - -var G2_GEOM_MAP = { - bar: 'interval', -}; -var PLOT_GEOM_MAP = { - interval: 'bar', -}; -var BaseBarLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(BaseBarLayer, _super); - function BaseBarLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'bar'; - return _this; - } - BaseBarLayer.getDefaultOptions = function () { - var cfg = { - xAxis: { - visible: true, - line: { - visible: false, - }, - title: { - visible: true, - }, - label: { - visible: false, - }, - tickLine: { - visible: false, - }, - grid: { - visible: false, - }, - }, - yAxis: { - visible: true, - autoRotateTitle: true, - nice: true, - grid: { - visible: false, - }, - line: { - visible: false, - }, - tickLine: { - visible: false, - }, - label: { - visible: true, - autoRotate: false, - autoHide: true, - }, - title: { - visible: false, - offset: 12, - }, - }, - tooltip: { - visible: true, - shared: true, - showCrosshairs: false, - showMarkers: false, - }, - label: { - visible: true, - position: 'left', - adjustColor: true, - }, - legend: { - visible: false, - position: 'top-left', - }, - interactions: [ - { type: 'tooltip' }, - { type: 'active-region' }, - { type: 'legend-active' }, - { type: 'legend-filter' }, - ], - conversionTag: { - visible: false, - }, - }; - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), cfg); - }; - BaseBarLayer.prototype.beforeInit = function () { - _super.prototype.beforeInit.call(this); - var props = this.options; - /** 响应式图形 */ - if (props.responsive && props.padding !== 'auto') { - this.applyResponsive('preRender'); - } - }; - BaseBarLayer.prototype.afterRender = function () { - var props = this.options; - this.renderLabel(); - /** 响应式 */ - if (props.responsive && props.padding !== 'auto') { - this.applyResponsive('afterRender'); - } - if (props.conversionTag.visible) { - this.conversionTag = new _components_conversion_tag__WEBPACK_IMPORTED_MODULE_5__["default"](Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ view: this.view, field: props.xField, animation: props.animation === false ? false : true }, props.conversionTag)); - } - _super.prototype.afterRender.call(this); - }; - BaseBarLayer.prototype.geometryParser = function (dim, type) { - if (dim === 'g2') { - return G2_GEOM_MAP[type]; - } - return PLOT_GEOM_MAP[type]; - }; - BaseBarLayer.prototype.processData = function (originData) { - var inputData = originData ? originData.slice().reverse() : originData; - var yField = this.options.yField; - var processedData = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(inputData, function (data) { - var d = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(data); - d[yField] = d[yField].toString(); - processedData.push(d); - }); - return processedData; - }; - BaseBarLayer.prototype.scale = function () { - var props = this.options; - var scales = {}; - /** 配置x-scale */ - scales[props.yField] = { - type: 'cat', - }; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(props, 'yAxis')) { - Object(_util_scale__WEBPACK_IMPORTED_MODULE_7__["extractScale"])(scales[props.yField], props.yAxis); - } - /** 配置y-scale */ - scales[props.xField] = {}; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(props, 'xAxis')) { - Object(_util_scale__WEBPACK_IMPORTED_MODULE_7__["extractScale"])(scales[props.xField], props.xAxis); - } - this.setConfig('scales', scales); - _super.prototype.scale.call(this); - }; - BaseBarLayer.prototype.coord = function () { - this.setConfig('coordinate', { - actions: [['transpose']], - }); - }; - BaseBarLayer.prototype.axis = function () { - var xAxis_parser = Object(_components_factory__WEBPACK_IMPORTED_MODULE_4__["getComponent"])('axis', { - plot: this, - dim: 'x', - }); - var yAxis_parser = Object(_components_factory__WEBPACK_IMPORTED_MODULE_4__["getComponent"])('axis', { - plot: this, - dim: 'y', - }); - /** 转置坐标系特殊配置 */ - if (xAxis_parser) { - xAxis_parser.position = 'left'; - } - if (yAxis_parser) { - yAxis_parser.position = 'bottom'; - } - var axesConfig = {}; - axesConfig[this.options.xField] = xAxis_parser; - axesConfig[this.options.yField] = yAxis_parser; - /** 存储坐标轴配置项到config */ - this.setConfig('axes', axesConfig); - }; - BaseBarLayer.prototype.adjustBar = function (bar) { }; - BaseBarLayer.prototype.addGeometry = function () { - var props = this.options; - var bar = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_6__["getGeom"])('interval', 'main', { - positionFields: [props.yField, props.xField], - plot: this, - }); - if (props.conversionTag.visible) { - this.setConfig('theme', Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, this.getTheme(), { - columnWidthRatio: 1 / 3, - })); - } - this.adjustBar(bar); - this.bar = bar; - if (props.tooltip && (props.tooltip.fields || props.tooltip.formatter)) { - this.geometryTooltip(); - } - this.setConfig('geometry', bar); - }; - BaseBarLayer.prototype.animation = function () { - _super.prototype.animation.call(this); - var props = this.options; - if (props.animation === false) { - /** 关闭动画 */ - this.bar.animate = false; - } - }; - BaseBarLayer.prototype.parseEvents = function (eventParser) { - _super.prototype.parseEvents.call(this, _event__WEBPACK_IMPORTED_MODULE_10__); - }; - BaseBarLayer.prototype.renderLabel = function () { - var scales = this.config.scales; - var yField = this.options.yField; - var scale = scales[yField]; - if (this.options.label && this.options.label.visible) { - var label = new _component_label__WEBPACK_IMPORTED_MODULE_9__["default"](Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ view: this.view, plot: this, formatter: scale.formatter }, this.options.label)); - label.render(); - } - }; - BaseBarLayer.prototype.geometryTooltip = function () { - this.bar.tooltip = {}; - var tooltipOptions = this.options.tooltip; - if (tooltipOptions.fields) { - this.bar.tooltip.fields = tooltipOptions.fields; - } - if (tooltipOptions.formatter) { - this.bar.tooltip.callback = tooltipOptions.formatter; - if (!tooltipOptions.fields) { - this.bar.tooltip.fields = [this.options.xField, this.options.yField]; - if (this.options.colorField) { - this.bar.tooltip.fields.push(this.options.colorField); - } - } - } - }; - BaseBarLayer.prototype.applyResponsive = function (stage) { - var _this = this; - var methods = _apply_responsive__WEBPACK_IMPORTED_MODULE_8__["default"][stage]; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(methods, function (r) { - var responsive = r; - responsive.method(_this); - }); - }; - BaseBarLayer.prototype.getLabelOptionsByPosition = function (position) { - if (position === 'middle') { - return { - offset: 0, - }; - } - if (position === 'left') { - return { - offset: 7, - style: { - stroke: null, - lineWidth: 0, - }, - }; - } - if (position === 'right') { - return { - offset: 4, - }; - } - }; - return BaseBarLayer; -}(_base_view_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (BaseBarLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('bar', BaseBarLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/bar/theme.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/bar/theme.js ***! - \**********************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme */ "./node_modules/@antv/g2plot/esm/theme/index.js"); - -var BAR_ACTIVE_STYLE = function (style) { - var opacity = style.opacity || 1; - return { opacity: opacity * 0.5 }; -}; -var BAR_DISABLE_STYLE = function (style) { - var opacity = style.opacity || 1; - return { opacity: opacity * 0.5 }; -}; -Object(_theme__WEBPACK_IMPORTED_MODULE_0__["registerTheme"])('bar', { - columnStyle: { - normal: {}, - active: BAR_ACTIVE_STYLE, - disable: BAR_DISABLE_STYLE, - selected: { lineWidth: 1, stroke: 'black' }, - }, -}); -//# sourceMappingURL=theme.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/bubble/index.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/bubble/index.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/bubble/layer.js"); - - - - -var Bubble = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Bubble, _super); - function Bubble() { - return _super !== null && _super.apply(this, arguments) || this; - } - Bubble.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'bubble'; - _super.prototype.createLayers.call(this, layerProps); - }; - Bubble.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return Bubble; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Bubble); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/bubble/layer.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/bubble/layer.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _scatter_event__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../scatter/event */ "./node_modules/@antv/g2plot/esm/plots/scatter/event.js"); -/* harmony import */ var _scatter_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../scatter/layer */ "./node_modules/@antv/g2plot/esm/plots/scatter/layer.js"); -/* harmony import */ var _shape__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./shape */ "./node_modules/@antv/g2plot/esm/plots/bubble/shape.js"); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./theme */ "./node_modules/@antv/g2plot/esm/plots/bubble/theme.js"); - - - - - - - -var BubbleLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(BubbleLayer, _super); - function BubbleLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'bubble'; - return _this; - } - BubbleLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - // 直径 min 4px;max 64px - pointSize: [2, 32], - pointStyle: { - stroke: null, - strokeOpacity: 1, - fillOpacity: 0.5, - }, - label: { - position: 'middle', - style: { - stroke: '#fff', - lineWidth: 1, - }, - }, - shape: 'bubble-point', - }); - }; - BubbleLayer.prototype.legend = function () { - var _a; - _super.prototype.legend.call(this); - this.setConfig('legends', (_a = {}, - _a[this.options.sizeField] = false, - _a)); - }; - BubbleLayer.prototype.parseEvents = function () { - _super.prototype.parseEvents.call(this, _scatter_event__WEBPACK_IMPORTED_MODULE_3__); - }; - BubbleLayer.prototype.extractTooltip = function () { - this.points.tooltip = {}; - var tooltipOptions = this.options.tooltip; - if (tooltipOptions.fields) { - this.points.tooltip.fields = tooltipOptions.fields; - } - else { - this.points.tooltip.fields = [this.options.xField, this.options.yField, this.options.sizeField]; - } - if (tooltipOptions.formatter) { - this.points.tooltip.callback = tooltipOptions.formatter; - if (this.options.colorField) { - this.points.tooltip.fields.push(this.options.colorField); - } - } - }; - return BubbleLayer; -}(_scatter_layer__WEBPACK_IMPORTED_MODULE_4__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (BubbleLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('bubble', BubbleLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/bubble/shape.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/bubble/shape.js ***! - \*************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_g2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/g2 */ "./node_modules/@antv/g2/dist/g2.min.js"); -/* harmony import */ var _antv_g2__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_antv_g2__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _antv_g2_lib_geometry_shape_point_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/g2/lib/geometry/shape/point/util */ "./node_modules/@antv/g2/lib/geometry/shape/point/util.js"); -/* harmony import */ var _antv_g2_lib_geometry_shape_point_util__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_antv_g2_lib_geometry_shape_point_util__WEBPACK_IMPORTED_MODULE_1__); - - -Object(_antv_g2__WEBPACK_IMPORTED_MODULE_0__["registerShape"])('point', 'bubble-point', { - draw: function (cfg, container) { - var point = Object(_antv_g2_lib_geometry_shape_point_util__WEBPACK_IMPORTED_MODULE_1__["drawPoints"])(this, cfg, container, 'circle', false); - // 如果用户未配置 stroke,气泡图 stroke 默认用 fill 颜色 - if (!cfg.style.stroke) { - var fill = point.attr('fill'); - point.attr('stroke', fill); - } - return point; - }, - getMarker: function (markerCfg) { - var color = markerCfg.color; - return { - symbol: 'circle', - style: { - r: 4.5, - fill: color, - }, - }; - }, -}); -//# sourceMappingURL=shape.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/bubble/theme.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/bubble/theme.js ***! - \*************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme */ "./node_modules/@antv/g2plot/esm/theme/index.js"); - -var POINT_ACTIVE_STYLE = function (style) { - var stroke = style.stroke || '#000'; - var fillOpacity = style.fillOpacity || style.opacity || 0.95; - return { - stroke: stroke, - fillOpacity: fillOpacity, - }; -}; -var POINT_SELECTED_STYLE = function (style) { - var stroke = style.stroke || '#000'; - var lineWidth = style.lineWidth || 2; - return { - stroke: stroke, - lineWidth: lineWidth, - }; -}; -var POINT_INACTIVE_STYLE = function (style) { - var fillOpacity = style.fillOpacity || style.opacity || 0.3; - return { - fillOpacity: fillOpacity, - }; -}; -Object(_theme__WEBPACK_IMPORTED_MODULE_0__["registerTheme"])('bubble', { - pointStyle: { - normal: {}, - active: POINT_ACTIVE_STYLE, - selected: POINT_SELECTED_STYLE, - inactive: POINT_INACTIVE_STYLE, - }, -}); -//# sourceMappingURL=theme.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/bullet/component/bulletRect.js": -/*!****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/bullet/component/bulletRect.js ***! - \****************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_bbox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/bbox */ "./node_modules/@antv/g2plot/esm/util/bbox.js"); - - - -var BulletRect = /** @class */ (function () { - function BulletRect(view, cfg) { - this.view = view; - this.cfg = cfg; - this._init(); - } - /** 绘制辅助labels */ - BulletRect.prototype.draw = function () { - if (!this.view || this.view.destroyed) { - return; - } - this.container = this.view.middleGroup.addGroup(); - this.container.set('name', 'rectGroups'); - this.container.setZIndex(-100); - var geometry = this.getGeometry(); - var shapes = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["map"])(geometry === null || geometry === void 0 ? void 0 : geometry.elements, function (element) { return element.shape; }); - for (var i = 0; i < this.cfg.ranges.length; i += 1) { - var shapeBox = shapes[i].getBBox(); - var widthRatio = shapeBox.width / shapes[i].get('origin').data[this.cfg.yField]; - this.drawRect(shapeBox, this.cfg.ranges[i] || [0, 1], widthRatio); - } - this.view.canvas.draw(); - }; - BulletRect.prototype.drawRect = function (box, ranges, widthRatio) { - var options = this.cfg; - var rangeColors = options.rangeColors; - var xPos = box.minX; - var yPos = box.minY - (box.height * (options.rangeSize - 1)) / 2; - var rect; - for (var i = 1; i < ranges.length; i += 1) { - var width = (ranges[i] - ranges[i - 1]) * options.rangeMax * widthRatio; - rect = this.container - .addShape('rect', { - name: 'bullet-rect', - attrs: { - width: width, - height: box.height * options.rangeSize, - x: xPos, - y: yPos, - fill: rangeColors[(i - 1) % rangeColors.length], - fillOpacity: 0.25, - }, - }) - .set('zIndex', -1); - xPos += width; - } - if (options.axis && options.axis.visible) { - var tickInterval = options.rangeMax / (options.axis.tickCount - 1); - var rangeBox = new _util_bbox__WEBPACK_IMPORTED_MODULE_2__["default"](box.x, yPos, xPos, box.height * options.rangeSize); - this.drawBulletTicks(rangeBox, tickInterval, widthRatio); - } - }; - /** 添加 ticks */ - BulletRect.prototype.drawBulletTicks = function (box, tickInterval, widthRatio) { - var options = this.cfg; - var ticksStyle = options.axis.style; - var tickCount = options.axis.tickCount; - var tickPosition = options.axis.position; - var tickOffset = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(ticksStyle, 'lineHeight', 0) - ticksStyle.fontSize / 2; - for (var tickIdx = 0; tickIdx < tickCount; tickIdx += 1) { - var x = box.minX + tickInterval * tickIdx * widthRatio; - var tickText = "" + tickInterval * tickIdx; - if (options.axis.formatter) { - tickText = options.axis.formatter(tickText, tickIdx); - } - var tickShape = this.container.addShape('text', { - name: 'tick', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: x, y: tickPosition === 'before' ? box.minY - tickOffset : box.maxY + tickOffset, text: "" + tickText }, ticksStyle), - }); - if (options.axis.tickLine && options.axis.tickLine.visible) { - var tickLineCfg = options.axis.tickLine; - if (tickIdx > 0 && tickIdx !== tickCount - 1) { - this.container - .addShape('path', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: [ - ['M', x, box.minY], - ['L', x, box.maxY], - ] }, tickLineCfg), - }) - .set('zIndex', -1); - } - } - } - }; - BulletRect.prototype.clear = function () { - if (this.container) { - this.container.clear(); - } - }; - BulletRect.prototype.destroy = function () { - if (this.container) { - this.container.remove(); - } - }; - BulletRect.prototype._init = function () { - var _this = this; - this.view.on('beforerender', function () { - _this.clear(); - }); - this.view.on('afterrender', function () { - _this.draw(); - }); - }; - BulletRect.prototype.getGeometry = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["find"])(this.view.geometries, function (geometry) { return geometry.type === 'interval'; }); - }; - return BulletRect; -}()); -/* harmony default export */ __webpack_exports__["default"] = (BulletRect); -//# sourceMappingURL=bulletRect.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/bullet/component/bulletTarget.js": -/*!******************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/bullet/component/bulletTarget.js ***! - \******************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - - -var BulletTarget = /** @class */ (function () { - function BulletTarget(view, cfg) { - this.view = view; - this.cfg = cfg; - this._init(); - } - /** 绘制辅助labels */ - BulletTarget.prototype.draw = function () { - if (!this.view || this.view.destroyed) { - return; - } - this.container = this.view.foregroundGroup.addGroup(); - this.container.set('name', 'targetGroups'); - var shapes = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["map"])(this.getGeometry().elements, function (element) { return element.shape; }); - for (var i = 0; i < this.cfg.targets.length; i += 1) { - var shapeBox = shapes[i].getBBox(); - var widthRatio = shapeBox.width / shapes[i].get('origin').data[this.cfg.yField]; - this.drawTarget(shapeBox, this.cfg.targets[i], widthRatio); - } - this.view.canvas.draw(); - }; - BulletTarget.prototype.drawTarget = function (box, targets, widthRatio) { - var _this = this; - var options = this.cfg; - var colors = options.markerColors; - /** 添加目标值 */ - targets.forEach(function (target, i) { - var markerStyle = options.markerStyle; - var targetRect = _this.container.addShape('rect', { - name: 'bullet-target', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ width: markerStyle.width, height: box.height * options.markerSize - markerStyle.width / 2, x: box.minX + target * widthRatio, y: box.minY - (box.height * (options.markerSize - 1)) / 2 }, markerStyle), { fill: colors[i % colors.length] || markerStyle.fill }), - }); - }); - }; - BulletTarget.prototype.clear = function () { - if (this.container) { - this.container.clear(); - } - }; - BulletTarget.prototype.destroy = function () { - if (this.container) { - this.container.remove(); - } - }; - BulletTarget.prototype._init = function () { - var _this = this; - this.view.on('beforerender', function () { - _this.clear(); - }); - this.view.on('afterrender', function () { - _this.draw(); - }); - }; - BulletTarget.prototype.getGeometry = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["find"])(this.view.geometries, function (geometry) { return geometry.type === 'interval'; }); - }; - return BulletTarget; -}()); -/* harmony default export */ __webpack_exports__["default"] = (BulletTarget); -//# sourceMappingURL=bulletTarget.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/bullet/event.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/bullet/event.js ***! - \*************************************************************/ -/*! exports provided: EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["onEvent"]; }); - - - -var componentMap = { - Bullet: 'interval', - BulletTarget: 'bullet-target', -}; -var SHAPE_EVENT_MAP = Object(_util_event__WEBPACK_IMPORTED_MODULE_1__["getEventMap"])(componentMap); -Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(_util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"], SHAPE_EVENT_MAP); - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/bullet/index.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/bullet/index.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/bullet/layer.js"); - - - - -var Bullet = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Bullet, _super); - function Bullet() { - return _super !== null && _super.apply(this, arguments) || this; - } - Bullet.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'bullet'; - _super.prototype.createLayers.call(this, layerProps); - }; - Bullet.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return Bullet; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Bullet); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/bullet/layer.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/bullet/layer.js ***! - \*************************************************************/ -/*! exports provided: STACK_FIELD, X_FIELD, Y_FIELD, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STACK_FIELD", function() { return STACK_FIELD; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "X_FIELD", function() { return X_FIELD; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Y_FIELD", function() { return Y_FIELD; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./event */ "./node_modules/@antv/g2plot/esm/plots/bullet/event.js"); -/* harmony import */ var _base_view_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/view-layer */ "./node_modules/@antv/g2plot/esm/base/view-layer.js"); -/* harmony import */ var _util_scale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/scale */ "./node_modules/@antv/g2plot/esm/util/scale.js"); -/* harmony import */ var _components_factory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../components/factory */ "./node_modules/@antv/g2plot/esm/components/factory.js"); -/* harmony import */ var _geoms_factory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../geoms/factory */ "./node_modules/@antv/g2plot/esm/geoms/factory.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _component_bulletRect__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./component/bulletRect */ "./node_modules/@antv/g2plot/esm/plots/bullet/component/bulletRect.js"); -/* harmony import */ var _component_bulletTarget__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./component/bulletTarget */ "./node_modules/@antv/g2plot/esm/plots/bullet/component/bulletTarget.js"); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./theme */ "./node_modules/@antv/g2plot/esm/plots/bullet/theme.js"); - - - - - - - - - - - -var G2_GEOM_MAP = { - bullet: 'interval', -}; -var PLOT_GEOM_MAP = { - interval: 'bullet', -}; -var STACK_FIELD = '$$stackField$$'; -var X_FIELD = '$$xField$$'; -var Y_FIELD = '$$yField$$'; -var BulletLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(BulletLayer, _super); - function BulletLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'bullet'; - return _this; - } - BulletLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - data: [], - stackField: STACK_FIELD, - xField: X_FIELD, - yField: Y_FIELD, - rangeColors: ['rgba(91, 143, 249, 0.45)'], - measureSize: 12, - rangeSize: 2, - markerSize: 2, - markerColors: [], - markerStyle: { - width: 2, - fill: '#5B8FF9', - lineWidth: 0, - }, - axis: { - visible: false, - position: 'before', - tickCount: 6, - formatter: function (text, idx) { return "" + idx; }, - style: { - fill: 'rgba(0, 0, 0, 0.25)', - textBaseline: 'middle', - textAlign: 'center', - fontSize: 12, - lineHeight: 16, - }, - tickLine: { - visible: true, - lineWidth: 1, - stroke: '#FFF', - lineDash: [4, 2], - }, - }, - xAxis: { - visible: true, - line: { - visible: false, - }, - tickLine: { - visible: false, - }, - label: { - visible: true, - }, - }, - yAxis: { - visible: false, - nice: false, - }, - tooltip: { - visible: false, - trigger: 'item', - crosshairs: false, - }, - label: { - visible: true, - offset: 4, - style: { - fill: 'rgba(0, 0, 0, 0.45)', - stroke: '#fff', - lineWidth: 1, - }, - }, - }); - }; - BulletLayer.prototype.afterRender = function () { - _super.prototype.afterRender.call(this); - this.view.removeInteraction('legend-filter'); - }; - BulletLayer.prototype.scale = function () { - var options = this.options; - var scales = {}; - /** 配置y-scale */ - scales[options.yField] = {}; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(options, 'yAxis')) { - Object(_util_scale__WEBPACK_IMPORTED_MODULE_4__["extractScale"])(scales[options.yField], options.yAxis); - } - /** 配置x-scale */ - scales[options.xField] = { - type: 'cat', - }; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(options, 'xAxis')) { - Object(_util_scale__WEBPACK_IMPORTED_MODULE_4__["extractScale"])(scales[options.xField], options.xAxis); - } - this.setConfig('scales', scales); - _super.prototype.scale.call(this); - }; - BulletLayer.prototype.getOptions = function (props) { - var options = _super.prototype.getOptions.call(this, props); - this.adjustOptions(options); - return options; - }; - BulletLayer.prototype.afterInit = function () { - _super.prototype.afterInit.call(this); - var options = this.options; - var ranges = options.data.map(function (d) { return d.ranges; }); - var targets = options.data.map(function (d) { return d.targets; }); - this.bulletRect = new _component_bulletRect__WEBPACK_IMPORTED_MODULE_8__["default"](this.view, { - ranges: ranges, - rangeMax: options.rangeMax, - yField: options.yField, - rangeSize: options.rangeSize, - rangeColors: options.rangeColors || [], - axis: options.axis, - }); - this.bulletTarget = new _component_bulletTarget__WEBPACK_IMPORTED_MODULE_9__["default"](this.view, { - targets: targets, - yField: options.yField, - markerSize: options.markerSize, - markerColors: options.markerColors || [], - markerStyle: options.markerStyle, - }); - }; - BulletLayer.prototype.geometryParser = function (dim, type) { - if (dim === 'g2') { - return G2_GEOM_MAP[type]; - } - return PLOT_GEOM_MAP[type]; - }; - BulletLayer.prototype.coord = function () { - this.setConfig('coordinate', { - actions: [['transpose']], - }); - }; - /** 自定义子弹图图例 */ - BulletLayer.prototype.legend = function () { - var options = this.options; - var markerColor = options.markerStyle.fill; - var measureColors = options.measureColors || this.theme.colors; - var items = [ - { - name: '实际进度', - value: '实际进度', - marker: { - symbol: 'square', - style: { - fill: measureColors[0], - }, - }, - }, - { - name: '目标值', - value: '目标值', - marker: { - symbol: 'line', - style: { - stroke: markerColor, - lineWidth: 2, - }, - }, - }, - ]; - var legendOptions = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ custom: true, position: 'bottom', items: items }, options.legend); - // @ts-ignore - this.setConfig('legends', legendOptions); - }; - BulletLayer.prototype.addGeometry = function () { - var options = this.options; - var bullet = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_6__["getGeom"])('interval', 'main', { - positionFields: [options.xField, options.yField], - plot: this, - }); - bullet.adjust = [ - { - type: 'stack', - }, - ]; - if (options.label) { - bullet.label = this.extractLabel(); - } - this.bullet = bullet; - this.setConfig('geometry', bullet); - }; - BulletLayer.prototype.parseEvents = function (eventParser) { - _super.prototype.parseEvents.call(this, _event__WEBPACK_IMPORTED_MODULE_2__); - }; - BulletLayer.prototype.extractLabel = function () { - var options = this.options; - var label = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, options.label); - if (label.visible === false) { - return false; - } - var labelConfig = Object(_components_factory__WEBPACK_IMPORTED_MODULE_5__["getComponent"])('label', Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ plot: this, labelType: 'barLabel', fields: [options.yField] }, label)); - return labelConfig; - }; - BulletLayer.prototype.adjustOptions = function (options) { - options.barSize = options.measureSize || 12; - this.adjustYAxisOptions(options); - }; - BulletLayer.prototype.adjustYAxisOptions = function (options) { - var values = []; - options.data.forEach(function (d) { return values.push(d.measures.reduce(function (a, b) { return a + b; }, 0)); }); - values.push(options.rangeMax); - options.yAxis.max = Math.max.apply([], values); - }; - BulletLayer.prototype.processData = function (dataOptions) { - var options = this.options; - var data = []; - dataOptions.forEach(function (dataItem, dataIdx) { - var _a; - for (var valueIdx = 0; valueIdx < dataItem.measures.length; valueIdx += 1) { - var value = dataItem.measures[valueIdx]; - var xField = dataItem.title || "" + dataIdx; - data.push((_a = {}, - _a[options.xField] = xField, - _a[options.yField] = value, - _a[options.stackField] = "" + valueIdx, - _a)); - } - }); - return data; - }; - return BulletLayer; -}(_base_view_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (BulletLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_7__["registerPlotType"])('bullet', BulletLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/bullet/theme.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/bullet/theme.js ***! - \*************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme */ "./node_modules/@antv/g2plot/esm/theme/index.js"); - -var BULLET_ACTIVE_STYLE = function (style) { - var opacity = style.opacity || 1; - return { opacity: opacity * 0.5, lineWidth: 0 }; -}; -var BULLET_DISABLE_STYLE = function (style) { - var opacity = style.opacity || 1; - return { opacity: opacity * 0.5 }; -}; -Object(_theme__WEBPACK_IMPORTED_MODULE_0__["registerTheme"])('bullet', { - columnStyle: { - normal: {}, - active: BULLET_ACTIVE_STYLE, - disable: BULLET_DISABLE_STYLE, - selected: {}, - }, -}); -//# sourceMappingURL=theme.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/calendar/constant.js": -/*!******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/calendar/constant.js ***! - \******************************************************************/ -/*! exports provided: DAY_FIELD, WEEK_FIELD, DATE_FIELD, IS_MONTH_CENTER_FIELD, FORMATTER, MONTHS, WEEKS */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DAY_FIELD", function() { return DAY_FIELD; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WEEK_FIELD", function() { return WEEK_FIELD; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DATE_FIELD", function() { return DATE_FIELD; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IS_MONTH_CENTER_FIELD", function() { return IS_MONTH_CENTER_FIELD; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FORMATTER", function() { return FORMATTER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MONTHS", function() { return MONTHS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WEEKS", function() { return WEEKS; }); -/** - * 当前一周中的第几天(周日 = 0) - */ -var DAY_FIELD = '$$day$$'; -/** - * 当前是一年中的第几周 - */ -var WEEK_FIELD = '$$week$$'; -/** - * 日期字段,Date 类型 - */ -var DATE_FIELD = '$$date$$'; -/** - * 数据处理阶段,标记这周是否是当月中间 - */ -var IS_MONTH_CENTER_FIELD = '$$is_month_center$$'; -/** - * 格式化日期 - */ -var FORMATTER = 'YYYY-MM-DD'; -/** - * 月份枚举 - */ -var MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; -/** - * 周枚举 - */ -var WEEKS = ['S', 'M', 'T', 'W', 'T', 'F', 'S']; -//# sourceMappingURL=constant.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/calendar/event.js": -/*!***************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/calendar/event.js ***! - \***************************************************************/ -/*! exports provided: EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["onEvent"]; }); - - - -var componentMap = { - Rect: 'polygon', -}; -var SHAPE_EVENT_MAP = Object(_util_event__WEBPACK_IMPORTED_MODULE_1__["getEventMap"])(componentMap); -Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(_util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"], SHAPE_EVENT_MAP); - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/calendar/index.js": -/*!***************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/calendar/index.js ***! - \***************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/calendar/layer.js"); -/* harmony import */ var _shape__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./shape */ "./node_modules/@antv/g2plot/esm/plots/calendar/shape.js"); - - - - -// 注册日历图的自定义 shape - -/** - * 日历图 - */ -var Calendar = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Calendar, _super); - function Calendar() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * 复写父类方法 - * @param props - */ - Calendar.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'calendar'; - _super.prototype.createLayers.call(this, layerProps); - }; - Calendar.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return Calendar; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Calendar); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/calendar/layer.js": -/*!***************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/calendar/layer.js ***! - \***************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var fecha__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! fecha */ "./node_modules/fecha/src/fecha.js"); -/* harmony import */ var _base_view_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/view-layer */ "./node_modules/@antv/g2plot/esm/base/view-layer.js"); -/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constant */ "./node_modules/@antv/g2plot/esm/plots/calendar/constant.js"); -/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./util */ "./node_modules/@antv/g2plot/esm/plots/calendar/util.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _util_date__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../util/date */ "./node_modules/@antv/g2plot/esm/util/date.js"); -/* harmony import */ var _components_factory__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../components/factory */ "./node_modules/@antv/g2plot/esm/components/factory.js"); -/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./event */ "./node_modules/@antv/g2plot/esm/plots/calendar/event.js"); - - - - - - - - - - -/** - * 日历图 - */ -var CalendarLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CalendarLayer, _super); - function CalendarLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'calendar'; - return _this; - } - CalendarLayer.getDefaultOptions = function () { - var _a; - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - xAxis: { - line: { - visible: false, - }, - grid: { - visible: false, - }, - tickLine: { - visible: false, - }, - label: { - visible: true, - autoRotate: false, - autoHide: false, - }, - }, - yAxis: { - line: { - visible: false, - }, - grid: { - visible: false, - }, - tickLine: { - visible: false, - }, - label: { - visible: true, - autoRotate: false, - autoHide: false, - }, - }, - legend: { visible: false }, - meta: (_a = {}, - _a[_constant__WEBPACK_IMPORTED_MODULE_4__["DAY_FIELD"]] = { - type: 'cat', - alias: 'Day', - values: [0, 1, 2, 3, 4, 5, 6], - }, - _a[_constant__WEBPACK_IMPORTED_MODULE_4__["WEEK_FIELD"]] = { - type: 'cat', - alias: 'Month', - }, - _a), - tooltip: { - visible: true, - showTitle: true, - showCrosshairs: false, - showMarkers: false, - title: 'date', - }, - }); - }; - /** - * 复写父类的数据处理类,主要完成: - * 1. 生成 polygon 的 x y field(虚拟的,无需用户传入) - * - * @param data - */ - CalendarLayer.prototype.processData = function (data) { - var dateField = this.options.dateField; - var dateRange = this.options.dateRange; - // 给与默认值是当前这一年 - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNil"])(dateRange)) { - var dates = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["map"])(data, function (datum) { return fecha__WEBPACK_IMPORTED_MODULE_2__["default"].parse("" + datum[dateField], _constant__WEBPACK_IMPORTED_MODULE_4__["FORMATTER"]); }); - dateRange = Object(_util_date__WEBPACK_IMPORTED_MODULE_7__["getDateRange"])(dates); - } - return Object(_util__WEBPACK_IMPORTED_MODULE_5__["generateCalendarData"])(data, dateRange, dateField); - }; - CalendarLayer.prototype.addGeometry = function () { - var _a = this.options, valueField = _a.valueField, colors = _a.colors, tooltip = _a.tooltip; - var polygonConfig = { - type: 'polygon', - position: { - fields: [_constant__WEBPACK_IMPORTED_MODULE_4__["WEEK_FIELD"], _constant__WEBPACK_IMPORTED_MODULE_4__["DAY_FIELD"]], - }, - shape: { - values: ['calendar-polygon'], - }, - color: { - fields: [valueField], - values: colors, - }, - label: this.extractLabel(), - }; - if (tooltip && (tooltip.fields || tooltip.formatter)) { - this.geometryTooltip(polygonConfig); - } - this.setConfig('geometry', polygonConfig); - }; - CalendarLayer.prototype.geometryTooltip = function (geomConfig) { - geomConfig.tooltip = {}; - var tooltipOptions = this.options.tooltip; - if (tooltipOptions.fields) { - geomConfig.tooltip.fields = tooltipOptions.fields; - } - if (tooltipOptions.formatter) { - geomConfig.tooltip.callback = tooltipOptions.formatter; - if (!tooltipOptions.fields) { - geomConfig.tooltip.fields = [_constant__WEBPACK_IMPORTED_MODULE_4__["WEEK_FIELD"], _constant__WEBPACK_IMPORTED_MODULE_4__["DAY_FIELD"]]; - } - } - }; - CalendarLayer.prototype.extractLabel = function () { - var props = this.options; - var label = props.label; - if (label && label.visible === false) { - return false; - } - var valueField = this.options.valueField; - return Object(_components_factory__WEBPACK_IMPORTED_MODULE_8__["getComponent"])('label', Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ plot: this, fields: [valueField], position: 'top', offset: 0 }, label)); - }; - /** - * 写入坐标系配置,默认增加镜像 - */ - CalendarLayer.prototype.coord = function () { - // 默认做镜像处理 - var coordinateConfig = { - type: 'rect', - cfg: {}, - actions: [['reflect', 'y']], - }; - this.setConfig('coordinate', coordinateConfig); - }; - /** - * 无需 geometry parser,直接使用 polygon 即可 - */ - CalendarLayer.prototype.geometryParser = function (dim, type) { - return ''; - }; - CalendarLayer.prototype.axis = function () { - var xAxis_parser = Object(_components_factory__WEBPACK_IMPORTED_MODULE_8__["getComponent"])('axis', { - plot: this, - dim: 'x', - }); - var yAxis_parser = Object(_components_factory__WEBPACK_IMPORTED_MODULE_8__["getComponent"])('axis', { - plot: this, - dim: 'y', - }); - var axesConfig = {}; - axesConfig[_constant__WEBPACK_IMPORTED_MODULE_4__["WEEK_FIELD"]] = xAxis_parser; - axesConfig[_constant__WEBPACK_IMPORTED_MODULE_4__["DAY_FIELD"]] = yAxis_parser; - /** 存储坐标轴配置项到config */ - this.setConfig('axes', axesConfig); - }; - CalendarLayer.prototype.scale = function () { - _super.prototype.scale.call(this); - var monthWeek = Object(_util__WEBPACK_IMPORTED_MODULE_5__["getMonthCenterWeek"])(this.options.dateRange); - // 拿出 scale 二次加工,主要是配置 x y 中的标题显示 - var scales = this.config.scales; - var _a = this.options, _b = _a.weeks, weeks = _b === void 0 ? _constant__WEBPACK_IMPORTED_MODULE_4__["WEEKS"] : _b, _c = _a.months, months = _c === void 0 ? _constant__WEBPACK_IMPORTED_MODULE_4__["MONTHS"] : _c; - var x = scales[_constant__WEBPACK_IMPORTED_MODULE_4__["WEEK_FIELD"]]; - var y = scales[_constant__WEBPACK_IMPORTED_MODULE_4__["DAY_FIELD"]]; - // 1. 设置 formatter - x.formatter = function (v) { - var m = monthWeek[v]; - return m !== undefined ? months[m] : ''; - }; - y.formatter = function (v) { return weeks[v] || ''; }; - // 2. 设置 alias - var _d = this.options, xAxis = _d.xAxis, yAxis = _d.yAxis; - x.alias = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(xAxis, ['title', 'text'], x.alias); - y.alias = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(yAxis, ['title', 'text'], y.alias); - this.setConfig('scales', scales); - }; - CalendarLayer.prototype.parseEvents = function (eventParser) { - _super.prototype.parseEvents.call(this, _event__WEBPACK_IMPORTED_MODULE_9__); - }; - return CalendarLayer; -}(_base_view_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (CalendarLayer); -// 注册到池子中 -Object(_base_global__WEBPACK_IMPORTED_MODULE_6__["registerPlotType"])('calendar', CalendarLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/calendar/shape.js": -/*!***************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/calendar/shape.js ***! - \***************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _antv_g2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/g2 */ "./node_modules/@antv/g2/dist/g2.min.js"); -/* harmony import */ var _antv_g2__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_antv_g2__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constant */ "./node_modules/@antv/g2plot/esm/plots/calendar/constant.js"); -/* harmony import */ var _util_date__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/date */ "./node_modules/@antv/g2plot/esm/util/date.js"); - - - - - -/** - * 注册自定义日历图的 shape - * code from https://g2.antv.vision/zh/examples/heatmap/heatmap#calendar-horizontal - */ -Object(_antv_g2__WEBPACK_IMPORTED_MODULE_2__["registerShape"])('polygon', 'calendar-polygon', { - draw: function (cfg, container) { - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isEmpty"])(cfg.points)) { - var points = cfg.points; - // rect path - var path = [ - ['M', points[0].x, points[0].y], - ['L', points[1].x, points[1].y], - ['L', points[2].x, points[2].y], - ['L', points[3].x, points[3].y], - ['Z'], - ]; - path = this.parsePath(path); - var attrs = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ stroke: '#fff', lineWidth: 1, fill: cfg.color }, cfg.style), { path: path }); - var polygon = container.addShape('path', { - attrs: attrs, - }); - var date = cfg.data[_constant__WEBPACK_IMPORTED_MODULE_3__["DATE_FIELD"]]; - if (Object(_util_date__WEBPACK_IMPORTED_MODULE_4__["isLastWeekOfMonth"])(date)) { - var linePath = [ - ['M', points[2].x, points[2].y], - ['L', points[3].x, points[3].y], - ]; - // 最后一周的多边形添加右侧边框 - container.addShape('path', { - zIndex: 1, - attrs: { - path: this.parsePath(linePath), - lineWidth: 1, - stroke: '#404040', - }, - }); - if (Object(_util_date__WEBPACK_IMPORTED_MODULE_4__["isLastDayOfMonth"])(date)) { - container.addShape('path', { - zIndex: 1, - attrs: { - path: this.parsePath([ - ['M', points[1].x, points[1].y], - ['L', points[2].x, points[2].y], - ]), - lineWidth: 1, - stroke: '#404040', - }, - }); - } - } - container.sort(); - return polygon; - } - }, -}); -//# sourceMappingURL=shape.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/calendar/util.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/calendar/util.js ***! - \**************************************************************/ -/*! exports provided: generateCalendarData, getMonthCenterWeek */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generateCalendarData", function() { return generateCalendarData; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMonthCenterWeek", function() { return getMonthCenterWeek; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var fecha__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fecha */ "./node_modules/fecha/src/fecha.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constant */ "./node_modules/@antv/g2plot/esm/plots/calendar/constant.js"); -/* harmony import */ var _util_date__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/date */ "./node_modules/@antv/g2plot/esm/util/date.js"); - - - - - -/** - * 解析日期 - * @param dateRange - */ -function parseDateRange(dateRange) { - var _a; - var from = dateRange[0], to = dateRange[1]; - var fromDate = fecha__WEBPACK_IMPORTED_MODULE_1__["default"].parse(from, _constant__WEBPACK_IMPORTED_MODULE_3__["FORMATTER"]); - var toDate = fecha__WEBPACK_IMPORTED_MODULE_1__["default"].parse(to, _constant__WEBPACK_IMPORTED_MODULE_3__["FORMATTER"]); - // 交换顺序 - if (fromDate > toDate) { - _a = [fromDate, toDate], toDate = _a[0], fromDate = _a[1]; - } - return [fromDate, toDate]; -} -/** - * 根据 range 补齐日历图的数据 - * @param data 传入数据 - * @param dateRange 日期区间 - * @param dateField 日期字段 - */ -function generateCalendarData(data, dateRange, dateField) { - var all = []; - var _a = parseDateRange(dateRange), fromDate = _a[0], toDate = _a[1]; - // copy 一份 - var curr = new Date(fromDate); - var _loop_1 = function () { - var _a; - var dateString = fecha__WEBPACK_IMPORTED_MODULE_1__["default"].format(curr, _constant__WEBPACK_IMPORTED_MODULE_3__["FORMATTER"]); - // 找到对应的数据 - var datum = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["find"])(data, function (datum) { return datum[dateField] === dateString; }); - all.push(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])((_a = {}, _a[_constant__WEBPACK_IMPORTED_MODULE_3__["DAY_FIELD"]] = Object(_util_date__WEBPACK_IMPORTED_MODULE_4__["getDay"])(curr), _a[_constant__WEBPACK_IMPORTED_MODULE_3__["WEEK_FIELD"]] = "" + Object(_util_date__WEBPACK_IMPORTED_MODULE_4__["getWeek"])(curr), _a[dateField] = dateString, _a[_constant__WEBPACK_IMPORTED_MODULE_3__["DATE_FIELD"]] = new Date(curr), _a), datum)); - // 向前移动一天 - Object(_util_date__WEBPACK_IMPORTED_MODULE_4__["advanceBy"])(curr, _util_date__WEBPACK_IMPORTED_MODULE_4__["DAY_MS"]); - }; - while (curr <= toDate) { - _loop_1(); - } - return all; -} -/** - * 计算每个月的中间周。 - */ -function getMonthCenterWeek(dateRange) { - var _a = parseDateRange(dateRange), fromDate = _a[0], toDate = _a[1]; - var monthWeekMap = new Map(); - function append(current) { - var month = current.getMonth(); // 从 0 开始 - var week = Object(_util_date__WEBPACK_IMPORTED_MODULE_4__["getWeek"])(current); - if (!monthWeekMap.has(month)) { - monthWeekMap.set(month, []); - } - monthWeekMap.get(month).push(week); - } - // copy 一份 - var curr = new Date(fromDate); - while (curr <= toDate) { - // 设置到 map 中 - append(curr); - // 向前移动 7 天(一周) - Object(_util_date__WEBPACK_IMPORTED_MODULE_4__["advanceBy"])(curr, _util_date__WEBPACK_IMPORTED_MODULE_4__["DAY_MS"] * 7); - } - // 增加最后一个日期的计算 - if (toDate < curr) { - append(toDate); - } - // 处理数据,返回结果 - var result = {}; // week -> month - monthWeekMap.forEach(function (v, k) { - var w = Math.ceil((Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["head"])(v) + Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["last"])(v)) / 2); // 取平均值 - result[w] = k; - }); - return result; -} -//# sourceMappingURL=util.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/column/apply-responsive/axis.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/column/apply-responsive/axis.js ***! - \*****************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return responsiveAxis; }); -/* harmony import */ var _util_responsive_apply_axis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/responsive/apply/axis */ "./node_modules/@antv/g2plot/esm/util/responsive/apply/axis.js"); - -function responsiveAxis(layer) { - var responsiveTheme = layer.getResponsiveTheme(); - var canvas = layer.canvas; - // x-axis - var x_responsiveAxis = new _util_responsive_apply_axis__WEBPACK_IMPORTED_MODULE_0__["default"]({ - plot: layer, - responsiveTheme: responsiveTheme, - dim: 'x', - }); - // y-axis - var y_responsiveAxis = new _util_responsive_apply_axis__WEBPACK_IMPORTED_MODULE_0__["default"]({ - plot: layer, - responsiveTheme: responsiveTheme, - dim: 'y', - }); - canvas.draw(); -} -//# sourceMappingURL=axis.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/column/apply-responsive/index.js": -/*!******************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/column/apply-responsive/index.js ***! - \******************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _axis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./axis */ "./node_modules/@antv/g2plot/esm/plots/column/apply-responsive/axis.js"); -/* harmony import */ var _label__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./label */ "./node_modules/@antv/g2plot/esm/plots/column/apply-responsive/label.js"); - - -var preRenderResponsive = []; -var afterRenderResponsive = [ - { name: 'responsiveAxis', method: _axis__WEBPACK_IMPORTED_MODULE_0__["default"] }, - { name: 'responsiveLabel', method: _label__WEBPACK_IMPORTED_MODULE_1__["default"] }, -]; -/* harmony default export */ __webpack_exports__["default"] = ({ - preRender: preRenderResponsive, - afterRender: afterRenderResponsive, -}); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/column/apply-responsive/label.js": -/*!******************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/column/apply-responsive/label.js ***! - \******************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return responsivePointLabel; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _util_responsive_apply_label__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/responsive/apply/label */ "./node_modules/@antv/g2plot/esm/util/responsive/apply/label.js"); - - -var ApplyResponsiveColumnLabel = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ApplyResponsiveColumnLabel, _super); - function ApplyResponsiveColumnLabel() { - return _super !== null && _super.apply(this, arguments) || this; - } - ApplyResponsiveColumnLabel.prototype.getType = function () { - if (this.plot.column.label) { - if (!this.plot.column.label.position || this.plot.column.label.position === 'top') { - return 'top'; - } - } - return 'inner'; - }; - return ApplyResponsiveColumnLabel; -}(_util_responsive_apply_label__WEBPACK_IMPORTED_MODULE_1__["default"])); -function responsivePointLabel(layer) { - var responsiveTheme = layer.getResponsiveTheme(); - var applyResponsiveColumnLabel = new ApplyResponsiveColumnLabel({ - plot: layer, - responsiveTheme: responsiveTheme, - }); -} -//# sourceMappingURL=label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/column/apply-responsive/theme.js": -/*!******************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/column/apply-responsive/theme.js ***! - \******************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _util_responsive_theme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/responsive/theme */ "./node_modules/@antv/g2plot/esm/util/responsive/theme.js"); - -/** 组装theme */ -var columnTheme = { - label: { - top: { - constraints: [{ name: 'elementCollision' }], - rules: { - elementCollision: [ - { name: 'nodeJitterUpward' }, - { - name: 'nodesResamplingByState', - option: { - keep: ['min', 'max', 'median'], - }, - }, - { - name: 'textHide', - }, - ], - }, - }, - }, -}; -Object(_util_responsive_theme__WEBPACK_IMPORTED_MODULE_0__["registerResponsiveTheme"])('column', columnTheme); -//# sourceMappingURL=theme.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/column/component/label.js": -/*!***********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/column/component/label.js ***! - \***********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/color */ "./node_modules/@antv/g2plot/esm/util/color.js"); -/* harmony import */ var _util_bbox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/bbox */ "./node_modules/@antv/g2plot/esm/util/bbox.js"); - - - -var ColumnLabel = /** @class */ (function () { - function ColumnLabel(cfg) { - this.destroyed = false; - this.view = cfg.view; - this.plot = cfg.plot; - var defaultOptions = this.getDefaultOptions(); - this.options = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])(defaultOptions, cfg, {}); - this.init(); - } - ColumnLabel.prototype.init = function () { - var _this = this; - this.container = this.getGeometry().labelsContainer; - this.view.on('beforerender', function () { - _this.clear(); - _this.plot.canvas.draw(); - }); - }; - ColumnLabel.prototype.render = function () { - var _this = this; - var _a = this.getGeometry(), elements = _a.elements, coordinate = _a.coordinate; - this.coord = coordinate; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(elements, function (ele) { - var shape = ele.shape; - var style = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(_this.options.style); - var value = _this.getValue(shape); - var position = _this.getPosition(shape, value); - var textAlign = _this.getTextAlign(value); - var textBaseline = _this.getTextBaseLine(value); - var color = _this.getTextColor(shape); - if (_this.options.position !== 'top' && _this.options.adjustColor && color !== 'black') { - style.stroke = null; - } - var formatter = _this.options.formatter; - var content = formatter ? formatter(value) : value; - var label = _this.container.addShape('text', { - attrs: Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])({}, style, { - x: position.x, - y: position.y, - text: content, - fill: color, - textAlign: textAlign, - textBaseline: textBaseline, - }), - name: 'label', - }); - _this.adjustLabel(label, shape); - }); - }; - ColumnLabel.prototype.clear = function () { - if (this.container) { - this.container.clear(); - } - }; - ColumnLabel.prototype.hide = function () { - this.container.set('visible', false); - this.plot.canvas.draw(); - }; - ColumnLabel.prototype.show = function () { - this.container.set('visible', true); - this.plot.canvas.draw(); - }; - ColumnLabel.prototype.destroy = function () { - if (this.container) { - this.container.remove(); - } - this.destroyed = true; - }; - ColumnLabel.prototype.getBBox = function () { }; - ColumnLabel.prototype.getPosition = function (shape, value) { - var bbox = this.getShapeBbox(shape); - var minX = bbox.minX, maxX = bbox.maxX, minY = bbox.minY, maxY = bbox.maxY, height = bbox.height, width = bbox.width; - var _a = this.options, offsetX = _a.offsetX, offsetY = _a.offsetY, position = _a.position; - var x = minX + width / 2 + offsetX; - var dir = value > 0 ? -1 : 1; - var y; - if (position === 'top') { - var root = value > 0 ? minY : maxY; - y = root + (offsetY + 8) * dir; - } - else if (position === 'bottom') { - y = maxY + (offsetY + 8) * dir; - } - else { - y = minY + height / 2 + offsetY; - } - return { x: x, y: y }; - }; - ColumnLabel.prototype.getTextColor = function (shape) { - if (this.options.adjustColor && this.options.position !== 'top') { - var shapeColor = shape.attr('fill'); - var shapeOpacity = shape.attr('opacity') ? shape.attr('opacity') : 1; - var rgb = Object(_util_color__WEBPACK_IMPORTED_MODULE_1__["rgb2arr"])(shapeColor); - var gray = Math.round(rgb[0] * 0.299 + rgb[1] * 0.587 + rgb[2] * 0.114) / shapeOpacity; - var colorBand = [ - { from: 0, to: 85, color: 'white' }, - { from: 85, to: 170, color: '#F6F6F6' }, - { from: 170, to: 255, color: 'black' }, - ]; - var reflect = Object(_util_color__WEBPACK_IMPORTED_MODULE_1__["mappingColor"])(colorBand, gray); - return reflect; - } - var defaultColor = this.options.style.fill; - return defaultColor; - }; - ColumnLabel.prototype.getTextAlign = function (value) { - return 'center'; - }; - ColumnLabel.prototype.getTextBaseLine = function (value) { - var position = this.options.position; - return position === 'middle' ? 'middle' : 'bottom'; - }; - ColumnLabel.prototype.getValue = function (shape) { - var data = shape.get('origin').data; - return data[this.plot.options.yField]; - }; - ColumnLabel.prototype.adjustLabel = function (label, shape) { - if (this.options.adjustPosition && this.options.position !== 'top') { - var labelRange = label.getBBox(); - var shapeRange = shape.getBBox(); - if (shapeRange.height <= labelRange.height) { - var yPosition = shapeRange.minY + this.options.offsetY - 8; - label.attr('y', yPosition); - label.attr('textBaseline', 'bottom'); - label.attr('fill', this.options.style.fill); - } - } - }; - ColumnLabel.prototype.getDefaultOptions = function () { - var theme = this.plot.theme; - var labelStyle = theme.label.style; - return { - offsetX: 0, - offsetY: 0, - style: Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(labelStyle), - adjustPosition: true, - }; - }; - ColumnLabel.prototype.getShapeBbox = function (shape) { - var _this = this; - var points = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(shape.get('origin').points, function (p) { - points.push(_this.coord.convertPoint(p)); - }); - var bbox = new _util_bbox__WEBPACK_IMPORTED_MODULE_2__["default"](points[0].x, points[1].y, Math.abs(points[2].x - points[0].x), Math.abs(points[0].y - points[1].y)); - return bbox; - }; - ColumnLabel.prototype.getGeometry = function () { - var geometries = this.view.geometries; - var lineGeom; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(geometries, function (geom) { - if (geom.type === 'interval') { - lineGeom = geom; - } - }); - return lineGeom; - }; - return ColumnLabel; -}()); -/* harmony default export */ __webpack_exports__["default"] = (ColumnLabel); -//# sourceMappingURL=label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/column/event.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/column/event.js ***! - \*************************************************************/ -/*! exports provided: EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["onEvent"]; }); - - - -var componentMap = { - Column: 'interval', -}; -var SHAPE_EVENT_MAP = Object(_util_event__WEBPACK_IMPORTED_MODULE_1__["getEventMap"])(componentMap); -Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(_util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"], SHAPE_EVENT_MAP); - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/column/index.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/column/index.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/column/layer.js"); - - - - -var Column = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Column, _super); - function Column() { - return _super !== null && _super.apply(this, arguments) || this; - } - Column.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'column'; - _super.prototype.createLayers.call(this, layerProps); - }; - Column.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return Column; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Column); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/column/layer.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/column/layer.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _base_view_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/view-layer */ "./node_modules/@antv/g2plot/esm/base/view-layer.js"); -/* harmony import */ var _geoms_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../geoms/factory */ "./node_modules/@antv/g2plot/esm/geoms/factory.js"); -/* harmony import */ var _components_conversion_tag__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../components/conversion-tag */ "./node_modules/@antv/g2plot/esm/components/conversion-tag.js"); -/* harmony import */ var _util_scale__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../util/scale */ "./node_modules/@antv/g2plot/esm/util/scale.js"); -/* harmony import */ var _apply_responsive__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./apply-responsive */ "./node_modules/@antv/g2plot/esm/plots/column/apply-responsive/index.js"); -/* harmony import */ var _apply_responsive_theme__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./apply-responsive/theme */ "./node_modules/@antv/g2plot/esm/plots/column/apply-responsive/theme.js"); -/* harmony import */ var _component_label__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./component/label */ "./node_modules/@antv/g2plot/esm/plots/column/component/label.js"); -/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./event */ "./node_modules/@antv/g2plot/esm/plots/column/event.js"); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./theme */ "./node_modules/@antv/g2plot/esm/plots/column/theme.js"); - - - - - - - - - - - - -var G2_GEOM_MAP = { - column: 'interval', -}; -var PLOT_GEOM_MAP = { - interval: 'column', -}; -var BaseColumnLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(BaseColumnLayer, _super); - function BaseColumnLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'column'; - return _this; - } - BaseColumnLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - xAxis: { - visible: true, - tickLine: { - visible: false, - }, - title: { - visible: true, - }, - }, - yAxis: { - nice: true, - title: { - visible: true, - }, - label: { - visible: true, - }, - grid: { - visible: true, - }, - }, - tooltip: { - visible: true, - shared: true, - showCrosshairs: false, - showMarkers: false, - }, - label: { - visible: false, - position: 'top', - adjustColor: true, - }, - legend: { - visible: true, - position: 'top-left', - }, - interactions: [ - { type: 'tooltip' }, - { type: 'active-region' }, - { type: 'legend-active' }, - { type: 'legend-filter' }, - ], - conversionTag: { - visible: false, - }, - }); - }; - BaseColumnLayer.prototype.beforeInit = function () { - _super.prototype.beforeInit.call(this); - /** 响应式图形 */ - if (this.options.responsive && this.options.padding !== 'auto') { - this.applyResponsive('preRender'); - } - }; - BaseColumnLayer.prototype.afterRender = function () { - var props = this.options; - this.renderLabel(); - /** 响应式 */ - if (this.options.responsive && this.options.padding !== 'auto') { - this.applyResponsive('afterRender'); - } - if (props.conversionTag.visible) { - this.conversionTag = new _components_conversion_tag__WEBPACK_IMPORTED_MODULE_5__["default"](Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ view: this.view, field: props.yField, transpose: true, animation: props.animation === false ? false : true }, props.conversionTag)); - } - _super.prototype.afterRender.call(this); - }; - BaseColumnLayer.prototype.geometryParser = function (dim, type) { - if (dim === 'g2') { - return G2_GEOM_MAP[type]; - } - return PLOT_GEOM_MAP[type]; - }; - BaseColumnLayer.prototype.processData = function (originData) { - var xField = this.options.xField; - var processedData = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(originData, function (data) { - var d = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(data); - d[xField] = d[xField].toString(); - processedData.push(d); - }); - return processedData; - }; - BaseColumnLayer.prototype.scale = function () { - var options = this.options; - var scales = {}; - /** 配置x-scale */ - scales[options.xField] = { type: 'cat' }; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(options, 'xAxis')) { - Object(_util_scale__WEBPACK_IMPORTED_MODULE_6__["extractScale"])(scales[options.xField], options.xAxis); - } - /** 配置y-scale */ - scales[options.yField] = {}; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(options, 'yAxis')) { - Object(_util_scale__WEBPACK_IMPORTED_MODULE_6__["extractScale"])(scales[options.yField], options.yAxis); - } - this.setConfig('scales', scales); - _super.prototype.scale.call(this); - }; - BaseColumnLayer.prototype.coord = function () { }; - BaseColumnLayer.prototype.adjustColumn = function (column) { - return; - }; - BaseColumnLayer.prototype.addGeometry = function () { - var options = this.options; - var column = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_4__["getGeom"])('interval', 'main', { - positionFields: [options.xField, options.yField], - plot: this, - }); - if (options.conversionTag.visible) { - this.setConfig('theme', Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, this.getTheme(), { - columnWidthRatio: 1 / 3, - })); - } - this.adjustColumn(column); - this.column = column; - if (options.tooltip && (options.tooltip.fields || options.tooltip.formatter)) { - this.geometryTooltip(); - } - this.setConfig('geometry', column); - }; - BaseColumnLayer.prototype.geometryTooltip = function () { - this.column.tooltip = {}; - var tooltipOptions = this.options.tooltip; - if (tooltipOptions.fields) { - this.column.tooltip.fields = tooltipOptions.fields; - } - if (tooltipOptions.formatter) { - this.column.tooltip.callback = tooltipOptions.formatter; - if (!tooltipOptions.fields) { - this.column.tooltip.fields = [this.options.xField, this.options.yField]; - if (this.options.colorField) { - this.column.tooltip.fields.push(this.options.colorField); - } - } - } - }; - BaseColumnLayer.prototype.animation = function () { - _super.prototype.animation.call(this); - if (this.options.animation === false) { - /** 关闭动画 */ - this.column.animate = false; - } - }; - BaseColumnLayer.prototype.parseEvents = function (eventParser) { - _super.prototype.parseEvents.call(this, _event__WEBPACK_IMPORTED_MODULE_10__); - }; - BaseColumnLayer.prototype.renderLabel = function () { - var scales = this.config.scales; - var yField = this.options.yField; - var scale = scales[yField]; - if (this.options.label && this.options.label.visible) { - var label = new _component_label__WEBPACK_IMPORTED_MODULE_9__["default"](Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ view: this.view, plot: this, formatter: scale.formatter }, this.options.label)); - label.render(); - } - }; - BaseColumnLayer.prototype.applyResponsive = function (stage) { - var _this = this; - var methods = _apply_responsive__WEBPACK_IMPORTED_MODULE_7__["default"][stage]; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(methods, function (r) { - var responsive = r; - responsive.method(_this); - }); - }; - return BaseColumnLayer; -}(_base_view_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (BaseColumnLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('column', BaseColumnLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/column/theme.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/column/theme.js ***! - \*************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme */ "./node_modules/@antv/g2plot/esm/theme/index.js"); - -var COLUMN_ACTIVE_STYLE = function (style) { - var opacity = style.opacity || 1; - return { opacity: opacity * 0.5 }; -}; -var COLUMN_DISABLE_STYLE = function (style) { - var opacity = style.opacity || 1; - return { opacity: opacity * 0.5, fillOpacity: opacity * 0.5 }; -}; -Object(_theme__WEBPACK_IMPORTED_MODULE_0__["registerTheme"])('column', { - columnStyle: { - normal: {}, - active: COLUMN_ACTIVE_STYLE, - disable: COLUMN_DISABLE_STYLE, - selected: { lineWidth: 1, stroke: 'black' }, - }, -}); -//# sourceMappingURL=theme.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/compatiblePlots/group-bar/index.js": -/*!********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/compatiblePlots/group-bar/index.js ***! - \********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _grouped_bar_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../grouped-bar/layer */ "./node_modules/@antv/g2plot/esm/plots/grouped-bar/layer.js"); - - - - - -var GroupBar = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GroupBar, _super); - function GroupBar() { - return _super !== null && _super.apply(this, arguments) || this; - } - GroupBar.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'groupedBar'; - _super.prototype.createLayers.call(this, layerProps); - warning__WEBPACK_IMPORTED_MODULE_3___default()(false, 'Please use "GroupedBar" instead of "GroupBar" which was not recommended.'); - }; - GroupBar.getDefaultOptions = _grouped_bar_layer__WEBPACK_IMPORTED_MODULE_4__["default"].getDefaultOptions; - return GroupBar; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (GroupBar); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/compatiblePlots/group-column/index.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/compatiblePlots/group-column/index.js ***! - \***********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _grouped_column_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../grouped-column/layer */ "./node_modules/@antv/g2plot/esm/plots/grouped-column/layer.js"); - - - - - -var GroupColumn = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GroupColumn, _super); - function GroupColumn() { - return _super !== null && _super.apply(this, arguments) || this; - } - GroupColumn.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'groupedColumn'; - _super.prototype.createLayers.call(this, layerProps); - warning__WEBPACK_IMPORTED_MODULE_3___default()(false, 'Please use "GroupedColumn" instead of "GroupColumn" which was not recommended.'); - }; - GroupColumn.getDefaultOptions = _grouped_column_layer__WEBPACK_IMPORTED_MODULE_4__["default"].getDefaultOptions; - return GroupColumn; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (GroupColumn); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/compatiblePlots/index.js": -/*!**********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/compatiblePlots/index.js ***! - \**********************************************************************/ -/*! exports provided: Ring, GroupColumn, GroupBar, PercentageStackArea, PercentageStackBar, PercentageStackColumn, StackArea, StackBar, StackColumn */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _ring__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ring */ "./node_modules/@antv/g2plot/esm/plots/compatiblePlots/ring/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Ring", function() { return _ring__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _group_column__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./group-column */ "./node_modules/@antv/g2plot/esm/plots/compatiblePlots/group-column/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupColumn", function() { return _group_column__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - -/* harmony import */ var _group_bar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./group-bar */ "./node_modules/@antv/g2plot/esm/plots/compatiblePlots/group-bar/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupBar", function() { return _group_bar__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - -/* harmony import */ var _percentage_stack_area__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./percentage-stack-area */ "./node_modules/@antv/g2plot/esm/plots/compatiblePlots/percentage-stack-area/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PercentageStackArea", function() { return _percentage_stack_area__WEBPACK_IMPORTED_MODULE_3__["default"]; }); - -/* harmony import */ var _percentage_stack_bar__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./percentage-stack-bar */ "./node_modules/@antv/g2plot/esm/plots/compatiblePlots/percentage-stack-bar/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PercentageStackBar", function() { return _percentage_stack_bar__WEBPACK_IMPORTED_MODULE_4__["default"]; }); - -/* harmony import */ var _percentage_stack_column__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./percentage-stack-column */ "./node_modules/@antv/g2plot/esm/plots/compatiblePlots/percentage-stack-column/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PercentageStackColumn", function() { return _percentage_stack_column__WEBPACK_IMPORTED_MODULE_5__["default"]; }); - -/* harmony import */ var _stack_area__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./stack-area */ "./node_modules/@antv/g2plot/esm/plots/compatiblePlots/stack-area/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackArea", function() { return _stack_area__WEBPACK_IMPORTED_MODULE_6__["default"]; }); - -/* harmony import */ var _stack_bar__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./stack-bar */ "./node_modules/@antv/g2plot/esm/plots/compatiblePlots/stack-bar/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackBar", function() { return _stack_bar__WEBPACK_IMPORTED_MODULE_7__["default"]; }); - -/* harmony import */ var _stack_column__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./stack-column */ "./node_modules/@antv/g2plot/esm/plots/compatiblePlots/stack-column/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackColumn", function() { return _stack_column__WEBPACK_IMPORTED_MODULE_8__["default"]; }); - -// 兼容 0.x的图表类型 - - - - - - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/compatiblePlots/percentage-stack-area/index.js": -/*!********************************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/compatiblePlots/percentage-stack-area/index.js ***! - \********************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _percent_stacked_area_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../percent-stacked-area/layer */ "./node_modules/@antv/g2plot/esm/plots/percent-stacked-area/layer.js"); - - - - - -var PercentageStackArea = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PercentageStackArea, _super); - function PercentageStackArea() { - return _super !== null && _super.apply(this, arguments) || this; - } - PercentageStackArea.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'percentStackedArea'; - _super.prototype.createLayers.call(this, layerProps); - warning__WEBPACK_IMPORTED_MODULE_3___default()(false, 'Please use "PercentStackedArea" instead of "PercentageStackArea" which was not recommended.'); - }; - PercentageStackArea.getDefaultOptions = _percent_stacked_area_layer__WEBPACK_IMPORTED_MODULE_4__["default"].getDefaultOptions; - return PercentageStackArea; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (PercentageStackArea); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/compatiblePlots/percentage-stack-bar/index.js": -/*!*******************************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/compatiblePlots/percentage-stack-bar/index.js ***! - \*******************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _percent_stacked_bar_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../percent-stacked-bar/layer */ "./node_modules/@antv/g2plot/esm/plots/percent-stacked-bar/layer.js"); - - - - - -var PercentageStackBar = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PercentageStackBar, _super); - function PercentageStackBar() { - return _super !== null && _super.apply(this, arguments) || this; - } - PercentageStackBar.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'percentStackedBar'; - _super.prototype.createLayers.call(this, layerProps); - warning__WEBPACK_IMPORTED_MODULE_3___default()(false, 'Please use "PercentStackedBar" instead of "PercentageStackBar" which was not recommended.'); - }; - PercentageStackBar.getDefaultOptions = _percent_stacked_bar_layer__WEBPACK_IMPORTED_MODULE_4__["default"].getDefaultOptions; - return PercentageStackBar; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (PercentageStackBar); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/compatiblePlots/percentage-stack-column/index.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/compatiblePlots/percentage-stack-column/index.js ***! - \**********************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _percent_stacked_column_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../percent-stacked-column/layer */ "./node_modules/@antv/g2plot/esm/plots/percent-stacked-column/layer.js"); - - - - - -var PercentageStackColumn = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PercentageStackColumn, _super); - function PercentageStackColumn() { - return _super !== null && _super.apply(this, arguments) || this; - } - PercentageStackColumn.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'percentStackedColumn'; - _super.prototype.createLayers.call(this, layerProps); - warning__WEBPACK_IMPORTED_MODULE_3___default()(false, 'Please use "PercentStackedColumn" instead of "PercentageStackColumn" which was not recommended.'); - }; - PercentageStackColumn.getDefaultOptions = _percent_stacked_column_layer__WEBPACK_IMPORTED_MODULE_4__["default"].getDefaultOptions; - return PercentageStackColumn; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (PercentageStackColumn); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/compatiblePlots/ring/index.js": -/*!***************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/compatiblePlots/ring/index.js ***! - \***************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _donut_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../donut/layer */ "./node_modules/@antv/g2plot/esm/plots/donut/layer.js"); - - - - - -var Ring = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Ring, _super); - function Ring() { - return _super !== null && _super.apply(this, arguments) || this; - } - Ring.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'donut'; - _super.prototype.createLayers.call(this, layerProps); - warning__WEBPACK_IMPORTED_MODULE_3___default()(false, 'Please use "Donut" instead of "Ring" which was not recommended.'); - }; - Ring.getDefaultOptions = _donut_layer__WEBPACK_IMPORTED_MODULE_4__["default"].getDefaultOptions; - return Ring; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Ring); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/compatiblePlots/stack-area/index.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/compatiblePlots/stack-area/index.js ***! - \*********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _stacked_area_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../stacked-area/layer */ "./node_modules/@antv/g2plot/esm/plots/stacked-area/layer.js"); - - - - - -var StackArea = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(StackArea, _super); - function StackArea() { - return _super !== null && _super.apply(this, arguments) || this; - } - StackArea.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'stackedArea'; - _super.prototype.createLayers.call(this, layerProps); - warning__WEBPACK_IMPORTED_MODULE_3___default()(false, 'Please use "StackedArea" instead of "StackArea" which was not recommended.'); - }; - StackArea.getDefaultOptions = _stacked_area_layer__WEBPACK_IMPORTED_MODULE_4__["default"].getDefaultOptions; - return StackArea; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (StackArea); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/compatiblePlots/stack-bar/index.js": -/*!********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/compatiblePlots/stack-bar/index.js ***! - \********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _stacked_bar_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../stacked-bar/layer */ "./node_modules/@antv/g2plot/esm/plots/stacked-bar/layer.js"); - - - - - -var StackBar = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(StackBar, _super); - function StackBar() { - return _super !== null && _super.apply(this, arguments) || this; - } - StackBar.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'stackedBar'; - _super.prototype.createLayers.call(this, layerProps); - warning__WEBPACK_IMPORTED_MODULE_3___default()(false, 'Please use "StackedBar" instead of "StackBar" which was not recommended.'); - }; - StackBar.getDefaultOptions = _stacked_bar_layer__WEBPACK_IMPORTED_MODULE_4__["default"].getDefaultOptions; - return StackBar; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (StackBar); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/compatiblePlots/stack-column/index.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/compatiblePlots/stack-column/index.js ***! - \***********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _stacked_column_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../stacked-column/layer */ "./node_modules/@antv/g2plot/esm/plots/stacked-column/layer.js"); - - - - - -var StackColumn = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(StackColumn, _super); - function StackColumn() { - return _super !== null && _super.apply(this, arguments) || this; - } - StackColumn.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'stackedColumn'; - _super.prototype.createLayers.call(this, layerProps); - warning__WEBPACK_IMPORTED_MODULE_3___default()(false, 'Please use "StackedColumn" instead of "StackColumn" which was not recommended.'); - }; - StackColumn.getDefaultOptions = _stacked_column_layer__WEBPACK_IMPORTED_MODULE_4__["default"].getDefaultOptions; - return StackColumn; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (StackColumn); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/density-heatmap/components/background.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/density-heatmap/components/background.js ***! - \**************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _antv_event_emitter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/event-emitter */ "./node_modules/@antv/event-emitter/lib/index.js"); -/* harmony import */ var _antv_event_emitter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_antv_event_emitter__WEBPACK_IMPORTED_MODULE_2__); - - - -var HeatmapBackground = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(HeatmapBackground, _super); - function HeatmapBackground(cfg) { - var _this = _super.call(this) || this; - _this.options = cfg; - _this.view = _this.options.view; - _this.init(); - return _this; - } - HeatmapBackground.prototype.init = function () { - var coord = this.getCoordinate(); - this.width = coord.getWidth(); - this.height = coord.getHeight(); - this.x = coord.start.x; - this.y = coord.end.y; - this.container = this.view.backgroundGroup.addGroup({}); - }; - HeatmapBackground.prototype.render = function () { - if (this.options.type === 'color') { - this.renderColorBackground(); - } - else if (this.options.type === 'image') { - this.renderImageBackground(); - } - else if (this.options.callback) { - var callbackCfg = { - x: this.x, - y: this.y, - width: this.width, - height: this.height, - container: this.container, - }; - this.options.callback(callbackCfg); - } - }; - HeatmapBackground.prototype.renderColorBackground = function () { - this.container.addShape('rect', { - attrs: { - x: this.x, - y: this.y, - width: this.width, - height: this.height, - fill: this.options.value, - }, - name: 'heatmap-background', - }); - }; - HeatmapBackground.prototype.renderImageBackground = function () { - this.container.addShape('image', { - attrs: { - x: this.x, - y: this.y, - width: this.width, - height: this.height, - img: this.options.src, - }, - name: 'heatmap-background', - }); - }; - HeatmapBackground.prototype.clear = function () { - if (this.container) { - this.container.clear(); - this.emit('background:clear'); - } - }; - HeatmapBackground.prototype.destroy = function () { - if (this.container) { - this.container.remove(); - // 使用callback定制的html background需要自己监听销毁事件自行销毁 - this.emit('background:destroy'); - } - }; - HeatmapBackground.prototype.getCoordinate = function () { - var coordinate; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(this.view.geometries, function (geom) { - if (geom.type === 'heatmap') { - coordinate = geom.coordinate; - } - }); - return coordinate; - }; - return HeatmapBackground; -}(_antv_event_emitter__WEBPACK_IMPORTED_MODULE_2___default.a)); -/* harmony default export */ __webpack_exports__["default"] = (HeatmapBackground); -//# sourceMappingURL=background.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/density-heatmap/components/index.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/density-heatmap/components/index.js ***! - \*********************************************************************************/ -/*! exports provided: getPlotComponents */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPlotComponents", function() { return getPlotComponents; }); -/* harmony import */ var _background__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./background */ "./node_modules/@antv/g2plot/esm/plots/density-heatmap/components/background.js"); -/* harmony import */ var _legend__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./legend */ "./node_modules/@antv/g2plot/esm/plots/density-heatmap/components/legend.js"); - - -var ComponentsInfo = { - background: { Ctr: _background__WEBPACK_IMPORTED_MODULE_0__["default"] }, - legend: { Ctr: _legend__WEBPACK_IMPORTED_MODULE_1__["default"], padding: 'outer' }, -}; -function getPlotComponents(plot, type, cfg) { - if (plot.options[type] && plot.options[type].visible) { - var componentInfo = ComponentsInfo[type]; - var component = new componentInfo.Ctr(cfg); - if (componentInfo.padding) { - plot.paddingController.registerPadding(component, componentInfo.padding); - } - return component; - } -} -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/density-heatmap/components/legend.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/density-heatmap/components/legend.js ***! - \**********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_bbox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/bbox */ "./node_modules/@antv/g2plot/esm/util/bbox.js"); - - - -var LABEL_MARGIN = 4; -var ACTIVE_OPACITY = 1; -var DEACTIVE_OPACITY = 0.1; -var HeatmapLegend = /** @class */ (function () { - function HeatmapLegend(cfg) { - this.destroyed = false; - this.dataSlides = {}; - var defaultOptions = this.getDefaultOptions(); - if (cfg.plot.options.theme && cfg.plot.options.theme === 'dark') { - defaultOptions = this.getDarkOptions(); - } - this.options = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, defaultOptions, cfg); - this.view = this.options.view; - this.afterRender = true; - this.init(); - } - HeatmapLegend.prototype.init = function () { - this.layout = this.getLayout(); - this.width = this.options.width ? this.options.width : this.getDefaultWidth(); - this.height = this.options.height ? this.options.height : this.getDefaultHeight(); - var plotContainer = this.options.plot.container; - this.container = plotContainer.addGroup(); - }; - HeatmapLegend.prototype.render = function () { - var scales = this.getScales(); - var colorField = this.options.plot.options.colorField; - this.colorScale = scales[colorField]; - var _a = this.colorScale, min = _a.min, max = _a.max; - var color = this.options.plot.options.color; - if (this.layout === 'horizontal') { - this.renderHorizontal(min, max, color); - } - else { - this.renderVertical(min, max, color); - } - this.legendLayout(); - this.addInteraction(); - this.options.plot.canvas.draw(); - }; - HeatmapLegend.prototype.hide = function () { - this.container.set('visible', false); - this.options.plot.canvas.draw(); - }; - HeatmapLegend.prototype.show = function () { - this.container.set('visible', true); - this.options.plot.canvas.draw(); - }; - HeatmapLegend.prototype.clear = function () { - if (this.container) { - this.container.clear(); - } - }; - HeatmapLegend.prototype.destroy = function () { - if (this.container) { - this.container.remove(); - } - this.destroyed = true; - }; - HeatmapLegend.prototype.getBBox = function () { - var origin_bbox = this.container.getBBox(); - return new _util_bbox__WEBPACK_IMPORTED_MODULE_2__["default"](this.x, this.y, origin_bbox.width, origin_bbox.height); - }; - HeatmapLegend.prototype.renderVertical = function (min, max, colors) { - var _this = this; - var gridWidth = this.width; - var gridHeight = this.height / colors.length; - var gridLineContainer = this.container.addGroup(); - var gridColors = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(colors).reverse(); - var valueStep = (max - min) / colors.length; - // 绘制色彩格子 - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(gridColors, function (c, i) { - var y = gridHeight * i; - // 记录每个grid代表的区间信息用于legend交互 - var appendInfo = { to: max - valueStep * i, from: max - valueStep * (i + 1) }; - var rect = _this.container.addShape('rect', { - attrs: { - x: 0, - y: y, - width: gridWidth, - height: gridHeight, - fill: c, - opacity: ACTIVE_OPACITY, - cursor: 'pointer', - }, - name: 'legend', - }); - rect.set('info', appendInfo); - var dataSlide = _this.getDataSlide(appendInfo); - _this.dataSlides[appendInfo.from + "-" + appendInfo.to] = { mode: 'active', data: dataSlide }; - var line = gridLineContainer.addShape('path', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: [ - ['M', 0, y + gridHeight], - ['L', gridWidth, y + gridHeight], - ] }, _this.options.gridlineStyle), - }); - }); - // 绘制两边的label - var textMax = this.container.addShape('text', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ text: max, x: gridWidth / 2, y: -LABEL_MARGIN, textAlign: 'center', textBaseline: 'bottom' }, this.options.text.style), - name: 'legend-label', - }); - var textMin = this.container.addShape('text', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ text: min, x: gridWidth / 2, y: this.height + LABEL_MARGIN, textAlign: 'center', textBaseline: 'top' }, this.options.text.style), { name: 'legend-label' }), - }); - // 绘制包围线 - var path = gridLineContainer.addShape('path', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: [ - ['M', 0, 0], - ['L', this.width, 0], - ['L', this.width, this.height], - ['L', 0, this.height], - ['L', 0, 0], - ] }, this.options.gridlineStyle), - }); - }; - HeatmapLegend.prototype.renderHorizontal = function (min, max, colors) { - var _this = this; - var gridWidth = this.width / colors.length; - var gridHeight = this.height; - var gridLineContainer = this.container.addGroup(); - var valueStep = (max - min) / colors.length; - // 绘制色彩格子 - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(colors, function (c, i) { - var x = gridWidth * i; - // 记录每个grid代表的区间信息用于legend交互 - var appendInfo = { from: valueStep * i, to: valueStep * (i + 1) }; - var rect = _this.container.addShape('rect', { - attrs: { - x: x, - y: 0, - width: gridWidth, - height: gridHeight, - fill: c, - opacity: 0.8, - cursor: 'pointer', - }, - name: 'legend', - }); - rect.set('info', appendInfo); - var line = gridLineContainer.addShape('path', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: [ - ['M', x + gridWidth, 0], - ['L', x + gridWidth, gridHeight], - ] }, _this.options.gridlineStyle), - }); - }); - // 绘制两边的label - this.container.addShape('text', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ text: min, x: -LABEL_MARGIN, y: gridHeight / 2 }, this.options.text.style), { textAlign: 'right', textBaseline: 'middle' }), - name: 'legend-label', - }); - this.container.addShape('text', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ text: max, x: this.width + LABEL_MARGIN, y: gridHeight / 2, textAlign: 'left', textBaseline: 'middle' }, this.options.text.style), - name: 'legend-label', - }); - // 绘制包围线 - gridLineContainer.addShape('path', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: [ - ['M', 0, 0], - ['L', this.width, 0], - ['L', this.width, this.height], - ['L', 0, this.height], - ['L', 0, 0], - ] }, this.options.gridlineStyle), - }); - }; - HeatmapLegend.prototype.getLayout = function () { - var positions = this.options.position.split('-'); - this.position = positions[0]; - if (positions[0] === 'left' || positions[0] === 'right') { - return 'vertical'; - } - return 'horizontal'; - }; - HeatmapLegend.prototype.getDefaultWidth = function () { - if (this.layout === 'horizontal') { - var width = this.options.plot.options.width; - return width * 0.5; - } - return 10; - }; - HeatmapLegend.prototype.getDefaultHeight = function () { - if (this.layout === 'vertical') { - var height = this.options.plot.options.height; - return height * 0.5; - } - return 10; - }; - HeatmapLegend.prototype.legendLayout = function () { - var _this = this; - var bleeding = this.options.plot.getPlotTheme().bleeding; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(bleeding)) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(bleeding, function (it, index) { - if (typeof bleeding[index] === 'function') { - bleeding[index] = bleeding[index](_this.options.plot.options); - } - }); - } - var bbox = this.container.getBBox(); - var x = 0; - var y = 0; - var positions = this.options.position.split('-'); - var plotWidth = this.options.plot.width; - var plotHeight = this.options.plot.height; - // 先确定x - if (positions[0] === 'left') { - x = bleeding[3]; - } - else if (positions[0] === 'right') { - x = plotWidth - bleeding[1] - bbox.width; - } - else if (positions[1] === 'center') { - x = (plotWidth - bbox.width) / 2; - } - else if (positions[1] === 'left') { - x = bleeding[3]; - } - else if (positions[1] === 'right') { - x = this.options.plot.width - bleeding[1] - bbox.width; - } - // 再确定y - if (positions[0] === 'bottom') { - y = plotHeight - bleeding[2] - bbox.height; - } - else if (positions[0] === 'top') { - y = this.getTopPosition(bleeding); - } - else if (positions[1] === 'center') { - y = (plotHeight - bbox.height) / 2; - } - else if (positions[1] === 'top') { - y = bleeding[0]; - } - else if (positions[1] === 'bottom') { - y = plotHeight - bleeding[2] - bbox.height; - } - this.x = x; - this.y = y; - this.container.translate(x, y); - }; - HeatmapLegend.prototype.getDefaultOptions = function () { - return { - text: { - style: { - fontSize: 12, - fill: 'rgba(0, 0, 0, 0.45)', - }, - }, - gridlineStyle: { - lineWidth: 1, - stroke: 'rgba(0, 0, 0, 0.45)', - }, - }; - }; - HeatmapLegend.prototype.getDarkOptions = function () { - return { - text: { - style: { - fontSize: 12, - fill: 'rgba(255, 255, 255, 0.45)', - }, - }, - gridlineStyle: { - lineWidth: 1, - stroke: 'rgba(255, 255, 255, 0.25)', - }, - }; - }; - HeatmapLegend.prototype.addInteraction = function () { - var _this = this; - var _a = this.options.plot.options, colorField = _a.colorField, data = _a.data; - this.container.on('click', function (ev) { - var target = ev.target; - if (target.get('name') === 'legend') { - var appendInfo = target.get('info'); - var targetInfo = appendInfo.from + "-" + appendInfo.to; - var relativeData = _this.dataSlides[targetInfo]; - if (relativeData.mode === 'active') { - relativeData.mode = 'deactive'; - target.stopAnimate(); - target.animate({ - opacity: DEACTIVE_OPACITY, - }, 200); - } - else { - relativeData.mode = 'active'; - target.stopAnimate(); - target.animate({ - opacity: ACTIVE_OPACITY, - }, 200); - } - var filteredData = _this.getFilteredData(); - if (filteredData.length > 0) { - _this.view.changeData(filteredData); - //this.view.set('data', filteredData); - _this.view.scale(colorField, { - min: _this.colorScale.min, - max: _this.colorScale.max, - nice: _this.colorScale.nice, - }); - _this.view.render(); - } - } - }); - }; - HeatmapLegend.prototype.getFilteredData = function () { - var filteredData = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(this.dataSlides, function (s) { - if (s.mode == 'active') { - filteredData.push.apply(filteredData, s.data); - } - }); - return filteredData; - }; - //预先对数据进行分组 - HeatmapLegend.prototype.getDataSlide = function (range) { - var slide = []; - var _a = this.options.plot.options, colorField = _a.colorField, data = _a.data; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(data, function (d) { - var value = d[colorField]; - if (value >= range.from && value < range.to) { - slide.push(d); - } - }); - return slide; - }; - HeatmapLegend.prototype.getTopPosition = function (bleeding) { - if (this.options.plot.description) { - var bbox = this.options.plot.description.getBBox(); - return bbox.maxY + 10; - } - else if (this.options.plot.title) { - var bbox = this.options.plot.title.getBBox(); - return bbox.maxY + 10; - } - return bleeding[0]; - }; - HeatmapLegend.prototype.getScales = function () { - var scales; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(this.view.geometries, function (geom) { - if (geom.type === 'heatmap') { - scales = geom.scales; - } - }); - return scales; - }; - return HeatmapLegend; -}()); -/* harmony default export */ __webpack_exports__["default"] = (HeatmapLegend); -//# sourceMappingURL=legend.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/density-heatmap/event.js": -/*!**********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/density-heatmap/event.js ***! - \**********************************************************************/ -/*! exports provided: EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["onEvent"]; }); - - - -var componentMap = { - Heatmap: 'heatmap', - LegendLabel: 'legend-label', - HeatmapBackground: 'heatmap-background', -}; -var SHAPE_EVENT_MAP = Object(_util_event__WEBPACK_IMPORTED_MODULE_1__["getEventMap"])(componentMap); -Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(_util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"], SHAPE_EVENT_MAP); - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/density-heatmap/index.js": -/*!**********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/density-heatmap/index.js ***! - \**********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/density-heatmap/layer.js"); - - - - -var DensityHeatmap = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(DensityHeatmap, _super); - function DensityHeatmap() { - return _super !== null && _super.apply(this, arguments) || this; - } - DensityHeatmap.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'densityHeatmap'; - _super.prototype.createLayers.call(this, layerProps); - }; - DensityHeatmap.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return DensityHeatmap; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (DensityHeatmap); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/density-heatmap/layer.js": -/*!**********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/density-heatmap/layer.js ***! - \**********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _base_view_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/view-layer */ "./node_modules/@antv/g2plot/esm/base/view-layer.js"); -/* harmony import */ var _components_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../components/factory */ "./node_modules/@antv/g2plot/esm/components/factory.js"); -/* harmony import */ var _geoms_factory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../geoms/factory */ "./node_modules/@antv/g2plot/esm/geoms/factory.js"); -/* harmony import */ var _util_scale__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../util/scale */ "./node_modules/@antv/g2plot/esm/util/scale.js"); -/* harmony import */ var _geoms_heatmap_linear__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../geoms/heatmap/linear */ "./node_modules/@antv/g2plot/esm/geoms/heatmap/linear.js"); -/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./components */ "./node_modules/@antv/g2plot/esm/plots/density-heatmap/components/index.js"); -/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./event */ "./node_modules/@antv/g2plot/esm/plots/density-heatmap/event.js"); - - - - - - - - - - -var DensityHeatmapLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(DensityHeatmapLayer, _super); - function DensityHeatmapLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'densityHeatmap'; - _this.plotComponents = []; - return _this; - } - DensityHeatmapLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - xAxis: { - visible: true, - autoRotateTitle: false, - grid: { - visible: false, - }, - line: { - visible: true, - }, - tickLine: { - visible: true, - }, - label: { - visible: true, - autoHide: true, - autoRotate: true, - }, - title: { - visible: false, - offset: 12, - }, - }, - yAxis: { - visible: true, - autoRotateTitle: true, - grid: { - visible: false, - }, - line: { - visible: true, - }, - tickLine: { - visible: true, - }, - label: { - visible: true, - autoHide: true, - autoRotate: false, - }, - title: { - visible: false, - offset: 12, - }, - }, - tooltip: { - visible: true, - showCrosshairs: true, - crosshairs: { - type: 'xy', - line: { - style: { - stroke: '#000000', - lineWidth: 1, - opacity: 0.5, - }, - }, - }, - showMarkers: false, - }, - legend: { - visible: true, - position: 'bottom-center', - }, - color: [ - 'rgba(33,102,172,0)', - 'rgb(103,169,207)', - 'rgb(209,229,240)', - 'rgb(253,219,199)', - 'rgb(239,138,98)', - 'rgb(178,24,43)', - ], - interactions: [{ type: 'tooltip' }], - }); - }; - DensityHeatmapLayer.prototype.afterRender = function () { - this.renderPlotComponents(); - _super.prototype.afterRender.call(this); - }; - DensityHeatmapLayer.prototype.destroy = function () { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(this.plotComponents, function (component) { - component.destroy(); - }); - _super.prototype.destroy.call(this); - }; - DensityHeatmapLayer.prototype.scale = function () { - var props = this.options; - var scales = {}; - /** 配置x-scale */ - scales[props.xField] = {}; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(props, 'xAxis')) { - Object(_util_scale__WEBPACK_IMPORTED_MODULE_6__["extractScale"])(scales[props.xField], props.xAxis); - } - /** 配置y-scale */ - scales[props.yField] = {}; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(props, 'yAxis')) { - Object(_util_scale__WEBPACK_IMPORTED_MODULE_6__["extractScale"])(scales[props.yField], props.yAxis); - } - this.setConfig('scales', scales); - _super.prototype.scale.call(this); - }; - DensityHeatmapLayer.prototype.coord = function () { }; - DensityHeatmapLayer.prototype.geometryParser = function (dim, type) { - return 'heatmap'; - }; - DensityHeatmapLayer.prototype.addGeometry = function () { - var config = { - type: 'linearheatmap', - position: { - fields: [this.options.xField, this.options.yField], - }, - color: { - fields: [this.options.colorField], - values: this.options.color, - }, - cfg: { - intensity: this.options.intensity, - radius: this.options.radius, - }, - }; - if (this.options.radius) { - config.radius = this.options.radius; - } - if (this.options.intensity) { - config.intensity = this.options.intensity; - } - if (this.options.tooltip && (this.options.tooltip.fields || this.options.tooltip.formatter)) { - this.geometryTooltip(config); - } - this.setConfig('geometry', config); - this.addPoint(); - }; - DensityHeatmapLayer.prototype.addPoint = function () { - var props = this.options; - var defaultConfig = { visible: false, size: 0 }; - if (props.point && props.point.visible) { - props.point = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])(defaultConfig, props.point); - } - else { - props.point = defaultConfig; - } - var point = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_5__["getGeom"])('point', 'guide', { - plot: this, - }); - point.active = false; - // point.label = this.extractLabel(); - this.setConfig('geometry', point); - }; - DensityHeatmapLayer.prototype.extractLabel = function () { - var props = this.options; - var label = props.label; - if (label && label.visible === false) { - return false; - } - var labelConfig = Object(_components_factory__WEBPACK_IMPORTED_MODULE_4__["getComponent"])('label', Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ plot: this, labelType: 'scatterLabel', fields: [props.xField, props.yField], position: 'middle', offset: 0 }, label)); - return labelConfig; - }; - DensityHeatmapLayer.prototype.legend = function () { - this.setConfig('legends', false); - }; - DensityHeatmapLayer.prototype.geometryTooltip = function (config) { - config.tooltip = {}; - var tooltipOptions = this.options.tooltip; - if (tooltipOptions.fields) { - config.tooltip.fields = tooltipOptions.fields; - } - if (tooltipOptions.formatter) { - config.tooltip.callback = tooltipOptions.formatter; - if (!tooltipOptions.fields) { - config.tooltip.fields = [this.options.xField, this.options.yField]; - if (this.options.colorField) { - config.tooltip.fields.push(this.options.colorField); - } - } - } - }; - DensityHeatmapLayer.prototype.parseEvents = function (eventParser) { - _super.prototype.parseEvents.call(this, _event__WEBPACK_IMPORTED_MODULE_9__); - }; - DensityHeatmapLayer.prototype.renderPlotComponents = function () { - var _this = this; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(this.plotComponents, function (component) { - component.destroy(); - }); - var componentsType = ['legend', 'background']; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(componentsType, function (t) { - var cfg = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ view: _this.view, plot: _this }, _this.options[t]); - var component = Object(_components__WEBPACK_IMPORTED_MODULE_8__["getPlotComponents"])(_this, t, cfg); - if (component) { - component.render(); - _this.plotComponents.push(component); - } - }); - }; - return DensityHeatmapLayer; -}(_base_view_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (DensityHeatmapLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('densityHeatmap', DensityHeatmapLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/density/index.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/density/index.js ***! - \**************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/density/layer.js"); - - - - -var Density = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Density, _super); - function Density() { - return _super !== null && _super.apply(this, arguments) || this; - } - Density.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'density'; - _super.prototype.createLayers.call(this, layerProps); - }; - Density.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return Density; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Density); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/density/layer.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/density/layer.js ***! - \**************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_scale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/scale */ "./node_modules/@antv/scale/esm/index.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _util_math__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/math */ "./node_modules/@antv/g2plot/esm/util/math.js"); -/* harmony import */ var _area_layer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../area/layer */ "./node_modules/@antv/g2plot/esm/plots/area/layer.js"); - - - - - - -var kernels = { - epanechnikov: function (dist) { - return Math.abs(dist) <= 1 ? 0.75 * (1 - dist * dist) : 0; - }, - gaussian: function (dist) { - return (1 / Math.sqrt(Math.PI * 2)) * Math.exp(-0.5 * Math.pow(dist, 2)); - }, - uniform: function (dist) { - return Math.abs(dist) <= 1 ? 0.5 : 0; - }, - triangle: function (dist) { - return Math.abs(dist) <= 1 ? 1 - Math.abs(dist) : 0; - }, - quartic: function (dist) { - var v = 1 - dist * dist; - return Math.abs(dist) <= 1 ? (15 / 16) * v * v : 0; - }, - triweight: function (dist) { - var v = 1 - dist * dist; - return Math.abs(dist) <= 1 ? (15 / 16) * Math.pow(v, 3) : 0; - }, - cosinus: function (dist) { - var v = (Math.PI / 4) * Math.cos(0.5 * Math.PI * dist); - return Math.abs(dist) <= 1 ? v : 0; - }, -}; -var DensityLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(DensityLayer, _super); - function DensityLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'density'; - return _this; - } - DensityLayer.prototype.init = function () { - var originXAxisConfig = this.options.xAxis ? Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["clone"])(this.options.xAxis) : {}; - this.options.xField = 'value'; - this.options.yField = 'density'; - this.options.xAxis = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["deepMix"])({}, originXAxisConfig, { type: 'linear' }); - this.options.smooth = true; - _super.prototype.init.call(this); - }; - DensityLayer.prototype.processData = function (originData) { - var _this = this; - var _a = this.options, binField = _a.binField, binWidth = _a.binWidth, binNumber = _a.binNumber, kernel = _a.kernel; - var _kernel = kernel ? kernel : 'epanechnikov'; - var kernelFunc = kernels[_kernel]; - var originDataCopy = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["clone"])(originData); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["sortBy"])(originDataCopy, binField); - // 计算分箱,直方图分箱的计算基于binWidth,如配置了binNumber则将其转为binWidth进行计算 - var values = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["valuesOfKey"])(originDataCopy, binField); - var range = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["getRange"])(values); - var rangeWidth = range.max - range.min; - var _binNumber = binNumber; - var _binWidth = binWidth; - if (!binNumber && binWidth) { - _binNumber = Math.floor(rangeWidth / binWidth); - } - if (!binWidth && binNumber) { - _binWidth = rangeWidth / binNumber; - } - // 当binWidth和binNumber都没有指定的情况,采用Sturges formula自动生成binWidth - if (!binNumber && !binWidth) { - _binNumber = Object(_util_math__WEBPACK_IMPORTED_MODULE_4__["sturges"])(values); - _binWidth = rangeWidth / binNumber; - } - // 根据binNumber获取samples - var LinearScale = Object(_antv_scale__WEBPACK_IMPORTED_MODULE_1__["getScale"])('linear'); - var scale = new LinearScale({ - min: range.min, - max: range.max, - tickCount: _binNumber, - nice: false, - }); - var samples = scale.getTicks(); - // 计算KDE - var densities = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(samples, function (s) { - var density = _this.kernelDensityEstimator(_binWidth, kernelFunc, s, values); - densities.push({ value: s.text, density: density }); - }); - return densities; - }; - DensityLayer.prototype.kernelDensityEstimator = function (binWidth, kernelFunc, x, values) { - var sum = 0; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(values, function (v) { - var dist = (x.tickValue - v) / binWidth; - sum += kernelFunc(dist); - }); - return values.length === 0 ? 0 : sum / values.length; - }; - return DensityLayer; -}(_area_layer__WEBPACK_IMPORTED_MODULE_5__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (DensityLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_3__["registerPlotType"])('density', DensityLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/donut/apply-responsive/geometry.js": -/*!********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/donut/apply-responsive/geometry.js ***! - \********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return responsiveRing; }); -/* harmony import */ var _antv_coord__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/coord */ "./node_modules/@antv/coord/esm/index.js"); -/* harmony import */ var _util_responsive_node_variable_node__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/responsive/node/variable-node */ "./node_modules/@antv/g2plot/esm/util/responsive/node/variable-node.js"); -/* harmony import */ var _util_responsive_responsive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/responsive/responsive */ "./node_modules/@antv/g2plot/esm/util/responsive/responsive.js"); - - - -function responsiveRing(layer) { - var props = layer.options; - var responsiveTheme = layer.getResponsiveTheme(); - var padding = props.padding; - var radius = props.radius ? props.radius : 1; - var width = layer.width, height = layer.height; - /** 创建坐标系 */ - var polar = Object(_antv_coord__WEBPACK_IMPORTED_MODULE_0__["getCoordinate"])('polar'); - var coord = new polar({ - radius: radius, - start: { x: padding[3], y: padding[0] }, - end: { x: width - padding[1], y: height - padding[2] }, - }); - var region = { - radius: radius, - coord: coord, - }; - var nodes = new _util_responsive_node_variable_node__WEBPACK_IMPORTED_MODULE_1__["default"]({ - nodes: [{ name: 'innerRadius', value: 0 }], - }); - var constraints = responsiveTheme.ring.constraints; - new _util_responsive_responsive__WEBPACK_IMPORTED_MODULE_2__["default"]({ - nodes: nodes, - constraints: constraints, - region: region, - plot: layer, - onEnd: function () { - props.innerRadius = nodes.nodes[0].value; - }, - }); -} -//# sourceMappingURL=geometry.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/donut/apply-responsive/index.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/donut/apply-responsive/index.js ***! - \*****************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./geometry */ "./node_modules/@antv/g2plot/esm/plots/donut/apply-responsive/geometry.js"); - -var preRenderResponsive = [{ name: 'responsiveRing', method: _geometry__WEBPACK_IMPORTED_MODULE_0__["default"] }]; -var afterRenderResponsive = []; -/* harmony default export */ __webpack_exports__["default"] = ({ - preRender: preRenderResponsive, -}); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/donut/apply-responsive/theme.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/donut/apply-responsive/theme.js ***! - \*****************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _util_responsive_theme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/responsive/theme */ "./node_modules/@antv/g2plot/esm/util/responsive/theme.js"); - -/** 组装theme - * 其实这个应该是扩展自pie的,anyway,先这样写 - */ -var ringTheme = { - ring: { - constraints: [{ name: 'ringThickness' }, { name: 'minRingThickness' }], - }, -}; -Object(_util_responsive_theme__WEBPACK_IMPORTED_MODULE_0__["registerResponsiveTheme"])('ring', ringTheme); -//# sourceMappingURL=theme.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/donut/component/ring-statistic.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/donut/component/ring-statistic.js ***! - \*******************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _statistic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./statistic */ "./node_modules/@antv/g2plot/esm/plots/donut/component/statistic.js"); -/* harmony import */ var _statistic_template__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./statistic-template */ "./node_modules/@antv/g2plot/esm/plots/donut/component/statistic-template.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - - - - -var RingStatistic = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(RingStatistic, _super); - function RingStatistic(cfg) { - var _this = _super.call(this, cfg) || this; - _this.view = cfg.view; - _this.plot = cfg.plot; - _this.statisticClass = cfg.statisticClass; - _this.adjustOptions(); - return _this; - } - RingStatistic.prototype.triggerOn = function () { - var _this = this; - var triggerOnEvent = this.options.triggerOn; - this.view.on("interval:" + triggerOnEvent, Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["debounce"])(function (e) { - var displayData = _this.parseStatisticData(e.data.data); - var htmlString = _this.getStatisticHtmlString(displayData); - _this.updateHtml(htmlString); - }, 150)); - var triggerOffEvent = this.options.triggerOff ? this.options.triggerOff : 'mouseleave'; - this.view.on("interval:" + triggerOffEvent, Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["debounce"])(function (e) { - var totalValue = _this.getTotalValue(); - var displayData = _this.parseStatisticData(totalValue); - var htmlString = _this.getStatisticHtmlString(displayData); - _this.updateHtml(htmlString); - }, 150)); - }; - RingStatistic.prototype.adjustOptions = function () { - var displayData; - if (this.options.content) { - displayData = this.options.content; - } - else { - /** 用户没有指定文本内容时,默认显示总计 */ - var data = this.getTotalValue(); - displayData = this.parseStatisticData(data); - } - /** 中心文本显示 */ - var htmlString; - if (this.options.htmlContent) { - htmlString = this.options.htmlContent(displayData); - } - else { - htmlString = this.getStatisticTemplate(displayData); - } - this.html = htmlString; - var _a = this.view.coordinateBBox, minX = _a.minX, minY = _a.minY, width = _a.width, height = _a.height; - this.x = minX + width / 2; - this.y = minY + height / 2; - }; - RingStatistic.prototype.getTotalValue = function () { - var _a; - var total = 0; - var _b = this.plot.options, angleField = _b.angleField, colorField = _b.colorField; - var totalLabel = this.options.totalLabel; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["each"])(this.plot.options.data, function (item) { - if (typeof item[angleField] === 'number') { - total += item[angleField]; - } - }); - var data = (_a = {}, - _a[angleField] = total, - _a[colorField] = totalLabel, - _a); - return data; - }; - RingStatistic.prototype.parseStatisticData = function (data) { - var _a = this.plot.options, angleField = _a.angleField, colorField = _a.colorField; - return colorField ? { name: data[colorField], value: data[angleField] } : data[angleField]; - }; - RingStatistic.prototype.getStatisticTemplate = function (data) { - var size = this.getStatisticSize(); - var htmlString; - /** 如果文本内容为string或单条数据 */ - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["isString"])(data)) { - htmlString = _statistic_template__WEBPACK_IMPORTED_MODULE_2__["getSingleDataTemplate"](data, this.statisticClass, size); - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["isObject"])(data) && Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["keys"])(data).length === 2) { - /** 如果文本内容为两条数据 */ - var content = data; - htmlString = _statistic_template__WEBPACK_IMPORTED_MODULE_2__["getTwoDataTemplate"](content.name, content.value, this.statisticClass, size); - } - /** 更为复杂的文本要求用户自行制定html模板 */ - return htmlString; - }; - RingStatistic.prototype.getStatisticSize = function () { - var radius = this.view.getCoordinate().getRadius(); - var _a = this.plot.options, radiusCfg = _a.radius, innerRadiusCfg = _a.innerRadius; - return (radius / radiusCfg) * innerRadiusCfg * 2; - }; - RingStatistic.prototype.getStatisticHtmlString = function (data) { - var triggerOnConfig = this.options.triggerOn; - var htmlString; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["isString"])(triggerOnConfig)) { - htmlString = this.getStatisticTemplate(data); - } - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_3__["isFunction"])(triggerOnConfig)) { - htmlString = triggerOnConfig(data); - htmlString = "
      " + htmlString + "
      "; - } - return htmlString; - }; - return RingStatistic; -}(_statistic__WEBPACK_IMPORTED_MODULE_1__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (RingStatistic); -//# sourceMappingURL=ring-statistic.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/donut/component/statistic-template.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/donut/component/statistic-template.js ***! - \***********************************************************************************/ -/*! exports provided: getSingleDataTemplate, getTwoDataTemplate */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSingleDataTemplate", function() { return getSingleDataTemplate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTwoDataTemplate", function() { return getTwoDataTemplate; }); -/*tslint:disable*/ -var containerStyle = "color:#4d4d4d;font-size:14px;text-align:center;line-height:2;font-family:'-apple-system',BlinkMacSystemFont,'SegoeUI',Roboto,'HelveticaNeue',Helvetica,'PingFangSC','HiraginoSansGB','MicrosoftYaHei',SimSun,'sans-serif';pointer-events:none;"; -var nameStyle = 'font-weight:300;'; -var valueStyle = 'font-size:32px;font-weight:bold;color:#4D4D4D'; -function getSingleDataTemplate(value, classId, size) { - var domStyle = containerStyle + "width:" + size + "px;"; - return "
      " + value + "
      "; -} -function getTwoDataTemplate(name, value, classId, size) { - var domStyle = containerStyle + "width:" + size + "px;"; - return "
      " + name + "
      " + value + "
      "; -} - -//# sourceMappingURL=statistic-template.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/donut/component/statistic.js": -/*!**************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/donut/component/statistic.js ***! - \**************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _antv_dom_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/dom-util */ "./node_modules/@antv/dom-util/esm/index.js"); - - -var StatisticHtml = /** @class */ (function () { - function StatisticHtml(cfg) { - var defaultOptions = this.getDefaultOptions(); - this.options = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])(defaultOptions, cfg, {}); - this.x = this.options.x; - this.y = this.options.y; - this.html = this.options.html; - this.container = this.options.container; - } - StatisticHtml.prototype.render = function () { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isElement"])(this.container)) { - this.wrapperNode = Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["createDom"])('
      '); - this.container.appendChild(this.wrapperNode); - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["modifyCSS"])(this.wrapperNode, { - position: 'absolute', - }); - var htmlNode = Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["createDom"])(this.html); - this.wrapperNode.appendChild(htmlNode); - this.setDomPosition(this.x, this.y); - } - }; - StatisticHtml.prototype.updateHtml = function (content) { - this.wrapperNode.innerHTML = content; - }; - StatisticHtml.prototype.updatePosition = function (x, y) { - this.setDomPosition(x, y); - }; - StatisticHtml.prototype.destory = function () { - this.container.removeChild(this.wrapperNode); - }; - StatisticHtml.prototype.getDefaultOptions = function () { - return { - x: 0, - y: 0, - html: '', - container: null, - alignX: 'middle', - alignY: 'middle', - }; - }; - StatisticHtml.prototype.setDomPosition = function (x, y) { - var xPosition = x; - var yPosition = y; - var width = Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["getOuterWidth"])(this.wrapperNode); - var height = Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["getOuterHeight"])(this.wrapperNode); - if (this.options.alignX === 'middle') { - xPosition = x - width / 2; - } - if (this.options.alignY === 'middle') { - yPosition = y - height / 2; - } - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["modifyCSS"])(this.wrapperNode, { - top: Math.round(yPosition) + "px", - left: Math.round(xPosition) + "px", - }); - }; - return StatisticHtml; -}()); -/* harmony default export */ __webpack_exports__["default"] = (StatisticHtml); -//# sourceMappingURL=statistic.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/donut/event.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/donut/event.js ***! - \************************************************************/ -/*! exports provided: EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["onEvent"]; }); - - - -var componentMap = { - Ring: 'interval', -}; -var SHAPE_EVENT_MAP = Object(_util_event__WEBPACK_IMPORTED_MODULE_1__["getEventMap"])(componentMap); -Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(_util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"], SHAPE_EVENT_MAP); - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/donut/index.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/donut/index.js ***! - \************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/donut/layer.js"); - - - - -var Donut = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Donut, _super); - function Donut() { - return _super !== null && _super.apply(this, arguments) || this; - } - Donut.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'donut'; - _super.prototype.createLayers.call(this, layerProps); - }; - Donut.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return Donut; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Donut); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/donut/layer.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/donut/layer.js ***! - \************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_dom_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/dom-util */ "./node_modules/@antv/dom-util/esm/index.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _pie_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../pie/layer */ "./node_modules/@antv/g2plot/esm/plots/pie/layer.js"); -/* harmony import */ var _apply_responsive__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./apply-responsive */ "./node_modules/@antv/g2plot/esm/plots/donut/apply-responsive/index.js"); -/* harmony import */ var _apply_responsive_theme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./apply-responsive/theme */ "./node_modules/@antv/g2plot/esm/plots/donut/apply-responsive/theme.js"); -/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./event */ "./node_modules/@antv/g2plot/esm/plots/donut/event.js"); -/* harmony import */ var _component_ring_statistic__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./component/ring-statistic */ "./node_modules/@antv/g2plot/esm/plots/donut/component/ring-statistic.js"); -/* harmony import */ var _pie_component_label__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../pie/component/label */ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/index.js"); - - - - - - - - - - -var G2_GEOM_MAP = { - ring: 'interval', -}; -var PLOT_GEOM_MAP = { - interval: 'ring', -}; -var DonutLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(DonutLayer, _super); - function DonutLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'donut'; - return _this; - } - DonutLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["deepMix"])({}, _super.getDefaultOptions.call(this), { - radius: 0.6, - innerRadius: 0.64, - statistic: { - visible: true, - totalLabel: '总计', - triggerOn: 'mouseenter', - triggerOff: 'mouseleave', - }, - }); - }; - DonutLayer.prototype.beforeInit = function () { - _super.prototype.beforeInit.call(this); - DonutLayer.centralId++; - this.statisticClass = "statisticClassId" + DonutLayer.centralId; - this.adjustLabelDefaultOptions(); - if (this.options.statistic && this.options.statistic.triggerOn) { - this.options.tooltip.visible = false; - } - /** 响应式图形 */ - if (this.options.responsive && this.options.padding !== 'auto') { - this.applyResponsive('preRender'); - } - }; - DonutLayer.prototype.afterRender = function () { - var options = this.options; - var container = this.canvas.get('container'); - if (this.statistic) { - container.removeChild(this.statistic.wrapperNode); - } - /**环图中心文本 */ - if (this.options.statistic && this.options.statistic.visible) { - var container_1 = this.canvas.get('container'); - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_1__["modifyCSS"])(container_1, { position: 'relative' }); - this.statistic = new _component_ring_statistic__WEBPACK_IMPORTED_MODULE_8__["default"](Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ container: container_1, view: this.view, plot: this, statisticClass: this.statisticClass }, this.options.statistic)); - this.statistic.render(); - /**响应交互 */ - if (this.options.statistic.triggerOn) { - //this.triggerOnStatistic(); - this.statistic.triggerOn(); - } - } - if (options.label && options.label.visible) { - var LabelCtor = Object(_pie_component_label__WEBPACK_IMPORTED_MODULE_9__["getPieLabel"])(options.label.type); - var label = new LabelCtor(this, options.label); - label.render(); - } - }; - DonutLayer.prototype.destroy = function () { - if (this.statistic) { - this.statistic.destroy(); - } - _super.prototype.destroy.call(this); - }; - DonutLayer.prototype.geometryParser = function (dim, type) { - if (dim === 'g2') { - return G2_GEOM_MAP[type]; - } - return PLOT_GEOM_MAP[type]; - }; - DonutLayer.prototype.coord = function () { - var props = this.options; - var coordConfig = { - type: 'theta', - cfg: { - radius: props.radius, - innerRadius: props.innerRadius, - }, - }; - this.setConfig('coordinate', coordConfig); - }; - DonutLayer.prototype.parseEvents = function (eventParser) { - _super.prototype.parseEvents.call(this, _event__WEBPACK_IMPORTED_MODULE_7__); - }; - DonutLayer.prototype.applyResponsive = function (stage) { - var _this = this; - var methods = _apply_responsive__WEBPACK_IMPORTED_MODULE_5__["default"][stage]; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(methods, function (r) { - var responsive = r; - responsive.method(_this); - }); - }; - /** @override 调整 label 默认 options */ - DonutLayer.prototype.adjustLabelDefaultOptions = function () { - var labelConfig = this.options.label; - if (labelConfig && labelConfig.type === 'inner') { - var labelStyleConfig = (labelConfig.style || {}); - if (!labelStyleConfig.textAlign) { - labelStyleConfig.textAlign = 'center'; - } - labelConfig.style = labelStyleConfig; - if (!labelConfig.offset) { - labelConfig.offset = ((this.options.innerRadius - 1) / 2) * 100 + "%"; - } - } - }; - DonutLayer.centralId = 0; - return DonutLayer; -}(_pie_layer__WEBPACK_IMPORTED_MODULE_4__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (DonutLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_3__["registerPlotType"])('donut', DonutLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/fan-gauge/index.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/fan-gauge/index.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/fan-gauge/layer.js"); - - - - -var FanGauge = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FanGauge, _super); - function FanGauge() { - return _super !== null && _super.apply(this, arguments) || this; - } - FanGauge.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'fanGauge'; - _super.prototype.createLayers.call(this, layerProps); - }; - FanGauge.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return FanGauge; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (FanGauge); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/fan-gauge/layer.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/fan-gauge/layer.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _gauge_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../gauge/layer */ "./node_modules/@antv/g2plot/esm/plots/gauge/layer.js"); -/* harmony import */ var _gauge_geometry_shape_options__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../gauge/geometry/shape/options */ "./node_modules/@antv/g2plot/esm/plots/gauge/geometry/shape/options.js"); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme */ "./node_modules/@antv/g2plot/esm/theme/index.js"); - - - - - - -var FanGaugeLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FanGaugeLayer, _super); - function FanGaugeLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'fanGauge'; - return _this; - } - FanGaugeLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - legend: { - visible: true, - position: 'right-top', - }, - label: { - visible: false, - position: 'middle', - offset: 0, - adjustColor: true, - }, - connectedArea: { - visible: false, - triggerOn: 'mouseenter', - }, - }); - }; - FanGaugeLayer.prototype.getCustomStyle = function () { - var _a = this.options, theme = _a.theme, styleMix = _a.styleMix; - var colors = styleMix.colors || Object(_theme__WEBPACK_IMPORTED_MODULE_5__["getGlobalTheme"])().colors; - return Object(_gauge_geometry_shape_options__WEBPACK_IMPORTED_MODULE_4__["getOptions"])('fan', theme, colors); - }; - FanGaugeLayer.prototype.axis = function () { - var axesConfig = { - value: false, - 1: false, - }; - this.setConfig('axes', axesConfig); - }; - FanGaugeLayer.prototype.annotation = function () { - var _a = this.options, statistic = _a.statistic, style = _a.style; - var annotationConfigs = []; - // @ts-ignore - if (statistic && statistic.visible) { - var statistics = this.renderStatistic(); - annotationConfigs.push(statistics); - } - var siderTexts = this.renderSideText(); - var allAnnotations = annotationConfigs.concat(siderTexts); - this.setConfig('annotations', allAnnotations); - }; - FanGaugeLayer.prototype.renderSideText = function () { - var _a = this.options, max = _a.max, min = _a.min, styleMix = _a.styleMix, format = _a.format, style = _a.style; - var ringStyle = this.getCustomStyle().ringStyle; - var OFFSET_Y = 12; - return [min, max].map(function (value, index) { - return { - type: 'text', - top: true, - position: ['50%', '50%'], - content: format(value), - style: { - fill: styleMix.labelColor, - fontSize: styleMix.tickLabelSize, - textAlign: 'center', - }, - offsetX: !index ? -ringStyle.thickness : ringStyle.thickness, - offsetY: OFFSET_Y, - }; - }); - }; - return FanGaugeLayer; -}(_gauge_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (FanGaugeLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('fanGauge', FanGaugeLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/funnel/animation/funnel-scale-in-x.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/funnel/animation/funnel-scale-in-x.js ***! - \***********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_matrix_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/matrix-util */ "./node_modules/@antv/matrix-util/esm/index.js"); -/* harmony import */ var _antv_g2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/g2 */ "./node_modules/@antv/g2/dist/g2.min.js"); -/* harmony import */ var _antv_g2__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_antv_g2__WEBPACK_IMPORTED_MODULE_1__); - - -function funnelScaleInX(shape, animateCfg) { - var _a = animateCfg || {}, _b = _a.duration, duration = _b === void 0 ? 200 : _b, delay = _a.delay, easing = _a.easing, callback = _a.callback, reverse = _a.reverse; - var bbox = shape.getBBox(); - var originX = reverse ? bbox.maxX : bbox.minX; - var originY = (bbox.minY + bbox.maxY) / 2; - var clip = shape.setClip({ - type: 'rect', - attrs: { - x: bbox.x, - y: bbox.y, - width: bbox.width, - height: bbox.height, - }, - }); - var clipTargetAttrs = { - matrix: [1, 0, 0, 0, 1, 0, 0, 0, 1], - }; - clip.setMatrix(Object(_antv_matrix_util__WEBPACK_IMPORTED_MODULE_0__["transform"])(clip.getMatrix(), [ - ['t', -originX, -originY], - ['s', 0, 1], - ['t', originX, originY], - ])); - var shapeTargetAttrs = { - fillOpacity: shape.attr('fillOpacity'), - strokeOpacity: shape.attr('strokeOpacity'), - opacity: shape.attr('opacity'), - }; - shape.attr({ - fillOpacity: 0, - strokeOpacity: 0, - opacity: 0, - }); - clip.animate(clipTargetAttrs, { - duration: 200, - easing: easing, - callback: function () { - shape.setClip(null); - clip.remove(); - }, - delay: delay, - }); - shape.animate(shapeTargetAttrs, { duration: duration, easing: easing, delay: delay }); - callback && setTimeout(function () { return callback(shape); }, duration + delay); -} -funnelScaleInX.animationName = 'funnelScaleInX'; -Object(_antv_g2__WEBPACK_IMPORTED_MODULE_1__["registerAnimation"])('funnelScaleInX', funnelScaleInX); -//# sourceMappingURL=funnel-scale-in-x.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/funnel/animation/funnel-scale-in-y.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/funnel/animation/funnel-scale-in-y.js ***! - \***********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_matrix_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/matrix-util */ "./node_modules/@antv/matrix-util/esm/index.js"); -/* harmony import */ var _antv_g2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/g2 */ "./node_modules/@antv/g2/dist/g2.min.js"); -/* harmony import */ var _antv_g2__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_antv_g2__WEBPACK_IMPORTED_MODULE_1__); - - -function funnelScaleInY(shape, animateCfg) { - var _a = animateCfg || {}, _b = _a.duration, duration = _b === void 0 ? 200 : _b, delay = _a.delay, easing = _a.easing, callback = _a.callback, reverse = _a.reverse; - var bbox = shape.getBBox(); - var originX = (bbox.minX + bbox.maxX) / 2; - var originY = reverse ? bbox.maxY : bbox.minY; - var clip = shape.setClip({ - type: 'rect', - attrs: { - x: bbox.x, - y: bbox.y, - width: bbox.width, - height: bbox.height, - }, - }); - var clipTargetAttrs = { - matrix: [1, 0, 0, 0, 1, 0, 0, 0, 1], - }; - clip.setMatrix(Object(_antv_matrix_util__WEBPACK_IMPORTED_MODULE_0__["transform"])(clip.getMatrix(), [ - ['t', -originX, -originY], - ['s', 1, 0], - ['t', originX, originY], - ])); - var shapeTargetAttrs = { - fillOpacity: shape.attr('fillOpacity'), - strokeOpacity: shape.attr('strokeOpacity'), - opacity: shape.attr('opacity'), - }; - shape.attr({ - fillOpacity: 0, - strokeOpacity: 0, - opacity: 0, - }); - clip.animate(clipTargetAttrs, { - duration: 200, - easing: easing, - callback: function () { - shape.setClip(null); - clip.remove(); - }, - delay: delay, - }); - shape.animate(shapeTargetAttrs, { duration: duration, easing: easing, delay: delay }); - callback && setTimeout(function () { return callback(shape); }, duration + delay); -} -funnelScaleInY.animationName = 'funnelScaleInY'; -Object(_antv_g2__WEBPACK_IMPORTED_MODULE_1__["registerAnimation"])('funnelScaleInY', funnelScaleInY); -//# sourceMappingURL=funnel-scale-in-y.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/funnel/apply-responsive/axis.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/funnel/apply-responsive/axis.js ***! - \*****************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return responsiveAxis; }); -/* harmony import */ var _util_responsive_apply_axis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/responsive/apply/axis */ "./node_modules/@antv/g2plot/esm/util/responsive/apply/axis.js"); - -function responsiveAxis(layer) { - var responsiveTheme = layer.getResponsiveTheme(); - var canvas = layer.canvas; - // x-axis - var x_responsiveAxis = new _util_responsive_apply_axis__WEBPACK_IMPORTED_MODULE_0__["default"]({ - plot: layer, - responsiveTheme: responsiveTheme, - dim: 'x', - }); - // y-axis - var y_responsiveAxis = new _util_responsive_apply_axis__WEBPACK_IMPORTED_MODULE_0__["default"]({ - plot: layer, - responsiveTheme: responsiveTheme, - dim: 'y', - }); - canvas.draw(); -} -//# sourceMappingURL=axis.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/funnel/apply-responsive/index.js": -/*!******************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/funnel/apply-responsive/index.js ***! - \******************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _axis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./axis */ "./node_modules/@antv/g2plot/esm/plots/funnel/apply-responsive/axis.js"); - -var preRenderResponsive = []; -var afterRenderResponsive = [{ name: 'responsiveAxis', method: _axis__WEBPACK_IMPORTED_MODULE_0__["default"] }]; -/* harmony default export */ __webpack_exports__["default"] = ({ - preRender: preRenderResponsive, - afterRender: afterRenderResponsive, -}); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/funnel/geometry/shape/funnel-basic-rect.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/funnel/geometry/shape/funnel-basic-rect.js ***! - \****************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _antv_g2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/g2 */ "./node_modules/@antv/g2/dist/g2.min.js"); -/* harmony import */ var _antv_g2__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_antv_g2__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _antv_g2_lib_geometry_shape_util_get_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @antv/g2/lib/geometry/shape/util/get-style */ "./node_modules/@antv/g2/lib/geometry/shape/util/get-style.js"); -/* harmony import */ var _antv_g2_lib_geometry_shape_util_get_style__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_antv_g2_lib_geometry_shape_util_get_style__WEBPACK_IMPORTED_MODULE_3__); - - - - -// 根据数据点生成矩形的四个关键点 -function _getRectPoints(cfg, isPyramid) { - if (isPyramid === void 0) { isPyramid = false; } - var x = cfg.x, y = cfg.y, y0 = cfg.y0, size = cfg.size; - // 有 4 种情况, - // 1. x, y 都不是数组 - // 2. y是数组,x不是 - // 3. x是数组,y不是 - // 4. x, y 都是数组 - var yMin; - var yMax; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(y)) { - yMin = y[0]; - yMax = y[1]; - } - else { - yMin = y0; - yMax = y; - } - var xMin; - var xMax; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(x)) { - xMin = x[0]; - xMax = x[1]; - } - else { - xMin = x - size / 2; - xMax = x + size / 2; - } - var points = [ - { x: xMin, y: yMin }, - { x: xMin, y: yMax }, - ]; - if (isPyramid) { - // 绘制尖底漏斗图 - // 金字塔漏斗图的关键点 - // 1 - // | 2 - // 0 - points.push({ - x: xMax, - y: (yMax + yMin) / 2, - }); - } - else { - // 矩形的四个关键点,结构如下(左下角顺时针连接) - // 1 ---- 2 - // | | - // 0 ---- 3 - points.push({ x: xMax, y: yMax }, { x: xMax, y: yMin }); - } - return points; -} -// 根据关键点绘制漏斗图的 path -function _getFunnelPath(cfg, compare) { - var path = []; - var points = cfg.points, nextPoints = cfg.nextPoints; - if (compare) { - // 对比漏斗 - var yValues = compare.yValues, yValuesMax = compare.yValuesMax, yValuesNext = compare.yValuesNext; - var originY = (points[0].y + points[1].y) / 2; - var yValueTotal_1 = yValues[0] + yValues[1]; - var yRatios = yValues.map(function (yValue) { return yValue / yValueTotal_1 / 0.5; }); - var yOffset = (yValuesMax[0] / (yValuesMax[0] + yValuesMax[1]) - 0.5) * 0.9; - var spacing = 0.001; - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNil"])(nextPoints)) { - var yValueTotalNext_1 = yValuesNext[0] + yValuesNext[1]; - var yRatiosNext = yValuesNext.map(function (yValueNext) { return yValueNext / yValueTotalNext_1 / 0.5; }); - path.push(['M', points[0].x, yOffset + (points[0].y - originY) * yRatios[0] + originY - spacing], ['L', points[1].x, yOffset + originY - spacing], ['L', nextPoints[1].x, yOffset + originY - spacing], ['L', nextPoints[0].x, yOffset + (nextPoints[3].y - originY) * yRatiosNext[0] + originY - spacing], ['Z']); - path.push(['M', points[0].x, yOffset + originY + spacing], ['L', points[1].x, yOffset + (points[1].y - originY) * yRatios[1] + originY + spacing], ['L', nextPoints[1].x, yOffset + (nextPoints[2].y - originY) * yRatiosNext[1] + originY + spacing], ['L', nextPoints[0].x, yOffset + originY + spacing], ['Z']); - } - else { - path.push(['M', points[0].x, yOffset + (points[0].y - originY) * yRatios[0] + originY], ['L', points[1].x, yOffset + originY], ['L', points[2].x, yOffset + originY], ['L', points[3].x, yOffset + (points[3].y - originY) * yRatios[0] + originY], ['Z']); - path.push(['M', points[0].x, yOffset + 0.002 + originY], ['L', points[1].x, yOffset + 0.002 + (points[1].y - originY) * yRatios[1] + originY], ['L', points[2].x, yOffset + 0.002 + (points[2].y - originY) * yRatios[1] + originY], ['L', points[3].x, yOffset + 0.002 + originY], ['Z']); - } - } - else { - // 标准漏斗 - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNil"])(nextPoints)) { - path.push(['M', points[0].x, points[0].y], ['L', points[1].x, points[1].y], ['L', nextPoints[1].x, nextPoints[1].y], ['L', nextPoints[0].x, nextPoints[0].y], ['Z']); - } - else { - path.push(['M', points[0].x, points[0].y], ['L', points[1].x, points[1].y], ['L', points[2].x, points[2].y], ['L', points[3].x, points[3].y], ['Z']); - } - } - return path; -} -Object(_antv_g2__WEBPACK_IMPORTED_MODULE_2__["registerShape"])('interval', 'funnel-basic-rect', { - getPoints: function (pointInfo) { - pointInfo.size = pointInfo.size * 1.8; // 调整面积 - return _getRectPoints(pointInfo); - }, - draw: function (cfg, container) { - var _a; - var style = Object(_antv_g2_lib_geometry_shape_util_get_style__WEBPACK_IMPORTED_MODULE_3__["getStyle"])(cfg, false, true); - var compare = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(cfg, 'data.__compare__'); - var path = this.parsePath(_getFunnelPath(cfg, compare)); - return container.addShape('path', (_a = { - name: 'interval', - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, style), { path: path }) - }, - _a['__compare__'] = compare, - _a)); - }, - getMarker: function (markerCfg) { - var color = markerCfg.color; - return { - symbol: 'square', - style: { - r: 4, - fill: color, - }, - }; - }, -}); -//# sourceMappingURL=funnel-basic-rect.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/funnel/geometry/shape/funnel-dynamic-rect.js": -/*!******************************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/funnel/geometry/shape/funnel-dynamic-rect.js ***! - \******************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _antv_g2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/g2 */ "./node_modules/@antv/g2/dist/g2.min.js"); -/* harmony import */ var _antv_g2__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_antv_g2__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _antv_g2_lib_geometry_shape_util_get_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @antv/g2/lib/geometry/shape/util/get-style */ "./node_modules/@antv/g2/lib/geometry/shape/util/get-style.js"); -/* harmony import */ var _antv_g2_lib_geometry_shape_util_get_style__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_antv_g2_lib_geometry_shape_util_get_style__WEBPACK_IMPORTED_MODULE_3__); - - - - -function lerp(a, b, factor) { - return (1 - factor) * a + factor * b; -} -// 根据矩形关键点绘制 path -function _getRectPath(points, _a) { - var reverse = _a.reverse, ratioUpper = _a.ratioUpper, ratioLower = _a.ratioLower; - var path = []; - var firstPoint = points[0]; - var originX = (points[1].x + points[2].x) / 2; - var factorTop = 1.2; - var factorBottom = 0.6; - if (reverse) { - var tmp = ratioLower; - ratioLower = ratioUpper; - ratioUpper = tmp; - } - var firstPointX = (firstPoint.x - originX) * lerp(factorBottom, factorTop, ratioLower) + originX; - path.push(['M', firstPointX, firstPoint.y]); - for (var i = 1, len = points.length; i < len; i++) { - var pointX = points[i].x; - switch (i) { - case 1: - case 2: - pointX = (pointX - originX) * lerp(factorBottom, factorTop, ratioUpper) + originX; - break; - case 3: - pointX = (pointX - originX) * lerp(factorBottom, factorTop, ratioLower) + originX; - break; - } - path.push(['L', pointX, points[i].y]); - } - path.push(['L', firstPointX, firstPoint.y]); // 需要闭合 - path.push(['z']); - return path; -} -Object(_antv_g2__WEBPACK_IMPORTED_MODULE_2__["registerShape"])('interval', 'funnel-dynamic-rect', { - draw: function (cfg, container) { - var style = Object(_antv_g2_lib_geometry_shape_util_get_style__WEBPACK_IMPORTED_MODULE_3__["getStyle"])(cfg, false, true); - var custom = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(cfg, 'data.__custom__'); - var path = this.parsePath(_getRectPath(cfg.points, custom)); - return container.addShape('path', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, style), { path: path }), - }); - }, - getMarker: function (markerCfg) { - var color = markerCfg.color, isInPolar = markerCfg.isInPolar; - return { - symbol: isInPolar ? 'circle' : 'square', - style: { - r: isInPolar ? 4.5 : 4, - fill: color, - }, - }; - }, -}); -//# sourceMappingURL=funnel-dynamic-rect.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/funnel/index.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/funnel/index.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/funnel/layer.js"); - - - - -var Funnel = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Funnel, _super); - function Funnel() { - return _super !== null && _super.apply(this, arguments) || this; - } - Funnel.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'funnel'; - _super.prototype.createLayers.call(this, layerProps); - }; - Funnel.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return Funnel; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Funnel); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/funnel/layer.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/funnel/layer.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _antv_dom_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/dom-util */ "./node_modules/@antv/dom-util/esm/index.js"); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _base_view_layer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../base/view-layer */ "./node_modules/@antv/g2plot/esm/base/view-layer.js"); -/* harmony import */ var _geoms_factory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../geoms/factory */ "./node_modules/@antv/g2plot/esm/geoms/factory.js"); -/* harmony import */ var _apply_responsive__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./apply-responsive */ "./node_modules/@antv/g2plot/esm/plots/funnel/apply-responsive/index.js"); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./theme */ "./node_modules/@antv/g2plot/esm/plots/funnel/theme.js"); -/* harmony import */ var _geometry_shape_funnel_basic_rect__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./geometry/shape/funnel-basic-rect */ "./node_modules/@antv/g2plot/esm/plots/funnel/geometry/shape/funnel-basic-rect.js"); -/* harmony import */ var _geometry_shape_funnel_dynamic_rect__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./geometry/shape/funnel-dynamic-rect */ "./node_modules/@antv/g2plot/esm/plots/funnel/geometry/shape/funnel-dynamic-rect.js"); -/* harmony import */ var _animation_funnel_scale_in_x__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./animation/funnel-scale-in-x */ "./node_modules/@antv/g2plot/esm/plots/funnel/animation/funnel-scale-in-x.js"); -/* harmony import */ var _animation_funnel_scale_in_y__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./animation/funnel-scale-in-y */ "./node_modules/@antv/g2plot/esm/plots/funnel/animation/funnel-scale-in-y.js"); -/* harmony import */ var _util_color__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../util/color */ "./node_modules/@antv/g2plot/esm/util/color.js"); - - - - - - - - - - - - - - -function lerp(a, b, factor) { - return (1 - factor) * a + factor * b; -} -var G2_GEOM_MAP = { - column: 'interval', -}; -var PLOT_GEOM_MAP = { - interval: 'funnel', -}; -var FunnelLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FunnelLayer, _super); - function FunnelLayer(props) { - var _this = _super.call(this, props) || this; - _this.type = 'funnel'; - _this._shouldResetPercentages = true; - _this._shouldResetLabels = true; - _this._shouldResetCompareTexts = true; - _this._legendsListenerAttached = false; - _this._onLegendContainerMouseDown = function (e) { - var props = _this.options; - var targetName = e.target.get('name'); - if (targetName.startsWith('legend-item')) { - var legendItem = e.target.get('parent'); - legendItem.set('unchecked', !legendItem.get('unchecked')); - _this.refreshPercentages(); - _this.refreshLabels(); - if (props.dynamicHeight) { - var data = _this._findCheckedDataByMouseDownLegendItem(legendItem); - _this._genCustomFieldForDynamicHeight(data); - } - if (props.compareField) { - var data = _this._findCheckedDataByMouseDownLegendItem(legendItem); - _this._updateDataForCompare(data); - _this.refreshCompareTexts(); - } - } - }; - _this.adjustProps(_this.options); - if (props.dynamicHeight) { - _this._genCustomFieldForDynamicHeight(_this.getData()); - } - if (props.compareField) { - _this.options.data = _this._reduceDataForCompare(_this.getData()); - } - return _this; - } - FunnelLayer.getDefaultOptions = function (props) { - var cfg = { - label: { - visible: true, - adjustColor: true, - formatter: props && (props.compareField || props.transpose) - ? function (xValue, item, idx, yValue, yValueTop) { return "" + yValue; } - : function (xValue, item, idx, yValue, yValueTop) { return xValue + " " + yValue; }, - }, - percentage: { - visible: true, - offsetX: props.transpose ? 0 : 40, - offsetY: props.transpose ? 40 : 0, - spacing: 4, - line: { - visible: true, - style: { - lineWidth: 1, - stroke: 'rgba(0, 0, 0, 0.15)', - }, - }, - text: { - content: '转化率', - style: { - fill: 'rgba(0, 0, 0, 0.65)', - }, - }, - value: { - visible: true, - style: { - fill: 'black', - }, - formatter: function (yValueUpper, yValueLower) { return ((100 * yValueLower) / yValueUpper).toFixed(2) + "%"; }, - }, - }, - tooltip: { - visible: true, - shared: true, - showTitle: false, - showCrosshairs: false, - showMarkers: false, - }, - animation: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _dependents__WEBPACK_IMPORTED_MODULE_3__["DEFAULT_ANIMATE_CFG"], { - appear: { - duration: 800, - }, - }), - dynamicHeight: false, - compareText: { - visible: true, - offsetX: -16, - offsetY: -16, - style: { - fill: 'black', - }, - }, - legend: { - position: 'bottom', - }, - interactions: [{ type: 'tooltip' }, { type: 'legend-filter' }], - }; - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), cfg); - }; - FunnelLayer.prototype.beforeInit = function () { - _super.prototype.beforeInit.call(this); - var props = this.options; - /** 响应式图形 */ - if (props.responsive && props.padding !== 'auto') { - this.applyResponsive('preRender'); - } - }; - FunnelLayer.prototype.coord = function () { - var props = this.options; - var coordConfig = { - actions: props.transpose - ? props.dynamicHeight - ? [['transpose'], ['scale', 1, -1]] - : [['scale', 1, -1]] - : props.dynamicHeight - ? [] - : [['transpose'], ['scale', 1, -1]], - }; - // @ts-ignore - this.setConfig('coordinate', coordConfig); - }; - FunnelLayer.prototype.axis = function () { - this.setConfig('axes', false); - }; - FunnelLayer.prototype.adjustFunnel = function (funnel) { - var props = this.options; - // @ts-ignore - funnel.shape = props.dynamicHeight ? 'funnel-dynamic-rect' : 'funnel-basic-rect'; - funnel.color = { - fields: [props.xField], - values: props.color && (Array.isArray(props.color) ? props.color : [props.color]), - }; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(props.funnelStyle)) { - // @ts-ignore - funnel.style = { callback: props.funnelStyle }; - } - else { - // @ts-ignore - funnel.style = { cfg: props.funnelStyle }; - } - funnel.adjust = [ - { - type: props.dynamicHeight ? 'stack' : 'symmetric', - }, - ]; - }; - FunnelLayer.prototype.tooltip = function () { - var props = this.options; - if (props.compareField) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])(props.tooltip, { - htmlContent: function (title, items) { - var clss, el, color, elMarker; - clss = _dependents__WEBPACK_IMPORTED_MODULE_3__["TooltipCssConst"].CONTAINER_CLASS; - el = Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_2__["createDom"])("
      "); - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_2__["modifyCSS"])(el, _dependents__WEBPACK_IMPORTED_MODULE_3__["HtmlTooltipTheme"][clss]); - var elRoot = el; - if (title) { - clss = _dependents__WEBPACK_IMPORTED_MODULE_3__["TooltipCssConst"].TITLE_CLASS; - el = Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_2__["createDom"])("
      "); - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_2__["modifyCSS"])(el, _dependents__WEBPACK_IMPORTED_MODULE_3__["HtmlTooltipTheme"][clss]); - elRoot.appendChild(el); - var elTitle = el; - clss = _dependents__WEBPACK_IMPORTED_MODULE_3__["TooltipCssConst"].MARKER_CLASS; - el = Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_2__["createDom"])(""); - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_2__["modifyCSS"])(el, _dependents__WEBPACK_IMPORTED_MODULE_3__["HtmlTooltipTheme"][clss]); - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_2__["modifyCSS"])(el, { width: '10px', height: '10px' }); - elTitle.appendChild(el); - elMarker = el; - el = Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_2__["createDom"])("" + title + ""); - elTitle.appendChild(el); - } - if (items) { - clss = _dependents__WEBPACK_IMPORTED_MODULE_3__["TooltipCssConst"].LIST_CLASS; - el = Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_2__["createDom"])("
        "); - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_2__["modifyCSS"])(el, _dependents__WEBPACK_IMPORTED_MODULE_3__["HtmlTooltipTheme"][clss]); - elRoot.appendChild(el); - var elList_1 = el; - items - .reduce(function (pairs, item) { - if (!color) { - color = item.color; - } - var compareValues = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(item, 'point._origin.__compare__.compareValues'); - var yValues = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(item, 'point._origin.__compare__.yValues'); - yValues.forEach(function (yValue, i) { return pairs.push([compareValues[i], yValue]); }); - return pairs; - }, []) - .forEach(function (_a, index) { - var compareValue = _a[0], yValue = _a[1]; - clss = _dependents__WEBPACK_IMPORTED_MODULE_3__["TooltipCssConst"].LIST_ITEM_CLASS; - el = Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_2__["createDom"])("
      • "); - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_2__["modifyCSS"])(el, _dependents__WEBPACK_IMPORTED_MODULE_3__["HtmlTooltipTheme"][clss]); - elList_1.appendChild(el); - var elListItem = el; - clss = _dependents__WEBPACK_IMPORTED_MODULE_3__["TooltipCssConst"].NAME_CLASS; - el = Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_2__["createDom"])("" + compareValue + ""); - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_2__["modifyCSS"])(el, _dependents__WEBPACK_IMPORTED_MODULE_3__["HtmlTooltipTheme"][clss]); - elListItem.appendChild(el); - clss = _dependents__WEBPACK_IMPORTED_MODULE_3__["TooltipCssConst"].VALUE_CLASS; - el = Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_2__["createDom"])("" + yValue + ""); - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_2__["modifyCSS"])(el, _dependents__WEBPACK_IMPORTED_MODULE_3__["HtmlTooltipTheme"][clss]); - elListItem.appendChild(el); - }); - } - if (color && elMarker) { - Object(_antv_dom_util__WEBPACK_IMPORTED_MODULE_2__["modifyCSS"])(elMarker, { backgroundColor: color }); - } - return elRoot; - }, - }); - } - _super.prototype.tooltip.call(this); - }; - FunnelLayer.prototype.addGeometry = function () { - var props = this.options; - var funnel = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_6__["getGeom"])('interval', 'main', { - positionFields: [props.dynamicHeight ? '_' : props.xField, props.yField], - plot: this, - }); - this.adjustFunnel(funnel); - this.funnel = funnel; - this.setConfig('geometry', funnel); - }; - FunnelLayer.prototype.animation = function () { - var _this = this; - _super.prototype.animation.call(this); - var props = this.options; - if (props.animation === false) { - /** 关闭动画 */ - this.funnel.animate = false; - } - else { - var data_1 = this.getData(); - var appearDuration = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(props, 'animation.appear.duration'); - var appearDurationEach_1 = appearDuration / (data_1.length || 1); - if (this._animationAppearTimeoutHandler) { - clearTimeout(this._animationAppearTimeoutHandler); - delete this._animationAppearTimeoutHandler; - } - this._animationAppearTimeoutHandler = setTimeout(function () { - _this.fadeInPercentages(appearDurationEach_1); - if (props.compareField) { - _this.fadeInCompareTexts(appearDurationEach_1); - } - delete _this._animationAppearTimeoutHandler; - }, appearDuration); - this.funnel.animate = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props.animation, { - appear: { - animation: props.transpose ? 'funnelScaleInX' : 'funnelScaleInY', - duration: appearDurationEach_1, - delay: function (datum) { return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["findIndex"])(data_1, function (o) { return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isEqual"])(o, datum); }) * appearDurationEach_1; }, - callback: function (shape) { - _this.fadeInLabels(shape, 0.5 * appearDurationEach_1); - }, - }, - enter: { - animation: 'fade-in', - }, - }); - } - }; - FunnelLayer.prototype.afterRender = function () { - var props = this.options; - /** 响应式 */ - if (props.responsive && props.padding !== 'auto') { - this.applyResponsive('afterRender'); - } - this.resetLabels(); - this.resetPercentages(); - if (props.compareField) { - this.resetCompareTexts(); - } - if (props.padding == 'auto') { - var percentageContainer = this._findPercentageContainer(); - if (percentageContainer) { - this.paddingController.registerPadding(percentageContainer, 'inner', true); - } - var compareTextContainer = this._findCompareTextContainer(); - if (compareTextContainer) { - this.paddingController.registerPadding(compareTextContainer, 'inner', true); - } - } - _super.prototype.afterRender.call(this); - if (props.animation === false) { - this.fadeInLabels(); - this.fadeInPercentages(); - if (props.compareField) { - this.fadeInCompareTexts(); - } - } - if (!this._legendsListenerAttached) { - this._legendsListenerAttached = true; - // @ts-ignore - var legendContainer = this.view.getController('legend').container; - legendContainer.on('mousedown', this._onLegendContainerMouseDown); - } - }; - FunnelLayer.prototype.updateConfig = function (cfg) { - cfg = this.adjustProps(cfg); - _super.prototype.updateConfig.call(this, cfg); - this._legendsListenerAttached = false; - }; - FunnelLayer.prototype.changeData = function (data) { - var props = this.options; - if (props.animation !== false) { - this._shouldResetPercentages = false; - this._shouldResetLabels = false; - } - if (props.dynamicHeight) { - var checkedData = this._findCheckedDataInNewData(data); - this._genCustomFieldForDynamicHeight(checkedData); - } - if (props.compareField) { - data = this._reduceDataForCompare(data); - var checkedData = this._findCheckedDataInNewData(data); - this._updateDataForCompare(checkedData); - } - _super.prototype.changeData.call(this, data); - this.refreshPercentages(); - this.refreshLabels(); - if (props.compareField) { - this.fadeInCompareTexts(); - } - }; - FunnelLayer.prototype.geometryParser = function (dim, type) { - if (dim === 'g2') { - return G2_GEOM_MAP[type]; - } - return PLOT_GEOM_MAP[type]; - }; - FunnelLayer.prototype.applyResponsive = function (stage) { - var _this = this; - var methods = _apply_responsive__WEBPACK_IMPORTED_MODULE_7__["default"][stage]; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(methods, function (r) { - var responsive = r; - responsive.method(_this); - }); - }; - FunnelLayer.prototype.adjustProps = function (props) { - if (props.compareField) { - props.dynamicHeight = false; - } - if (props.dynamicHeight) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["set"])(props, "meta." + props.yField + ".nice", false); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["set"])(props, 'tooltip.shared', false); - } - return props; - }; - FunnelLayer.prototype.resetPercentages = function () { - var _this = this; - if (!this._shouldResetPercentages) - return; - var props = this.options; - var _a = props.percentage || {}, offsetX = _a.offsetX, offsetY = _a.offsetY, spacing = _a.spacing, _b = _a.line, percentageLine = _b === void 0 ? {} : _b, _c = _a.text, percentageText = _c === void 0 ? {} : _c, _d = _a.value, percentageValue = _d === void 0 ? {} : _d; - var adjustTimestamp = Date.now(); - var container = this._findPercentageContainer(true); - this._eachShape(function (shape, index, datumLower, datumUpper) { - if (index > 0) { - var _a = shape.getBBox(), minX = _a.minX, maxX = _a.maxX, maxY = _a.maxY, minY = _a.minY; - var x1 = props.transpose ? minX : maxX; - var y1 = props.transpose ? (props.compareField ? maxY : minY) : minY; - var _b = _this._findPercentageMembersInContainerByIndex(container, index, true), line_1 = _b.line, text_1 = _b.text, value_1 = _b.value; - var eachProcs_1 = [ - function (x, y, line, text, value) { - if (line) { - line.attr(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, percentageLine.style, { - x1: x, - y1: y, - x2: props.transpose ? x + offsetX : x - offsetX, - y2: props.transpose ? y - offsetY : y + offsetY, - opacity: 0, - })); - line.set('adjustTimestamp', adjustTimestamp); - } - var textWidth = 0; - var valueWidth = 0; - var textProc = function () { - if (text) { - text.attr(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, percentageText.style, { - x: props.transpose ? x + offsetX : x - offsetX - spacing - valueWidth - spacing, - y: props.transpose ? y - offsetY - spacing : y + offsetY, - opacity: 0, - text: percentageText.content, - textAlign: props.transpose ? 'left' : 'right', - textBaseline: props.transpose ? 'bottom' : 'middle', - })); - text.set('adjustTimestamp', adjustTimestamp); - textWidth = text.getBBox().width; - } - }; - var valueProc = function () { - if (value) { - value.attr(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, percentageValue.style, { - x: props.transpose ? x + offsetX + textWidth + spacing : x - offsetX - spacing, - y: props.transpose ? y - offsetY - spacing : y + offsetY, - opacity: 0, - text: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(percentageValue.formatter) - ? props.compareField - ? percentageValue.formatter(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(datumUpper, '__compare__.yValues.0'), Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(datumLower, '__compare__.yValues.0')) - : percentageValue.formatter(datumUpper[props.yField], datumLower[props.yField]) - : '', - textAlign: props.transpose ? 'left' : 'right', - textBaseline: props.transpose ? 'bottom' : 'middle', - })); - value.set('adjustTimestamp', adjustTimestamp); - valueWidth = value.getBBox().width; - } - }; - if (props.transpose) { - textProc(); - valueProc(); - } - else { - valueProc(); - textProc(); - } - }, - function (x, y, line, text, value) { - if (line) { - line.attr(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, percentageLine.style, { - x1: x, - y1: y, - x2: x + offsetX, - y2: props.transpose ? (props.compareField ? y + offsetY : y - offsetY) : y + offsetY, - opacity: 0, - })); - line.set('adjustTimestamp', adjustTimestamp); - } - var textWidth = 0; - if (text) { - text.attr(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, percentageText.style, { - x: props.transpose ? x + offsetX : x + offsetX + spacing, - y: props.transpose - ? props.compareField - ? y + offsetY + spacing - : y - offsetY - spacing - : y + offsetY, - opacity: 0, - text: percentageText.content, - textAlign: 'left', - textBaseline: props.transpose ? (props.compareField ? 'top' : 'bottom') : 'middle', - })); - text.set('adjustTimestamp', adjustTimestamp); - textWidth = text.getBBox().width; - } - if (value) { - value.attr(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, percentageValue.style, { - x: props.transpose ? x + offsetX + textWidth + spacing : x + offsetX + spacing + textWidth + spacing, - y: props.transpose - ? props.compareField - ? y + offsetY + spacing - : y - offsetY - spacing - : y + offsetY, - opacity: 0, - text: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(percentageValue.formatter) - ? props.compareField - ? percentageValue.formatter(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(datumUpper, "__compare__.yValues.1"), Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(datumLower, "__compare__.yValues.1")) - : percentageValue.formatter(datumUpper[props.yField], datumLower[props.yField]) - : '', - textAlign: 'left', - textBaseline: props.transpose ? (props.compareField ? 'top' : 'bottom') : 'middle', - })); - value.set('adjustTimestamp', adjustTimestamp); - } - }, - ]; - if (props.compareField) { - var _c = [minX, minY], x0 = _c[0], y0 = _c[1]; - [ - [x0, y0], - [x1, y1], - ].forEach(function (_a, i) { - var x = _a[0], y = _a[1]; - return eachProcs_1[i](x, y, line_1 && line_1[i], text_1 && text_1[i], value_1 && value_1[i]); - }); - } - else { - eachProcs_1[1](x1, y1, line_1, text_1, value_1); - } - } - datumUpper = datumLower; - index++; - }); - container.get('children').forEach(function (child) { - if (child.get('adjustTimestamp') != adjustTimestamp) { - child.attr({ opacity: 0 }); - container.set(child.get('id'), null); - setTimeout(function () { return child.remove(); }, 0); - } - }); - }; - FunnelLayer.prototype.fadeInPercentages = function (duration, callback) { - var _this = this; - var props = this.options; - var container = this._findPercentageContainer(); - var eachProc = function (i) { - var lastBBox = { minX: Infinity, maxX: -Infinity, minY: Infinity, maxY: -Infinity }; - _this._eachShape(function (shape, index) { - var members = _this._findPercentageMembersInContainerByIndex(container, index); - var currBBox = { minX: Infinity, maxX: -Infinity, minY: Infinity, maxY: -Infinity }; - var eachCalc = function (member) { - if (member && member.get('type') == 'text') { - var _a = member.getBBox(), minX = _a.minX, maxX = _a.maxX, minY = _a.minY, maxY = _a.maxY; - if (minX < currBBox.minX) - currBBox.minX = minX; - if (maxX > currBBox.maxX) - currBBox.maxX = maxX; - if (minY < currBBox.minY) - currBBox.minY = minY; - if (maxY > currBBox.maxY) - currBBox.maxY = maxY; - } - }; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(members, function (member) { return (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(member) ? eachCalc(member[i]) : eachCalc(member)); }); - if (currBBox.minX > lastBBox.maxX || - currBBox.maxX < lastBBox.minX || - currBBox.minY > lastBBox.maxY || - currBBox.maxY < lastBBox.minY) { - var eachShow_1 = function (member) { - if (member) { - var attrs = { - opacity: 1, - }; - duration ? member.animate(attrs, duration) : member.attr(attrs); - } - }; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(members, function (member) { return (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(member) ? eachShow_1(member[i]) : eachShow_1(member)); }); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["assign"])(lastBBox, currBBox); - } - }); - }; - props.compareField ? [0, 1].forEach(eachProc) : eachProc(); - duration && callback && setTimeout(callback, duration); - }; - FunnelLayer.prototype.fadeOutPercentages = function (duration, callback) { - var _this = this; - var container = this._findPercentageContainer(); - this._eachShape(function (shape, index) { - var members = _this._findPercentageMembersInContainerByIndex(container, index); - var eachProc = function (member) { - if (member) { - var attrs = { - opacity: 0, - }; - duration ? member.animate(attrs, duration) : member.attr(attrs); - } - }; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(members, function (member) { return (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(member) ? member.forEach(eachProc) : eachProc(member)); }); - }); - duration && callback && setTimeout(callback, duration); - }; - FunnelLayer.prototype.refreshPercentages = function (callback) { - var _this = this; - var props = this.options; - if (props.animation !== false) { - var _a = this._calcRefreshFadeDurations(), fadeOutDuration = _a.fadeOutDuration, fadeInDuration_1 = _a.fadeInDuration; - this._shouldResetPercentages = false; - this.fadeOutPercentages(fadeOutDuration, function () { - _this._shouldResetPercentages = true; - _this.resetPercentages(); - _this.fadeInPercentages(fadeInDuration_1, callback); - }); - } - }; - FunnelLayer.prototype._findPercentageContainer = function (createIfNotFound) { - if (createIfNotFound === void 0) { createIfNotFound = false; } - var middleGroup = this.view.middleGroup; - var percentageContainer = middleGroup.get('percentageContainer'); - if (!percentageContainer && createIfNotFound) { - percentageContainer = middleGroup.addGroup(); - middleGroup.set('percentageContainer', percentageContainer); - } - return percentageContainer; - }; - FunnelLayer.prototype._findPercentageMembersInContainerByIndex = function (container, index, createIfNotFound) { - if (createIfNotFound === void 0) { createIfNotFound = false; } - var props = this.options; - var _a = props.percentage || {}, visible = _a.visible, _b = _a.line, percentageLine = _b === void 0 ? {} : _b, _c = _a.text, percentageText = _c === void 0 ? {} : _c, _d = _a.value, percentageValue = _d === void 0 ? {} : _d; - var members = { - line: undefined, - text: undefined, - value: undefined, - }; - if (visible === false || !container) { - return members; - } - if (percentageLine.visible !== false) { - var find = function (i) { - var lineId = "_percentage-line-" + index + "-" + i; - var line = container.get(lineId); - if (!line && createIfNotFound) { - line = container.addShape({ id: lineId, type: 'line', attrs: {} }); - container.set(lineId, line); - } - return line; - }; - var line = props.compareField ? [0, 1].map(find) : find(0); - members.line = line; - } - if (percentageText.visible !== false) { - var find = function (i) { - var textId = "_percentage-text-" + index + "-" + i; - var text = container.get(textId); - if (!text && createIfNotFound) { - text = container.addShape({ id: textId, type: 'text', attrs: {} }); - container.set(textId, text); - } - return text; - }; - var text = props.compareField ? [0, 1].map(find) : find(0); - members.text = text; - } - if (percentageValue.visible !== false) { - var find = function (i) { - var valueId = "_percentage-value-" + index + "-" + i; - var value = container.get(valueId); - if (!value && createIfNotFound) { - value = container.addShape({ id: valueId, type: 'text', attrs: {} }); - container.set(valueId, value); - } - return value; - }; - var value = props.compareField ? [0, 1].map(find) : find(0); - members.value = value; - } - return members; - }; - FunnelLayer.prototype._calcRefreshFadeDurations = function () { - var props = this.options; - var updateDuration = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(props, 'animation.update.duration'); - var enterDuration = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(props, 'animation.enter.duration'); - var fadeInDuration = Math.min(enterDuration, updateDuration) * 0.6; - var fadeOutDuration = Math.max(enterDuration, updateDuration) * 1.2; - return { fadeInDuration: fadeInDuration, fadeOutDuration: fadeOutDuration }; - }; - FunnelLayer.prototype.resetLabels = function () { - var _this = this; - if (!this._shouldResetLabels) - return; - var props = this.options; - var xField = props.xField, yField = props.yField; - var adjustTimestamp = Date.now(); - var labelsContainer = this._getGeometry().labelsContainer; - var labelProps = props.label || {}; - var labelStyle = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this.theme.label), props.label.style, { - opacity: 0, - textAlign: 'center', - textBaseline: 'middle', - }); - var formatter = labelProps.formatter; - var datumTop; - var compareTop; - this._eachShape(function (shape, index, datum) { - if (index == 0) { - datumTop = datum; - compareTop = datumTop.__compare__; - } - var _a = shape.getBBox(), minX = _a.minX, maxX = _a.maxX, minY = _a.minY, maxY = _a.maxY; - var xValue = datum[xField]; - var yValue = datum[yField]; - if (labelProps.adjustColor) { - labelStyle.fill = _this._getAdjustedTextFillByShape(shape); - } - var compare = datum.__compare__; - var content; - if (compare) { - content = [0, 1] - .map(function (i) { return formatter(xValue, shape, index, compare.yValues[i], compareTop.yValues[i]); }) - .join(props.transpose ? '\n\n' : ' '); - } - else { - content = formatter(xValue, shape, index, yValue, datumTop[yField]); - } - var label = _this._findLabelInContainerByIndex(labelsContainer, index, true); - var ratio = compare ? compare.yValues[0] / (compare.yValues[0] + compare.yValues[1]) : 0.5; - label.attr(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, labelStyle), { x: lerp(minX, maxX, !props.transpose ? ratio : 0.5), y: lerp(minY, maxY, props.transpose ? ratio : 0.5), text: content })); - label.set('adjustTimestamp', adjustTimestamp); - }); - labelsContainer.get('children').forEach(function (label) { - if (label.get('adjustTimestamp') != adjustTimestamp) { - label.attr({ opacity: 0 }); - labelsContainer.set(label.get('id'), null); - setTimeout(function () { return label.remove(); }); - } - }); - }; - FunnelLayer.prototype.fadeInLabels = function (targetShape, duration, callback) { - var _this = this; - var labelsContainer = this._getGeometry().labelsContainer; - this._eachShape(function (shape, index) { - if (!targetShape || targetShape == shape) { - var label = _this._findLabelInContainerByIndex(labelsContainer, index); - if (label) { - var shapeBBox = shape.getBBox(); - var labelBBox = label.getBBox(); - if (labelBBox.minX >= shapeBBox.minX && - labelBBox.maxX <= shapeBBox.maxX && - labelBBox.minY >= shapeBBox.minY && - labelBBox.maxY <= shapeBBox.maxY) { - var attrs = { - opacity: 1, - }; - duration ? label.animate(attrs, duration) : label.attr(attrs); - } - } - } - }); - duration && callback && setTimeout(callback, duration); - }; - FunnelLayer.prototype.fadeOutLabels = function (targetShape, duration, callback) { - var _this = this; - var labelsContainer = this._getGeometry().labelsContainer; - this._eachShape(function (shape, index) { - if (!targetShape || targetShape == shape) { - var label = _this._findLabelInContainerByIndex(labelsContainer, index); - if (label) { - var attrs = { - opacity: 0, - }; - duration ? label.animate(attrs, duration) : label.attr(attrs); - } - } - }); - duration && callback && setTimeout(callback, duration); - }; - FunnelLayer.prototype.refreshLabels = function (callback) { - var _this = this; - var props = this.options; - if (props.animation !== false) { - var _a = this._calcRefreshFadeDurations(), fadeOutDuration = _a.fadeOutDuration, fadeInDuration_2 = _a.fadeInDuration; - this._shouldResetLabels = false; - this.fadeOutLabels(null, fadeOutDuration, function () { - _this._shouldResetLabels = true; - _this.resetLabels(); - _this.fadeInLabels(null, fadeInDuration_2, callback); - }); - } - }; - FunnelLayer.prototype._findLabelInContainerByIndex = function (container, index, createIfNotFound) { - if (createIfNotFound === void 0) { createIfNotFound = false; } - var _a; - var props = this.options; - var label; - if (((_a = props.label) === null || _a === void 0 ? void 0 : _a.visible) === false) { - return label; - } - var labelId = "_label-" + index; - label = container.get(labelId); - if (!label && createIfNotFound) { - label = container.addShape({ - id: labelId, - type: 'text', - attrs: {}, - }); - container.set(labelId, label); - } - return label; - }; - FunnelLayer.prototype.resetCompareTexts = function () { - if (!this._shouldResetCompareTexts) - return; - var props = this.options; - var shapeParentBBox; - var compare; - this._eachShape(function (shape, index, datum) { - if (index == 0) { - shapeParentBBox = shape.get('parent').getBBox(); - compare = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(datum, '__compare__'); - } - }); - if (shapeParentBBox && compare && Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(props, 'compareText.visible') !== false) { - var container_1 = this._findCompareTextContainer(true); - var yValuesMax_1 = compare.yValuesMax, compareValues_1 = compare.compareValues; - var minX_1 = shapeParentBBox.minX, maxX_1 = shapeParentBBox.maxX, minY_1 = shapeParentBBox.minY, maxY_1 = shapeParentBBox.maxY; - var compareTexts_1 = container_1.get('children'); - [0, 1].forEach(function (i) { - var compareText = compareTexts_1[i]; - if (!compareText) { - compareText = container_1.addShape({ type: 'text' }); - } - compareText.attr(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(props, 'compareText.style'), { - text: props.transpose ? compareValues_1[i] : i ? " " + compareValues_1[i] : compareValues_1[i] + " ", - x: props.transpose - ? minX_1 + Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(props, 'compareText.offsetX') - : lerp(minX_1, maxX_1, yValuesMax_1[0] / (yValuesMax_1[0] + yValuesMax_1[1])), - y: props.transpose - ? lerp(minY_1, maxY_1, yValuesMax_1[0] / (yValuesMax_1[0] + yValuesMax_1[1])) + (i ? 8 : -8) - : minY_1 + Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(props, 'compareText.offsetY'), - opacity: 0, - textAlign: props.transpose ? 'right' : i ? 'left' : 'right', - textBaseline: props.transpose ? (i ? 'top' : 'bottom') : 'bottom', - })); - }); - } - }; - FunnelLayer.prototype.fadeInCompareTexts = function (duration, callback) { - var container = this._findCompareTextContainer(); - if (container) { - var compareTexts_2 = container.get('children'); - [0, 1].forEach(function (i) { - var compareText = compareTexts_2[i]; - if (compareText) { - var attrs = { - opacity: 1, - }; - duration ? compareText.animate(attrs, duration) : compareText.attr(attrs); - } - }); - } - duration && callback && setTimeout(callback, duration); - }; - FunnelLayer.prototype.fadeOutCompareTexts = function (duration, callback) { - var container = this._findCompareTextContainer(); - if (container) { - var compareTexts_3 = container.get('children'); - [0, 1].forEach(function (i) { - var compareText = compareTexts_3[i]; - if (compareText) { - var attrs = { - opacity: 0, - }; - duration ? compareText.animate(attrs, duration) : compareText.attr(attrs); - } - }); - } - duration && callback && setTimeout(callback, duration); - }; - FunnelLayer.prototype.refreshCompareTexts = function (callback) { - var _this = this; - var props = this.options; - if (props.animation !== false) { - var _a = this._calcRefreshFadeDurations(), fadeInDuration_3 = _a.fadeInDuration, fadeOutDuration = _a.fadeOutDuration; - this._shouldResetCompareTexts = false; - this.fadeOutCompareTexts(fadeOutDuration, function () { - _this._shouldResetCompareTexts = true; - _this.resetCompareTexts(); - _this.fadeInCompareTexts(fadeInDuration_3, callback); - }); - } - }; - FunnelLayer.prototype._findCompareTextContainer = function (createIfNotFound) { - if (createIfNotFound === void 0) { createIfNotFound = false; } - var middleGroup = this.view.middleGroup; - var compareTextContainer = middleGroup.get('compareTextContainer'); - if (!compareTextContainer && createIfNotFound) { - compareTextContainer = middleGroup.addGroup(); - middleGroup.set('compareTextContainer', compareTextContainer); - } - return compareTextContainer; - }; - FunnelLayer.prototype._eachShape = function (fn) { - var _a; - var data = this._findCheckedData(this.getData()); - var dataLen = data.length; - var index = 0; - var datumUpper; - (_a = this._getGeometry()) === null || _a === void 0 ? void 0 : _a.elements.forEach(function (element) { - var shape = element.shape; - var datumLower = data[index]; - if (index < dataLen) { - fn(shape, index, datumLower, datumUpper); - } - datumUpper = datumLower; - index++; - }); - }; - FunnelLayer.prototype._getGeometry = function () { - return this.view.geometries[0]; - }; - FunnelLayer.prototype._getAdjustedTextFillByShape = function (shape) { - var shapeColor = shape.attr('fill'); - var shapeOpacity = shape.attr('opacity') ? shape.attr('opacity') : 1; - var rgb = Object(_util_color__WEBPACK_IMPORTED_MODULE_13__["rgb2arr"])(shapeColor); - var gray = Math.round(rgb[0] * 0.299 + rgb[1] * 0.587 + rgb[2] * 0.114) / shapeOpacity; - var colorBand = [ - { from: 0, to: 85, color: 'white' }, - { from: 85, to: 170, color: '#F6F6F6' }, - { from: 170, to: 255, color: 'black' }, - ]; - var reflect = Object(_util_color__WEBPACK_IMPORTED_MODULE_13__["mappingColor"])(colorBand, gray); - return reflect; - }; - FunnelLayer.prototype._genCustomFieldForDynamicHeight = function (data) { - var props = this.options; - var total = data.reduce(function (total, datum) { return total + datum[props.yField]; }, 0); - var ratioUpper = 1; - data.forEach(function (datum, index) { - var value = datum[props.yField]; - var share = value / total; - var ratioLower = ratioUpper - share; - datum['__custom__'] = { - datumIndex: index, - dataLength: data.length, - ratioUpper: ratioUpper, - ratioLower: ratioLower, - reverse: props.transpose, - }; - ratioUpper = ratioLower; - }); - }; - FunnelLayer.prototype._findCheckedDataByMouseDownLegendItem = function (legendItem) { - var props = this.options; - var flags = legendItem - .get('parent') - .get('children') - .map(function (legendItem) { return !legendItem.get('unchecked'); }); - var data = this.getData().filter(function (datum, index) { return flags[index]; }); - return data; - }; - FunnelLayer.prototype._findCheckedDataInNewData = function (newData) { - var props = this.options; - // @ts-ignore - var legendContainer = this.view.getController('legend').container; - var uncheckedXValues = legendContainer - .findAll(function (shape) { return shape.get('name') == 'legend-item'; }) - .filter(function (legendItem) { return legendItem.get('unchecked'); }) - .map(function (legendItem) { return legendItem.get('id').replace('-legend-item-', ''); }); - var checkedData = newData.filter(function (datum) { return !Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["contains"])(uncheckedXValues, datum[props.xField]); }); - return checkedData; - }; - FunnelLayer.prototype._findCheckedData = function (data) { - var props = this.options; - // @ts-ignore - var legendContainer = this.view.getController('legend').container; - var checkedXValues = legendContainer - .findAll(function (shape) { return shape.get('name') == 'legend-item'; }) - .filter(function (legendItem) { return !legendItem.get('unchecked'); }) - .map(function (legendItem) { return legendItem.get('id').replace('-legend-item-', ''); }); - var checkedData = data.filter(function (datum) { return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["contains"])(checkedXValues, datum[props.xField]); }); - return checkedData; - }; - FunnelLayer.prototype._reduceDataForCompare = function (data) { - var props = this.options; - var compareValueFirstVisited; - var yValuesMax = [-Infinity, -Infinity]; - data = data.reduce(function (newData, datum) { - var _a; - var xValue = datum[props.xField]; - var yValue = datum[props.yField]; - var compareValue = datum[props.compareField]; - if (!compareValueFirstVisited) - compareValueFirstVisited = compareValue; - var newDatum = newData.find(function (newDatum) { return newDatum[props.xField] == xValue; }); - if (!newDatum) { - newDatum = (_a = {}, - _a[props.xField] = xValue, - _a[props.yField] = 0, - _a['__compare__'] = { - compareValues: [], - yValues: [], - yValuesMax: [], - yValuesNext: undefined, - transpose: props.transpose, - }, - _a); - newData.push(newDatum); - } - var idx = compareValue == compareValueFirstVisited ? 0 : 1; - newDatum['__compare__'].yValues[idx] = yValue; - if (yValuesMax[idx] < yValue) { - yValuesMax[idx] = yValue; - } - newDatum['__compare__'].compareValues[idx] = compareValue; - return newData; - }, []); - data.forEach(function (datum, index) { - datum[props.yField] = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(datum, '__compare__.yValues', []).reduce(function (yTotal, yValue) { return (yTotal += yValue); }, 0); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["set"])(datum, '__compare__.yValuesMax', yValuesMax); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["set"])(datum, '__compare__.yValuesNext', Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(data, index + 1 + ".__compare__.yValues")); - }); - return data; - }; - FunnelLayer.prototype._updateDataForCompare = function (data) { - var yValuesMax = [-Infinity, -Infinity]; - data.forEach(function (datum) { - var yValues = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(datum, '__compare__.yValues'); - [0, 1].forEach(function (i) { - if (yValues[i] > yValuesMax[i]) { - yValuesMax[i] = yValues[i]; - } - }); - }); - data.forEach(function (datum, index) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["set"])(datum, '__compare__.yValuesMax', yValuesMax); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["set"])(datum, '__compare__.yValuesNext', Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(data, index + 1 + ".__compare__.yValues")); - }); - }; - return FunnelLayer; -}(_base_view_layer__WEBPACK_IMPORTED_MODULE_5__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (FunnelLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_4__["registerPlotType"])('funnel', FunnelLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/funnel/theme.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/funnel/theme.js ***! - \*************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme */ "./node_modules/@antv/g2plot/esm/theme/index.js"); - -var BAR_ACTIVE_STYLE = function (style) { - var opacity = style.opacity || 1; - return { opacity: opacity * 0.5 }; -}; -var BAR_DISABLE_STYLE = function (style) { - var opacity = style.opacity || 1; - return { opacity: opacity * 0.5 }; -}; -Object(_theme__WEBPACK_IMPORTED_MODULE_0__["registerTheme"])('bar', { - columnStyle: { - normal: {}, - active: BAR_ACTIVE_STYLE, - disable: BAR_DISABLE_STYLE, - selected: { lineWidth: 1, stroke: 'black' }, - }, -}); -//# sourceMappingURL=theme.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/gauge/event.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/gauge/event.js ***! - \************************************************************/ -/*! exports provided: EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["onEvent"]; }); - - - -var componentMap = { - Range: 'point', - Statistic: 'annotation-text', -}; -var SHAPE_EVENT_MAP = Object(_util_event__WEBPACK_IMPORTED_MODULE_1__["getEventMap"])(componentMap); -Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(_util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"], SHAPE_EVENT_MAP); - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/gauge/geometry/shape/gauge-shape.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/gauge/geometry/shape/gauge-shape.js ***! - \*********************************************************************************/ -/*! exports provided: GaugeShape */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GaugeShape", function() { return GaugeShape; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _antv_g2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/g2 */ "./node_modules/@antv/g2/dist/g2.min.js"); -/* harmony import */ var _antv_g2__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_antv_g2__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../theme */ "./node_modules/@antv/g2plot/esm/theme/index.js"); -/* harmony import */ var _util_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../util/common */ "./node_modules/@antv/g2plot/esm/util/common.js"); - -/** - * @author linhuiw - * @description 仪表盘形状 - */ - - - - -/** - * 仪表盘指针图形 - * 指针主体由梯形和一大一小圆形组成, - * 中心处由灰色圆底和小白圆加以装饰 - */ -var GaugeShape = /** @class */ (function () { - function GaugeShape(uid) { - this.uid = uid; - } - GaugeShape.prototype.setOption = function (type, options, pointerStyle, ringStyle) { - this.type = type; - this.options = options; - this.pointerStyle = pointerStyle; - this.ringStyle = ringStyle; - }; - GaugeShape.prototype.render = function () { - var Gauge = this; // eslint-disable-line - Object(_antv_g2__WEBPACK_IMPORTED_MODULE_2__["registerShape"])('point', 'gauge', { - draw: function (cfg, group) { - this.gauge = {}; - this.gauge.options = Gauge.options; - this.gauge.pointerStyle = Gauge.pointerStyle; - this.gauge.ringStyle = Gauge.ringStyle; - this.gauge.type = Gauge.type; - var gauge = this.gauge; - var type = this.gauge.type; - var point = cfg.points[0]; - var center = this.parsePoint({ - x: 0, - y: 0, - }); - var target = this.parsePoint({ - x: point.x || 0, - y: 1, - }); - gauge.center = center; - gauge.group = group; - var r = { x: center.x - target.x, y: center.y - target.y }; - this.gauge.ringRadius = Math.sqrt(r.x * r.x + r.y * r.y) - 10; - var _a = this.getAngleRange(), starAngle = _a.starAngle, endAngle = _a.endAngle; - var currentAngle = point.x * (endAngle - starAngle) + starAngle; - switch (type) { - case 'meterGauge': - this.drawBarGauge(currentAngle); - this.drawInSideAxis(); - break; - case 'fanGauge': - this.drawGauge(currentAngle); - this.drawOutSideAxis(); - break; - case 'standardGauge': - default: - this.drawGauge(currentAngle); - this.drawAxis(); - break; - } - // 绘制指针 - this.drawPoniter(cfg, group); - }, - drawGauge: function (currentAngle) { - var range = this.gauge.options.range; - this.drawBottomRing(); // 绘制灰底色 - if (range && range.length) { - this.drawRangeColor(); - } - else { - this.drawCurrentRing(currentAngle); - } - }, - drawRangeColor: function () { - var _a = this.gauge.options, min = _a.min, max = _a.max, range = _a.range, styleMix = _a.styleMix, color = _a.color; - var colors = color || Object(_theme__WEBPACK_IMPORTED_MODULE_3__["getGlobalTheme"])().colors; - var _b = this.getAngleRange(), starAngle = _b.starAngle, endAngle = _b.endAngle; - var config = { - min: min, - max: max, - starAngle: starAngle, - endAngle: endAngle, - }; - for (var i = 0; i < range.length; i++) { - var start = this.valueToAngle(range[i], config); - var end = this.valueToAngle(range[i + 1], config); - if (end >= start) { - var path2 = this.getPath(start, end); - this.drawRing(path2, colors[i]); - } - } - }, - drawBottomRing: function () { - var _a = this.getAngleRange(), starAngle = _a.starAngle, endAngle = _a.endAngle; - var background = this.gauge.ringStyle.background; - var path = this.getPath(starAngle, endAngle); - this.drawRing(path, background); - }, - drawCurrentRing: function (current) { - var starAngle = this.getAngleRange().starAngle; - var color = this.gauge.ringStyle.color; - var path3 = this.getPath(starAngle, current); - this.drawRing(path3, color); - }, - drawInSideAxis: function () { - var axis = this.gauge.ringStyle.axis; - var amount = axis.amount; - var _a = this.gauge.options, min = _a.min, max = _a.max; - var _b = this.getAngleRange(), starAngle = _b.starAngle, endAngle = _b.endAngle; - var config = { - min: min, - max: max, - starAngle: starAngle, - endAngle: endAngle, - }; - var interval = (max - min) / amount; - for (var i = 0; i < amount; i++) { - var startValue = min + i * interval; - var angle = this.valueToAngle(startValue + interval / 2, config); - this.drawRect(angle); - } - }, - drawAxis: function () { - var axis = this.gauge.ringStyle.axis; - var amount = axis.amount, length = axis.length, thickness = axis.thickness; - var _a = this.gauge.options, min = _a.min, max = _a.max; - var _b = this.getAngleRange(), starAngle = _b.starAngle, endAngle = _b.endAngle; - var config = { - min: min, - max: max, - starAngle: starAngle, - endAngle: endAngle, - }; - var interval = (max - min) / (amount - 1); - for (var i = 0; i < amount; i++) { - var startValue = min + i * interval; - var angle = this.valueToAngle(startValue, config); - this.drawRect(angle, { - length: i % 5 === 0 ? length : length / 2, - thickness: i % 5 === 0 ? thickness : thickness / 2, - }); - } - }, - drawOutSideAxis: function () { - var axis = this.gauge.ringStyle.axis; - var amount = axis.amount; - var _a = this.gauge.options, min = _a.min, max = _a.max; - var _b = this.getAngleRange(), starAngle = _b.starAngle, endAngle = _b.endAngle; - var config = { - min: min, - max: max, - starAngle: starAngle, - endAngle: endAngle, - }; - var interval = (max - min) / (amount - 1); - for (var i = 0; i < amount; i++) { - var startValue = min + i * interval; - var angle = this.valueToAngle(startValue, config); - this.drawRect(angle); - } - }, - drawBarGauge: function (current) { - var _this = this; - var _a = this.gauge.options, min = _a.min, max = _a.max, range = _a.range, styleMix = _a.styleMix; - var colors = styleMix.colors || Object(_theme__WEBPACK_IMPORTED_MODULE_3__["getGlobalTheme"])().colors; - var _b = this.gauge.ringStyle, color = _b.color, background = _b.background; - var _c = this.getAngleRange(), starAngle = _c.starAngle, endAngle = _c.endAngle; - var config = { - min: min, - max: max, - starAngle: starAngle, - endAngle: endAngle, - }; - var interval = (endAngle - starAngle) / (50 - 1); - var offset = interval / 3; - // 由50个柱子组成 - for (var i = 0; i < 50; i++) { - var start = starAngle + i * interval; - var path2 = this.getPath(start - offset / 2, start + offset - offset / 2); - var fillColor = background; - if (range && range.length) { - var result1 = range.map(function (item) { - return _this.valueToAngle(item, config); - }); - var index = Object(_util_common__WEBPACK_IMPORTED_MODULE_4__["sortedLastIndex"])(result1, start); - /** 最后一个值也在最后一个区间内 */ - var colorIndex = Math.min(index, range.length - 1); - fillColor = colors[colorIndex - 1] || background; - } - else { - fillColor = current >= start ? color : background; - } - this.drawRing(path2, fillColor); - } - }, - getAngleRange: function () { - var angle = this.gauge.ringStyle.angle; - var angleValue = 90 - (360 - angle) * 0.5; - var starAngle = ((270 - 90 - angleValue) * Math.PI) / 180; - var endAngle = ((270 + 90 + angleValue) * Math.PI) / 180; - return { starAngle: starAngle, endAngle: endAngle }; - }, - valueToAngle: function (value, config) { - var min = config.min, max = config.max, starAngle = config.starAngle, endAngle = config.endAngle; - if (value === max) { - return endAngle; - } - if (value === min) { - return starAngle; - } - var ratio = (value - min) / (max - min); - if (max === min) { - ratio = 1; - } - var angle = ratio * (endAngle - starAngle) + starAngle; - angle = Math.max(angle, starAngle); - angle = Math.min(angle, endAngle); - return angle; - }, - drawRing: function (path, color) { - this.gauge.group.addShape('path', { - attrs: { - path: path, - fill: color, - }, - }); - }, - drawRect: function (angle, param) { - var axis = this.gauge.ringStyle.axis; - var config = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, axis), param); - var offset = config.offset, length = config.length, thickness = config.thickness, color = config.color; - var center = this.gauge.center; - var radius = this.gauge.ringRadius + offset; - var xA1 = radius * Math.cos(angle) + center.x; - var yA1 = radius * Math.sin(angle) + center.y; - var xB1 = (radius + length) * Math.cos(angle) + center.x; - var yB1 = (radius + length) * Math.sin(angle) + center.y; - this.gauge.group.addShape('line', { - attrs: { - x1: xA1, - y1: yA1, - x2: xB1, - y2: yB1, - stroke: color, - lineWidth: thickness, - }, - }); - }, - getPath: function (starAngle, endAngle) { - var gauge = this.gauge; - var type = this.gauge.type; - var height = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(gauge, 'options.height'); - var width = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(gauge, 'options.width'); - var center = this.gauge.center; - var length = this.gauge.ringRadius; - var _a = this.gauge.ringStyle, thickness = _a.thickness, minThickness = _a.minThickness, minThickCanvsSize = _a.minThickCanvsSize, miniThickness = _a.miniThickness, bigThickness = _a.bigThickness; - var thick; - var size = Math.min(width, height); - if (type === 'fan' && size < minThickCanvsSize) { - thick = length - minThickness; - } - else { - thick = thickness; - } - var xA1 = length * Math.cos(starAngle) + center.x; - var yA1 = length * Math.sin(starAngle) + center.y; - var xA2 = (length - thick) * Math.cos(starAngle) + center.x; - var yA2 = (length - thick) * Math.sin(starAngle) + center.y; - var xB1 = length * Math.cos(endAngle) + center.x; - var yB1 = length * Math.sin(endAngle) + center.y; - var xB2 = (length - thick) * Math.cos(endAngle) + center.x; - var yB2 = (length - thick) * Math.sin(endAngle) + center.y; - var largeArcFlag = Math.abs(starAngle - endAngle) > Math.PI ? 1 : 0; - return [ - ['M', xA1, yA1], - ['A', length, length, 0, largeArcFlag, 1, xB1, yB1], - ['L', xB2, yB2], - ['A', length - thick, length - thick, 0, largeArcFlag, 0, xA2, yA2], - ['Z'], - ]; - }, - drawPoniter: function (cfg) { - var _a = this.getAngleRange(), starAngle = _a.starAngle, endAngle = _a.endAngle; - var _b = this.gauge.pointerStyle, color = _b.color, circleColorTop = _b.circleColorTop, circleColorBottom = _b.circleColorBottom, radius = _b.radius, thickness = _b.thickness; - var bigCircle = thickness; - var smCircle = thickness / 2.5; - var group = this.gauge.group; - var point = cfg.points[0]; - var center = this.parsePoint({ - x: 0, - y: 0, - }); - // *radius - var current = point.x * (endAngle - starAngle) + starAngle; - var x = this.gauge.ringRadius * radius * Math.cos(current) + this.gauge.center.x; - var y = this.gauge.ringRadius * radius * Math.sin(current) + this.gauge.center.y; - var target = { - x: x, - y: y, - }; - // 外底色灰圆 - group.addShape('circle', { - attrs: { - x: center.x, - y: center.y, - r: bigCircle * 2.2, - fill: circleColorBottom, - }, - }); - var dirVec = { x: center.x - target.x, y: center.y - target.y }; - var length = Math.sqrt(dirVec.x * dirVec.x + dirVec.y * dirVec.y); - dirVec.x *= 1 / length; - dirVec.y *= 1 / length; - var angle1 = -Math.PI / 2; - var x1 = Math.cos(angle1) * dirVec.x - Math.sin(angle1) * dirVec.y; - var y1 = Math.sin(angle1) * dirVec.x + Math.cos(angle1) * dirVec.y; - var angle2 = Math.PI / 2; - var x2 = Math.cos(angle2) * dirVec.x - Math.sin(angle2) * dirVec.y; - var y2 = Math.sin(angle2) * dirVec.x + Math.cos(angle2) * dirVec.y; - var path = [ - ['M', target.x + x1 * smCircle, target.y + y1 * smCircle], - ['L', center.x + x1 * bigCircle, center.y + y1 * bigCircle], - ['L', center.x + x2 * bigCircle, center.y + y2 * bigCircle], - ['L', target.x + x2 * smCircle, target.y + y2 * smCircle], - ['Z'], - ]; - group.addShape('path', { - attrs: { - path: path, - fill: color, - stroke: color, - }, - }); - group.addShape('circle', { - attrs: { - x: target.x, - y: target.y, - r: smCircle, - fill: color, - }, - }); - group.addShape('circle', { - attrs: { - x: center.x, - y: center.y, - r: bigCircle, - fill: color, - }, - }); - // 内部白色小圆 - group.addShape('circle', { - attrs: { - x: center.x, - y: center.y, - r: smCircle / 1.2, - fill: circleColorTop, - }, - }); - }, - }); - }; - return GaugeShape; -}()); - -//# sourceMappingURL=gauge-shape.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/gauge/geometry/shape/options.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/gauge/geometry/shape/options.js ***! - \*****************************************************************************/ -/*! exports provided: getOptions */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOptions", function() { return getOptions; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -/** - * @author linhuiw - * @description 存放仪表盘的配置项,比如指针的颜色、粗细等 - */ - -var basicPointerStyleDark = { - color: '#CFCFCF', - circleColorTop: '#2E364B', - circleColorBottom: '#EEEEEE', - thickness: 4.5, -}; -var getOptions = function (name, theme, colors) { - var basicPointerStyle = basicPointerStyleDark; - var ringBackground = '#f0f0f0'; - var common = { - color: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(colors, [0], '#F6445A'), - thickness: 24, - radius: 1, - angle: 240, - textPosition: '100%', - }; - switch (name) { - case 'standard': - return { - ringStyle: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, common), { background: ringBackground, axis: { - amount: 21, - offset: -35, - length: 5, - thickness: 2, - color: '#999', - } }), - pointerStyle: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, basicPointerStyle), { radius: 0.5 }), - }; - case 'meter': - return { - ringStyle: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, common), { background: ringBackground, axis: { - amount: 25, - offset: -35, - length: 2, - thickness: 1, - color: '#999', - } }), - pointerStyle: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, basicPointerStyle), { radius: 0.5 }), - }; - case 'fan': - return { - ringStyle: { - color: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(colors, [0], '#F6445A'), - background: ringBackground, - thickness: 70, - radius: 1, - angle: 120, - textPosition: '125%', - bottomRatio: 3.5, - axis: { - amount: 10, - offset: 5, - length: 3, - thickness: 3, - color: '#999', - }, - }, - pointerStyle: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, basicPointerStyle), { radius: 0.6 }), - }; - default: - break; - } -}; -//# sourceMappingURL=options.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/gauge/index.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/gauge/index.js ***! - \************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/gauge/layer.js"); - - - - -var Gauge = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Gauge, _super); - function Gauge() { - return _super !== null && _super.apply(this, arguments) || this; - } - Gauge.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'gauge'; - _super.prototype.createLayers.call(this, layerProps); - }; - Gauge.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return Gauge; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Gauge); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/gauge/layer.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/gauge/layer.js ***! - \************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _base_view_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/view-layer */ "./node_modules/@antv/g2plot/esm/base/view-layer.js"); -/* harmony import */ var _util_scale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/scale */ "./node_modules/@antv/g2plot/esm/util/scale.js"); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./theme */ "./node_modules/@antv/g2plot/esm/plots/gauge/theme.js"); -/* harmony import */ var _options__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./options */ "./node_modules/@antv/g2plot/esm/plots/gauge/options.js"); -/* harmony import */ var _geometry_shape_gauge_shape__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./geometry/shape/gauge-shape */ "./node_modules/@antv/g2plot/esm/plots/gauge/geometry/shape/gauge-shape.js"); -/* harmony import */ var _geometry_shape_options__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./geometry/shape/options */ "./node_modules/@antv/g2plot/esm/plots/gauge/geometry/shape/options.js"); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../theme */ "./node_modules/@antv/g2plot/esm/theme/index.js"); -/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./event */ "./node_modules/@antv/g2plot/esm/plots/gauge/event.js"); - -/** - * @author linhuiw - * @description 仪表盘 layer - */ - - - - - - - - - - -var GaugeLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GaugeLayer, _super); - function GaugeLayer(props) { - var _this = _super.call(this, props) || this; - _this.type = 'gauge'; - return _this; - } - GaugeLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), _options__WEBPACK_IMPORTED_MODULE_6__["DEFAULT_GAUGE_CONFIG"]); - }; - GaugeLayer.prototype.init = function () { - var _a = this.options, value = _a.value, range = _a.range; - var rangeSorted = (range || []).map(function (d) { return +d; }).sort(function (a, b) { return a - b; }); - var _b = this.options, _c = _b.min, min = _c === void 0 ? rangeSorted[0] : _c, _d = _b.max, max = _d === void 0 ? rangeSorted[rangeSorted.length - 1] : _d, _e = _b.format, format = _e === void 0 ? function (d) { return "" + d; } : _e; - var valueText = format(value); - var styleMix = this.getStyleMix(); - this.options.styleMix = styleMix; - this.options.data = [{ value: value || 0 }]; - this.options.valueText = valueText; - this.options.min = min; - this.options.max = max; - this.options.format = format; - this.initG2Shape(); - _super.prototype.init.call(this); - }; - GaugeLayer.prototype.getStyleMix = function () { - var _a = this.options, _b = _a.gaugeStyle, gaugeStyle = _b === void 0 ? {} : _b, _c = _a.statistic, statistic = _c === void 0 ? {} : _c; - var _d = this, width = _d.width, height = _d.height; - var size = Math.max(width, height) / 20; - var defaultStyle = Object.assign({}, this.theme, { - stripWidth: size, - tickLabelSize: size / 2, - }); - if (!statistic.size) { - statistic.size = size * 1.2; - } - var style = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, defaultStyle, gaugeStyle, { statistic: statistic }); - return style; - }; - /** - * 绘制指针 - */ - GaugeLayer.prototype.initG2Shape = function () { - this.gaugeShape = new _geometry_shape_gauge_shape__WEBPACK_IMPORTED_MODULE_7__["GaugeShape"](Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["uniqueId"])()); - this.gaugeShape.setOption(this.type, this.options, this.getCustomStyle().pointerStyle, this.getCustomStyle().ringStyle); - this.gaugeShape.render(); - }; - GaugeLayer.prototype.getCustomStyle = function () { - var _a = this.options, color = _a.color, theme = _a.theme; - var globalTheme = Object(_theme__WEBPACK_IMPORTED_MODULE_9__["getGlobalTheme"])(); - var colors = color || globalTheme.colors; - return Object(_geometry_shape_options__WEBPACK_IMPORTED_MODULE_8__["getOptions"])('standard', theme, colors); - }; - GaugeLayer.prototype.geometryParser = function (dim, type) { - throw new Error('Method not implemented.'); - }; - GaugeLayer.prototype.scale = function () { - var _a = this.options, min = _a.min, max = _a.max, format = _a.format, styleMix = _a.styleMix; - var scales = { - value: {}, - }; - Object(_util_scale__WEBPACK_IMPORTED_MODULE_4__["extractScale"])(scales.value, { - min: min, - max: max, - minLimit: min, - maxLimit: max, - nice: true, - formatter: format, - // 自定义 tick step - tickInterval: styleMix.tickInterval, - }); - // @ts-ignore - this.setConfig('scales', scales); - _super.prototype.scale.call(this); - }; - GaugeLayer.prototype.coord = function () { - var coordConfig = { - type: 'polar', - cfg: { - radius: 1, - startAngle: this.options.startAngle * Math.PI, - endAngle: this.options.endAngle * Math.PI, - }, - }; - this.setConfig('coordinate', coordConfig); - }; - GaugeLayer.prototype.axis = function () { - var _a = this.options, styleMix = _a.styleMix, style = _a.style; - var thickness = this.getCustomStyle().ringStyle.thickness; - var offset = typeof styleMix.tickLabelPos === 'number' - ? -styleMix.tickLabelPos - : styleMix.tickLabelPos === 'outer' - ? 0.8 - : -0.8; - var axesConfig = {}; - axesConfig.value = { - line: null, - grid: null, - label: { - offset: offset * (styleMix.stripWidth + styleMix.tickLabelSize + thickness), - textStyle: { - fontSize: styleMix.tickLabelSize, - fill: styleMix.tickLabelColor, - textAlign: 'center', - textBaseline: 'middle', - }, - }, - tickLine: null, - subTickCount: styleMix.subTickCount, - subTickLine: { - length: offset * (styleMix.stripWidth + 1), - stroke: styleMix.tickLineColor, - lineWidth: 1, - lineDash: [0, styleMix.stripWidth / 2, Math.abs(offset * (styleMix.stripWidth + 1))], - }, - labelAutoRotate: true, - }; - axesConfig['1'] = false; - this.setConfig('axes', axesConfig); - }; - GaugeLayer.prototype.addGeometry = function () { - var styleMix = this.options.styleMix; - var pointerColor = styleMix.pointerColor || this.theme.defaultColor; - var pointer = { - type: 'point', - position: { - fields: ['value', '1'], - }, - shape: { - values: ['gauge'], - }, - color: { - values: [pointerColor], - }, - }; - this.setConfig('geometry', pointer); - }; - GaugeLayer.prototype.annotation = function () { - var _a = this.options, statistic = _a.statistic, style = _a.style; - var annotationConfigs = []; - // @ts-ignore - if (statistic && statistic.visible) { - var statistics = this.renderStatistic(); - annotationConfigs.push(statistics); - } - this.setConfig('annotations', annotationConfigs); - }; - GaugeLayer.prototype.renderStatistic = function () { - var _a = this.options, statistic = _a.statistic, styleMix = _a.styleMix; - var text = { - type: 'text', - content: statistic.text, - top: true, - position: styleMix.statistic.position, - style: { - fill: styleMix.statistic.color, - fontSize: styleMix.statistic.size, - textAlign: 'center', - textBaseline: 'middle', - }, - }; - return text; - }; - GaugeLayer.prototype.parseEvents = function (eventParser) { - _super.prototype.parseEvents.call(this, _event__WEBPACK_IMPORTED_MODULE_10__); - }; - return GaugeLayer; -}(_base_view_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (GaugeLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('gauge', GaugeLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/gauge/options.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/gauge/options.js ***! - \**************************************************************/ -/*! exports provided: DEFAULT_GAUGE_CONFIG */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_GAUGE_CONFIG", function() { return DEFAULT_GAUGE_CONFIG; }); -/** - * 仪表盘默认配置 - */ -var DEFAULT_GAUGE_CONFIG = { - style: 'standard', - startAngle: -7 / 6, - endAngle: 1 / 6, - gaugeStyle: { - tickLineColor: 'rgba(0,0,0,0)', - pointerColor: '#bfbfbf', - }, - statistic: { - position: ['50%', '80%'], - }, -}; -//# sourceMappingURL=options.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/gauge/theme.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/gauge/theme.js ***! - \************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme */ "./node_modules/@antv/g2plot/esm/theme/index.js"); - -Object(_theme__WEBPACK_IMPORTED_MODULE_0__["registerTheme"])('gauge', { - stripWidth: 30, - stripBackColor: '#ddd', - tickInterval: 20, - tickLabelPos: 'inner', - tickLabelSize: 16, - tickLabelColor: '#aaa', - tickLineColor: '#aaa', - subTickCount: 4, - labelPos: ['50%', '80%'], - labelColor: '#666', - labelSize: 30, -}); -//# sourceMappingURL=theme.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/grouped-bar/index.js": -/*!******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/grouped-bar/index.js ***! - \******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/grouped-bar/layer.js"); - - - - -var GroupedBar = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GroupedBar, _super); - function GroupedBar() { - return _super !== null && _super.apply(this, arguments) || this; - } - GroupedBar.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'groupedBar'; - _super.prototype.createLayers.call(this, layerProps); - }; - GroupedBar.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return GroupedBar; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (GroupedBar); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/grouped-bar/layer.js": -/*!******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/grouped-bar/layer.js ***! - \******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _bar_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../bar/layer */ "./node_modules/@antv/g2plot/esm/plots/bar/layer.js"); - - - - -var GroupedBarLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GroupedBarLayer, _super); - function GroupedBarLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'groupedBar'; - return _this; - } - GroupedBarLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - xAxis: { - visible: true, - grid: { - visible: true, - }, - }, - yAxis: { - visible: true, - title: { - visible: false, - }, - }, - label: { - visible: true, - position: 'right', - offset: 8, - adjustColor: true, - }, - legend: { - visible: true, - position: 'right-top', - offsetY: 0, - }, - }); - }; - GroupedBarLayer.prototype.afterRender = function () { - _super.prototype.afterRender.call(this); - var names = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["valuesOfKey"])(this.options.data, this.options.groupField); - this.view.on('tooltip:change', function (e) { - var items = e.items; - var origin_items = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(items); - for (var i = 0; i < names.length; i++) { - var name_1 = names[i]; - for (var j = 0; j < origin_items.length; j++) { - var item = origin_items[j]; - if (item.name === name_1) { - e.items[i] = item; - } - } - } - }); - }; - GroupedBarLayer.prototype.scale = function () { - var defaultMeta = {}; - defaultMeta[this.options.groupField] = { - values: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["valuesOfKey"])(this.options.data, this.options.groupField), - }; - if (!this.options.meta) { - this.options.meta = defaultMeta; - } - else { - this.options.meta = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, this.options.meta, defaultMeta); - } - _super.prototype.scale.call(this); - }; - GroupedBarLayer.prototype.adjustBar = function (bar) { - bar.adjust = [ - { - type: 'dodge', - marginRatio: 0.1, - }, - ]; - }; - GroupedBarLayer.prototype.geometryTooltip = function () { - this.bar.tooltip = {}; - var tooltipOptions = this.options.tooltip; - if (tooltipOptions.fields) { - this.bar.tooltip.fields = tooltipOptions.fields; - } - if (tooltipOptions.formatter) { - this.bar.tooltip.callback = tooltipOptions.formatter; - if (!tooltipOptions.fields) { - this.bar.tooltip.fields = [this.options.xField, this.options.yField, this.options.groupField]; - } - } - }; - return GroupedBarLayer; -}(_bar_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (GroupedBarLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('groupedBar', GroupedBarLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/grouped-column/index.js": -/*!*********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/grouped-column/index.js ***! - \*********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/grouped-column/layer.js"); - - - - -var GroupedColumn = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GroupedColumn, _super); - function GroupedColumn() { - return _super !== null && _super.apply(this, arguments) || this; - } - GroupedColumn.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'groupedColumn'; - _super.prototype.createLayers.call(this, layerProps); - }; - GroupedColumn.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return GroupedColumn; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (GroupedColumn); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/grouped-column/layer.js": -/*!*********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/grouped-column/layer.js ***! - \*********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _column_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../column/layer */ "./node_modules/@antv/g2plot/esm/plots/column/layer.js"); - - - - -var GroupedColumnLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GroupedColumnLayer, _super); - function GroupedColumnLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'groupedColumn'; - return _this; - } - GroupedColumnLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - yAxis: { - title: { - visible: true, - }, - }, - }); - }; - GroupedColumnLayer.prototype.getResponsiveTheme = function () { - return this.themeController.getResponsiveTheme('column'); - }; - GroupedColumnLayer.prototype.addGeometry = function () { - _super.prototype.addGeometry.call(this); - }; - GroupedColumnLayer.prototype.adjustColumn = function (column) { - column.adjust = [ - { - type: 'dodge', - marginRatio: 0.1, - }, - ]; - }; - GroupedColumnLayer.prototype.geometryTooltip = function () { - this.column.tooltip = {}; - var tooltipOptions = this.options.tooltip; - if (tooltipOptions.fields) { - this.column.tooltip.fields = tooltipOptions.fields; - } - if (tooltipOptions.formatter) { - this.column.tooltip.callback = tooltipOptions.formatter; - if (!tooltipOptions.fields) { - this.column.tooltip.fields = [this.options.xField, this.options.yField, this.options.groupField]; - } - } - }; - return GroupedColumnLayer; -}(_column_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (GroupedColumnLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('groupedColumn', GroupedColumnLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/grouped-rose/index.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/grouped-rose/index.js ***! - \*******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/grouped-rose/layer.js"); - - - - -var GroupedRose = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GroupedRose, _super); - function GroupedRose() { - return _super !== null && _super.apply(this, arguments) || this; - } - GroupedRose.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'groupedRose'; - _super.prototype.createLayers.call(this, layerProps); - }; - GroupedRose.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return GroupedRose; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (GroupedRose); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/grouped-rose/layer.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/grouped-rose/layer.js ***! - \*******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _rose_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../rose/layer */ "./node_modules/@antv/g2plot/esm/plots/rose/layer.js"); - - - - -var GroupedRoseLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GroupedRoseLayer, _super); - function GroupedRoseLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'groupedRose'; - return _this; - } - GroupedRoseLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - xAxis: { - visible: true, - line: { - visible: false, - }, - tickLine: { - visible: false, - }, - grid: { - visible: true, - alignTick: false, - style: { - lineWidth: 0.5, - }, - }, - label: { - offset: 5, - autoRotate: true, - }, - }, - yAxis: { - visible: false, - }, - }); - }; - GroupedRoseLayer.prototype.adjustRoseAdjust = function () { - return [ - { - type: 'dodge', - marginRatio: 1, - }, - ]; - }; - GroupedRoseLayer.prototype.geometryTooltip = function () { - this.rose.tooltip = {}; - var tooltipOptions = this.options.tooltip; - if (tooltipOptions.fields) { - this.rose.tooltip.fields = tooltipOptions.fields; - } - if (tooltipOptions.formatter) { - this.rose.tooltip.callback = tooltipOptions.formatter; - if (!tooltipOptions.fields) { - this.rose.tooltip.fields = [this.options.radiusField, this.options.categoryField, this.options.groupField]; - } - } - }; - return GroupedRoseLayer; -}(_rose_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (GroupedRoseLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('groupedRose', GroupedRoseLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/heatmap/component/index.js": -/*!************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/heatmap/component/index.js ***! - \************************************************************************/ -/*! exports provided: getPlotComponents */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPlotComponents", function() { return getPlotComponents; }); -/* harmony import */ var _label__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./label */ "./node_modules/@antv/g2plot/esm/plots/heatmap/component/label.js"); -/* harmony import */ var _legend__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./legend */ "./node_modules/@antv/g2plot/esm/plots/heatmap/component/legend.js"); - - -var ComponentsInfo = { - label: { Ctr: _label__WEBPACK_IMPORTED_MODULE_0__["default"] }, - legend: { Ctr: _legend__WEBPACK_IMPORTED_MODULE_1__["default"], padding: 'outer' }, -}; -function getPlotComponents(plot, type, cfg) { - if (plot.options[type] && plot.options[type].visible) { - var componentInfo = ComponentsInfo[type]; - var component = new componentInfo.Ctr(cfg); - if (componentInfo.padding) { - plot.paddingController.registerPadding(component, componentInfo.padding); - } - return component; - } -} -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/heatmap/component/label.js": -/*!************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/heatmap/component/label.js ***! - \************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/color */ "./node_modules/@antv/g2plot/esm/util/color.js"); - - -var MatrixLabel = /** @class */ (function () { - function MatrixLabel(cfg) { - this.destroyed = false; - this.view = cfg.view; - this.plot = cfg.plot; - var defaultOptions = this.getDefaultOptions(); - this.options = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])(defaultOptions, cfg, {}); - this.init(); - } - MatrixLabel.prototype.init = function () { - var _this = this; - this.container = this.view.geometries[0].labelsContainer; - this.view.on('beforerender', function () { - _this.clear(); - _this.plot.canvas.draw(); - }); - }; - MatrixLabel.prototype.render = function () { - var _this = this; - var elements = this.view.geometries[0].elements; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(elements, function (ele) { - var shape = ele.shape; - var _a = _this.options, style = _a.style, offsetX = _a.offsetX, offsetY = _a.offsetY; - var formatter = _this.options.formatter; - var content = formatter ? formatter(_this.getContent(shape)) : _this.getContent(shape); - var position = _this.getPosition(shape); - var color = _this.getTextColor(shape); - var label = _this.container.addShape('text', { - attrs: Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])({}, style, { - x: position.x + offsetX, - y: position.y + offsetY, - text: content, - fill: color, - textAlign: 'center', - textBaseline: 'middle', - }), - name: 'label', - }); - if (_this.options.adjustPosition) { - _this.adjustLabel(label, shape); - } - }); - }; - MatrixLabel.prototype.clear = function () { - if (this.container) { - this.container.clear(); - } - }; - MatrixLabel.prototype.hide = function () { - this.container.set('visible', false); - this.plot.canvas.draw(); - }; - MatrixLabel.prototype.show = function () { - this.container.set('visible', true); - this.plot.canvas.draw(); - }; - MatrixLabel.prototype.destroy = function () { - if (this.container) { - this.container.remove(); - } - this.destroyed = true; - }; - MatrixLabel.prototype.getBBox = function () { }; - MatrixLabel.prototype.getDefaultOptions = function () { - var theme = this.plot.theme; - var labelStyle = theme.label.style; - return { - offsetX: 0, - offsetY: 0, - style: Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(labelStyle), - }; - }; - MatrixLabel.prototype.getContent = function (shape) { - var data = shape.get('origin').data; - var field = this.plot.options.colorField; - return data[field]; - }; - MatrixLabel.prototype.getPosition = function (shape) { - var bbox = shape.getBBox(); - return { - x: bbox.minX + bbox.width / 2, - y: bbox.minY + bbox.height / 2, - }; - }; - MatrixLabel.prototype.getTextColor = function (shape) { - if (this.options.adjustColor) { - var shapeColor = shape.attr('fill'); - var shapeOpacity = shape.attr('opacity') ? shape.attr('opacity') : 1; - var rgb = Object(_util_color__WEBPACK_IMPORTED_MODULE_1__["rgb2arr"])(shapeColor); - var gray = Math.round(rgb[0] * 0.299 + rgb[1] * 0.587 + rgb[2] * 0.114) / shapeOpacity; - var colorBand = [ - { from: 0, to: 85, color: 'white' }, - { from: 85, to: 170, color: '#F6F6F6' }, - { from: 170, to: 255, color: 'black' }, - ]; - var reflect = Object(_util_color__WEBPACK_IMPORTED_MODULE_1__["mappingColor"])(colorBand, gray); - return reflect; - } - var defaultColor = this.options.style.fill; - return defaultColor; - }; - MatrixLabel.prototype.adjustLabel = function (label, shape) { - var labelRange = label.getBBox(); - var shapeRange = shape.getBBox(); - if (labelRange.width > shapeRange.width || labelRange.height > shapeRange.height) { - label.attr('text', ''); - } - }; - return MatrixLabel; -}()); -/* harmony default export */ __webpack_exports__["default"] = (MatrixLabel); -//# sourceMappingURL=label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/heatmap/component/legend.js": -/*!*************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/heatmap/component/legend.js ***! - \*************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_bbox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/bbox */ "./node_modules/@antv/g2plot/esm/util/bbox.js"); - - - -var LABEL_MARGIN = 4; -var MatrixLegend = /** @class */ (function () { - function MatrixLegend(cfg) { - this.destroyed = false; - this.dataSlides = {}; - this.interactiveEvents = {}; - var defaultOptions = this.getDefaultOptions(); - this.options = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, defaultOptions, cfg); - this.view = this.options.view; - this.afterRender = true; - this.init(); - } - MatrixLegend.prototype.init = function () { - var _this = this; - this.layout = this.getLayout(); - this.width = this.options.width ? this.options.width : this.getDefaultWidth(); - this.height = this.options.height ? this.options.height : this.getDefaultHeight(); - var plotContainer = this.options.plot.container; - if (this.container) { - this.container.remove(); - } - this.container = plotContainer.addGroup(); - this.view.on('beforerender', function () { - _this.clear(); - _this.options.plot.canvas.draw(); - }); - }; - MatrixLegend.prototype.render = function () { - var scales = this.view.geometries[0].scales; - var colorField = this.options.plot.options.colorField; - this.colorScale = scales[colorField]; - var _a = this.colorScale, min = _a.min, max = _a.max; - var color = this.options.plot.options.color; - if (this.layout === 'horizontal') { - this.renderHorizontal(min, max, color); - } - else { - this.renderVertical(min, max, color); - } - this.legendLayout(); - this.addInteraction(); - }; - MatrixLegend.prototype.hide = function () { - this.container.set('visible', false); - this.options.plot.canvas.draw(); - }; - MatrixLegend.prototype.show = function () { - this.container.set('visible', true); - this.options.plot.canvas.draw(); - }; - MatrixLegend.prototype.clear = function () { - if (this.container) { - var children = this.container.get('children'); - this.container.clear(); - } - }; - MatrixLegend.prototype.destroy = function () { - if (this.container) { - this.container.remove(); - } - this.offEvent(); - this.destroyed = true; - }; - MatrixLegend.prototype.getBBox = function () { - var origin_bbox = this.container.getBBox(); - return new _util_bbox__WEBPACK_IMPORTED_MODULE_2__["default"](this.x, this.y, origin_bbox.width, origin_bbox.height); - }; - MatrixLegend.prototype.renderVertical = function (min, max, colors) { - var _this = this; - var valueStep = (max - min) / (colors.length - 1); - var colorStep = 1 / (colors.length - 1); - var tickStep = this.height / (colors.length - 1); - var gradientColor = 'l(90)'; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(colors, function (c, index) { - var stepNum = colorStep * index; - gradientColor += stepNum + ":" + c + " "; - }); - this.container.addShape('rect', { - attrs: { - x: 0, - y: 0, - width: this.width, - height: this.height, - fill: gradientColor, - }, - name: 'legend', - }); - // draw tick and label - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(colors, function (c, index) { - // tick - var step = tickStep * index; - _this.container.addShape('path', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: [ - ['M', 0, step], - ['L', _this.width, step], - ] }, _this.options.ticklineStyle), - }); - // value - var value = Math.round(valueStep * index); - _this.container.addShape('text', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ text: value, textAlign: 'left', textBaseline: 'middle', x: _this.width + LABEL_MARGIN, y: step }, _this.options.text.style), - name: 'legend-label', - }); - }); - //anchor - var tri_width = 10; - var tri_height = 14; - var tri_path = [['M', -tri_width, -tri_height / 2], ['L', 0, 0], ['L', -tri_width, tri_height / 2], ['Z']]; - this.anchor = this.container.addShape('path', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: tri_path }, this.options.anchorStyle), - }); - this.anchor.set('visible', false); - }; - MatrixLegend.prototype.renderHorizontal = function (min, max, colors) { - var _this = this; - var valueStep = (max - min) / (colors.length - 1); - var colorStep = 1 / (colors.length - 1); - var tickStep = this.width / (colors.length - 1); - var gradientColor = 'l(0)'; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(colors, function (c, index) { - var stepNum = colorStep * index; - gradientColor += stepNum + ":" + c + " "; - }); - this.container.addShape('rect', { - attrs: { - x: 0, - y: 0, - width: this.width, - height: this.height, - fill: gradientColor, - }, - name: 'legend', - }); - // draw tick and label - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(colors, function (c, index) { - // tick - var step = tickStep * index; - _this.container.addShape('path', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: [ - ['M', step, 0], - ['L', step, _this.height], - ] }, _this.options.ticklineStyle), - name: 'legend-label', - }); - // value - var value = Math.round(valueStep * index); - _this.container.addShape('text', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ text: value, textAlign: 'center', textBaseline: 'top', x: step, y: _this.height + LABEL_MARGIN }, _this.options.text.style), - }); - }); - //anchor - var tri_width = 14; - var tri_height = 10; - var tri_path = [['M', 0, 0], ['L', -tri_width / 2, -tri_height], ['L', tri_width / 2, -tri_height], ['Z']]; - this.anchor = this.container.addShape('path', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: tri_path }, this.options.anchorStyle), - }); - this.anchor.set('visible', false); - }; - MatrixLegend.prototype.getLayout = function () { - var positions = this.options.position.split('-'); - this.position = positions[0]; - if (positions[0] === 'left' || positions[0] === 'right') { - return 'vertical'; - } - return 'horizontal'; - }; - MatrixLegend.prototype.getDefaultWidth = function () { - if (this.layout === 'horizontal') { - var width = this.view.coordinateBBox.width; - return width; - } - return 10; - }; - MatrixLegend.prototype.getDefaultHeight = function () { - if (this.layout === 'vertical') { - var height = this.view.coordinateBBox.height; - return height; - } - return 10; - }; - MatrixLegend.prototype.legendLayout = function () { - var _this = this; - var panelRange = this.view.coordinateBBox; - var bleeding = this.options.plot.getPlotTheme().bleeding; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(bleeding)) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(bleeding, function (it, index) { - if (typeof bleeding[index] === 'function') { - bleeding[index] = bleeding[index](_this.options.plot.options); - } - }); - } - var bbox = this.container.getBBox(); - var x = 0; - var y = 0; - var positions = this.options.position.split('-'); - var plotWidth = this.options.plot.width; - var plotHeight = this.options.plot.height; - // 先确定x - if (positions[0] === 'left') { - x = bleeding[3]; - } - else if (positions[0] === 'right') { - x = plotWidth - bleeding[1] - bbox.width; - } - else if (positions[1] === 'center') { - // default - if (this.width === panelRange.width) { - x = panelRange.x; - } - else { - x = (plotWidth - bbox.width) / 2; - } - } - else if (positions[1] === 'left') { - x = bleeding[3]; - } - else if (positions[1] === 'right') { - x = this.options.plot.width - bleeding[1] - bbox.width; - } - // 再确定y - if (positions[0] === 'bottom') { - y = plotHeight - bleeding[2] - bbox.height; - } - else if (positions[0] === 'top') { - y = this.getTopPosition(bleeding); - } - else if (positions[1] === 'center') { - // default - if (this.height === panelRange.height) { - y = panelRange.y; - } - else { - //用户自行设定 - y = (plotHeight - bbox.height) / 2; - } - } - else if (positions[1] === 'top') { - y = bleeding[0]; - } - else if (positions[1] === 'bottom') { - y = plotHeight - bleeding[2] - bbox.height; - } - this.x = x; - this.y = y; - this.container.translate(x, y); - }; - MatrixLegend.prototype.getDefaultOptions = function () { - return { - text: { - style: { - fontSize: 12, - fill: 'rgba(0, 0, 0, 0.45)', - }, - }, - ticklineStyle: { - lineWidth: 1, - stroke: 'rgba(0, 0, 0, 0.8)', - }, - anchorStyle: { - fill: 'rgba(0,0,0,0.5)', - }, - triggerOn: 'mousemove', - }; - }; - MatrixLegend.prototype.addInteraction = function () { - var _this = this; - var geomType; - if (this.options.plot.options.shapeType === 'rect') { - geomType = 'polygon'; - } - else { - geomType = 'point'; - } - var eventName = geomType + ":" + this.options.triggerOn; - var labelEventName = "label:" + this.options.triggerOn; - var field = this.options.plot.options.colorField; - var _a = this.colorScale, min = _a.min, max = _a.max; - var geomEventHandler = function (ev) { - var value = ev.data.data[field]; - var ratio = (value - min) / (max - min); - _this.moveAnchor(ratio); - }; - this.view.on(eventName, geomEventHandler); - this.interactiveEvents[eventName] = { - target: this.view, - handler: geomEventHandler, - }; - /*this.view.on(labelEventName, (ev) => { - const value = ev.data[field]; - const ratio = (value - min) / (max - min); - this.moveAnchor(ratio); - });*/ - var mouseleaveHandler = function (ev) { - _this.anchor.set('visible', false); - }; - this.options.plot.canvas.on('mouseleave', mouseleaveHandler); - this.interactiveEvents.mouseleave = { - target: this.options.plot.canvas, - handler: mouseleaveHandler, - }; - }; - MatrixLegend.prototype.moveAnchor = function (ratio) { - this.anchor.set('visible', true); - if (this.layout === 'vertical') { - var pos = this.height * ratio; - var ulMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1]; - ulMatrix[7] = pos; - this.anchor.stopAnimate(); - this.anchor.animate({ - matrix: ulMatrix, - }, 400, 'easeLinear'); - } - else { - var pos = this.width * ratio; - var ulMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1]; - ulMatrix[6] = pos; - this.anchor.stopAnimate(); - this.anchor.animate({ - matrix: ulMatrix, - }, 400, 'easeLinear'); - } - }; - MatrixLegend.prototype.getTopPosition = function (bleeding) { - if (this.options.plot.description) { - var bbox = this.options.plot.description.getBBox(); - return bbox.maxY + 10; - } - else if (this.options.plot.title) { - var bbox = this.options.plot.title.getBBox(); - return bbox.maxY + 10; - } - return bleeding[0]; - }; - MatrixLegend.prototype.offEvent = function () { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(this.interactiveEvents, function (event, key) { - var target = event.target, handler = event.handler; - target.off(key, handler); - }); - }; - return MatrixLegend; -}()); -/* harmony default export */ __webpack_exports__["default"] = (MatrixLegend); -//# sourceMappingURL=legend.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/heatmap/index.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/heatmap/index.js ***! - \**************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/heatmap/layer.js"); - - - - -var Heatmap = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Heatmap, _super); - function Heatmap() { - return _super !== null && _super.apply(this, arguments) || this; - } - Heatmap.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'heatmap'; - _super.prototype.createLayers.call(this, layerProps); - }; - Heatmap.prototype.changeShape = function (type) { - var layer = this.layers[0]; - layer.changeShape(type); - }; - Heatmap.prototype.mappingSize = function (field) { - var layer = this.layers[0]; - layer.mappingSize(field); - }; - Heatmap.prototype.disableMappingSize = function () { - var layer = this.layers[0]; - layer.disableMappingSize(); - }; - Heatmap.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return Heatmap; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Heatmap); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/heatmap/layer.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/heatmap/layer.js ***! - \**************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _antv_scale__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/scale */ "./node_modules/@antv/scale/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _base_view_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../base/view-layer */ "./node_modules/@antv/g2plot/esm/base/view-layer.js"); -/* harmony import */ var _shape__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./shape */ "./node_modules/@antv/g2plot/esm/plots/heatmap/shape.js"); -/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./component */ "./node_modules/@antv/g2plot/esm/plots/heatmap/component/index.js"); - - - - - - - -var HeatmapLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(HeatmapLayer, _super); - function HeatmapLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'heatmap'; - _this.gridSize = []; - _this.plotComponents = []; - return _this; - } - HeatmapLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - shapeType: 'rect', - legend: { - visible: true, - position: 'right-center', - }, - tooltip: { - shared: false, - showCrosshairs: false, - showMarkers: false, - }, - xAxis: { - visible: true, - gridAlign: 'center', - grid: { - visible: true, - }, - tickLine: { - visible: true, - }, - line: { - visible: false, - }, - label: { - visible: true, - autoHide: true, - autoRotate: true, - }, - }, - yAxis: { - visible: true, - gridAlign: 'center', - grid: { - visible: true, - align: 'center', - }, - tickLine: { - visible: true, - }, - label: { - autoHide: true, - autoRotate: false, - }, - }, - color: ['#9ae3d5', '#66cdbb', '#e7a744', '#f1e066', '#f27664', '#e7c1a2'], - label: { - visible: true, - adjustColor: true, - adjustPosition: true, - offset: 0, - style: { - stroke: 'rgba(255,255,255,0)', - lineWidth: 0, - }, - }, - interactions: [{ type: 'tooltip' }], - }); - }; - HeatmapLayer.prototype.afterRender = function () { - this.renderPlotComponents(); - _super.prototype.afterRender.call(this); - }; - HeatmapLayer.prototype.changeShape = function (type) { - if (this.options.shapeType === type) { - return; - } - this.options.shapeType = type; - if (type === 'rect') { - var shapes = this.getShapes(); - this.circleToRect(shapes); - } - else if (type === 'circle') { - var shapes = this.getShapes(); - this.rectToCircle(shapes); - } - }; - HeatmapLayer.prototype.mappingSize = function (field) { - if (this.options.sizeField && this.options.sizeField === field) { - return; - } - this.options.sizeField = field; - // 创建scale - var values = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["valuesOfKey"])(this.options.data, field); - var min = Math.min.apply(Math, values); - var max = Math.max.apply(Math, values); - var LinearScale = Object(_antv_scale__WEBPACK_IMPORTED_MODULE_2__["getScale"])('linear'); - var scale = new LinearScale({ - min: min, - max: max, - }); - var shapes = this.getShapes(); - if (this.options.shapeType === 'rect') { - this.rectSizeMapping(shapes, scale, field); - } - else if (this.options.shapeType === 'circle') { - this.circleSizeMapping(shapes, scale, field); - } - }; - HeatmapLayer.prototype.disableMappingSize = function () { - var shapes = this.getShapes(); - if (this.options.shapeType === 'rect') { - this.rectDisableSizeMapping(shapes); - } - else if (this.options.shapeType === 'circle') { - this.circleDisableSizeMapping(shapes); - } - }; - HeatmapLayer.prototype.destroy = function () { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(this.plotComponents, function (component) { - component.destroy(); - }); - _super.prototype.destroy.call(this); - }; - HeatmapLayer.prototype.geometryParser = function () { - return ''; - }; - HeatmapLayer.prototype.coord = function () { }; - HeatmapLayer.prototype.legend = function () { - this.setConfig('legends', false); - }; - HeatmapLayer.prototype.addGeometry = function () { - this.gridSize = this.getGridSize(); - var geomConfig; - if (this.options.shapeType === 'rect') { - geomConfig = this.addRect(); - } - else { - var circle = this.addCircle(); - geomConfig = circle; - } - if (this.options.tooltip && (this.options.tooltip.fields || this.options.tooltip.formatter)) { - this.geometryTooltip(geomConfig); - } - this.setConfig('geometry', geomConfig); - }; - HeatmapLayer.prototype.addRect = function () { - // 如果用户设置了size,将size数值转换为[0,1]区间 - var size = [0.3, 0.9]; - if (this.options.shapeSize) { - size[0] = this.options.shapeSize[0] / this.gridSize[0]; - size[1] = this.options.shapeSize[1] / this.gridSize[1]; - } - var rect = { - type: 'polygon', - position: { - fields: [this.options.xField, this.options.yField], - }, - color: { - fields: [this.options.colorField], - values: this.options.color, - }, - shape: { - values: ['rect'], - }, - label: false, - }; - if (this.options.sizeField) { - rect.size = { - fields: [this.options.sizeField], - values: size, - }; - } - else { - rect.size = { - values: [1], - }; - } - return rect; - }; - HeatmapLayer.prototype.addCircle = function () { - var size = [0.3, 0.9]; - if (this.options.shapeSize) { - size = this.options.shapeSize; - } - else { - size[0] = this.gridSize[0] * size[0] * 0.5; - size[1] = this.gridSize[1] * size[1] * 0.5; - } - var circle = { - type: 'point', - position: { - fields: [this.options.xField, this.options.yField], - }, - color: { - fields: [this.options.colorField], - values: this.options.color, - }, - shape: { - values: ['curvePoint'], - }, - label: false, - }; - if (this.options.sizeField) { - circle.size = { - fields: [this.options.sizeField], - values: size, - }; - } - else { - circle.size = { - values: [Math.min(this.gridSize[0], this.gridSize[1]) * 0.5 * 0.9], - }; - } - return circle; - }; - HeatmapLayer.prototype.geometryTooltip = function (config) { - config.tooltip = {}; - var tooltipOptions = this.options.tooltip; - if (tooltipOptions.fields) { - config.tooltip.fields = tooltipOptions.fields; - } - if (tooltipOptions.formatter) { - config.tooltip.callback = tooltipOptions.formatter; - if (!tooltipOptions.fields) { - config.tooltip.fields = [this.options.xField, this.options.yField]; - if (this.options.colorField) { - config.tooltip.fields.push(this.options.colorField); - } - } - } - }; - HeatmapLayer.prototype.getGridSize = function () { - if (this.options.padding === 'auto') { - return [0, 0]; - } - else { - var viewRange = this.getViewRange(); - var _a = this.options, padding = _a.padding, xField = _a.xField, yField = _a.yField, data = _a.data; - var width = viewRange.width - padding[1] - padding[3]; - var height = viewRange.height - padding[0] - padding[2]; - var xCount = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["valuesOfKey"])(data, xField).length; - var yCount = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["valuesOfKey"])(data, yField).length; - return [width / xCount, height / yCount]; - } - }; - HeatmapLayer.prototype.circleToRect = function (shapes) { - var _this = this; - var gridSize = this.gridSize; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(shapes, function (shape) { - var _a = shape.get('origin'), x = _a.x, y = _a.y, size = _a.size; - var sizeRatio = (size * 2) / Math.min(gridSize[0], gridSize[1]); - if (!_this.options.sizeField) { - sizeRatio = 1; - } - var curvePath = Object(_shape__WEBPACK_IMPORTED_MODULE_5__["getCircleCurve"])(x, y, size); - var rectPath = Object(_shape__WEBPACK_IMPORTED_MODULE_5__["getRectPath"])(x, y, gridSize[0], gridSize[1], sizeRatio); - shape.stopAnimate(); - shape.attr('path', curvePath); - shape.animate({ - path: rectPath, - }, 500, 'easeLinear'); - }); - }; - HeatmapLayer.prototype.rectToCircle = function (shapes) { - var _this = this; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(shapes, function (shape) { - var coord = shape.get('coord'); - var points = shape.get('origin').points; - var ps = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(points, function (p) { - ps.push(coord.convertPoint(p)); - }); - var bbox = shape.getBBox(); - var width = bbox.width; - var height = bbox.height; - var centerX = bbox.minX + width / 2; - var centerY = bbox.minY + height / 2; - var offsetRatio = _this.options.sizeField ? 1 : 0.9; - var curvePath = Object(_shape__WEBPACK_IMPORTED_MODULE_5__["getCircleCurve"])(centerX, centerY, (Math.min(width, height) / 2) * offsetRatio); - var circlePath = Object(_shape__WEBPACK_IMPORTED_MODULE_5__["getCirclePath"])(centerX, centerY, (Math.min(width, height) / 2) * offsetRatio); - shape.stopAnimate(); - shape.animate({ - path: curvePath, - }, 500, 'easeLinear', function () { - shape.attr('path', circlePath); - }); - }); - }; - HeatmapLayer.prototype.rectSizeMapping = function (shapes, scale, field) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(shapes, function (shape) { - var data = shape.get('origin').data; - var ratio = 0.3 + scale.scale(data[field]) * 0.6; - shape.get('origin').size = ratio; - var bbox = shape.getBBox(); - var width = bbox.width; - var height = bbox.height; - var centerX = bbox.minX + width / 2; - var centerY = bbox.minY + height / 2; - var path = Object(_shape__WEBPACK_IMPORTED_MODULE_5__["getRectPath"])(centerX, centerY, width, height, ratio); - shape.stopAnimate(); - shape.animate({ - path: path, - }, 500, 'easeLinear'); - }); - }; - HeatmapLayer.prototype.circleSizeMapping = function (shapes, scale, field) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(shapes, function (shape) { - var data = shape.get('origin').data; - var ratio = 0.3 + scale.scale(data[field]) * 0.6; - var _a = shape.get('origin'), x = _a.x, y = _a.y, size = _a.size; - var path = Object(_shape__WEBPACK_IMPORTED_MODULE_5__["getCirclePath"])(x, y, size * ratio); - shape.get('origin').size = size * ratio; - shape.stopAnimate(); - shape.animate({ - path: path, - }, 500, 'easeLinear'); - }); - }; - HeatmapLayer.prototype.circleDisableSizeMapping = function (shapes) { - var _this = this; - this.options.sizeField = null; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(shapes, function (shape) { - var _a = shape.get('origin'), x = _a.x, y = _a.y; - var size = Math.min(_this.gridSize[0], _this.gridSize[1]) * 0.9; - shape.get('origin').size = size / 2; - var path = Object(_shape__WEBPACK_IMPORTED_MODULE_5__["getCirclePath"])(x, y, size / 2); - shape.stopAnimate(); - shape.animate({ - path: path, - }, 500, 'easeLinear'); - }); - }; - HeatmapLayer.prototype.rectDisableSizeMapping = function (shapes) { - var _this = this; - this.options.sizeField = null; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(shapes, function (shape) { - var bbox = shape.getBBox(); - var width = bbox.width; - var height = bbox.height; - var centerX = bbox.minX + width / 2; - var centerY = bbox.minY + height / 2; - var path = Object(_shape__WEBPACK_IMPORTED_MODULE_5__["getRectPath"])(centerX, centerY, _this.gridSize[0], _this.gridSize[1], 1); - shape.get('origin').size = 1; - shape.stopAnimate(); - shape.animate({ - path: path, - }, 500, 'easeLinear'); - }); - }; - HeatmapLayer.prototype.getShapes = function () { - var elements = this.view.geometries[0].elements; - var shapes = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(elements, function (ele) { - shapes.push(ele.shape); - }); - return shapes; - }; - HeatmapLayer.prototype.renderPlotComponents = function () { - var _this = this; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(this.plotComponents, function (component) { - component.destroy(); - }); - this.plotComponents = []; - var componentsType = ['label', 'legend']; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(componentsType, function (t) { - var cfg = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ view: _this.view, plot: _this }, _this.options[t]); - var component = Object(_component__WEBPACK_IMPORTED_MODULE_6__["getPlotComponents"])(_this, t, cfg); - if (component) { - component.render(); - _this.plotComponents.push(component); - } - }); - }; - return HeatmapLayer; -}(_base_view_layer__WEBPACK_IMPORTED_MODULE_4__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (HeatmapLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_3__["registerPlotType"])('heatmap', HeatmapLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/heatmap/shape.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/heatmap/shape.js ***! - \**************************************************************/ -/*! exports provided: getRectPath, getCirclePath, getCircleCurve */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRectPath", function() { return getRectPath; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCirclePath", function() { return getCirclePath; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCircleCurve", function() { return getCircleCurve; }); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); - -function getRectPath(cx, cy, width, height, size) { - var w = width * size; - var h = height * size; - var path = [ - ['M', cx - w / 2, cy + h / 2], - ['Q', cx - w / 2, cy, cx - w / 2, cy - h / 2], - ['Q', cx, cy - h / 2, cx + w / 2, cy - h / 2], - ['Q', cx + w / 2, cy, cx + w / 2, cy + h / 2], - ['Q', cx, cy + h / 2, cx - w / 2, cy + h / 2], - ['Z'], - ]; - return path; -} -function getCirclePath(x, y, size) { - var path = [ - ['M', x, y], - ['l', -size, 0], - ['a', size, size, 0, 1, 0, size * 2, 0], - ['a', size, size, 0, 1, 0, -(size * 2), 0], - ['Z'], - ]; - return path; -} -function getCircleCurve(x, y, size) { - // 计算四个角和中点 - var path = [ - ['M', x - size, y], - ['Q', x - size, y - size, x, y - size], - ['Q', x + size, y - size, x + size, y], - ['Q', x + size, y + size, x, y + size], - ['Q', x - size, y + size, x - size, y], - ['Z'], - ]; - return path; -} -Object(_dependents__WEBPACK_IMPORTED_MODULE_0__["registerShape"])('polygon', 'rect', { - draw: function (cfg, container) { - var points = this.parsePoints(cfg.points); - var width = points[2].x - points[0].x; - var height = points[0].y - points[1].y; - var centerX = points[0].x + width / 2; - var centerY = points[1].y + height / 2; - /* - const path = [ - ['M', centerX - w / 2, centerY + h / 2], - ['L', centerX - w / 2, centerY - h / 2], - ['L', centerX + w / 2, centerY - h / 2], - ['L', centerX + w / 2, centerY + h / 2], - ['Z'], - ]; - */ - var path = getRectPath(centerX, centerY, width, height, cfg.size); - return container.addShape('path', { - attrs: { - path: path, - fill: cfg.color, - opacity: 1, - }, - }); - }, -}); -Object(_dependents__WEBPACK_IMPORTED_MODULE_0__["registerShape"])('point', 'curvePoint', { - draw: function (cfg, container) { - var path = getCirclePath(cfg.x, cfg.y, cfg.size); - return container.addShape('path', { - attrs: { - path: path, - fill: cfg.color, - opacity: 1, - }, - }); - }, -}); -//# sourceMappingURL=shape.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/histogram/index.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/histogram/index.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/histogram/layer.js"); - - - - -var Histogram = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Histogram, _super); - function Histogram() { - return _super !== null && _super.apply(this, arguments) || this; - } - Histogram.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'histogram'; - _super.prototype.createLayers.call(this, layerProps); - }; - Histogram.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return Histogram; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Histogram); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/histogram/layer.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/histogram/layer.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _util_math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/math */ "./node_modules/@antv/g2plot/esm/util/math.js"); -/* harmony import */ var _column_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../column/layer */ "./node_modules/@antv/g2plot/esm/plots/column/layer.js"); - - - - - -var HistogramLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(HistogramLayer, _super); - function HistogramLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'histogram'; - return _this; - } - HistogramLayer.prototype.init = function () { - this.options.xField = 'range'; - this.options.yField = 'count'; - _super.prototype.init.call(this); - }; - HistogramLayer.prototype.processData = function (originData) { - var _this = this; - var _a = this.options, binField = _a.binField, binWidth = _a.binWidth, binNumber = _a.binNumber; - var originData_copy = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(originData); - // 根据binField value对源数据进行排序 - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["sortBy"])(originData_copy, binField); - // 获取源数据binField values的range - var values = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["valuesOfKey"])(originData_copy, binField); - var range = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["getRange"])(values); - var rangeWidth = range.max - range.min; - // 计算分箱,直方图分箱的计算基于binWidth,如配置了binNumber则将其转为binWidth进行计算 - var _binWidth = binWidth; - if (!binWidth && binNumber) { - _binWidth = rangeWidth / binNumber; - } - // 当binWidth和binNumber都没有指定的情况,采用Sturges formula自动生成binWidth - if (!binWidth && !binNumber) { - var _defaultBinNumber = Object(_util_math__WEBPACK_IMPORTED_MODULE_3__["sturges"])(values); - _binWidth = rangeWidth / _defaultBinNumber; - } - var bins = {}; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(originData_copy, function (data) { - var value = data[binField]; - var bin = _this.getBin(value, _binWidth); - var binName = bin[0] + "-" + bin[1]; - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["hasKey"])(bins, binName)) { - bins[binName] = { name: binName, range: bin, count: 0, data: [] }; - } - bins[binName].data.push(data); - bins[binName].count += 1; - }); - // 将分箱数据转换为plotData - var plotData = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(bins, function (bin) { - plotData.push(bin); - }); - return plotData; - }; - HistogramLayer.prototype.scale = function () { - _super.prototype.scale.call(this); - // fixme: 类型定义 - var range = this.config.scales.range; - range.nice = false; - range.type = 'linear'; - }; - HistogramLayer.prototype.getBin = function (value, binWidth) { - var index = Math.floor(value / binWidth); - return [binWidth * index, binWidth * (index + 1)]; - }; - return HistogramLayer; -}(_column_layer__WEBPACK_IMPORTED_MODULE_4__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (HistogramLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('histogram', HistogramLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/index.js": -/*!******************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/index.js ***! - \******************************************************/ -/*! exports provided: Line, Treemap, StepLine, Bar, StackedBar, GroupedBar, PercentStackedBar, RangeBar, Area, StackedArea, PercentStackedArea, Column, GroupedColumn, StackedColumn, RangeColumn, PercentStackedColumn, Pie, DensityHeatmap, Heatmap, WordCloud, Rose, Funnel, StackedRose, GroupedRose, Radar, Liquid, Histogram, Density, Donut, Waterfall, Scatter, Bubble, Bullet, Calendar, Gauge, FanGauge, MeterGauge, Ring, GroupColumn, GroupBar, PercentageStackArea, PercentageStackBar, PercentageStackColumn, StackArea, StackBar, StackColumn */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _line__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./line */ "./node_modules/@antv/g2plot/esm/plots/line/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Line", function() { return _line__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _treemap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./treemap */ "./node_modules/@antv/g2plot/esm/plots/treemap/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Treemap", function() { return _treemap__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - -/* harmony import */ var _step_line__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./step-line */ "./node_modules/@antv/g2plot/esm/plots/step-line/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StepLine", function() { return _step_line__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - -/* harmony import */ var _bar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bar */ "./node_modules/@antv/g2plot/esm/plots/bar/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Bar", function() { return _bar__WEBPACK_IMPORTED_MODULE_3__["default"]; }); - -/* harmony import */ var _stacked_bar__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./stacked-bar */ "./node_modules/@antv/g2plot/esm/plots/stacked-bar/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackedBar", function() { return _stacked_bar__WEBPACK_IMPORTED_MODULE_4__["default"]; }); - -/* harmony import */ var _grouped_bar__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./grouped-bar */ "./node_modules/@antv/g2plot/esm/plots/grouped-bar/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupedBar", function() { return _grouped_bar__WEBPACK_IMPORTED_MODULE_5__["default"]; }); - -/* harmony import */ var _percent_stacked_bar__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./percent-stacked-bar */ "./node_modules/@antv/g2plot/esm/plots/percent-stacked-bar/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PercentStackedBar", function() { return _percent_stacked_bar__WEBPACK_IMPORTED_MODULE_6__["default"]; }); - -/* harmony import */ var _range_bar__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./range-bar */ "./node_modules/@antv/g2plot/esm/plots/range-bar/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeBar", function() { return _range_bar__WEBPACK_IMPORTED_MODULE_7__["default"]; }); - -/* harmony import */ var _area__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./area */ "./node_modules/@antv/g2plot/esm/plots/area/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Area", function() { return _area__WEBPACK_IMPORTED_MODULE_8__["default"]; }); - -/* harmony import */ var _stacked_area__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./stacked-area */ "./node_modules/@antv/g2plot/esm/plots/stacked-area/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackedArea", function() { return _stacked_area__WEBPACK_IMPORTED_MODULE_9__["default"]; }); - -/* harmony import */ var _percent_stacked_area__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./percent-stacked-area */ "./node_modules/@antv/g2plot/esm/plots/percent-stacked-area/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PercentStackedArea", function() { return _percent_stacked_area__WEBPACK_IMPORTED_MODULE_10__["default"]; }); - -/* harmony import */ var _column__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./column */ "./node_modules/@antv/g2plot/esm/plots/column/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Column", function() { return _column__WEBPACK_IMPORTED_MODULE_11__["default"]; }); - -/* harmony import */ var _grouped_column__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./grouped-column */ "./node_modules/@antv/g2plot/esm/plots/grouped-column/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupedColumn", function() { return _grouped_column__WEBPACK_IMPORTED_MODULE_12__["default"]; }); - -/* harmony import */ var _stacked_column__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./stacked-column */ "./node_modules/@antv/g2plot/esm/plots/stacked-column/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackedColumn", function() { return _stacked_column__WEBPACK_IMPORTED_MODULE_13__["default"]; }); - -/* harmony import */ var _range_column__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./range-column */ "./node_modules/@antv/g2plot/esm/plots/range-column/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RangeColumn", function() { return _range_column__WEBPACK_IMPORTED_MODULE_14__["default"]; }); - -/* harmony import */ var _percent_stacked_column__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./percent-stacked-column */ "./node_modules/@antv/g2plot/esm/plots/percent-stacked-column/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PercentStackedColumn", function() { return _percent_stacked_column__WEBPACK_IMPORTED_MODULE_15__["default"]; }); - -/* harmony import */ var _pie__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./pie */ "./node_modules/@antv/g2plot/esm/plots/pie/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Pie", function() { return _pie__WEBPACK_IMPORTED_MODULE_16__["default"]; }); - -/* harmony import */ var _density_heatmap__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./density-heatmap */ "./node_modules/@antv/g2plot/esm/plots/density-heatmap/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DensityHeatmap", function() { return _density_heatmap__WEBPACK_IMPORTED_MODULE_17__["default"]; }); - -/* harmony import */ var _heatmap__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./heatmap */ "./node_modules/@antv/g2plot/esm/plots/heatmap/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Heatmap", function() { return _heatmap__WEBPACK_IMPORTED_MODULE_18__["default"]; }); - -/* harmony import */ var _word_cloud__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./word-cloud */ "./node_modules/@antv/g2plot/esm/plots/word-cloud/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WordCloud", function() { return _word_cloud__WEBPACK_IMPORTED_MODULE_19__["default"]; }); - -/* harmony import */ var _rose__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./rose */ "./node_modules/@antv/g2plot/esm/plots/rose/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Rose", function() { return _rose__WEBPACK_IMPORTED_MODULE_20__["default"]; }); - -/* harmony import */ var _funnel__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./funnel */ "./node_modules/@antv/g2plot/esm/plots/funnel/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Funnel", function() { return _funnel__WEBPACK_IMPORTED_MODULE_21__["default"]; }); - -/* harmony import */ var _stacked_rose__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./stacked-rose */ "./node_modules/@antv/g2plot/esm/plots/stacked-rose/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackedRose", function() { return _stacked_rose__WEBPACK_IMPORTED_MODULE_22__["default"]; }); - -/* harmony import */ var _grouped_rose__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./grouped-rose */ "./node_modules/@antv/g2plot/esm/plots/grouped-rose/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupedRose", function() { return _grouped_rose__WEBPACK_IMPORTED_MODULE_23__["default"]; }); - -/* harmony import */ var _radar__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./radar */ "./node_modules/@antv/g2plot/esm/plots/radar/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Radar", function() { return _radar__WEBPACK_IMPORTED_MODULE_24__["default"]; }); - -/* harmony import */ var _liquid__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./liquid */ "./node_modules/@antv/g2plot/esm/plots/liquid/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Liquid", function() { return _liquid__WEBPACK_IMPORTED_MODULE_25__["default"]; }); - -/* harmony import */ var _histogram__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./histogram */ "./node_modules/@antv/g2plot/esm/plots/histogram/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Histogram", function() { return _histogram__WEBPACK_IMPORTED_MODULE_26__["default"]; }); - -/* harmony import */ var _density__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./density */ "./node_modules/@antv/g2plot/esm/plots/density/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Density", function() { return _density__WEBPACK_IMPORTED_MODULE_27__["default"]; }); - -/* harmony import */ var _donut__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./donut */ "./node_modules/@antv/g2plot/esm/plots/donut/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Donut", function() { return _donut__WEBPACK_IMPORTED_MODULE_28__["default"]; }); - -/* harmony import */ var _waterfall__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./waterfall */ "./node_modules/@antv/g2plot/esm/plots/waterfall/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Waterfall", function() { return _waterfall__WEBPACK_IMPORTED_MODULE_29__["default"]; }); - -/* harmony import */ var _scatter__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./scatter */ "./node_modules/@antv/g2plot/esm/plots/scatter/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scatter", function() { return _scatter__WEBPACK_IMPORTED_MODULE_30__["default"]; }); - -/* harmony import */ var _bubble__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./bubble */ "./node_modules/@antv/g2plot/esm/plots/bubble/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Bubble", function() { return _bubble__WEBPACK_IMPORTED_MODULE_31__["default"]; }); - -/* harmony import */ var _bullet__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./bullet */ "./node_modules/@antv/g2plot/esm/plots/bullet/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Bullet", function() { return _bullet__WEBPACK_IMPORTED_MODULE_32__["default"]; }); - -/* harmony import */ var _calendar__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./calendar */ "./node_modules/@antv/g2plot/esm/plots/calendar/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Calendar", function() { return _calendar__WEBPACK_IMPORTED_MODULE_33__["default"]; }); - -/* harmony import */ var _gauge__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./gauge */ "./node_modules/@antv/g2plot/esm/plots/gauge/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Gauge", function() { return _gauge__WEBPACK_IMPORTED_MODULE_34__["default"]; }); - -/* harmony import */ var _fan_gauge__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./fan-gauge */ "./node_modules/@antv/g2plot/esm/plots/fan-gauge/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FanGauge", function() { return _fan_gauge__WEBPACK_IMPORTED_MODULE_35__["default"]; }); - -/* harmony import */ var _meter_gauge__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./meter-gauge */ "./node_modules/@antv/g2plot/esm/plots/meter-gauge/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MeterGauge", function() { return _meter_gauge__WEBPACK_IMPORTED_MODULE_36__["default"]; }); - -/* harmony import */ var _compatiblePlots__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./compatiblePlots */ "./node_modules/@antv/g2plot/esm/plots/compatiblePlots/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Ring", function() { return _compatiblePlots__WEBPACK_IMPORTED_MODULE_37__["Ring"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupColumn", function() { return _compatiblePlots__WEBPACK_IMPORTED_MODULE_37__["GroupColumn"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupBar", function() { return _compatiblePlots__WEBPACK_IMPORTED_MODULE_37__["GroupBar"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PercentageStackArea", function() { return _compatiblePlots__WEBPACK_IMPORTED_MODULE_37__["PercentageStackArea"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PercentageStackBar", function() { return _compatiblePlots__WEBPACK_IMPORTED_MODULE_37__["PercentageStackBar"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PercentageStackColumn", function() { return _compatiblePlots__WEBPACK_IMPORTED_MODULE_37__["PercentageStackColumn"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackArea", function() { return _compatiblePlots__WEBPACK_IMPORTED_MODULE_37__["StackArea"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackBar", function() { return _compatiblePlots__WEBPACK_IMPORTED_MODULE_37__["StackBar"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StackColumn", function() { return _compatiblePlots__WEBPACK_IMPORTED_MODULE_37__["StackColumn"]; }); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/line/animation/clipIn-with-data.js": -/*!********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/line/animation/clipIn-with-data.js ***! - \********************************************************************************/ -/*! exports provided: getPlotOption */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPlotOption", function() { return getPlotOption; }); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - - -var plotInfo; -function clipingWithData(shape, animateCfg, cfg) { - var geometry = shape.get('element').geometry; - /** 动画初始状态 */ - var index = shape.get('index'); - var coord = geometry.coordinate; - var scales = geometry.scales; - var yScale = scales[plotInfo.options.yField]; - var shapeData = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(shape.get('origin')); - setClip(shape, coord); - var clip = shape.get('clipShape'); - var parent = shape.get('parent'); - var offsetX = 12; - var title; - if (animateCfg.seriesField) { - title = parent.addShape('text', { - attrs: { - x: coord.start.x + offsetX, - y: 0, - text: shapeData[0]._origin[animateCfg.seriesField], - fill: shape.attr('stroke'), - fontSize: 12, - textAlign: 'start', - textBaseline: 'middle', - }, - }); - } - var offsetY = title ? 16 : 0; - var marker = parent.addShape('text', { - attrs: { - x: coord.start.x + offsetX, - y: offsetY, - text: "test" + index, - fill: shape.attr('stroke'), - fontSize: 12, - textAlign: 'start', - textBaseline: 'middle', - }, - }); - /** 动画执行之后 */ - animateCfg.callback = function () { - if (shape && !shape.get('destroyed')) { - shape.setClip(null); - clip.remove(); - marker.animate({ - opacity: 0, - }, 300, function () { - marker.remove(); - }); - if (title) { - marker.animate({ - opacity: 0, - }, 300, function () { - marker.remove(); - }); - } - } - }; - /** 执行动画 */ - /** 准备动画参数 */ - var delay = animateCfg.delay; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(delay)) { - delay = animateCfg.delay(index); - } - var easing = animateCfg.easing; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(easing)) { - easing = animateCfg.easing(index); - } - /** 动起来 */ - var i = 0; - clip.animate({ - width: coord.getWidth(), - }, animateCfg.duration, easing, animateCfg.callback, delay); - (animateCfg.onFrame = function (ratio) { - var position = getPositionByRatio(ratio, shapeData, coord, i); - if (!position) - return; - marker.attr('x', position[0] + offsetX); - marker.attr('y', position[1] + offsetY); - var yText = getDataByPosition(yScale, position[1], coord); - // use formatter - if (yScale.formatter) { - yText = yScale.formatter(yText); - } - marker.attr('text', yText); - }), - marker.animate(animateCfg.onFrame, { - duration: animateCfg.duration, - easing: easing, - callback: animateCfg.callback, - delay: delay, - }); - if (title) { - title.animate({ - onFrame: function (ratio) { - var position = getPositionByRatio(ratio, shapeData, coord, i); - if (!position) - return; - title.attr('x', position[0] + offsetX); - title.attr('y', position[1]); - }, - }, animateCfg.duration, easing, animateCfg.callback, delay); - } -} -function setClip(shape, coord) { - var start = coord.start, end = coord.end, width = coord.width, height = coord.height; - shape.setClip({ - type: 'rect', - attrs: { - x: start.x, - y: end.y, - width: 0, - height: height, - }, - }); -} -function getPositionByRatio(ratio, dataPoints, coord, index) { - var data = dataPoints.data, points = dataPoints.points; - var currentX = coord.start.x + coord.getWidth() * ratio; - for (var i = 0; i < points.length - 1; i++) { - var current = points[i]; - var next = points[i + 1]; - if (currentX >= current.x && currentX <= next.x) { - var m = (next.y - current.y) / (next.x - current.x); // 斜率 - var y = current.y + m * (currentX - current.x); - return [currentX, y]; - } - } -} -function getDataByPosition(scale, y, coord) { - var yRatio = (y - coord.start.y) / (coord.end.y - coord.start.y); - return scale.invert(yRatio).toFixed(2); -} -function getPlotOption(option) { - plotInfo = option; -} -Object(_dependents__WEBPACK_IMPORTED_MODULE_0__["registerAnimation"])('clipingWithData', clipingWithData); -//# sourceMappingURL=clipIn-with-data.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/line/apply-responsive/axis.js": -/*!***************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/line/apply-responsive/axis.js ***! - \***************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return responsiveAxis; }); -/* harmony import */ var _util_responsive_apply_axis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/responsive/apply/axis */ "./node_modules/@antv/g2plot/esm/util/responsive/apply/axis.js"); - -function responsiveAxis(layer) { - var responsiveTheme = layer.getResponsiveTheme(); - var canvas = layer.canvas; - // x-axis - var x_responsiveAxis = new _util_responsive_apply_axis__WEBPACK_IMPORTED_MODULE_0__["default"]({ - plot: layer, - responsiveTheme: responsiveTheme, - dim: 'x', - }); - // y-axis - var y_responsiveAxis = new _util_responsive_apply_axis__WEBPACK_IMPORTED_MODULE_0__["default"]({ - plot: layer, - responsiveTheme: responsiveTheme, - dim: 'y', - }); - canvas.draw(); -} -//# sourceMappingURL=axis.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/line/apply-responsive/index.js": -/*!****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/line/apply-responsive/index.js ***! - \****************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _axis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./axis */ "./node_modules/@antv/g2plot/esm/plots/line/apply-responsive/axis.js"); -/* harmony import */ var _label__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./label */ "./node_modules/@antv/g2plot/esm/plots/line/apply-responsive/label.js"); - - -var preRenderResponsive = []; -var afterRenderResponsive = [ - { name: 'responsiveAxis', method: _axis__WEBPACK_IMPORTED_MODULE_0__["default"] }, - { name: 'responsivePointLabel', method: _label__WEBPACK_IMPORTED_MODULE_1__["default"] }, -]; -/* harmony default export */ __webpack_exports__["default"] = ({ - preRender: preRenderResponsive, - afterRender: afterRenderResponsive, -}); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/line/apply-responsive/label.js": -/*!****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/line/apply-responsive/label.js ***! - \****************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return responsivePointLabel; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _util_responsive_apply_label__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/responsive/apply/label */ "./node_modules/@antv/g2plot/esm/util/responsive/apply/label.js"); - - -var ApplyResponsiveLineLabel = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ApplyResponsiveLineLabel, _super); - function ApplyResponsiveLineLabel() { - return _super !== null && _super.apply(this, arguments) || this; - } - ApplyResponsiveLineLabel.prototype.getType = function () { - var props = this.plot.options; - if (props.label && props.label.type) { - return props.label.type; - } - return 'point'; - }; - return ApplyResponsiveLineLabel; -}(_util_responsive_apply_label__WEBPACK_IMPORTED_MODULE_1__["default"])); -function responsivePointLabel(layer) { - var responsiveTheme = layer.getResponsiveTheme(); - var applyResponsiveLineLabel = new ApplyResponsiveLineLabel({ - plot: layer, - responsiveTheme: responsiveTheme, - }); -} -//# sourceMappingURL=label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/line/apply-responsive/theme.js": -/*!****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/line/apply-responsive/theme.js ***! - \****************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _util_responsive_theme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/responsive/theme */ "./node_modules/@antv/g2plot/esm/util/responsive/theme.js"); - -/** 组装theme */ -var lineTheme = { - label: { - point: { - constraints: [{ name: 'elementCollision' }], - rules: { - elementCollision: [{ name: 'nodesResamplingByChange' }, { name: 'clearOverlapping' }], - }, - }, - }, -}; -Object(_util_responsive_theme__WEBPACK_IMPORTED_MODULE_0__["registerResponsiveTheme"])('line', lineTheme); -//# sourceMappingURL=theme.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/line/component/label/line-label.js": -/*!********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/line/component/label/line-label.js ***! - \********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -var DEFAULT_OFFSET = 8; -var LineLabel = /** @class */ (function () { - function LineLabel(cfg) { - this.destroyed = false; - this.view = cfg.view; - this.plot = cfg.plot; - var defaultOptions = this.getDefaultOptions(); - this.options = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])(defaultOptions, cfg, {}); - this.init(); - } - LineLabel.prototype.init = function () { - var _this = this; - this.container = this.getGeometry().labelsContainer; - this.view.on('beforerender', function () { - _this.clear(); - _this.plot.canvas.draw(); - }); - }; - LineLabel.prototype.render = function () { - var _this = this; - var elements = this.getGeometry().elements; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(elements, function (ele) { - var shapeInfo = _this.getShapeInfo(ele.shape); - var _a = _this.options, style = _a.style, offsetX = _a.offsetX, offsetY = _a.offsetY; - var formatter = _this.options.formatter; - var content = formatter ? formatter(shapeInfo.name) : shapeInfo.name; - _this.container.addShape('text', { - attrs: Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])({}, { - x: shapeInfo.x + offsetX, - y: shapeInfo.y + offsetY, - text: content, - fill: shapeInfo.color, - textAlign: 'left', - textBaseline: 'middle', - }, style), - name: 'label', - }); - }); - }; - LineLabel.prototype.clear = function () { - if (this.container) { - this.container.clear(); - } - }; - LineLabel.prototype.hide = function () { - this.container.set('visible', false); - this.plot.canvas.draw(); - }; - LineLabel.prototype.show = function () { - this.container.set('visible', true); - this.plot.canvas.draw(); - }; - LineLabel.prototype.destroy = function () { - if (this.container) { - this.container.remove(); - } - this.destroyed = true; - }; - LineLabel.prototype.getBBox = function () { }; - LineLabel.prototype.getDefaultOptions = function () { - var theme = this.plot.theme; - var labelStyle = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(theme.label.style); - delete labelStyle.fill; - return { - offsetX: DEFAULT_OFFSET, - offsetY: 0, - style: labelStyle, - }; - }; - LineLabel.prototype.getGeometry = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["find"])(this.view.geometries, function (geom) { return geom.type === 'line'; }); - }; - LineLabel.prototype.getShapeInfo = function (shape) { - var originPoints = shape.get('origin').points; - var lastPoint = originPoints[originPoints.length - 1]; - var color = shape.attr('stroke'); - var seriesField = this.plot.options.seriesField; - var name = shape.get('origin').data[0][seriesField]; - return { x: lastPoint.x, y: lastPoint.y, color: color, name: name }; - }; - return LineLabel; -}()); -/* harmony default export */ __webpack_exports__["default"] = (LineLabel); -//# sourceMappingURL=line-label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/line/event.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/line/event.js ***! - \***********************************************************/ -/*! exports provided: EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["onEvent"]; }); - - - -var componentMap = { - Line: 'line', - Point: 'point', -}; -var SHAPE_EVENT_MAP = Object(_util_event__WEBPACK_IMPORTED_MODULE_1__["getEventMap"])(componentMap); -Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(_util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"], SHAPE_EVENT_MAP); - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/line/index.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/line/index.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/line/layer.js"); - - - - -var Line = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Line, _super); - function Line() { - return _super !== null && _super.apply(this, arguments) || this; - } - Line.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'line'; - _super.prototype.createLayers.call(this, layerProps); - }; - Line.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return Line; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Line); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/line/interaction/index.js": -/*!***********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/line/interaction/index.js ***! - \***********************************************************************/ -/*! exports provided: LineActive, LineSelect */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _line_active__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./line-active */ "./node_modules/@antv/g2plot/esm/plots/line/interaction/line-active.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LineActive", function() { return _line_active__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _line_select__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./line-select */ "./node_modules/@antv/g2plot/esm/plots/line/interaction/line-select.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LineSelect", function() { return _line_select__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/line/interaction/line-active.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/line/interaction/line-active.js ***! - \*****************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _interaction_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../interaction/core */ "./node_modules/@antv/g2plot/esm/interaction/core.js"); - - - -var LineActive = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LineActive, _super); - function LineActive(cfg) { - return _super.call(this, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ - /** 没有用 line:mouseenter 和 line:mouseleave 事件,是因为可能在多条折线的情况下,从一条线滑动到另一条会同时触发process和reset,使画面出现闪动 */ - processEvent: 'mousemove' }, cfg)) || this; - } - LineActive.prototype.process = function (ev) { - var lines = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["filter"])(this.view.geometries, function (geom) { return geom.type == 'line'; }); - var target = ev.target; - if (target.get('name') === 'line') { - var data_1 = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(ev, 'data.data'); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(lines, function (line) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(line.elements, function (element) { - element.setState('active', element.data === data_1); - }); - }); - } - else { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(lines, function (line) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(line.elements, function (element) { - element.setState('active', false); - }); - }); - } - }; - return LineActive; -}(_interaction_core__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (LineActive); -//# sourceMappingURL=line-active.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/line/interaction/line-select.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/line/interaction/line-select.js ***! - \*****************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _interaction_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../interaction/core */ "./node_modules/@antv/g2plot/esm/interaction/core.js"); - - - -var LineSelect = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LineSelect, _super); - function LineSelect(cfg) { - return _super.call(this, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ endEvent: 'click' }, cfg)) || this; - } - LineSelect.prototype.end = function (ev) { - var target = ev.target; - var lines = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["filter"])(this.view.geometries, function (geom) { return geom.type == 'line'; }); - if (target.get('name') === 'line') { - var data_1 = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(ev, 'data.data'); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(lines, function (line) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(line.elements, function (element) { - element.setState('inactive', element.data !== data_1); - }); - }); - // TODO: 设置z-index - } - else { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(lines, function (line) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(line.elements, function (element) { - element.setState('inactive', false); - }); - }); - // TODO: 重置z-index - } - }; - return LineSelect; -}(_interaction_core__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (LineSelect); -//# sourceMappingURL=line-select.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/line/layer.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/line/layer.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _base_view_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/view-layer */ "./node_modules/@antv/g2plot/esm/base/view-layer.js"); -/* harmony import */ var _components_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../components/factory */ "./node_modules/@antv/g2plot/esm/components/factory.js"); -/* harmony import */ var _geoms_factory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../geoms/factory */ "./node_modules/@antv/g2plot/esm/geoms/factory.js"); -/* harmony import */ var _util_scale__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../util/scale */ "./node_modules/@antv/g2plot/esm/util/scale.js"); -/* harmony import */ var _animation_clipIn_with_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./animation/clipIn-with-data */ "./node_modules/@antv/g2plot/esm/plots/line/animation/clipIn-with-data.js"); -/* harmony import */ var _apply_responsive__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./apply-responsive */ "./node_modules/@antv/g2plot/esm/plots/line/apply-responsive/index.js"); -/* harmony import */ var _component_label_line_label__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./component/label/line-label */ "./node_modules/@antv/g2plot/esm/plots/line/component/label/line-label.js"); -/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./event */ "./node_modules/@antv/g2plot/esm/plots/line/event.js"); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./theme */ "./node_modules/@antv/g2plot/esm/plots/line/theme.js"); -/* harmony import */ var _apply_responsive_theme__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./apply-responsive/theme */ "./node_modules/@antv/g2plot/esm/plots/line/apply-responsive/theme.js"); -/* harmony import */ var _interaction_index__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./interaction/index */ "./node_modules/@antv/g2plot/esm/plots/line/interaction/index.js"); - - - - - - - - - - - - - - -var GEOM_MAP = { - line: 'line', - point: 'point', -}; -var LineLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LineLayer, _super); - function LineLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'line'; - return _this; - } - LineLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - connectNulls: false, - smooth: false, - lineSize: 2, - lineStyle: { - lineJoin: 'round', - lineCap: 'round', - }, - point: { - visible: false, - size: 3, - shape: 'circle', - style: { - stroke: '#fff', - }, - }, - label: { - visible: false, - type: 'point', - }, - legend: { - visible: true, - position: 'top-left', - wordSpacing: 4, - }, - }); - }; - LineLayer.prototype.afterRender = function () { - var props = this.options; - if (this.options.label && this.options.label.visible && this.options.label.type === 'line') { - var label = new _component_label_line_label__WEBPACK_IMPORTED_MODULE_9__["default"](Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ view: this.view, plot: this }, this.options.label)); - label.render(); - } - // 响应式 - if (props.responsive && props.padding !== 'auto') { - this.applyResponsive('afterRender'); - } - _super.prototype.afterRender.call(this); - }; - LineLayer.prototype.geometryParser = function (dim, type) { - return GEOM_MAP[type]; - }; - LineLayer.prototype.scale = function () { - var props = this.options; - var scales = {}; - /** 配置x-scale */ - scales[props.xField] = {}; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(props, 'xAxis')) { - Object(_util_scale__WEBPACK_IMPORTED_MODULE_6__["extractScale"])(scales[props.xField], props.xAxis); - } - /** 配置y-scale */ - scales[props.yField] = {}; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(props, 'yAxis')) { - Object(_util_scale__WEBPACK_IMPORTED_MODULE_6__["extractScale"])(scales[props.yField], props.yAxis); - } - this.setConfig('scales', scales); - Object(_util_scale__WEBPACK_IMPORTED_MODULE_6__["trySetScaleMinToZero"])(scales[props.yField], Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["map"])(props.data, function (item) { return item[props.yField]; })); - _super.prototype.scale.call(this); - }; - LineLayer.prototype.coord = function () { }; - LineLayer.prototype.addGeometry = function () { - // 配置线 - this.addLine(); - // 配置数据点 - this.addPoint(); - }; - LineLayer.prototype.addLine = function () { - var props = this.options; - this.line = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_5__["getGeom"])('line', 'main', { - plot: this, - }); - if (props.label) { - this.label(); - } - if (props.tooltip && (props.tooltip.fields || props.tooltip.formatter)) { - this.geometryTooltip(); - } - this.setConfig('geometry', this.line); - }; - LineLayer.prototype.addPoint = function () { - var props = this.options; - var defaultConfig = { visible: false }; - if (props.point) { - props.point = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])(defaultConfig, props.point); - } - if (props.point && props.point.visible) { - this.point = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_5__["getGeom"])('point', 'guide', { - plot: this, - }); - this.setConfig('geometry', this.point); - } - }; - LineLayer.prototype.label = function () { - var props = this.options; - var label = props.label; - if (label.visible === false || this.singleLineLabelCheck()) { - this.line.label = false; - return; - } - /** label类型为point时,使用g2默认label */ - if (label.type === 'point') { - this.line.label = Object(_components_factory__WEBPACK_IMPORTED_MODULE_4__["getComponent"])('label', Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ plot: this, top: true, labelType: label.type, fields: [props.yField] }, label)); - } - }; - LineLayer.prototype.geometryTooltip = function () { - this.line.tooltip = {}; - var tooltipOptions = this.options.tooltip; - if (tooltipOptions.fields) { - this.line.tooltip.fields = tooltipOptions.fields; - } - if (tooltipOptions.formatter) { - this.line.tooltip.callback = tooltipOptions.formatter; - if (!tooltipOptions.fields) { - this.line.tooltip.fields = [this.options.xField, this.options.yField]; - if (this.options.seriesField) { - this.line.tooltip.fields.push(this.options.seriesField); - } - } - } - }; - LineLayer.prototype.animation = function () { - _super.prototype.animation.call(this); - var props = this.options; - if (props.animation === false) { - // 关闭动画 - this.line.animate = false; - if (this.point) - this.point.animate = false; - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(props, 'animation')) { - // 根据动画类型区分图形动画和群组动画 - if (props.animation.type === 'clipingWithData' && props.padding !== 'auto') { - Object(_animation_clipIn_with_data__WEBPACK_IMPORTED_MODULE_7__["getPlotOption"])({ - options: this.options, - view: this.view, - }); - this.line.animate = { - appear: { - animation: 'clipingWithData', - easing: 'easeLinear', - duration: 10000, - options: { - test: true, - }, - yField: props.yField, - seriesField: props.seriesField, - plot: this, - }, - }; - // 如果有数据点的话要追加数据点的动画 - if (props.point && props.point.visible) { - this.point.animate = false; - } - } - } - }; - LineLayer.prototype.applyInteractions = function () { - _super.prototype.applyInteractions.call(this); - this.interactions.push(new _interaction_index__WEBPACK_IMPORTED_MODULE_13__["LineActive"]({ - view: this.view, - })); - this.interactions.push(new _interaction_index__WEBPACK_IMPORTED_MODULE_13__["LineSelect"]({ - view: this.view, - })); - }; - LineLayer.prototype.parseEvents = function (eventParser) { - _super.prototype.parseEvents.call(this, _event__WEBPACK_IMPORTED_MODULE_10__); - }; - LineLayer.prototype.applyResponsive = function (stage) { - var _this = this; - var methods = _apply_responsive__WEBPACK_IMPORTED_MODULE_8__["default"][stage]; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(methods, function (r) { - var responsive = r; - responsive.method(_this); - }); - }; - LineLayer.prototype.singleLineLabelCheck = function () { - // 不允许单折线设置尾部跟随label - return !this.options.seriesField && this.options.label.type && this.options.label.type === 'line'; - }; - return LineLayer; -}(_base_view_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (LineLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('line', LineLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/line/theme.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/line/theme.js ***! - \***********************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme */ "./node_modules/@antv/g2plot/esm/theme/index.js"); - -var LINE_ACTIVE_STYLE = function (_a) { - var shape = _a.shape; - var lineWidth = shape.attr('lineWidth') || 1; - return { lineWidth: lineWidth + 1 }; -}; -var LINE_DISABLE_STYLE = function (_a) { - var shape = _a.shape; - var opacity = shape.attr('opacity') || 1; - return { opacity: opacity * 0.2 }; -}; -var LINE_SELECTED_STYLE = function (_a) { - var shape = _a.shape; - var lineWidth = shape.attr('lineWidth') || 1; - return { lineWidth: lineWidth + 2 }; -}; -Object(_theme__WEBPACK_IMPORTED_MODULE_0__["registerTheme"])('line', { - lineStyle: { - normal: {}, - active: LINE_ACTIVE_STYLE, - disable: LINE_DISABLE_STYLE, - selected: LINE_SELECTED_STYLE, - }, - pointStyle: { - normal: {}, - active: {}, - disable: {}, - selected: {}, - }, -}); -//# sourceMappingURL=theme.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/liquid/animation/liquid-move-in.js": -/*!********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/liquid/animation/liquid-move-in.js ***! - \********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_g_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/g-util */ "./node_modules/@antv/g2plot/esm/util/g-util.js"); - - - -function liquidMoveIn(shape, animateCfg) { - var container = shape.get('parent'); - var box = container.getBBox(); - var factor = Math.min(Math.max(0, Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(animateCfg, 'factor', 0.5)), 1); - var delay = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(animateCfg, 'delay', 0); - var duration = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(animateCfg, 'duration', 800); - var callback = animateCfg.callback; - var originX = (box.minX + box.maxX) / 2; - var originY = box.maxY; - var wrap = container.find(function (shape) { return shape.get('name') == 'wrap'; }); - var wrapTargetOpacity = wrap.attr('opacity'); - wrap.attr('opacity', 0); - wrap.animate({ opacity: wrapTargetOpacity }, duration * factor, 'easeLinear', null, delay); - var waves = container.find(function (shape) { return shape.get('name') == 'waves'; }); - var wavesTargetMatrix = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(waves.attr('matrix')) || [1, 0, 0, 0, 1, 0, 0, 0, 1]; - var transformMatrix = Object(_util_g_util__WEBPACK_IMPORTED_MODULE_2__["transform"])(wavesTargetMatrix, [ - ['t', -originX, -originY], - ['s', 1, 0], - ['t', originX, originY], - ]); - waves.setMatrix(transformMatrix); - waves.animate({ matrix: wavesTargetMatrix }, duration, animateCfg.easing, function () { return callback && callback(container, wrap, waves); }, delay); -} -liquidMoveIn.animationName = 'liquidMoveIn'; -Object(_dependents__WEBPACK_IMPORTED_MODULE_0__["registerAnimation"])('liquidMoveIn', liquidMoveIn); -//# sourceMappingURL=liquid-move-in.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/liquid/event.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/liquid/event.js ***! - \*************************************************************/ -/*! exports provided: EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["onEvent"]; }); - - - -var componentMap = { - Liquid: 'intervl', - Statistic: 'annotation-text', -}; -var SHAPE_EVENT_MAP = Object(_util_event__WEBPACK_IMPORTED_MODULE_1__["getEventMap"])(componentMap); -Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(_util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"], SHAPE_EVENT_MAP); - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/liquid/geometry/shape/liquid.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/liquid/geometry/shape/liquid.js ***! - \*****************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../theme */ "./node_modules/@antv/g2plot/esm/theme/index.js"); -/* harmony import */ var _util_g_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../util/g-util */ "./node_modules/@antv/g2plot/esm/util/g-util.js"); - - - - -var globalTheme = Object(_theme__WEBPACK_IMPORTED_MODULE_2__["getGlobalTheme"])(); -var ShapeUtil = { - splitPoints: function (obj) { - var points = []; - var x = obj.x; - var y = obj.y; - y = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(y) ? y : [y]; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(y, function (yItem, index) { - var point = { - x: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(x) ? x[index] : x, - y: yItem, - }; - points.push(point); - }); - return points; - }, - addFillAttrs: function (attrs, cfg) { - if (cfg.color && !attrs.fill) { - attrs.fill = cfg.color; - } - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(cfg.opacity)) { - attrs.opacity = attrs.fillOpacity = cfg.opacity; - } - }, - addStrokeAttrs: function (attrs, cfg) { - if (cfg.color && !attrs.stroke) { - attrs.stroke = cfg.color; - } - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(cfg.opacity)) { - attrs.opacity = attrs.strokeOpacity = cfg.opacity; - } - }, -}; -var ValueUtil = { - lerp: function (a, b, factor) { - return (1 - factor) * a + factor * b; - }, -}; -var getFillAttrs = function (cfg) { - var defaultAttrs = { - lineWidth: 0, - fill: globalTheme.color, - fillOpacity: 0.85, - }; - var attrs = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mix"])({}, defaultAttrs, cfg.style); - ShapeUtil.addFillAttrs(attrs, cfg); - if (cfg.color && !attrs.stroke) { - attrs.stroke = attrs.stroke || cfg.color; - } - return attrs; -}; -var getLineAttrs = function (cfg) { - var defaultAttrs = { - fill: '#fff', - stroke: globalTheme.color, - fillOpacity: 0, - lineWidth: 2, - }; - var attrs = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mix"])({}, defaultAttrs, cfg.style); - ShapeUtil.addStrokeAttrs(attrs, cfg); - return attrs; -}; -/** - * 用贝塞尔曲线模拟正弦波 - * Using Bezier curves to fit sine wave. - * There is 4 control points for each curve of wave, - * which is at 1/4 wave length of the sine wave. - * - * The control points for a wave from (a) to (d) are a-b-c-d: - * c *----* d - * b * - * | - * ... a * .................. - * - * whose positions are a: (0, 0), b: (0.5, 0.5), c: (1, 1), d: (PI / 2, 1) - * - * @param {number} x x position of the left-most point (a) - * @param {number} stage 0-3, stating which part of the wave it is - * @param {number} waveLength wave length of the sine wave - * @param {number} amplitude wave amplitude - * @return {Array} 正弦片段曲线 - */ -function getWaterWavePositions(x, stage, waveLength, amplitude) { - if (stage === 0) { - return [ - [x + ((1 / 2) * waveLength) / Math.PI / 2, amplitude / 2], - [x + ((1 / 2) * waveLength) / Math.PI, amplitude], - [x + waveLength / 4, amplitude], - ]; - } - if (stage === 1) { - return [ - [x + (((1 / 2) * waveLength) / Math.PI / 2) * (Math.PI - 2), amplitude], - [x + (((1 / 2) * waveLength) / Math.PI / 2) * (Math.PI - 1), amplitude / 2], - [x + waveLength / 4, 0], - ]; - } - if (stage === 2) { - return [ - [x + ((1 / 2) * waveLength) / Math.PI / 2, -amplitude / 2], - [x + ((1 / 2) * waveLength) / Math.PI, -amplitude], - [x + waveLength / 4, -amplitude], - ]; - } - return [ - [x + (((1 / 2) * waveLength) / Math.PI / 2) * (Math.PI - 2), -amplitude], - [x + (((1 / 2) * waveLength) / Math.PI / 2) * (Math.PI - 1), -amplitude / 2], - [x + waveLength / 4, 0], - ]; -} -/** - * 获取水波路径 - * @param {number} radius 半径 - * @param {number} waterLevel 水位 - * @param {number} waveLength 波长 - * @param {number} phase 相位 - * @param {number} amplitude 震幅 - * @param {number} cx 圆心x - * @param {number} cy 圆心y - * @return {Array} path 路径 - * @reference http://gitlab.alipay-inc.com/datavis/g6/blob/1.2.0/src/graph/utils/path.js#L135 - */ -function getWaterWavePath(radius, waterLevel, waveLength, phase, amplitude, cx, cy) { - var curves = Math.ceil(((2 * radius) / waveLength) * 4) * 2; - var path = []; - var _phase = phase; - // map phase to [-Math.PI * 2, 0] - while (_phase < -Math.PI * 2) { - _phase += Math.PI * 2; - } - while (_phase > 0) { - _phase -= Math.PI * 2; - } - _phase = (_phase / Math.PI / 2) * waveLength; - var left = cx - radius + _phase - radius * 2; - /** - * top-left corner as start point - * - * draws this point - * | - * \|/ - * ~~~~~~~~ - * | | - * +------+ - */ - path.push(['M', left, waterLevel]); - /** - * top wave - * - * ~~~~~~~~ <- draws this sine wave - * | | - * +------+ - */ - var waveRight = 0; - for (var c = 0; c < curves; ++c) { - var stage = c % 4; - var pos = getWaterWavePositions((c * waveLength) / 4, stage, waveLength, amplitude); - path.push([ - 'C', - pos[0][0] + left, - -pos[0][1] + waterLevel, - pos[1][0] + left, - -pos[1][1] + waterLevel, - pos[2][0] + left, - -pos[2][1] + waterLevel, - ]); - if (c === curves - 1) { - waveRight = pos[2][0]; - } - } - /** - * top-right corner - * - * ~~~~~~~~ - * 3. draws this line -> | | <- 1. draws this line - * +------+ - * ^ - * | - * 2. draws this line - */ - path.push(['L', waveRight + left, cy + radius]); - path.push(['L', left, cy + radius]); - path.push(['L', left, waterLevel]); - return path; -} -/** - * 添加水波 - * @param {number} x 中心x - * @param {number} y 中心y - * @param {number} level 水位等级 0~1 - * @param {number} waveCount 水波数 - * @param {number} colors 色值 - * @param {number} group 图组 - * @param {number} clip 用于剪切的图形 - * @param {number} radius 绘制图形的高度 - */ -function addWaterWave(x, y, level, waveCount, color, group, clip, radius) { - var bbox = clip.getBBox(); - var width = bbox.maxX - bbox.minX; - var height = bbox.maxY - bbox.minY; - var duration = 5000; - for (var i = 0; i < waveCount; i++) { - var factor = waveCount <= 1 ? 0 : i / (waveCount - 1); - var wave = group.addShape('path', { - attrs: { - path: getWaterWavePath(radius, bbox.minY + height * level, width / 4, 0, width / ValueUtil.lerp(56, 64, factor), x, y), - fill: color, - opacity: ValueUtil.lerp(0.6, 0.3, factor), - }, - }); - /*wave.setClip({ - type:'circle', - attrs: clip.attrs - })*/ - // FIXME wave animation error in svg - // if (Global.renderer === 'canvas') { - var matrix = Object(_util_g_util__WEBPACK_IMPORTED_MODULE_3__["transform"])([['t', width / 2, 0]]); - wave.animate({ matrix: matrix }, { - duration: ValueUtil.lerp(duration, 0.7 * duration, factor), - repeat: true, - }); - //} - } -} -Object(_dependents__WEBPACK_IMPORTED_MODULE_0__["registerShape"])('interval', 'liquid-fill-gauge', { - draw: function (cfg, container) { - var cy = 0.5; - var sumX = 0; - var minX = Infinity; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(cfg.points, function (p) { - if (p.x < minX) { - minX = p.x; - } - sumX += p.x; - }); - var cx = sumX / cfg.points.length; - var cp = this.parsePoint({ x: cx, y: cy }); - var minP = this.parsePoint({ x: minX, y: 0.5 }); - var xWidth = cp.x - minP.x; - var radius = Math.min(xWidth, minP.y); - var fill = getFillAttrs(cfg).fill; - var waves = container.addGroup({ - name: 'waves', - attrs: { - x: cp.x, - y: cp.y, - }, - }); - waves.setClip({ - type: 'circle', - attrs: { - x: cp.x, - y: cp.y, - r: radius, - }, - }); - var clipCircle = waves.get('clipShape'); - addWaterWave(cp.x, cp.y, 1 - cfg.points[1].y, // cfg.y / (2 * cp.y), - 3, fill, waves, clipCircle, radius * 4); - var warpRing = container.addShape('circle', { - name: 'wrap', - attrs: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mix"])(getLineAttrs(cfg), { - x: cp.x, - y: cp.y, - r: radius, - fill: 'transparent', - }), - }); - return waves[0]; - }, -}); -//# sourceMappingURL=liquid.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/liquid/index.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/liquid/index.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/liquid/layer.js"); - - - - -var Liquid = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Liquid, _super); - function Liquid() { - return _super !== null && _super.apply(this, arguments) || this; - } - Liquid.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'liquid'; - _super.prototype.createLayers.call(this, layerProps); - }; - Liquid.prototype.changeValue = function (value, all) { - if (all === void 0) { all = false; } - if (all) { - this.eachLayer(function (layer) { - if (layer instanceof _layer__WEBPACK_IMPORTED_MODULE_3__["default"]) { - layer.changeValue(value); - } - }); - } - else { - var layer = this.layers[0]; - if (layer instanceof _layer__WEBPACK_IMPORTED_MODULE_3__["default"]) { - layer.changeValue(value); - } - } - }; - Liquid.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return Liquid; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Liquid); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/liquid/layer.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/liquid/layer.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_bbox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/bbox */ "./node_modules/@antv/g2plot/esm/util/bbox.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _base_view_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../base/view-layer */ "./node_modules/@antv/g2plot/esm/base/view-layer.js"); -/* harmony import */ var _geoms_factory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../geoms/factory */ "./node_modules/@antv/g2plot/esm/geoms/factory.js"); -/* harmony import */ var _util_scale__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../util/scale */ "./node_modules/@antv/g2plot/esm/util/scale.js"); -/* harmony import */ var _util_color__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../util/color */ "./node_modules/@antv/g2plot/esm/util/color.js"); -/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./event */ "./node_modules/@antv/g2plot/esm/plots/liquid/event.js"); -/* harmony import */ var _geometry_shape_liquid__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./geometry/shape/liquid */ "./node_modules/@antv/g2plot/esm/plots/liquid/geometry/shape/liquid.js"); -/* harmony import */ var _animation_liquid_move_in__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./animation/liquid-move-in */ "./node_modules/@antv/g2plot/esm/plots/liquid/animation/liquid-move-in.js"); - - - - - - - - - - - -var G2_GEOM_MAP = { - column: 'interval', -}; -var PLOT_GEOM_MAP = { - interval: 'liquid', -}; -var LiquidLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LiquidLayer, _super); - function LiquidLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'liquid'; - _this.shouldFadeInAnnotation = true; - return _this; - } - LiquidLayer.getDefaultOptions = function () { - var cfg = { - animation: { - factor: 0.4, - easing: 'easeExpOut', - duration: 800, - }, - liquidStyle: { - lineWidth: 2, - }, - color: '#6a99f9', - interactions: [], - }; - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), cfg); - }; - LiquidLayer.prototype.beforeInit = function () { - var _a = this.options, min = _a.min, max = _a.max, value = _a.value; - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(min)) { - throw new Error('The min value of Liquid is required, and the type of min must be Number.'); - } - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(max)) { - throw new Error('The max value of Liquid is required, and the type of max must be Number.'); - } - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(value)) { - throw new Error('The value of Liquid is required, and the type of value must be Number.'); - } - }; - LiquidLayer.prototype.init = function () { - this.options.data = [{}]; - _super.prototype.init.call(this); - }; - LiquidLayer.prototype.coord = function () { }; - LiquidLayer.prototype.scale = function () { - var props = this.options; - var min = props.min, max = props.max; - var scales = { - value: {}, - }; - Object(_util_scale__WEBPACK_IMPORTED_MODULE_6__["extractScale"])(scales.value, { - min: Math.min(min, max), - max: Math.max(min, max), - }); - // @ts-ignore - this.setConfig('scales', scales); - _super.prototype.scale.call(this); - }; - LiquidLayer.prototype.axis = function () { - this.setConfig('axes', false); - }; - LiquidLayer.prototype.adjustLiquid = function (liquid) { - var props = this.options; - liquid.shape = { - values: ['liquid-fill-gauge'], - }; - liquid.tooltip = false; - var liquidStyle = props.liquidStyle; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(liquidStyle)) - liquidStyle = liquidStyle(); - if (liquidStyle) { - liquid.style = liquidStyle; - } - }; - LiquidLayer.prototype.addGeometry = function () { - var liquid = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_5__["getGeom"])('interval', 'main', { - positionFields: [1, 'value'], - plot: this, - }); - this.adjustLiquid(liquid); - this.liquid = liquid; - this.setConfig('geometry', liquid); - }; - LiquidLayer.prototype.animation = function () { - var props = this.options; - if (props.animation === false) { - /** 关闭动画 */ - this.liquid.animate = false; - } - else { - var factor = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(props, 'animation.factor'); - var easing = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(props, 'animation.easing'); - var duration = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(props, 'animation.duration'); - this.liquid.animate = { - appear: { - animation: 'liquidMoveIn', - factor: factor, - easing: easing, - duration: duration, - }, - }; - } - }; - LiquidLayer.prototype.geometryParser = function (dim, type) { - if (dim === 'g2') { - return G2_GEOM_MAP[type]; - } - return PLOT_GEOM_MAP[type]; - }; - LiquidLayer.prototype.annotation = function () { - var annotationConfigs = []; - var statisticConfig = this.extractStatistic(); - annotationConfigs.push(statisticConfig); - this.setConfig('annotations', annotationConfigs); - }; - LiquidLayer.prototype.extractStatistic = function () { - var props = this.options; - var statistic = props.statistic || {}; - var content; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(statistic.formatter)) { - content = statistic.formatter(props.value); - } - else { - content = "" + props.value; - } - var fontSize; - var shadowBlur; - if (content) { - var contentWidth = void 0; - if (props.width < props.height) { - contentWidth = props.width * 0.8; - } - else { - contentWidth = props.height; - } - fontSize = (0.8 * contentWidth) / content.length; - shadowBlur = Math.max(1, Math.ceil(0.025 * fontSize)); - } - var opacity; - if (statistic.visible === false) { - opacity = 0; - } - var statisticConfig = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({ - style: { - fontSize: fontSize, - shadowBlur: shadowBlur, - }, - }, statistic, { - top: true, - content: content, - type: 'text', - position: ['50%', '50%'], - style: { - opacity: 1, - fill: 'transparent', - shadowColor: 'transparent', - textAlign: 'center', - }, - }); - delete statisticConfig.visible; - delete statisticConfig.formatter; - delete statisticConfig.adjustColor; - return statisticConfig; - }; - LiquidLayer.prototype.parseEvents = function (eventParser) { - _super.prototype.parseEvents.call(this, _event__WEBPACK_IMPORTED_MODULE_8__); - }; - LiquidLayer.prototype.afterRender = function () { - this.fadeInAnnotation(); - var options = this.options; - var padding = options.padding ? options.padding : this.config.theme.padding; - /** defaultState */ - if (options.defaultState && padding !== 'auto') { - this.stateController.defaultStates(options.defaultState); - } - /** autopadding */ - if (padding === 'auto') { - this.paddingController.processAutoPadding(); - } - }; - LiquidLayer.prototype.processData = function (data) { - var props = this.options; - return [{ _: '_', value: props.value }]; - }; - LiquidLayer.prototype.changeValue = function (value) { - var props = this.options; - props.value = value; - this.changeData([]); - }; - LiquidLayer.prototype.fadeInAnnotation = function () { - var _this = this; - var props = this.options; - var textShape = this.view.foregroundGroup.findAll(function (el) { - return el.get('name') === 'annotation-text'; - })[0]; - var animation = props.animation || {}; - var colorStyle = this.calcAnnotationColorStyle(); - if (this.shouldFadeInAnnotation) { - textShape.animate(colorStyle, animation.duration * Math.min(1, 1.5 * animation.factor), null, function () { - _this.shouldFadeInAnnotation = false; - }); - } - else { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["forIn"])(colorStyle, function (v, k) { return textShape.attr(k, v); }); - } - }; - LiquidLayer.prototype.calcAnnotationColorStyle = function () { - var props = this.options; - var lightColorStyle = { fill: '#f6f6f6', shadowColor: 'black' }; - var darkColorStyle = { fill: '#303030', shadowColor: 'white' }; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(props, 'statistic.adjustColor') === false) { - return { - fill: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(props, 'statistic.style.fill', darkColorStyle.fill), - shadowColor: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(props, 'statistic.style.shadowColor', darkColorStyle.shadowColor), - }; - } - var min = props.min, max = props.max; - var value = props.value; - min = Math.min(min, max); - max = Math.max(min, max); - var percent; - if (min == max) { - percent = 1; - } - else { - percent = (value - min) / (max - min); - } - if (percent > 0.55) { - var waveColor = this.options.color; - var waveOpacity = 0.8; - var rgb = Object(_util_color__WEBPACK_IMPORTED_MODULE_7__["rgb2arr"])(waveColor); - var gray = Math.round(rgb[0] * 0.299 + rgb[1] * 0.587 + rgb[2] * 0.114) / waveOpacity; - return gray < 156 ? lightColorStyle : darkColorStyle; - } - return darkColorStyle; - }; - LiquidLayer.prototype.updateConfig = function (cfg) { - _super.prototype.updateConfig.call(this, cfg); - this.shouldFadeInAnnotation = true; - }; - LiquidLayer.prototype.getViewRange = function () { - var viewRange = _super.prototype.getViewRange.call(this); - var liquidStyle = this.options.liquidStyle; - var strokeWidth = liquidStyle.lineWidth ? liquidStyle.lineWidth : 2; - var minX = viewRange.minX, minY = viewRange.minY, width = viewRange.width, height = viewRange.height; - var size = Math.min(width, height) - strokeWidth * 2; - var cx = minX + width / 2; - var cy = minY + height / 2; - var x = cx - size / 2; - var y = cy - size / 2; - return new _util_bbox__WEBPACK_IMPORTED_MODULE_2__["default"](x, y, size, size); - }; - return LiquidLayer; -}(_base_view_layer__WEBPACK_IMPORTED_MODULE_4__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (LiquidLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_3__["registerPlotType"])('liquid', LiquidLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/meter-gauge/index.js": -/*!******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/meter-gauge/index.js ***! - \******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/meter-gauge/layer.js"); - - - - -var MeterGauge = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MeterGauge, _super); - function MeterGauge() { - return _super !== null && _super.apply(this, arguments) || this; - } - MeterGauge.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'meterGauge'; - _super.prototype.createLayers.call(this, layerProps); - }; - MeterGauge.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return MeterGauge; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (MeterGauge); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/meter-gauge/layer.js": -/*!******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/meter-gauge/layer.js ***! - \******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _gauge_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../gauge/layer */ "./node_modules/@antv/g2plot/esm/plots/gauge/layer.js"); -/* harmony import */ var _gauge_geometry_shape_options__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../gauge/geometry/shape/options */ "./node_modules/@antv/g2plot/esm/plots/gauge/geometry/shape/options.js"); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme */ "./node_modules/@antv/g2plot/esm/theme/index.js"); - - - - - - -var MeterGaugeLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MeterGaugeLayer, _super); - function MeterGaugeLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'meterGauge'; - return _this; - } - MeterGaugeLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), {}); - }; - MeterGaugeLayer.prototype.getCustomStyle = function () { - var _a = this.options, theme = _a.theme, styleMix = _a.styleMix; - var colors = styleMix.colors || Object(_theme__WEBPACK_IMPORTED_MODULE_5__["getGlobalTheme"])().colors; - return Object(_gauge_geometry_shape_options__WEBPACK_IMPORTED_MODULE_4__["getOptions"])('meter', theme, colors); - }; - return MeterGaugeLayer; -}(_gauge_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (MeterGaugeLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('meterGauge', MeterGaugeLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/percent-stacked-area/index.js": -/*!***************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/percent-stacked-area/index.js ***! - \***************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/percent-stacked-area/layer.js"); - - - - -var PercentStackedArea = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PercentStackedArea, _super); - function PercentStackedArea() { - return _super !== null && _super.apply(this, arguments) || this; - } - PercentStackedArea.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'percentStackedArea'; - _super.prototype.createLayers.call(this, layerProps); - }; - PercentStackedArea.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return PercentStackedArea; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (PercentStackedArea); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/percent-stacked-area/layer.js": -/*!***************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/percent-stacked-area/layer.js ***! - \***************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _stacked_area_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../stacked-area/layer */ "./node_modules/@antv/g2plot/esm/plots/stacked-area/layer.js"); -/* harmony import */ var _util_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/data */ "./node_modules/@antv/g2plot/esm/util/data.js"); - - - - - -var PercentStackedAreaLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PercentStackedAreaLayer, _super); - function PercentStackedAreaLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'percentStackedArea'; - return _this; - } - PercentStackedAreaLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - yAxis: { - visible: true, - label: { - visible: true, - formatter: function (v) { - var reg = /%/gi; - return v.replace(reg, ''); - }, - }, - }, - }); - }; - PercentStackedAreaLayer.prototype.processData = function (originData) { - var _a = this.options, xField = _a.xField, yField = _a.yField; - return Object(_util_data__WEBPACK_IMPORTED_MODULE_4__["transformDataPercentage"])(originData, xField, [yField]); - }; - PercentStackedAreaLayer.prototype.scale = function () { - var metaConfig = {}; - var yField = this.options.yField; - metaConfig[this.options.yField] = { - tickCount: 6, - alias: yField + " (%)", - min: 0, - max: 1, - formatter: function (v) { - var formattedValue = (v * 100).toFixed(1); - return formattedValue + "%"; - }, - }; - this.options.meta = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, metaConfig, this.options.meta); - _super.prototype.scale.call(this); - }; - return PercentStackedAreaLayer; -}(_stacked_area_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (PercentStackedAreaLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('percentStackedArea', PercentStackedAreaLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/percent-stacked-bar/index.js": -/*!**************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/percent-stacked-bar/index.js ***! - \**************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/percent-stacked-bar/layer.js"); - - - - -var PercentStackedBar = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PercentStackedBar, _super); - function PercentStackedBar() { - return _super !== null && _super.apply(this, arguments) || this; - } - PercentStackedBar.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'percentStackedBar'; - _super.prototype.createLayers.call(this, layerProps); - }; - PercentStackedBar.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return PercentStackedBar; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (PercentStackedBar); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/percent-stacked-bar/layer.js": -/*!**************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/percent-stacked-bar/layer.js ***! - \**************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _stacked_bar_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../stacked-bar/layer */ "./node_modules/@antv/g2plot/esm/plots/stacked-bar/layer.js"); -/* harmony import */ var _util_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/data */ "./node_modules/@antv/g2plot/esm/util/data.js"); - - - - - -var PercentStackedBarLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PercentStackedBarLayer, _super); - function PercentStackedBarLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'percentStackedBar'; - return _this; - } - PercentStackedBarLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - xAxis: { - visible: true, - tickLine: { - visible: false, - }, - grid: { - visible: false, - }, - title: { - visible: true, - formatter: function (v) { return v + " (%)"; }, - }, - label: { - visible: false, - formatter: function (v) { - var reg = /%/gi; - return v.replace(reg, ''); - }, - }, - }, - }); - }; - PercentStackedBarLayer.prototype.processData = function (originData) { - var _a = this.options, xField = _a.xField, yField = _a.yField; - var processData = _super.prototype.processData.call(this, originData); - return Object(_util_data__WEBPACK_IMPORTED_MODULE_4__["transformDataPercentage"])(processData, yField, [xField]); - }; - PercentStackedBarLayer.prototype.scale = function () { - var metaConfig = {}; - var xField = this.options.xField; - metaConfig[xField] = { - tickCount: 6, - alias: xField + " (%)", - min: 0, - max: 1, - formatter: function (v) { - var formattedValue = (v * 100).toFixed(1); - return formattedValue + "%"; - }, - }; - this.options.meta = metaConfig; - _super.prototype.scale.call(this); - }; - return PercentStackedBarLayer; -}(_stacked_bar_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (PercentStackedBarLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('percentStackedBar', PercentStackedBarLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/percent-stacked-column/index.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/percent-stacked-column/index.js ***! - \*****************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/percent-stacked-column/layer.js"); - - - - -var PercentStackedColumn = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PercentStackedColumn, _super); - function PercentStackedColumn() { - return _super !== null && _super.apply(this, arguments) || this; - } - PercentStackedColumn.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'percentStackedColumn'; - _super.prototype.createLayers.call(this, layerProps); - }; - PercentStackedColumn.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return PercentStackedColumn; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (PercentStackedColumn); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/percent-stacked-column/layer.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/percent-stacked-column/layer.js ***! - \*****************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _stacked_column_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../stacked-column/layer */ "./node_modules/@antv/g2plot/esm/plots/stacked-column/layer.js"); -/* harmony import */ var _util_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/data */ "./node_modules/@antv/g2plot/esm/util/data.js"); - - - - - -var PercentStackedColumnLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PercentStackedColumnLayer, _super); - function PercentStackedColumnLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'percentStackedColumn'; - return _this; - } - PercentStackedColumnLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - label: { - visible: true, - position: 'middle', - offset: 0, - }, - yAxis: { - visible: true, - tick: { - visible: false, - }, - grid: { - visible: false, - }, - title: { - visible: true, - }, - label: { - visible: false, - }, - }, - }); - }; - PercentStackedColumnLayer.prototype.processData = function (originData) { - var _a = this.options, xField = _a.xField, yField = _a.yField; - return Object(_util_data__WEBPACK_IMPORTED_MODULE_4__["transformDataPercentage"])(originData || [], xField, [yField]); - }; - PercentStackedColumnLayer.prototype.scale = function () { - var metaConfig = {}; - var yField = this.options.yField; - metaConfig[yField] = { - tickCount: 6, - alias: yField + " (%)", - min: 0, - max: 1, - formatter: function (v) { - var formattedValue = (v * 100).toFixed(1); - return formattedValue + "%"; - }, - }; - this.options.meta = metaConfig; - _super.prototype.scale.call(this); - }; - return PercentStackedColumnLayer; -}(_stacked_column_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (PercentStackedColumnLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('percentStackedColumn', PercentStackedColumnLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/base-label.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/pie/component/label/base-label.js ***! - \*******************************************************************************/ -/*! exports provided: CROOK_DISTANCE, percent2Number, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CROOK_DISTANCE", function() { return CROOK_DISTANCE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "percent2Number", function() { return percent2Number; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/matrix-util */ "./node_modules/@antv/matrix-util/esm/index.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/utils/index.js"); -/* harmony import */ var _utils_text__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/text */ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/utils/text.js"); - - - - - -/** label text和line距离 4px */ -var CROOK_DISTANCE = 4; -function percent2Number(value) { - var percentage = Number(value.endsWith('%') ? value.slice(0, -1) : value); - return percentage / 100; -} -var PieBaseLabel = /** @class */ (function () { - function PieBaseLabel(plot, cfg) { - this.destroyed = false; - this.plot = plot; - this.coordinateBBox = this.plot.view.coordinateBBox; - var options = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["deepMix"])(this.getDefaultOptions(), cfg, {}); - this.adjustOption(options); - this.options = options; - this.init(); - } - PieBaseLabel.prototype.adjustItem = function (item) { }; - PieBaseLabel.prototype.init = function () { - var _this = this; - this.container = this.getGeometry().labelsContainer; - this.plot.view.on('beforerender', function () { - _this.clear(); - _this.plot.canvas.draw(); - }); - }; - PieBaseLabel.prototype.render = function () { - // 先清空 再重新渲染(避免双次绘制) - this.clear(); - this.initArcPoints(); - this.drawTexts(); - this.drawLines(); - }; - PieBaseLabel.prototype.clear = function () { - if (this.container) { - this.container.clear(); - } - }; - PieBaseLabel.prototype.hide = function () { - this.container.set('visible', false); - this.plot.canvas.draw(); - }; - PieBaseLabel.prototype.show = function () { - this.container.set('visible', true); - this.plot.canvas.draw(); - }; - PieBaseLabel.prototype.destory = function () { - if (this.container) { - this.container.remove(); - } - this.destroyed = true; - }; - /** 绘制文本 */ - PieBaseLabel.prototype.drawTexts = function () { - var _this = this; - var _a = this.options, style = _a.style, formatter = _a.formatter, autoRotate = _a.autoRotate, offsetX = _a.offsetX, offsetY = _a.offsetY; - var shapeInfos = this.getItems(); - var shapes = []; - shapeInfos.map(function (shapeInfo, idx) { - var attrs = Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["deepMix"])({}, shapeInfo, style); - var content = formatter ? formatter(shapeInfo.name, { _origin: shapeInfo.origin }, idx) : shapeInfo.name; - var itemGroup = _this.container.addGroup({ name: 'itemGroup', index: idx }); - var textShape = itemGroup.addShape('text', { - attrs: Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["deepMix"])({}, attrs, { - x: shapeInfo.x + offsetX, - y: shapeInfo.y + offsetY, - text: content, - }), - }); - textShape.set('id', "text-" + shapeInfo.name + "-" + idx); - shapes.push(textShape); - }); - shapes.forEach(function (shape) { - var panelBox = _this.coordinateBBox; - _this.adjustText(shape, panelBox); - }); - this.layout(shapes, shapeInfos, this.coordinateBBox); - shapes.forEach(function (label, idx) { - if (autoRotate) { - _this.rotateLabel(label, shapeInfos[idx].angle); - } - }); - }; - PieBaseLabel.prototype.adjustText = function (label, panelBox) { - var box = label.getBBox(); - var width = box.width; - var deltaWidth = 0; - if (box.maxX > panelBox.maxX) { - width = panelBox.maxX - box.minX; - } - else if (box.minX < panelBox.minX) { - width = box.maxX - panelBox.minX; - } - if (label.attr('textAlign') === 'left') { - label.attr('x', Math.max(box.x - deltaWidth, 0)); - } - else if (label.attr('textAlign') === 'right') { - label.attr('x', Math.max(box.maxX - deltaWidth, 0)); - } - if (width !== box.width) { - var font_1 = {}; - ['fontSize', 'fontFamily', 'fontWeight'].forEach(function (k) { - font_1[k] = label.attr(k); - }); - var ellipsisTexts = label - .attr('text') - .split('\n') - .map(function (t) { return Object(_utils_text__WEBPACK_IMPORTED_MODULE_4__["getEllipsisText"])(t, width, font_1); }); - label.attr('text', ellipsisTexts.join('\n')); - } - }; - /** 绘制拉线 */ - PieBaseLabel.prototype.drawLines = function () { - var _this = this; - if (this.options.line.visible) { - var itemGroups = this.container.get('children'); - var center_1 = this.getCoordinate().center; - itemGroups.forEach(function (labelGroup, idx) { - var label = labelGroup.get('children')[0]; - var anchor = _this.arcPoints[idx]; - var inLeft = anchor.x < center_1.x; - // 拉线 和 label 之间的距离 - var distance = _this.options.offset > 4 ? 4 : 0; - var path = _this.getLinePath(label, anchor, distance); - var style = _this.options.line; - labelGroup.addShape('path', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: path, stroke: anchor.color }, style), - }); - // 由于拉线的存在 label 需要进行偏移 - label.attr('x', label.attr('x') + (inLeft ? -distance : distance)); - }); - } - }; - /** 获取label leader-line, 默认 not smooth */ - PieBaseLabel.prototype.getLinePath = function (label, anchor, distance) { - var smooth = this.options.line ? this.options.line.smooth : false; - var angle = anchor.angle; - var _a = this.getCoordinate(), center = _a.center, radius = _a.radius; - var breakAt = Object(_utils__WEBPACK_IMPORTED_MODULE_3__["getEndPoint"])(center, angle, radius + distance); - if (distance < 4) { - breakAt = anchor; - } - var inLeft = anchor.x < center.x; - var box = label.getBBox(); - var labelPosition = { x: inLeft ? box.maxX : box.minX, y: box.y + box.height / 2 }; - var smoothPath = [ - 'C', - // 1st control point (of the curve) - labelPosition.x + - // 4 gives the connector a little horizontal bend - (inLeft ? 1 : -1) * (distance < 4 ? distance / 2 : 4), - labelPosition.y, - 2 * breakAt.x - anchor.x, - 2 * breakAt.y - anchor.y, - breakAt.x, - breakAt.y, - ]; - var straightPath = ['L', /** pointy break */ breakAt.x, breakAt.y]; - var linePath = smooth ? smoothPath : straightPath; - var path = ['M', labelPosition.x, labelPosition.y].concat(linePath).concat('L', anchor.x, anchor.y); - return path.join(','); - }; - PieBaseLabel.prototype.getGeometry = function () { - return this.plot.view.geometries[0]; - }; - PieBaseLabel.prototype.getCoordinate = function () { - var coordinate = this.getGeometry().coordinate; - var center = coordinate.getCenter(); - // @ts-ignore - var radius = coordinate.getRadius(); - var startAngle = coordinate.startAngle; - return { center: center, radius: radius, startAngle: startAngle }; - }; - PieBaseLabel.prototype.adjustOption = function (options) { - var offset = options.offset; - var radius = this.getCoordinate().radius; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["isString"])(offset)) { - offset = radius * percent2Number(offset); - } - options.offset = offset; - }; - PieBaseLabel.prototype.rotateLabel = function (label, angle) { - var x = label.attr('x'); - var y = label.attr('y'); - var matrix = Object(_antv_matrix_util__WEBPACK_IMPORTED_MODULE_1__["transform"])(label.getMatrix(), [ - ['t', -x, -y], - ['r', getRotateAngle(angle)], - ['t', x, y], - ]); - label.setMatrix(matrix); - }; - PieBaseLabel.prototype.getItems = function () { - var _this = this; - var offset = this.options.offset; - var _a = this.getCoordinate(), center = _a.center, radius = _a.radius; - var items = this.arcPoints.map(function (anchor) { - var point = Object(_utils__WEBPACK_IMPORTED_MODULE_3__["getEndPoint"])(center, anchor.angle, radius + offset); - var item = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, anchor), point); - _this.adjustItem(item); - return item; - }); - return items; - }; - // 初始化圆弧上锚点 - PieBaseLabel.prototype.initArcPoints = function () { - var angleField = this.plot.options.angleField; - var elements = this.getGeometry().elements; - var coord = this.getCoordinate(); - var center = coord.center, radius = coord.radius; - var startAngle = this.getCoordinate().startAngle; - var scale = this.getGeometry().scales[angleField]; - var anchors = elements.map(function (ele) { - var origin = ele.shape.get('origin'); - var color = origin.color; - var originData = origin.data[0] || origin.data; - var endAngle = startAngle + Math.PI * 2 * scale.scale(originData[angleField]); - var angle = (startAngle + endAngle) / 2; - var point = Object(_utils__WEBPACK_IMPORTED_MODULE_3__["getEndPoint"])(center, angle, radius); - startAngle = endAngle; - var name = "" + originData[angleField]; - var textAlign = point.x > center.x ? 'left' : 'right'; - return { x: point.x, y: point.y, color: color, name: name, origin: originData, angle: angle, textAlign: textAlign }; - }); - this.arcPoints = anchors; - }; - return PieBaseLabel; -}()); -/* harmony default export */ __webpack_exports__["default"] = (PieBaseLabel); -/** - * @protected - * 获取文本旋转的方向 - * @param {Number} angle angle - * @return {Number} angle - */ -function getRotateAngle(angle) { - var rotate = (angle * 180) / Math.PI; - if (rotate < -90 || (rotate > 180 && rotate < 270)) { - // 第四象限 - rotate += 180; - } - else if (rotate < 180 && rotate > 90) { - // 第三象限 - rotate = 90 - rotate; - } - return (rotate / 180) * Math.PI; -} -//# sourceMappingURL=base-label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/index.js": -/*!**************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/pie/component/label/index.js ***! - \**************************************************************************/ -/*! exports provided: getPieLabel */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPieLabel", function() { return getPieLabel; }); -/* harmony import */ var _inner_label__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./inner-label */ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/inner-label.js"); -/* harmony import */ var _outer_label__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./outer-label */ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/outer-label.js"); -/* harmony import */ var _outer_center_label__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./outer-center-label */ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/outer-center-label.js"); - - - -var PieLabels = { - inner: _inner_label__WEBPACK_IMPORTED_MODULE_0__["default"], - outer: _outer_label__WEBPACK_IMPORTED_MODULE_1__["default"], - 'outer-center': _outer_center_label__WEBPACK_IMPORTED_MODULE_2__["default"], -}; -function getPieLabel(type) { - if (!PieLabels[type]) { - console.warn("this label " + type + " is not registered"); - return; - } - return PieLabels[type]; -} -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/inner-label.js": -/*!********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/pie/component/label/inner-label.js ***! - \********************************************************************************/ -/*! exports provided: percent2Number, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "percent2Number", function() { return percent2Number; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_label__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base-label */ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/base-label.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/utils/index.js"); -/* harmony import */ var _util_math__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../util/math */ "./node_modules/@antv/g2plot/esm/util/math.js"); - - - - - -function percent2Number(value) { - var percentage = Number(value.endsWith('%') ? value.slice(0, -1) : value); - return percentage / 100; -} -var PieInnerLabel = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PieInnerLabel, _super); - function PieInnerLabel() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** @override 不能大于0 */ - PieInnerLabel.prototype.adjustOption = function (options) { - _super.prototype.adjustOption.call(this, options); - if (options.offset > 0) { - options.offset = 0; - } - }; - PieInnerLabel.prototype.adjustItem = function (item) { - item.textAlign = 'middle'; - }; - /** @override 不绘制拉线 */ - PieInnerLabel.prototype.drawLines = function () { - return; - }; - PieInnerLabel.prototype.layout = function (labels, shapeInfos) { - var _this = this; - labels.forEach(function (label, idx) { - if (idx > 0) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(labels.slice(0, idx), function (prevLabel) { - _this.resolveCollision(label, prevLabel, shapeInfos[idx]); - }); - } - }); - }; - PieInnerLabel.prototype.getDefaultOptions = function () { - var theme = this.plot.theme; - var labelStyle = theme.label.style; - return { - offsetX: 0, - offsetY: 0, - offset: '-30%', - style: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, labelStyle), { textAlign: 'center', textBaseline: 'middle' }), - }; - }; - /** label 碰撞调整 */ - PieInnerLabel.prototype.resolveCollision = function (label, prev, shapeInfo) { - var center = this.getCoordinate().center; - var angle = shapeInfo.angle; - var box = label.getBBox(); - var prevBBox = prev.getBBox(); - var pos = { x: (box.minX + box.maxX) / 2, y: (box.minY + box.maxY) / 2 }; - // 两种调整方案 - /** 先偏移 x 方向 -> 再计算 y 位置 */ - var pos1 = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(pos); - /** 先偏移 y 方向 -> 再计算 x 位置 */ - var pos2 = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(pos); - // check overlap - if (prev.get('id') !== label.get('id')) { - var _a = Object(_utils__WEBPACK_IMPORTED_MODULE_3__["getOverlapInfo"])(box, prevBBox), xOverlap = _a.xOverlap, yOverlap = _a.yOverlap; - if (xOverlap) { - pos1.x = pos.x + xOverlap; - pos1.y = pos.y + Math.tan(angle) * xOverlap; - } - if (yOverlap) { - // fix issue-460 - var yMover = yOverlap; - if (pos.y < center.y) { - // 上方label优先往上偏移 - yMover = yMover < 0 ? yMover : prevBBox.minY - box.maxY; - } - else { - // 下方label优先往下偏移 - yMover = yMover > 0 ? yMover : prevBBox.maxY - box.minY; - } - pos2.y = pos.y + yMover; - pos2.x = pos.x + yMover / Math.tan(angle); - } - var dist1 = Object(_util_math__WEBPACK_IMPORTED_MODULE_4__["distBetweenPoints"])(pos, pos1); - var dist2 = Object(_util_math__WEBPACK_IMPORTED_MODULE_4__["distBetweenPoints"])(pos, pos2); - var actualPos = dist1 < dist2 ? pos1 : pos2; - // 取偏移距离最小的 - label.attr('x', actualPos.x); - label.attr('y', actualPos.y); - } - }; - return PieInnerLabel; -}(_base_label__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (PieInnerLabel); -//# sourceMappingURL=inner-label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/outer-center-label.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/pie/component/label/outer-center-label.js ***! - \***************************************************************************************/ -/*! exports provided: DEFAULT_OFFSET, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_OFFSET", function() { return DEFAULT_OFFSET; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _base_label__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base-label */ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/base-label.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/utils/index.js"); - - - -// 默认label和element的偏移 16px -var DEFAULT_OFFSET = 16; -var PieOuterCenterLabel = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PieOuterCenterLabel, _super); - function PieOuterCenterLabel() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** @override 不能大于0 */ - PieOuterCenterLabel.prototype.adjustOption = function (options) { - _super.prototype.adjustOption.call(this, options); - if (options.offset < 0) { - options.offset = 0; - } - }; - PieOuterCenterLabel.prototype.getDefaultOptions = function () { - var theme = this.plot.theme; - var labelStyle = theme.label.style; - return { - offsetX: 0, - offsetY: 0, - offset: 12, - style: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, labelStyle), { textBaseline: 'middle' }), - }; - }; - PieOuterCenterLabel.prototype.adjustItem = function (item) { - var offset = this.options.offset; - if (item.textAlign === 'left') { - item.x += offset > 4 ? 4 : offset / 2; - } - else if (item.textAlign === 'right') { - item.x -= offset > 4 ? 4 : offset / 2; - } - }; - /** label 碰撞调整 */ - PieOuterCenterLabel.prototype.layout = function (labels, items, panel) { - this.adjustOverlap(labels, panel); - }; - /** 处理标签遮挡问题 */ - PieOuterCenterLabel.prototype.adjustOverlap = function (labels, panel) { - var _this = this; - if (this.options.allowOverlap) { - return; - } - // clearOverlap; - for (var i = 1; i < labels.length; i++) { - var label = labels[i]; - var overlapArea = 0; - for (var j = i - 1; j >= 0; j--) { - var prev = labels[j]; - // fix: start draw point.x is error when textAlign is right - var prevBox = prev.getBBox(); - var currBox = label.getBBox(); - // if the previous one is invisible, skip - if (prev.get('parent').get('visible')) { - overlapArea = Object(_utils__WEBPACK_IMPORTED_MODULE_2__["getOverlapArea"])(prevBox, currBox); - if (!Object(_utils__WEBPACK_IMPORTED_MODULE_2__["near"])(overlapArea, 0)) { - label.get('parent').set('visible', false); - break; - } - } - } - } - labels.forEach(function (label) { return _this.checkInPanel(label, panel); }); - }; - /** - * 超出panel边界的标签默认隐藏 - */ - PieOuterCenterLabel.prototype.checkInPanel = function (label, panel) { - var box = label.getBBox(); - // 横向溢出 暂不隐藏 - if (!(panel.y <= box.y && panel.y + panel.height >= box.y + box.height)) { - label.get('parent').set('visible', false); - } - }; - return PieOuterCenterLabel; -}(_base_label__WEBPACK_IMPORTED_MODULE_1__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (PieOuterCenterLabel); -//# sourceMappingURL=outer-center-label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/outer-label.js": -/*!********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/pie/component/label/outer-label.js ***! - \********************************************************************************/ -/*! exports provided: DEFAULT_OFFSET, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_OFFSET", function() { return DEFAULT_OFFSET; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_label__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base-label */ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/base-label.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/utils/index.js"); - - - - -// 默认label和element的偏移 16px -var DEFAULT_OFFSET = 16; -var PieOuterLabel = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PieOuterLabel, _super); - function PieOuterLabel() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** @override 不能大于0 */ - PieOuterLabel.prototype.adjustOption = function (options) { - _super.prototype.adjustOption.call(this, options); - if (options.offset < 0) { - options.offset = 0; - } - }; - PieOuterLabel.prototype.getDefaultOptions = function () { - var theme = this.plot.theme; - var labelStyle = theme.label.style; - return { - offsetX: 0, - offsetY: 0, - offset: 12, - style: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, labelStyle), { textBaseline: 'middle' }), - }; - }; - /** label 碰撞调整 */ - PieOuterLabel.prototype.layout = function (labels, items, panel) { - var _this = this; - var center = this.getCoordinate().center; - var leftHalf = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["filter"])(labels, function (l) { return l.attr('x') <= center.x; }); - var rightHalf = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["filter"])(labels, function (l) { return l.attr('x') > center.x; }); - [rightHalf, leftHalf].forEach(function (half, isLeft) { - _this._antiCollision(half, !isLeft, panel); - }); - this.adjustOverlap(labels, panel); - }; - /** 处理标签遮挡问题 */ - PieOuterLabel.prototype.adjustOverlap = function (labels, panel) { - var _this = this; - if (this.options.allowOverlap) { - return; - } - // clearOverlap; - for (var i = 1; i < labels.length; i++) { - var label = labels[i]; - var overlapArea = 0; - for (var j = i - 1; j >= 0; j--) { - var prev = labels[j]; - // fix: start draw point.x is error when textAlign is right - var prevBox = prev.getBBox(); - var currBox = label.getBBox(); - // if the previous one is invisible, skip - if (prev.get('parent').get('visible')) { - overlapArea = Object(_utils__WEBPACK_IMPORTED_MODULE_3__["getOverlapArea"])(prevBox, currBox); - if (!Object(_utils__WEBPACK_IMPORTED_MODULE_3__["near"])(overlapArea, 0)) { - label.get('parent').set('visible', false); - break; - } - } - } - } - labels.forEach(function (label) { return _this.checkInPanel(label, panel); }); - }; - /** - * 超出panel边界的标签默认隐藏 - */ - PieOuterLabel.prototype.checkInPanel = function (label, panel) { - var box = label.getBBox(); - // 横向溢出 暂不隐藏 - if (!(panel.y <= box.y && panel.y + panel.height >= box.y + box.height)) { - label.get('parent').set('visible', false); - } - }; - /** labels 碰撞处理(重点算法) */ - PieOuterLabel.prototype._antiCollision = function (labels, isRight, panelBox) { - var _this = this; - var labelHeight = this.getLabelHeight(labels); - var _a = this.getCoordinate(), center = _a.center, radius = _a.radius; - var offset = this.options.offset; - var totalR = radius + offset; - var totalHeight = Math.min(panelBox.height, Math.max(totalR * 2 + labelHeight * 2, labels.length * labelHeight)); - var maxLabelsCount = Math.floor(totalHeight / labelHeight); - // fix-bug, maxLabelsCount 之后的labels 在非 allowOverlap 不显示(避免出现尾部label展示,而前置label不展示) - if (!this.options.allowOverlap) { - labels.slice(maxLabelsCount).forEach(function (label) { - label.get('parent').set('visible', false); - }); - } - labels.splice(maxLabelsCount, labels.length - maxLabelsCount); - // sort by y DESC - labels.sort(function (a, b) { return a.getBBox().y - b.getBBox().y; }); - // adjust y position of labels to avoid overlapping - var overlapping = true; - var i; - var maxY = center.y + totalHeight / 2; - var minY = center.y - totalHeight / 2; - var boxes = labels.map(function (label) { - var labelBox = label.getBBox(); - if (labelBox.maxY > maxY) { - maxY = Math.min(panelBox.maxY, labelBox.maxY); - } - if (labelBox.minY < minY) { - minY = Math.max(panelBox.minY, labelBox.minY); - } - return { - text: label.attr('text'), - size: labelHeight, - pos: labelBox.y, - targets: [], - }; - }); - var j = 0; - while (j < boxes.length) { - if (j === boxes.length - 1) { - boxes[j].targets[0] = maxY; - } - else { - boxes[j].targets[0] = boxes[j + 1].pos - boxes[j + 1].size / 2; - } - j++; - } - while (overlapping) { - boxes.forEach(function (box) { - var target = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["last"])(box.targets); - box.pos = Math.max(minY, Math.min(box.pos, target - box.size)); - }); - // detect overlapping and join boxes - overlapping = false; - i = boxes.length; - while (i--) { - if (i > 0) { - var previousBox = boxes[i - 1]; - var box = boxes[i]; - if (previousBox.pos + previousBox.size > box.pos) { - // overlapping - previousBox.size += box.size; - previousBox.targets = previousBox.targets.concat(box.targets); - // overflow, shift up - var target = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["last"])(previousBox.targets); - if (previousBox.pos + previousBox.size > target) { - previousBox.pos = target - previousBox.size; - } - boxes.splice(i, 1); // removing box - overlapping = true; - } - else { - // 换掉最后一个 - previousBox.targets.splice(-1, 1, box.pos); - } - } - } - } - i = 0; - // step 4: normalize y and adjust x - boxes.forEach(function (b) { - var posInCompositeBox = labelHeight / 2; // middle of the label - b.targets.forEach(function () { - labels[i].attr('y', b.pos + posInCompositeBox); - posInCompositeBox += labelHeight; - i++; - }); - }); - // 调整 x 位置在椭圆轨道上 - var topLabels = []; - var bottomLabels = []; - labels.forEach(function (label, idx) { - var anchor = _this.arcPoints[idx]; - if (anchor.angle >= 0 && anchor.angle <= Math.PI) { - bottomLabels.push(label); - } - else { - topLabels.push(label); - } - }); - [topLabels, bottomLabels].forEach(function (adjustLabels, isBottom) { - if (!adjustLabels.length) { - return; - } - var ry = isBottom ? Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["last"])(adjustLabels).getBBox().maxY - center.y : center.y - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["head"])(adjustLabels).getBBox().minY; - ry = Math.max(totalR, ry); - var distance = offset > 4 ? 4 : 0; - var maxLabelWidth = Math.max.apply(0, Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["map"])(labels, function (label) { return label.getBBox().width; })) + - offset + - distance; - var rx = Math.max(totalR, Math.min((ry + totalR) / 2, center.x - (panelBox.minX + maxLabelWidth))); - var rxPow2 = rx * rx; - var ryPow2 = ry * ry; - adjustLabels.forEach(function (label, idx) { - var anchor = _this.arcPoints[idx]; - var box = label.getBBox(); - var boxCenter = { x: box.minX + box.width / 2, y: box.minY + box.height / 2 }; - var dyPow2 = Math.pow(boxCenter.y - center.y, 2); - var endPoint = Object(_utils__WEBPACK_IMPORTED_MODULE_3__["getEndPoint"])(center, anchor.angle, radius); - var distance_offset = (isRight ? 1 : -1) * distance * 2; - if (dyPow2 > ryPow2) { - console.warn('异常(一般不会出现)', label.attr('text')); - label.attr('x', endPoint.x + distance_offset); - } - else { - // (x - cx)^2 / rx ^ 2 + (y - cy)^2 / ry ^ 2 = 1 - // 避免 label的 拉线 在 element 上 - var xPos = center.x + (isRight ? 1 : -1) * Math.sqrt((1 - dyPow2 / ryPow2) * rxPow2); - if ((center.x === endPoint.x && boxCenter.y === endPoint.y) || - (center.y === endPoint.y && xPos === endPoint.x)) { - xPos = endPoint.x; - } - else { - // const k1 = (center.y - endPoint.y) / (center.x - endPoint.x); - // const k2 = (boxCenter.y - endPoint.y) / (xPos - endPoint.x); - // const theta = Math.atan((k1 - k2) / (1 + k1 * k2)); - // 切角 < 90度(目前的坐标系 无法精准计算切角) - // if (Math.cos(theta) > 0 && (!isRight ? xPos > endPoint.x : xPos < endPoint.x)) { - // xPos = endPoint.x; - // } - } - label.attr('x', xPos + distance_offset); - } - }); - }); - }; - /** 获取label height */ - PieOuterLabel.prototype.getLabelHeight = function (labels) { - if (!this.options.labelHeight) { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["head"])(labels) ? Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["head"])(labels).getBBox().height : 14; - } - return this.options.labelHeight; - }; - return PieOuterLabel; -}(_base_label__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (PieOuterLabel); -//# sourceMappingURL=outer-label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/spider-label.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/pie/component/label/spider-label.js ***! - \*********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -var ANCHOR_OFFSET = 0; // 锚点偏移量 -var INFLECTION_OFFSET = 15; // 拐点偏移量 -var DEFAULT_COLOR = '#CCC'; -var LABEL1_OFFSETY = 2; -var LABEL2_OFFSETY = -2; -var ADJUSTOFFSET = 15; -function getEndPoint(center, angle, r) { - return { - x: center.x + r * Math.cos(angle), - y: center.y + r * Math.sin(angle), - }; -} -var SpiderLabel = /** @class */ (function () { - function SpiderLabel(cfg) { - this.destroyed = false; - this.view = cfg.view; - this.options = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])({}, this.getDefaultOptions(), cfg); - this._adjustOptions(this.options); - this.init(); - } - SpiderLabel.prototype.init = function () { - var _this = this; - this.container = this.view.geometries[0].labelsContainer; - this.view.on('beforerender', function () { - _this.clear(); - }); - }; - SpiderLabel.prototype.render = function () { - var _this = this; - if (!this.view || this.view.destroyed) { - return; - } - /** 如果有formatter则事先处理数据 */ - var data = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(this.view.getData()); - this.halves = [[], []]; - var shapes = []; - var elements = this.view.geometries[0].elements; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(elements, function (ele) { - shapes.push(ele.shape); - }); - this.coord = this.view.geometries[0].coordinate; - var angleField = this.options.fields[0]; - var scale = this.view.getScalesByDim('y')[angleField]; - var center = this.coord.getCenter(); - var startAngle = this.coord.startAngle; - var radius = this.coord.polarRadius; - var _a = this.view.coordinateBBox, width = _a.width, height = _a.height; - this.width = width; - this.height = height; - var angle = startAngle; - var _loop_1 = function (idx) { - var d = data[idx]; - // 计算每个切片的middle angle - var angleValue = scale.scale(d[angleField]); - var targetAngle = angle + Math.PI * 2 * angleValue; - var middleAngle = angle + (targetAngle - angle) / 2; - angle = targetAngle; - // 根据middle angle计算锚点和拐点距离 - var anchorPoint = getEndPoint(center, middleAngle, radius + ANCHOR_OFFSET); - var inflectionPoint = getEndPoint(center, middleAngle, radius + INFLECTION_OFFSET); - // 获取对应shape的color - var color = DEFAULT_COLOR; - if (this_1.options.fields.length === 2) { - var colorField = this_1.options.fields[1]; - var colorScale = this_1.view.geometries[0].scales[colorField]; - var colorIndex = colorScale.scale(d[colorField]); - var shapeIndex = Math.floor(colorIndex * (shapes.length - 1)); - color = shapes[shapeIndex].attr('fill'); - } - // 组装label数据 - var label = { - _anchor: anchorPoint, - _inflection: inflectionPoint, - _data: d, - x: inflectionPoint.x, - y: inflectionPoint.y, - r: radius + INFLECTION_OFFSET, - fill: color, - textGroup: null, - _side: null, - }; - // 创建label文本 - var texts = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(this_1.options.fields, function (f) { - texts.push(d[f]); - }); - if (this_1.options.formatter) { - var formatted = this_1.options.formatter(d[angleField], { _origin: d, color: color }, idx); - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isString"])(formatted)) { - formatted = [formatted]; - } - texts = formatted; - } - var textGroup = this_1.container.addGroup(); - var textAttrs = { - x: 0, - y: 0, - fontSize: this_1.options.text.fontSize, - lineHeight: this_1.options.text.fontSize, - fontWeight: this_1.options.text.fontWeight, - fill: this_1.options.text.fill, - }; - // label1:下部label - var lowerText = d[angleField]; - if (this_1.options.formatter) { - lowerText = texts[0]; - } - var lowerTextAttrs = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(textAttrs); - if (texts.length === 2) { - lowerTextAttrs.fontWeight = 700; - } - var lowerTextShape = textGroup.addShape('text', { - attrs: Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["mix"])({ - textBaseline: texts.length === 2 ? 'top' : 'middle', - text: lowerText, - }, lowerTextAttrs), - data: d, - offsetY: texts.length === 2 ? LABEL1_OFFSETY : 0, - name: 'label', - }); - lowerTextShape.name = 'label'; // 用于事件标记 shapeName - /** label2:上部label */ - if (texts.length === 2) { - var topTextShape = textGroup.addShape('text', { - attrs: Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["mix"])({ - textBaseline: 'bottom', - text: texts[1], - }, textAttrs), - data: d, - offsetY: LABEL2_OFFSETY, - name: 'label', - }); - topTextShape.name = 'label'; // 用于事件标记 shapeName - } - label.textGroup = textGroup; - /** 将label分组 */ - if (anchorPoint.x < center.x) { - label._side = 'left'; - this_1.halves[0].push(label); - } - else { - label._side = 'right'; - this_1.halves[1].push(label); - } - }; - var this_1 = this; - // tslint:disable-next-line: prefer-for-of - for (var idx = 0; idx < data.length; idx++) { - _loop_1(idx); - } - /** 绘制label */ - var maxCountForOneSide = Math.floor(height / this.options.lineHeight); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(this.halves, function (half) { - if (half.length > maxCountForOneSide) { - half.splice(maxCountForOneSide, half.length - maxCountForOneSide); - } - half.sort(function (a, b) { - return a.y - b.y; - }); - _this._antiCollision(half); - }); - this.view.canvas.draw(); - }; - SpiderLabel.prototype.clear = function () { - if (this.container) { - this.container.clear(); - } - }; - SpiderLabel.prototype.hide = function () { - this.container.set('visible', false); - this.view.canvas.draw(); - }; - SpiderLabel.prototype.show = function () { - this.container.set('visible', true); - this.view.canvas.draw(); - }; - SpiderLabel.prototype.destory = function () { - if (this.container) { - this.container.remove(); - } - this.destroyed = true; - }; - SpiderLabel.prototype.getDefaultOptions = function () { - return { - text: { - fill: 'rgba(0, 0, 0, 0.65)', - fontSize: 12, - }, - line: { - lineWidth: 0.5, - stroke: 'rgba(0, 0, 0, 0.45)', - }, - lineHeight: 32, - /** distance between label and edge */ - sidePadding: 20, - }; - }; - SpiderLabel.prototype._antiCollision = function (half) { - var _this = this; - var coord = this.coord; - var canvasHeight = coord.getHeight(); - var center = coord.center; - var radius = coord.getRadius(); - var startY = center.y - radius - INFLECTION_OFFSET - this.options.lineHeight; - var overlapping = true; - var totalH = canvasHeight; - var i; - var maxY = 0; - var minY = Number.MIN_VALUE; - var maxLabelWidth = 0; - var boxes = half.map(function (label) { - var labelY = label.y; - if (labelY > maxY) { - maxY = labelY; - } - if (labelY < minY) { - minY = labelY; - } - var textGroup = label.textGroup; - var labelWidth = textGroup.getBBox().width; - if (labelWidth >= maxLabelWidth) { - maxLabelWidth = labelWidth; - } - return { - size: _this.options.lineHeight, - targets: [labelY - startY], - }; - }); - if (maxY - startY > totalH) { - totalH = maxY - startY; - } - var iteratorBoxed = function (items) { - items.forEach(function (box) { - var target = (Math.min.apply(minY, box.targets) + Math.max.apply(minY, box.targets)) / 2; - box.pos = Math.min(Math.max(minY, target - box.size / 2), totalH - box.size); - }); - }; - while (overlapping) { - iteratorBoxed(boxes); - // detect overlapping and join boxes - overlapping = false; - i = boxes.length; - while (i--) { - if (i > 0) { - var previousBox = boxes[i - 1]; - var box = boxes[i]; - if (previousBox.pos + previousBox.size > box.pos) { - // overlapping - previousBox.size += box.size; - previousBox.targets = previousBox.targets.concat(box.targets); - // overflow, shift up - if (previousBox.pos + previousBox.size > totalH) { - previousBox.pos = totalH - previousBox.size; - } - boxes.splice(i, 1); // removing box - overlapping = true; - } - } - } - } - i = 0; - boxes.forEach(function (b) { - var posInCompositeBox = startY; // middle of the label - b.targets.forEach(function () { - half[i].y = b.pos + posInCompositeBox + _this.options.lineHeight / 2; - posInCompositeBox += _this.options.lineHeight; - i++; - }); - }); - var drawnLabels = []; - half.forEach(function (label) { - var textGroup = _this._drawLabel(label); - _this._drawLabelLine(label, maxLabelWidth, textGroup); - drawnLabels.push(textGroup); - }); - }; - SpiderLabel.prototype._drawLabel = function (label) { - var coord = this.coord; - var center = coord.getCenter(); - var radius = coord.getRadius(); - var width = this.width; - var y = label.y, textGroup = label.textGroup; - var children = textGroup.get('children'); - var x_dir = label._side === 'left' ? 1 : -1; - var textAttrs = { - textAlign: label._side === 'left' ? 'right' : 'left', - x: label._side === 'left' - ? center.x - radius - this.options.sidePadding - : center.x + radius + this.options.sidePadding, - }; - if (this.options.offsetX) { - textAttrs.x += this.options.offsetX * x_dir; - } - children.forEach(function (child) { - var offsetY = child.get('offsetY'); - var yPosition = y + offsetY; - child.attr(textAttrs); - child.attr('y', yPosition); - }); - return textGroup; - }; - SpiderLabel.prototype._drawLabelLine = function (label, maxLabelWidth, container) { - var _anchor = [label._anchor.x, label._anchor.y]; - var _inflection = [label._inflection.x, label._inflection.y]; - var fill = label.fill, y = label.y, textGroup = label.textGroup; - if (!textGroup) - return; - var lastPoint = [label._side === 'left' ? textGroup.getBBox().maxX + 4 : textGroup.getBBox().minX - 4, y]; - var points = [_anchor, _inflection, lastPoint]; - if (_inflection[1] !== y) { - // 展示全部文本文本位置做过调整 - if (_inflection[1] < y) { - // 文本被调整下去了,则添加拐点连接线 - var point1 = _inflection; - var leftPoint = lastPoint[0] + maxLabelWidth + ADJUSTOFFSET; - var rightPoint = lastPoint[0] - maxLabelWidth - ADJUSTOFFSET; - var point2 = [label._side === 'left' ? leftPoint : rightPoint, _inflection[1]]; - var point3 = [ - label._side === 'left' ? lastPoint[0] + maxLabelWidth : lastPoint[0] - maxLabelWidth, - lastPoint[1], - ]; - points = [_anchor, point1, point2, point3, lastPoint]; - if ((label._side === 'right' && point2[0] < point1[0]) || (label._side === 'left' && point2[0] > point1[0])) { - points = [_anchor, point3, lastPoint]; - } - } - else { - points = [_anchor, [_inflection[0], y], lastPoint]; - } - } - var path = []; - for (var i = 0; i < points.length; i++) { - var p = points[i]; - var starter = 'L'; - if (i === 0) { - starter = 'M'; - } - path.push([starter, p[0], p[1]]); - } - container.addShape('path', { - attrs: { - path: path, - lineWidth: this.options.line.lineWidth, - stroke: this.options.line.stroke, - }, - }); - // 绘制锚点 - // container.addShape('circle', { - // attrs: { - // x: _anchor[0], - // y: _anchor[1], - // r: this.config.anchorSize, - // fill, - // }, - // }); - }; - SpiderLabel.prototype._adjustOptions = function (config) { - if (config.text.fontSize) { - config.lineHeight = config.text.fontSize * 3; - } - }; - return SpiderLabel; -}()); -/* harmony default export */ __webpack_exports__["default"] = (SpiderLabel); -//# sourceMappingURL=spider-label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/utils/index.js": -/*!********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/pie/component/label/utils/index.js ***! - \********************************************************************************/ -/*! exports provided: getEndPoint, getCenter, getOverlapArea, getOverlapInfo, inPanel, near */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getEndPoint", function() { return getEndPoint; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCenter", function() { return getCenter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOverlapArea", function() { return getOverlapArea; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOverlapInfo", function() { return getOverlapInfo; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inPanel", function() { return inPanel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "near", function() { return near; }); -function getEndPoint(center, angle, r) { - return { - x: center.x + r * Math.cos(angle), - y: center.y + r * Math.sin(angle), - }; -} -/** 获取矩形中点 */ -function getCenter(box) { - return { - x: box.x + box.width / 2, - y: box.y + box.height / 2, - }; -} -function getOverlapArea(a, b, margin) { - if (margin === void 0) { margin = 0; } - var xOverlap = Math.max(0, Math.min(a.x + a.width + margin, b.x + b.width + margin) - Math.max(a.x - margin, b.x - margin)); - var yOverlap = Math.max(0, Math.min(a.y + a.height + margin, b.y + b.height + margin) - Math.max(a.y - margin, b.y - margin)); - return xOverlap * yOverlap; -} -/** - * 计算两个矩形之间的堆叠情况 - * @return xOverlap x方向重叠大小 - * @return yOverlap y方向重叠大小 - */ -function getOverlapInfo(a, b, margin) { - if (margin === void 0) { margin = 0; } - var xOverlap = Math.max(0, Math.min(a.x + a.width + margin, b.x + b.width + margin) - Math.max(a.x - margin, b.x - margin)); - var yOverlap = Math.max(0, Math.min(a.y + a.height + margin, b.y + b.height + margin) - Math.max(a.y - margin, b.y - margin)); - // 添加 sign - if (xOverlap && a.x < b.x) { - xOverlap = -xOverlap; - } - if (yOverlap && a.y < b.y) { - yOverlap = -yOverlap; - } - // 重叠 - if (a.x === b.x && a.width === b.width) { - xOverlap = b.width; - } - if (a.y === b.y && a.height === b.height) { - yOverlap = b.height; - } - return { xOverlap: xOverlap, yOverlap: yOverlap }; -} -/** - * 粗略地判断是否在panel内部 - * @param panel - * @param shape - */ -function inPanel(panel, shape) { - return (panel.x < shape.x && - panel.x + panel.width > shape.x + shape.width && - panel.y < shape.y && - panel.y + panel.height > shape.y + shape.height); -} -/** - * 判断两个数值 是否接近 - * - 解决精度问题(由于无法确定精度上限,根据具体场景可传入 精度 参数) - */ -var near = function (x, y, e) { - if (e === void 0) { e = Math.pow(Number.EPSILON, 0.5); } - return [x, y].includes(Infinity) ? Math.abs(x) === Math.abs(y) : Math.abs(x - y) < e; -}; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/utils/text.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/pie/component/label/utils/text.js ***! - \*******************************************************************************/ -/*! exports provided: measureTextWidth, getEllipsisText */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "measureTextWidth", function() { return measureTextWidth; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getEllipsisText", function() { return getEllipsisText; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - - -var canvas = document.createElement('canvas'); -var ctx = canvas.getContext('2d'); -/** - * 计算文本在画布中的宽度 - */ -var measureTextWidth = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["memoize"])(function (text, font) { - if (font === void 0) { font = {}; } - var fontSize = font.fontSize, fontFamily = font.fontFamily, fontWeight = font.fontWeight, fontStyle = font.fontStyle, fontVariant = font.fontVariant; - ctx.font = [fontStyle, fontVariant, fontWeight, fontSize + "px", fontFamily].join(' '); - return ctx.measureText(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isString"])(text) ? text : '').width; -}, function (text, font) { return (font ? Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArrays"])([text], Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["values"])(font)).join('') : text); }); -/** - * 获取文本的 ... 文本。 - * 算法(减少每次 measureText 的长度,measureText 的性能跟字符串时间相关): - * 1. 先通过 STEP 逐步计算,找到最后一个小于 maxWidth 的字符串 - * 2. 然后对最后这个字符串二分计算 - * @param text 需要计算的文本, 由于历史原因 除了支持string,还支持空值,number和数组等 - * @param maxWidth - * @param font - * TODO 后续更新省略算法 - */ -var getEllipsisText = function (text, maxWidth, font, priority) { - var STEP = 16; // 每次 16,调参工程师 - var DOT_WIDTH = measureTextWidth('...', font); - var leftText; - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isString"])(text)) { - leftText = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["toString"])(text); - } - else { - leftText = text; - } - var leftWidth = maxWidth; - var r = []; // 最终的分段字符串 - var currentText; - var currentWidth; - if (measureTextWidth(text, font) <= maxWidth) { - return text; - } - // 首先通过 step 计算,找出最大的未超出长度的 - while (true) { - // 更新字符串 - currentText = leftText.substr(0, STEP); - // 计算宽度 - currentWidth = measureTextWidth(currentText, font); - // 超出剩余宽度,则停止 - if (currentWidth + DOT_WIDTH > leftWidth) { - if (currentWidth > leftWidth) { - break; - } - } - r.push(currentText); - // 没有超出,则计算剩余宽度 - leftWidth -= currentWidth; - leftText = leftText.substr(STEP); - // 字符串整体没有超出 - if (!leftText) { - return r.join(''); - } - } - // 最下的最后一个 STEP,使用 1 递增(用二分效果更高) - while (true) { - // 更新字符串 - currentText = leftText.substr(0, 1); - // 计算宽度 - currentWidth = measureTextWidth(currentText, font); - // 超出剩余宽度,则停止 - if (currentWidth + DOT_WIDTH > leftWidth) { - break; - } - r.push(currentText); - // 没有超出,则计算剩余宽度 - leftWidth -= currentWidth; - leftText = leftText.substr(1); - if (!leftText) { - return r.join(''); - } - } - return r.join('') + "..."; -}; -//# sourceMappingURL=text.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/pie/event.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/pie/event.js ***! - \**********************************************************/ -/*! exports provided: EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["onEvent"]; }); - - - -var componentMap = { - Pie: 'interval', -}; -var SHAPE_EVENT_MAP = Object(_util_event__WEBPACK_IMPORTED_MODULE_1__["getEventMap"])(componentMap); -Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(_util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"], SHAPE_EVENT_MAP); - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/pie/index.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/pie/index.js ***! - \**********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/pie/layer.js"); - - - - -var Pie = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Pie, _super); - function Pie() { - return _super !== null && _super.apply(this, arguments) || this; - } - Pie.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'pie'; - _super.prototype.createLayers.call(this, layerProps); - }; - Pie.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return Pie; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Pie); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/pie/layer.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/pie/layer.js ***! - \**********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./event */ "./node_modules/@antv/g2plot/esm/plots/pie/event.js"); -/* harmony import */ var _base_view_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/view-layer */ "./node_modules/@antv/g2plot/esm/base/view-layer.js"); -/* harmony import */ var _geoms_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../geoms/factory */ "./node_modules/@antv/g2plot/esm/geoms/factory.js"); -/* harmony import */ var _component_label__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./component/label */ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/index.js"); -/* harmony import */ var _component_label_spider_label__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./component/label/spider-label */ "./node_modules/@antv/g2plot/esm/plots/pie/component/label/spider-label.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./theme */ "./node_modules/@antv/g2plot/esm/plots/pie/theme.js"); - - - - - - - - - -var G2_GEOM_MAP = { - pie: 'interval', -}; -var PLOT_GEOM_MAP = { - pie: 'column', -}; -// @ts-ignore -var PieLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PieLayer, _super); - function PieLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'pie'; - return _this; - } - PieLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - width: 400, - height: 400, - title: { - visible: false, - }, - description: { - visible: false, - }, - forceFit: true, - padding: 'auto', - radius: 0.8, - label: { - visible: true, - type: 'inner', - autoRotate: false, - allowOverlap: false, - line: { - visible: true, - smooth: true, - }, - }, - legend: { - visible: true, - position: 'right-center', - }, - tooltip: { - visible: true, - shared: false, - showCrosshairs: false, - showMarkers: false, - }, - pieStyle: { - stroke: 'white', - lineWidth: 1, - }, - }); - }; - PieLayer.prototype.afterRender = function () { - _super.prototype.afterRender.call(this); - var options = this.options; - /** 蜘蛛布局label */ - if (options.label && options.label.visible) { - // 清除,避免二次渲染 - if (this.labelComponent) { - this.labelComponent.clear(); - } - var labelConfig = options.label; - if (labelConfig.type === 'spider') { - this.labelComponent = new _component_label_spider_label__WEBPACK_IMPORTED_MODULE_6__["default"](Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ view: this.view, fields: options.colorField ? [options.angleField, options.colorField] : [options.angleField] }, this.options.label)); - this.labelComponent.render(); - } - else { - var LabelCtor = Object(_component_label__WEBPACK_IMPORTED_MODULE_5__["getPieLabel"])(labelConfig.type); - this.labelComponent = new LabelCtor(this, options.label); - this.labelComponent.render(); - } - } - }; - PieLayer.prototype.geometryParser = function (dim, type) { - if (dim === 'g2') { - return G2_GEOM_MAP[type]; - } - return PLOT_GEOM_MAP[type]; - }; - PieLayer.prototype.scale = function () { - var props = this.options; - _super.prototype.scale.call(this); - var scales = {}; - scales[props.angleField] = {}; - scales[props.colorField] = { type: 'cat' }; - scales = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, this.config.scales, scales); - this.setConfig('scales', scales); - }; - PieLayer.prototype.processData = function (data) { - var key = this.options.angleField; - return data.map(function (item) { - var _a; - return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, item), (_a = {}, _a[key] = typeof item[key] === 'string' ? Number.parseFloat(item[key]) : item[key], _a))); - }); - }; - PieLayer.prototype.axis = function () { }; - PieLayer.prototype.coord = function () { - var props = this.options; - var coordConfig = { - type: 'theta', - cfg: { - radius: props.radius, - // @ts-ignore 业务定制,不开放配置 - innerRadius: props.innerRadius || 0, - }, - }; - this.setConfig('coordinate', coordConfig); - }; - PieLayer.prototype.addGeometry = function () { - var props = this.options; - var pie = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_4__["getGeom"])('interval', 'main', { - plot: this, - positionFields: [1, props.angleField], - }); - pie.adjust = [{ type: 'stack' }]; - this.pie = pie; - if (props.label) { - this.label(); - } - if (props.tooltip && (props.tooltip.fields || props.tooltip.formatter)) { - this.geometryTooltip(); - } - this.setConfig('geometry', pie); - }; - PieLayer.prototype.geometryTooltip = function () { - this.pie.tooltip = {}; - var tooltipOptions = this.options.tooltip; - if (tooltipOptions.fields) { - this.pie.tooltip.fields = tooltipOptions.fields; - } - if (tooltipOptions.formatter) { - this.pie.tooltip.callback = tooltipOptions.formatter; - if (!tooltipOptions.fields) { - this.pie.tooltip.fields = [this.options.angleField, this.options.colorField]; - } - } - }; - PieLayer.prototype.animation = function () { - _super.prototype.animation.call(this); - var props = this.options; - if (props.animation === false) { - /** 关闭动画 */ - this.pie.animate = false; - } - }; - PieLayer.prototype.annotation = function () { }; - PieLayer.prototype.parseEvents = function (eventParser) { - _super.prototype.parseEvents.call(this, _event__WEBPACK_IMPORTED_MODULE_2__); - }; - PieLayer.prototype.label = function () { - // 不使用 g2 内置label - this.pie.label = false; - }; - return PieLayer; -}(_base_view_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (PieLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_7__["registerPlotType"])('pie', PieLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/pie/theme.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/pie/theme.js ***! - \**********************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme */ "./node_modules/@antv/g2plot/esm/theme/index.js"); - -var PIE_ACTIVE_STYLE = function (style) { - var opacity = style.opacity || 1; - return { fillOpacity: opacity * 0.8 }; -}; -var PIE_DISABLE_STYLE = function (style) { - var opacity = style.opacity || 1; - return { fillOpacity: opacity * 0.5 }; -}; -Object(_theme__WEBPACK_IMPORTED_MODULE_0__["registerTheme"])('pie', { - columnStyle: { - normal: {}, - active: PIE_ACTIVE_STYLE, - disable: PIE_DISABLE_STYLE, - selected: { lineWidth: 1, stroke: 'black' }, - }, -}); -//# sourceMappingURL=theme.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/radar/event.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/radar/event.js ***! - \************************************************************/ -/*! exports provided: EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["onEvent"]; }); - -/** - * Create By Bruce Too - * On 2020-02-14 - */ - - -var componentMap = { - Area: 'area', - Line: 'line', - Point: 'point', -}; -var SHAPE_EVENT_MAP = Object(_util_event__WEBPACK_IMPORTED_MODULE_1__["getEventMap"])(componentMap); -Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(_util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"], SHAPE_EVENT_MAP); - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/radar/index.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/radar/index.js ***! - \************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/radar/layer.js"); - -/** - * Create By Bruce Too - * On 2020-02-14 - */ - - - -var Radar = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Radar, _super); - function Radar() { - return _super !== null && _super.apply(this, arguments) || this; - } - Radar.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'radar'; - _super.prototype.createLayers.call(this, layerProps); - }; - Radar.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return Radar; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Radar); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/radar/layer.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/radar/layer.js ***! - \************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _base_view_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/view-layer */ "./node_modules/@antv/g2plot/esm/base/view-layer.js"); -/* harmony import */ var _components_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../components/factory */ "./node_modules/@antv/g2plot/esm/components/factory.js"); -/* harmony import */ var _geoms_factory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../geoms/factory */ "./node_modules/@antv/g2plot/esm/geoms/factory.js"); -/* harmony import */ var _util_scale__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../util/scale */ "./node_modules/@antv/g2plot/esm/util/scale.js"); -/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./event */ "./node_modules/@antv/g2plot/esm/plots/radar/event.js"); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./theme */ "./node_modules/@antv/g2plot/esm/plots/radar/theme.js"); - -/** - * Create By Bruce Too - * On 2020-02-14 - */ - - - - - - - - -var GEOM_MAP = { - area: 'area', - line: 'line', - point: 'point', -}; -var RadarLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(RadarLayer, _super); - function RadarLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'radar'; - return _this; - } - RadarLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - width: 400, - height: 400, - title: { - visible: false, - }, - description: { - visible: false, - }, - forceFit: true, - padding: 'auto', - radius: 0.8, - smooth: false, - line: { - visible: true, - size: 2, - style: { - opacity: 1, - }, - }, - area: { - visible: true, - style: { - opacity: 0.25, - }, - }, - point: { - visible: false, - size: 4, - shape: 'point', - style: { - opacity: 1, - }, - }, - angleAxis: { - visible: true, - autoRotateTitle: true, - line: { - visible: false, - }, - tickLine: { - visible: false, - }, - grid: { - visible: true, - line: { - style: { - lineDash: [0, 0], - }, - }, - }, - label: { - visible: true, - offset: 16, - autoRotate: true, - autoHide: true, - }, - title: { - visible: false, - }, - }, - radiusAxis: { - min: 0, - visible: true, - /** G2 4.0 默认 nice 不生效,需要手动添加 */ - nice: true, - autoRotateTitle: true, - line: { - visible: true, - }, - tickLine: { - visible: true, - }, - gridType: 'line', - grid: { - visible: true, - line: { - style: { - lineDash: [0, 0], - }, - }, - }, - label: { - visible: true, - autoHide: true, - autoRotate: true, - }, - title: { - visible: false, - }, - }, - label: { - visible: false, - type: 'point', - }, - legend: { - visible: true, - position: 'left-top', - }, - tooltip: { - visible: true, - shared: true, - showCrosshairs: false, - }, - }); - }; - RadarLayer.prototype.init = function () { - var props = this.options; - props.xField = props.angleField; - props.yField = props.radiusField; - _super.prototype.init.call(this); - }; - RadarLayer.prototype.geometryParser = function (dim, type) { - return GEOM_MAP[type]; - }; - RadarLayer.prototype.scale = function () { - var props = this.options; - var scales = {}; - /** 配置x-scale */ - scales[props.angleField] = {}; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(props, 'angleAxis')) { - Object(_util_scale__WEBPACK_IMPORTED_MODULE_6__["extractScale"])(scales[props.angleField], props.angleAxis); - } - /** 配置y-scale */ - scales[props.radiusField] = {}; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(props, 'radiusAxis')) { - Object(_util_scale__WEBPACK_IMPORTED_MODULE_6__["extractScale"])(scales[props.radiusField], props.radiusAxis); - } - this.setConfig('scales', scales); - _super.prototype.scale.call(this); - }; - RadarLayer.prototype.coord = function () { - var props = this.options; - var coordConfig = { - type: 'polar', - cfg: { - radius: props.radius, - }, - }; - this.setConfig('coordinate', coordConfig); - }; - RadarLayer.prototype.axis = function () { - var props = this.options; - var xAxis_parser = Object(_components_factory__WEBPACK_IMPORTED_MODULE_4__["getComponent"])('axis', { - plot: this, - dim: 'angle', - }); - var yAxis_parser = Object(_components_factory__WEBPACK_IMPORTED_MODULE_4__["getComponent"])('axis', { - plot: this, - dim: 'radius', - }); - var axesConfig = {}; - axesConfig[props.angleField] = xAxis_parser; - axesConfig[props.radiusField] = yAxis_parser; - /** 存储坐标轴配置项到config */ - this.setConfig('axes', axesConfig); - }; - RadarLayer.prototype.addGeometry = function () { - var props = this.options; - /** 配置面积 */ - if (props.area.visible) { - var area = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_5__["getGeom"])('area', 'main', { - plot: this, - }); - this.setConfig('geometry', area); - this.area = area; - } - /** 配置线 */ - if (props.line && props.line.visible) { - var line = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_5__["getGeom"])('line', 'guide', { - plot: this, - }); - this.setConfig('geometry', line); - this.line = line; - } - /** 配置点 */ - if (props.point && props.point.visible) { - var point = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_5__["getGeom"])('point', 'guide', { - plot: this, - }); - this.setConfig('geometry', point); - this.point = point; - } - if (props.label) { - this.label(); - } - if (props.tooltip && (props.tooltip.fields || props.tooltip.formatter)) { - this.geometryTooltip(); - } - }; - RadarLayer.prototype.geometryTooltip = function () { - var geomConfig = this.line ? this.line : this.area; - geomConfig.tooltip = {}; - var tooltipOptions = this.options.tooltip; - if (tooltipOptions.fields) { - geomConfig.tooltip.fields = tooltipOptions.fields; - } - if (tooltipOptions.formatter) { - geomConfig.tooltip.callback = tooltipOptions.formatter; - if (!tooltipOptions.fields) { - geomConfig.tooltip.fields = [this.options.angleField, this.options.radiusField]; - } - if (this.options.seriesField) { - geomConfig.tooltip.fields.push(this.options.seriesField); - } - } - }; - RadarLayer.prototype.label = function () { - var props = this.options; - if (props.label.visible === false) { - if (this.point) { - this.point.label = false; - } - if (this.line) { - this.line.label = false; - } - if (this.area) { - this.area.label = false; - } - return; - } - // @Todo 雷达图标签布局算法后续补充 - var label = Object(_components_factory__WEBPACK_IMPORTED_MODULE_4__["getComponent"])('label', Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ fields: [props.radiusField], cfg: { - type: 'polar', - autoRotate: false, - }, plot: this }, props.label)); - if (this.point) { - this.point.label = label; - } - else if (this.line) { - this.line.label = label; - } - else if (this.area) { - this.area.label = label; - } - }; - RadarLayer.prototype.annotation = function () { }; - RadarLayer.prototype.animation = function () { - _super.prototype.animation.call(this); - var props = this.options; - if (props.animation === false) { - // 关闭动画 - if (this.area) - this.area.animate = false; - if (this.line) - this.line.animate = false; - if (this.point) - this.point.animate = false; - } - }; - RadarLayer.prototype.parseEvents = function (eventParser) { - _super.prototype.parseEvents.call(this, _event__WEBPACK_IMPORTED_MODULE_7__); - }; - return RadarLayer; -}(_base_view_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (RadarLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('radar', RadarLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/radar/theme.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/radar/theme.js ***! - \************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme */ "./node_modules/@antv/g2plot/esm/theme/index.js"); -/** - * Create By Bruce Too - * On 2020-02-14 - */ - -var AREA_ACTIVE_STYLE = function (style) { - var opacity = style.opacity || 1; - return { opacity: opacity }; -}; -var AREA_DISABLE_STYLE = function (style) { - var opacity = style.opacity || 1; - return { opacity: opacity * 0.5 }; -}; -var LINE_ACTIVE_STYLE = function (style) { - var opacity = style.opacity || 1; - return { opacity: opacity }; -}; -var LINE_DISABLE_STYLE = function (style) { - var opacity = style.opacity || 1; - return { opacity: opacity * 0.5 }; -}; -var LINE_SELECTED_STYLE = function (style) { - var lineWidth = style.lineWidth || 1; - return { lineWidth: lineWidth + 2 }; -}; -var POINT_ACTIVE_STYLE = function (style) { - var color = style.fill || style.fillStyle; - var radius = style.size || style.radius; - return { - radius: radius + 1, - shadowBlur: radius, - shadowColor: color, - stroke: color, - strokeOpacity: 1, - lineWidth: 1, - }; -}; -var POINT_SELECTED_STYLE = function (style) { - var color = style.fill || style.fillStyle; - var radius = style.size || style.radius; - return { - radius: radius + 2, - shadowBlur: radius, - shadowColor: color, - stroke: color, - strokeOpacity: 1, - lineWidth: 2, - }; -}; -var POINT_DISABLED_STYLE = function (style) { - var opacity = style.opacity || style.fillOpacity || 1; - return { opacity: opacity * 0.5 }; -}; -Object(_theme__WEBPACK_IMPORTED_MODULE_0__["registerTheme"])('radar', { - areaStyle: { - normal: {}, - active: AREA_ACTIVE_STYLE, - disable: AREA_DISABLE_STYLE, - selected: { lineWidth: 1, stroke: '#333333' }, - }, - lineStyle: { - normal: {}, - active: LINE_ACTIVE_STYLE, - disable: LINE_DISABLE_STYLE, - selected: LINE_SELECTED_STYLE, - }, - pointStyle: { - normal: {}, - active: POINT_ACTIVE_STYLE, - disable: POINT_DISABLED_STYLE, - selected: POINT_SELECTED_STYLE, - }, -}); -//# sourceMappingURL=theme.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/range-bar/animation.js": -/*!********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/range-bar/animation.js ***! - \********************************************************************/ -/*! exports provided: setShapeCache */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setShapeCache", function() { return setShapeCache; }); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - - -// 记录之前的状态 -var shapeCache; -function clipInFromCenter(shape, animateCfg) { - var bbox = shape.getBBox(); - var centerX = bbox.minX + bbox.width / 2; - shape.setClip({ - type: 'rect', - attrs: { - x: centerX, - y: bbox.minY, - width: 0, - height: bbox.height, - }, - }); - var cliper = shape.get('clipShape'); - cliper.animate({ - width: bbox.width, - x: bbox.minX, - }, animateCfg.duration, animateCfg.easing, function () { - shape.setClip(null); - }, animateCfg.delay); -} -clipInFromCenter.animationName = 'clipInFromCenter'; -function setShapeCache(shapes) { - shapeCache = shapes; -} -function updateFromCenter(shape, animateCfg) { - var fromPath = getShapeFromCache(shape).attr('path'); - var toPath = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(shape.attr('path')); - shape.attr('path', fromPath); - shape.animate({ - path: toPath, - }, animateCfg.duration, animateCfg.easing, animateCfg.callback, 100); -} -function getShapeFromCache(shape) { - var id = shape.id; - var target; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(shapeCache, function (s) { - if (s.id === id) { - target = s; - } - }); - return target; -} -updateFromCenter.animationName = 'updateFromCenter'; -Object(_dependents__WEBPACK_IMPORTED_MODULE_0__["registerAnimation"])('clipInFromCenter', clipInFromCenter); -Object(_dependents__WEBPACK_IMPORTED_MODULE_0__["registerAnimation"])('updateFromCenter', updateFromCenter); -//# sourceMappingURL=animation.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/range-bar/component/label.js": -/*!**************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/range-bar/component/label.js ***! - \**************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/color */ "./node_modules/@antv/g2plot/esm/util/color.js"); -/* harmony import */ var _util_bbox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/bbox */ "./node_modules/@antv/g2plot/esm/util/bbox.js"); - - - -var DEFAULT_OFFSET = 8; -function mappingColor(band, gray) { - var reflect; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(band, function (b) { - var map = b; - if (gray >= map.from && gray < map.to) { - reflect = map.color; - } - }); - return reflect; -} -var RangeBarLabel = /** @class */ (function () { - function RangeBarLabel(cfg) { - this.destroyed = false; - this.view = cfg.view; - this.plot = cfg.plot; - var defaultOptions = this.getDefaultOptions(); - this.options = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])(defaultOptions, cfg, {}); - if (!this.options.leftStyle) { - this.options.leftStyle = this.options.style; - } - if (!this.options.rightStyle) { - this.options.rightStyle = this.options.style; - } - this.init(); - } - RangeBarLabel.prototype.init = function () { - var _this = this; - this.container = this.getGeometry().labelsContainer; - this.view.on('beforerender', function () { - _this.clear(); - _this.plot.canvas.draw(); - }); - }; - RangeBarLabel.prototype.render = function () { - var _this = this; - var _a = this.getGeometry(), elements = _a.elements, coordinate = _a.coordinate; - this.coord = coordinate; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(elements, function (ele) { - var shape = ele.shape; - var positions = _this.getPosition(shape); - var values = _this.getValue(shape); - var textAlign = _this.getTextAlign(); - var labels = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(positions, function (pos, i) { - var style = i === 0 ? _this.options.leftStyle : _this.options.rightStyle; - var color = _this.getTextColor(shape, i); - if (_this.options.position === 'inner' && _this.options.adjustColor && color !== 'black') { - style.stroke = null; - } - var formatter = _this.options.formatter; - var content = formatter ? formatter(values[i]) : values[i]; - var label = _this.container.addShape('text', { - attrs: Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])({}, style, { - x: pos.x, - y: pos.y, - text: content, - fill: color, - textAlign: textAlign[i], - textBaseline: 'middle', - }), - name: 'label', - }); - labels.push(label); - _this.doAnimation(label); - }); - shape.set('labelShapes', labels); - _this.adjustPosition(labels[0], labels[1], shape); - }); - this.plot.canvas.draw(); - }; - RangeBarLabel.prototype.hide = function () { - this.container.set('visible', false); - this.plot.canvas.draw(); - }; - RangeBarLabel.prototype.show = function () { - this.container.set('visible', true); - this.plot.canvas.draw(); - }; - RangeBarLabel.prototype.clear = function () { - if (this.container) { - this.container.clear(); - } - }; - RangeBarLabel.prototype.destory = function () { - if (this.container) { - this.container.remove(); - } - this.destroyed = true; - }; - RangeBarLabel.prototype.getBBox = function () { }; - RangeBarLabel.prototype.getShapeBbox = function (shape) { - var _this = this; - var points = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(shape.get('origin').points, function (p) { - points.push(_this.coord.convertPoint(p)); - }); - var bbox = new _util_bbox__WEBPACK_IMPORTED_MODULE_2__["default"](points[0].x, points[1].y, Math.abs(points[2].x - points[0].x), Math.abs(points[0].y - points[1].y)); - return bbox; - }; - RangeBarLabel.prototype.getDefaultOptions = function () { - var theme = this.plot.theme; - var labelStyle = theme.label.style; - return { - position: 'outer', - offsetX: DEFAULT_OFFSET, - offsetY: 0, - style: Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(labelStyle), - adjustColor: true, - adjustPosition: true, - }; - }; - RangeBarLabel.prototype.getPosition = function (shape) { - var bbox = this.getShapeBbox(shape); - var minX = bbox.minX, maxX = bbox.maxX, minY = bbox.minY, height = bbox.height, width = bbox.width; - var _a = this.options, offsetX = _a.offsetX, offsetY = _a.offsetY; - var y = minY + height / 2 + offsetY; - var x1, x2; - if (this.options.position === 'outer') { - x1 = minX - offsetX; - x2 = maxX + offsetX; - } - else { - x1 = minX + offsetX; - x2 = maxX - offsetX; - } - return [ - { x: x1, y: y }, - { x: x2, y: y }, - ]; - }; - RangeBarLabel.prototype.getValue = function (shape) { - var xField = this.plot.options.xField; - return shape.get('origin').data[xField]; - }; - RangeBarLabel.prototype.getTextAlign = function () { - if (this.options.position === 'outer') { - return ['right', 'left']; - } - else { - return ['left', 'right']; - } - }; - RangeBarLabel.prototype.getTextColor = function (shape, index) { - if (this.options.adjustColor && this.options.position === 'inner') { - var shapeColor = shape.attr('fill'); - var shapeOpacity = shape.attr('opacity') ? shape.attr('opacity') : 1; - var rgb = Object(_util_color__WEBPACK_IMPORTED_MODULE_1__["rgb2arr"])(shapeColor); - var gray = Math.round(rgb[0] * 0.299 + rgb[1] * 0.587 + rgb[2] * 0.114) / shapeOpacity; - var colorBand = [ - { from: 0, to: 85, color: 'white' }, - { from: 85, to: 170, color: '#F6F6F6' }, - { from: 170, to: 255, color: 'black' }, - ]; - var reflect = mappingColor(colorBand, gray); - return reflect; - } - var defaultColor = index === 0 ? this.options.leftStyle.fill : this.options.rightStyle.fill; - return defaultColor; - }; - RangeBarLabel.prototype.doAnimation = function (label) { - if (this.plot.animation && this.plot.animation === false) { - return; - } - label.attr('fillOpacity', 0); - label.attr('strokeOpacity', 0); - label.stopAnimate(); - label.animate({ - fillOpacity: 1, - strokeOpacity: 1, - }, 800, 'easeLinear', 500); - }; - RangeBarLabel.prototype.adjustPosition = function (la, lb, shape) { - var origin = shape.get('origin'); - var shapeMinX = origin.x[0]; - var shapeMaxX = origin.x[1]; - var shapeWidth = Math.abs(shapeMaxX - shapeMinX); - var panelRange = this.view.coordinateBBox; - var boxes = [la.getBBox(), lb.getBBox()]; - var ax = la.attr('x'); - var bx = lb.attr('x'); - if (this.options.adjustPosition && this.options.position === 'inner') { - var totalLength = boxes[0].width + boxes[1].width; - var isOverlap = boxes[0].maxX - boxes[1].minX > 2; - var isTooShort = totalLength > shapeWidth; - if (isOverlap || isTooShort) { - ax = shapeMinX - this.options.offsetX; - la.attr('fill', this.options.leftStyle.fill); - la.attr('textAlign', 'right'); - boxes[0] = la.getBBox(); - bx = shapeMaxX + this.options.offsetX; - lb.attr('fill', this.options.rightStyle.fill); - lb.attr('textAlign', 'left'); - boxes[1] = lb.getBBox(); - } - } - if (boxes[0].minX < panelRange.minX) { - ax = panelRange.minX + DEFAULT_OFFSET; - la.attr('textAlign', 'left'); - } - la.attr('x', ax); - lb.attr('x', bx); - this.plot.canvas.draw(); - }; - RangeBarLabel.prototype.getGeometry = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["find"])(this.view.geometries, function (geom) { return geom.type === 'interval'; }); - }; - return RangeBarLabel; -}()); -/* harmony default export */ __webpack_exports__["default"] = (RangeBarLabel); -//# sourceMappingURL=label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/range-bar/index.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/range-bar/index.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/range-bar/layer.js"); - - - - -var RangeBar = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(RangeBar, _super); - function RangeBar() { - return _super !== null && _super.apply(this, arguments) || this; - } - RangeBar.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'rangeBar'; - _super.prototype.createLayers.call(this, layerProps); - }; - RangeBar.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return RangeBar; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (RangeBar); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/range-bar/layer.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/range-bar/layer.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _bar_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../bar/layer */ "./node_modules/@antv/g2plot/esm/plots/bar/layer.js"); -/* harmony import */ var _component_label__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./component/label */ "./node_modules/@antv/g2plot/esm/plots/range-bar/component/label.js"); -/* harmony import */ var _animation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./animation */ "./node_modules/@antv/g2plot/esm/plots/range-bar/animation.js"); - - - - - - -var RangeBarLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(RangeBarLayer, _super); - function RangeBarLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'rangeBar'; - return _this; - } - RangeBarLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])(_super.getDefaultOptions.call(this), { - label: { - visible: true, - position: 'outer', - }, - xAxis: { - visible: true, - autoRotateTitle: false, - grid: { - visible: true, - }, - line: { - visible: false, - }, - tickLine: { - visible: false, - }, - label: { - visible: true, - autoRotate: true, - autoHide: true, - }, - title: { - visible: true, - offset: 12, - }, - }, - yAxis: { - visible: true, - autoRotateTitle: true, - grid: { - visible: false, - }, - line: { - visible: true, - }, - tickLine: { - visible: true, - }, - label: { - visible: true, - autoHide: true, - autoRotate: false, - }, - title: { - visible: false, - offset: 12, - }, - }, - }, {}); - }; - RangeBarLayer.prototype.afterRender = function () { - this.renderLabel(); - // 为更新动画缓存shape - var shapeCaches = []; - var geoms = this.view.geometries; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(geoms, function (geom) { - var elements = geom.elements; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(elements, function (ele) { - shapeCaches.push(ele.shape); - }); - }); - Object(_animation__WEBPACK_IMPORTED_MODULE_5__["setShapeCache"])(shapeCaches); - _super.prototype.afterRender.call(this); - }; - RangeBarLayer.prototype.renderLabel = function () { - if (this.options.label && this.options.label.visible) { - var label = new _component_label__WEBPACK_IMPORTED_MODULE_4__["default"](Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ view: this.view, plot: this }, this.options.label)); - label.render(); - } - }; - RangeBarLayer.prototype.animation = function () { - _super.prototype.animation.call(this); - this.bar.animate = { - appear: { - animation: 'clipInFromCenter', - duration: 600, - }, - update: { - animation: 'updateFromCenter', - duration: 600, - }, - }; - }; - return RangeBarLayer; -}(_bar_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (RangeBarLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('rangeBar', RangeBarLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/range-column/animation.js": -/*!***********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/range-column/animation.js ***! - \***********************************************************************/ -/*! exports provided: setShapeCache */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setShapeCache", function() { return setShapeCache; }); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - - -// 记录之前的状态 -var shapeCache; -function clipInFromCenterVertical(shape, animateCfg) { - var bbox = shape.getBBox(); - var centerY = bbox.minY + bbox.height / 2; - shape.setClip({ - type: 'rect', - attrs: { - x: bbox.minX, - y: centerY, - width: bbox.width, - height: 0, - }, - }); - var cliper = shape.get('clipShape'); - cliper.animate({ - height: bbox.height, - y: bbox.minY, - }, animateCfg.duration, animateCfg.easing, function () { - shape.setClip(null); - }, animateCfg.delay); -} -clipInFromCenterVertical.animationName = 'clipInFromCenterVertical'; -function setShapeCache(shapes) { - shapeCache = shapes; -} -function updateFromCenterVertical(shape, animateCfg) { - var fromPath = getShapeFromCache(shape).attr('path'); - var toPath = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(shape.attr('path')); - shape.attr('path', fromPath); - shape.animate({ - path: toPath, - }, animateCfg.duration, animateCfg.easing, animateCfg.callback, 100); -} -function getShapeFromCache(shape) { - var id = shape.id; - var target; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(shapeCache, function (s) { - if (s.id === id) { - target = s; - } - }); - return target; -} -updateFromCenterVertical.animationName = 'updateFromCenterVertical'; -Object(_dependents__WEBPACK_IMPORTED_MODULE_0__["registerAnimation"])('clipInFromCenterVertical', clipInFromCenterVertical); -Object(_dependents__WEBPACK_IMPORTED_MODULE_0__["registerAnimation"])('updateFromCenterVertical', updateFromCenterVertical); -//# sourceMappingURL=animation.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/range-column/component/label.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/range-column/component/label.js ***! - \*****************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/color */ "./node_modules/@antv/g2plot/esm/util/color.js"); -/* harmony import */ var _util_bbox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/bbox */ "./node_modules/@antv/g2plot/esm/util/bbox.js"); - - - -var DEFAULT_OFFSET = 8; -function mappingColor(band, gray) { - var reflect; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(band, function (b) { - var map = b; - if (gray >= map.from && gray < map.to) { - reflect = map.color; - } - }); - return reflect; -} -var RangeColumnLabel = /** @class */ (function () { - function RangeColumnLabel(cfg) { - this.destroyed = false; - this.view = cfg.view; - this.plot = cfg.plot; - var defaultOptions = this.getDefaultOptions(); - this.options = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])(defaultOptions, cfg, {}); - if (!this.options.topStyle) { - this.options.topStyle = this.options.style; - } - if (!this.options.bottomStyle) { - this.options.bottomStyle = this.options.style; - } - this.init(); - } - RangeColumnLabel.prototype.init = function () { - var _this = this; - this.container = this.getGeometry().labelsContainer; - this.view.on('beforerender', function () { - _this.clear(); - _this.plot.canvas.draw(); - }); - }; - RangeColumnLabel.prototype.render = function () { - var _this = this; - var _a = this.getGeometry(), coordinate = _a.coordinate, elements = _a.elements; - this.coord = coordinate; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(elements, function (ele) { - var shape = ele.shape; - var positions = _this.getPosition(shape); - var values = _this.getValue(shape); - var textBaeline = _this.getTextBaseline(); - var labels = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(positions, function (pos, i) { - var style = i === 1 ? _this.options.topStyle : _this.options.bottomStyle; - var color = _this.getTextColor(shape, i); - if (_this.options.position === 'inner' && _this.options.adjustColor && color !== 'black') { - style.stroke = null; - } - var formatter = _this.options.formatter; - var content = formatter ? formatter(values[i]) : values[i]; - var label = _this.container.addShape('text', { - attrs: Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])({}, style, { - x: pos.x, - y: pos.y, - text: content, - fill: color, - textAlign: 'center', - textBaseline: textBaeline[i], - }), - name: 'label', - }); - labels.push(label); - _this.doAnimation(label); - }); - shape.set('labelShapes', labels); - _this.adjustPosition(labels[0], labels[1], shape); - }); - this.plot.canvas.draw(); - }; - RangeColumnLabel.prototype.hide = function () { - this.container.set('visible', false); - this.plot.canvas.draw(); - }; - RangeColumnLabel.prototype.show = function () { - this.container.set('visible', true); - this.plot.canvas.draw(); - }; - RangeColumnLabel.prototype.clear = function () { - if (this.container) { - this.container.clear(); - } - }; - RangeColumnLabel.prototype.destory = function () { - if (this.container) { - this.container.remove(); - } - this.destroyed = true; - }; - RangeColumnLabel.prototype.getBBox = function () { }; - RangeColumnLabel.prototype.getShapeBbox = function (shape) { - var _this = this; - var points = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(shape.get('origin').points, function (p) { - points.push(_this.coord.convertPoint(p)); - }); - var bbox = new _util_bbox__WEBPACK_IMPORTED_MODULE_2__["default"](points[0].x, points[1].y, Math.abs(points[2].x - points[0].x), Math.abs(points[0].y - points[1].y)); - return bbox; - }; - RangeColumnLabel.prototype.getDefaultOptions = function () { - var theme = this.plot.theme; - var labelStyle = theme.label.style; - return { - position: 'outer', - offsetX: 0, - offsetY: DEFAULT_OFFSET, - style: Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(labelStyle), - adjustColor: true, - adjustPosition: true, - }; - }; - RangeColumnLabel.prototype.getPosition = function (shape) { - var bbox = this.getShapeBbox(shape); - var minX = bbox.minX, maxX = bbox.maxX, minY = bbox.minY, maxY = bbox.maxY, height = bbox.height, width = bbox.width; - var _a = this.options, offsetX = _a.offsetX, offsetY = _a.offsetY; - var x = minX + width / 2; - var y1, y2; - if (this.options.position === 'outer') { - y1 = minY - offsetY; - y2 = maxY + offsetY; - } - else { - y1 = minY + offsetY; - y2 = maxY - offsetY; - } - return [ - { x: x, y: y2 }, - { x: x, y: y1 }, - ]; - }; - RangeColumnLabel.prototype.getValue = function (shape) { - var yField = this.plot.options.yField; - return shape.get('origin').data[yField]; - }; - RangeColumnLabel.prototype.getTextBaseline = function () { - if (this.options.position === 'outer') { - return ['top', 'bottom']; - } - else { - return ['bottom', 'top']; - } - }; - RangeColumnLabel.prototype.getTextColor = function (shape, index) { - if (this.options.adjustColor && this.options.position === 'inner') { - var shapeColor = shape.attr('fill'); - var shapeOpacity = shape.attr('opacity') ? shape.attr('opacity') : 1; - var rgb = Object(_util_color__WEBPACK_IMPORTED_MODULE_1__["rgb2arr"])(shapeColor); - var gray = Math.round(rgb[0] * 0.299 + rgb[1] * 0.587 + rgb[2] * 0.114) / shapeOpacity; - var colorBand = [ - { from: 0, to: 85, color: 'white' }, - { from: 85, to: 170, color: '#F6F6F6' }, - { from: 170, to: 255, color: 'black' }, - ]; - var reflect = mappingColor(colorBand, gray); - return reflect; - } - var defaultColor = index === 1 ? this.options.topStyle.fill : this.options.bottomStyle.fill; - return defaultColor; - }; - RangeColumnLabel.prototype.doAnimation = function (label) { - if (this.plot.animation && this.plot.animation === false) { - return; - } - label.attr('fillOpacity', 0); - label.attr('strokeOpacity', 0); - label.stopAnimate(); - label.animate({ - fillOpacity: 1, - strokeOpacity: 1, - }, 800, 'easeLinear', 500); - }; - RangeColumnLabel.prototype.adjustPosition = function (la, lb, shape) { - var origin = shape.get('origin'); - var shapeMinY = origin.y[1]; - var shapeMaxY = origin.y[0]; - var bbox = shape.getBBox(); - var minX = bbox.minX, maxX = bbox.maxX, minY = bbox.minY, height = bbox.height, width = bbox.width; - var shapeHeight = height; - var panelRange = this.view.coordinateBBox; - var boxes = [la.getBBox(), lb.getBBox()]; - var ay = la.attr('y'); - var by = lb.attr('y'); - if (this.options.adjustPosition && this.options.position === 'inner') { - var totalLength = boxes[0].height + boxes[1].height; - var isOverlap = boxes[1].maxY - boxes[0].minY > 2; - var isTooShort = totalLength > shapeHeight; - if (isOverlap || isTooShort) { - by = shapeMinY - this.options.offsetY; - lb.attr('fill', this.options.topStyle.fill); - lb.attr('textBaseline', 'bottom'); - ay = shapeMaxY + this.options.offsetY; - la.attr('fill', this.options.bottomStyle.fill); - la.attr('textBaseline', 'top'); - boxes[0] = la.getBBox(); - boxes[1] = lb.getBBox(); - } - } - // fixme: textBaseline 取不准bbox - if (boxes[0].maxY > panelRange.maxY - DEFAULT_OFFSET) { - ay = panelRange.maxY - DEFAULT_OFFSET / 2; - la.attr('textBaseline', 'bottom'); - } - la.attr('y', ay); - lb.attr('y', by); - this.plot.canvas.draw(); - }; - RangeColumnLabel.prototype.getGeometry = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["find"])(this.view.geometries, function (geom) { return geom.type === 'interval'; }); - }; - return RangeColumnLabel; -}()); -/* harmony default export */ __webpack_exports__["default"] = (RangeColumnLabel); -//# sourceMappingURL=label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/range-column/index.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/range-column/index.js ***! - \*******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/range-column/layer.js"); - - - - -var RangeColumn = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(RangeColumn, _super); - function RangeColumn() { - return _super !== null && _super.apply(this, arguments) || this; - } - RangeColumn.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'rangeColumn'; - _super.prototype.createLayers.call(this, layerProps); - }; - RangeColumn.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return RangeColumn; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (RangeColumn); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/range-column/layer.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/range-column/layer.js ***! - \*******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _column_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../column/layer */ "./node_modules/@antv/g2plot/esm/plots/column/layer.js"); -/* harmony import */ var _component_label__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./component/label */ "./node_modules/@antv/g2plot/esm/plots/range-column/component/label.js"); -/* harmony import */ var _animation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./animation */ "./node_modules/@antv/g2plot/esm/plots/range-column/animation.js"); - - - - - - -var RangeColumnLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(RangeColumnLayer, _super); - function RangeColumnLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'rangeColumn'; - return _this; - } - RangeColumnLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])(_super.getDefaultOptions.call(this), { - label: { - visible: true, - position: 'outer', - }, - }, {}); - }; - RangeColumnLayer.prototype.afterRender = function () { - this.renderLabel(); - // 为更新动画缓存shape - var shapeCaches = []; - var geoms = this.view.geometries; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(geoms, function (geom) { - var elements = geom.elements; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(elements, function (ele) { - shapeCaches.push(ele.shape); - }); - }); - Object(_animation__WEBPACK_IMPORTED_MODULE_5__["setShapeCache"])(shapeCaches); - _super.prototype.afterRender.call(this); - }; - RangeColumnLayer.prototype.extractLabel = function () { }; - RangeColumnLayer.prototype.animation = function () { - _super.prototype.animation.call(this); - this.column.animate = { - appear: { - animation: 'clipInFromCenterVertical', - duration: 600, - }, - update: { - animation: 'updateFromCenterVertical', - duration: 600, - }, - }; - }; - RangeColumnLayer.prototype.renderLabel = function () { - if (this.options.label && this.options.label.visible) { - var label = new _component_label__WEBPACK_IMPORTED_MODULE_4__["default"](Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ view: this.view, plot: this }, this.options.label)); - label.render(); - } - }; - return RangeColumnLayer; -}(_column_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (RangeColumnLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('rangeColumn', RangeColumnLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/rose/event.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/rose/event.js ***! - \***********************************************************/ -/*! exports provided: EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["onEvent"]; }); - - - -var componentMap = { - Rose: 'interval', -}; -var SHAPE_EVENT_MAP = Object(_util_event__WEBPACK_IMPORTED_MODULE_1__["getEventMap"])(componentMap); -Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(_util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"], SHAPE_EVENT_MAP); - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/rose/index.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/rose/index.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/rose/layer.js"); - -/** - * Create By Bruce Too - * On 2020-02-17 - */ - - - -// TODO label的优化,可能要重新参考 https://github.com/antvis/G2Plot/blob/master/src/plots/rose/component/label/rose-label.ts -var Rose = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Rose, _super); - function Rose() { - return _super !== null && _super.apply(this, arguments) || this; - } - Rose.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'rose'; - _super.prototype.createLayers.call(this, layerProps); - }; - Rose.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return Rose; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Rose); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/rose/layer.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/rose/layer.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _base_view_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/view-layer */ "./node_modules/@antv/g2plot/esm/base/view-layer.js"); -/* harmony import */ var _components_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../components/factory */ "./node_modules/@antv/g2plot/esm/components/factory.js"); -/* harmony import */ var _geoms_factory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../geoms/factory */ "./node_modules/@antv/g2plot/esm/geoms/factory.js"); -/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event */ "./node_modules/@antv/g2plot/esm/plots/rose/event.js"); - -/** - * Create By Bruce Too - * On 2020-02-17 - */ - - - - - - -var G2_GEOM_MAP = { - rose: 'interval', -}; -var PLOT_GEOM_MAP = { - rose: 'column', -}; -var RoseLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(RoseLayer, _super); - function RoseLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'rose'; - return _this; - } - RoseLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - width: 400, - height: 400, - title: { - visible: false, - }, - description: { - visible: false, - }, - forceFit: true, - padding: 'auto', - radius: 0.8, - innerRadius: 0, - label: { - visible: true, - type: 'inner', - autoRotate: true, - adjustColor: false, - }, - legend: { - visible: true, - position: 'right', - }, - tooltip: { - visible: true, - shared: false, - showCrosshairs: false, - showMarkers: false, - }, - columnStyle: { - stroke: 'white', - lineWidth: 1, - }, - xAxis: { - visible: false, - line: { - visible: false, - }, - tickLine: { - visible: false, - }, - grid: { - visible: true, - alignTick: false, - style: { - lineWidth: 0.5, - }, - }, - label: { - offset: 5, - autoRotate: true, - }, - }, - yAxis: { - visible: false, - }, - }); - }; - RoseLayer.prototype.getOptions = function (props) { - var options = _super.prototype.getOptions.call(this, props); - var columnStyle = props.sectorStyle; - var xField = props.categoryField; - var yField = props.radiusField; - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, options, { columnStyle: columnStyle, xField: xField, yField: yField }); - }; - RoseLayer.prototype.geometryParser = function (dim, type) { - if (dim === 'g2') { - return G2_GEOM_MAP[type]; - } - return PLOT_GEOM_MAP[type]; - }; - RoseLayer.prototype.scale = function () { - // super.scale(); - var props = this.options; - var scales = {}; - scales[props.radiusField] = {}; - scales[props.categoryField] = { type: 'cat' }; - this.setConfig('scales', scales); - }; - /** 不显示坐标轴 */ - /*protected axis() { - super.axis(); - const options = this.options; - if (!options.stackField && !options.groupField) { - this.setConfig('axes', false); - } - }*/ - RoseLayer.prototype.coord = function () { - var props = this.options; - var coordConfig = { - type: 'polar', - cfg: { - radius: props.radius, - innerRadius: props.innerRadius || 0, - }, - }; - this.setConfig('coordinate', coordConfig); - }; - RoseLayer.prototype.addGeometry = function () { - var options = this.options; - var rose = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_5__["getGeom"])('interval', 'main', { - plot: this, - positionFields: [options.categoryField, options.radiusField], - widthRatio: { - rose: 1, - }, - }); - rose.label = this.extractLabel(); - rose.adjust = this.adjustRoseAdjust(); - this.rose = rose; - if (options.tooltip && (options.tooltip.fields || options.tooltip.formatter)) { - this.geometryTooltip(); - } - this.setConfig('geometry', rose); - }; - RoseLayer.prototype.adjustRoseAdjust = function () { - return; - }; - RoseLayer.prototype.geometryTooltip = function () { - this.rose.tooltip = {}; - var tooltipOptions = this.options.tooltip; - if (tooltipOptions.fields) { - this.rose.tooltip.fields = tooltipOptions.fields; - } - if (tooltipOptions.formatter) { - this.rose.tooltip.callback = tooltipOptions.formatter; - if (!tooltipOptions.fields) { - this.rose.tooltip.fields = [this.options.radiusField, this.options.categoryField, this.options.colorField]; - } - } - }; - RoseLayer.prototype.animation = function () { - _super.prototype.animation.call(this); - var props = this.options; - if (props.animation === false) { - /** 关闭动画 */ - this.rose.animate = false; - } - }; - RoseLayer.prototype.annotation = function () { }; - RoseLayer.prototype.parseEvents = function (eventParser) { - _super.prototype.parseEvents.call(this, _event__WEBPACK_IMPORTED_MODULE_6__); - }; - RoseLayer.prototype.extractLabel = function () { - var options = this.options; - if (!options.label || !options.label.visible) { - return false; - } - var label = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, options.label); - this.adjustLabelOptions(label); - var fields = [options.categoryField, options.radiusField]; - var labelConfig = Object(_components_factory__WEBPACK_IMPORTED_MODULE_4__["getComponent"])('label', Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ plot: this, labelType: 'polar', fields: fields }, label)); - return labelConfig; - }; - RoseLayer.prototype.adjustLabelOptions = function (labelOptions) { - var radiusField = this.options.radiusField; - if (labelOptions) { - var offset = labelOptions.offset, type = labelOptions.type, content = labelOptions.content; - if (type === 'inner') { - labelOptions.offset = offset < 0 ? offset : -10; - } - else if (type === 'outer') { - labelOptions.offset = offset >= 0 ? offset : 10; - } - if (!content) { - // 默认显示 数值 - labelOptions.content = function (text, item) { return "" + item._origin[radiusField]; }; - } - } - }; - return RoseLayer; -}(_base_view_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (RoseLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('rose', RoseLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/scatter/components/quadrant.js": -/*!****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/scatter/components/quadrant.js ***! - \****************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_bbox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/bbox */ "./node_modules/@antv/g2plot/esm/util/bbox.js"); - - - -var Quadrant = /** @class */ (function () { - function Quadrant(cfg) { - this.quadrantGroups = []; - this.regionData = []; - this.lineData = []; - this.options = cfg; - this.view = this.options.view; - this.init(); - } - Quadrant.prototype.init = function () { - var _a = this.options, xBaseline = _a.xBaseline, yBaseline = _a.yBaseline; - var coord = this.view.getCoordinate(); - // TODO: xBaseline和yBaseline支持百分比 - // 根据 xBaseline 和 yBaseline 分割象限 - var xScale = this.view.getScaleByField(this.options.plotOptions.xField); - var yScale = this.view.getScaleByField(this.options.plotOptions.yField); - // 先进行 x 方向的分割 - var xRegion; - if (xBaseline > xScale.min && xBaseline < xScale.max) { - var ratio = (xBaseline - xScale.min) / (xScale.max - xScale.min); - xRegion = [ - new _util_bbox__WEBPACK_IMPORTED_MODULE_2__["default"](coord.start.x, coord.end.y, coord.getWidth() * ratio, coord.getHeight()), - new _util_bbox__WEBPACK_IMPORTED_MODULE_2__["default"](coord.start.x + coord.getWidth() * ratio, coord.end.y, coord.getWidth() * (1 - ratio), coord.getHeight()), - ]; - var verticalLineData = { - start: { x: coord.start.x + coord.getWidth() * ratio, y: coord.end.y }, - end: { x: coord.start.x + coord.getWidth() * ratio, y: coord.start.y }, - }; - this.lineData.push(verticalLineData); - } - else { - xRegion = [new _util_bbox__WEBPACK_IMPORTED_MODULE_2__["default"](coord.start.x, coord.end.y, coord.getWidth(), coord.getHeight())]; - } - // 再进行 y 方向的分割 - if (yBaseline > yScale.min && yBaseline < yScale.max) { - var ratio = (yBaseline - yScale.min) / (yScale.max - yScale.min); - var horizontalLineData = { - start: { x: coord.start.x, y: coord.start.y - coord.getHeight() * ratio }, - end: { x: coord.end.x, y: coord.start.y - coord.getHeight() * ratio }, - }; - this.lineData.push(horizontalLineData); - var topQuadrant = { - name: xBaseline <= xScale.min ? 'top-right' : 'top-left', - bbox: new _util_bbox__WEBPACK_IMPORTED_MODULE_2__["default"](xRegion[0].minX, xRegion[0].minY, xRegion[0].width, xRegion[0].height * (1 - ratio)), - index: xBaseline <= xScale.min ? 2 : 0, - }; - this.regionData.push(topQuadrant); - var bottomQuadrant = { - name: xBaseline <= xScale.min ? 'bottom-right' : 'bottom-left', - bbox: new _util_bbox__WEBPACK_IMPORTED_MODULE_2__["default"](xRegion[0].minX, xRegion[0].minY + xRegion[0].height * (1 - ratio), xRegion[0].width, xRegion[0].height * ratio), - index: xBaseline <= xScale.min ? 3 : 1, - }; - this.regionData.push(bottomQuadrant); - // 四象限齐全 - if (xRegion.length > 1) { - var rightTopQuadrant = { - name: 'top-right', - bbox: new _util_bbox__WEBPACK_IMPORTED_MODULE_2__["default"](xRegion[1].minX, xRegion[1].minY, xRegion[1].width, xRegion[1].height * (1 - ratio)), - index: 2, - }; - this.regionData.push(rightTopQuadrant); - var rightBottomQuadrant = { - name: 'bottom-right', - bbox: new _util_bbox__WEBPACK_IMPORTED_MODULE_2__["default"](xRegion[1].minX, xRegion[1].minY + xRegion[1].height * (1 - ratio), xRegion[1].width, xRegion[1].height * ratio), - index: 3, - }; - this.regionData.push(rightBottomQuadrant); - } - } - else if (xRegion.length === 2) { - if (yBaseline <= yScale.min) { - var leftTopQuadrant = { - name: 'top-left', - bbox: xRegion[0], - index: 0, - }; - this.regionData.push(leftTopQuadrant); - var rightTopQuadrant = { - name: 'top-right', - bbox: xRegion[1], - index: 2, - }; - this.regionData.push(rightTopQuadrant); - } - else { - var leftBottomQuadrant = { - name: 'bottom-left', - bbox: xRegion[0], - index: 1, - }; - this.regionData.push(leftBottomQuadrant); - var rightBottomQuadrant = { - name: 'bottom-right', - bbox: xRegion[1], - index: 3, - }; - this.regionData.push(rightBottomQuadrant); - } - } - else { - // 当前绘制区域全部在一个象限中 - if (xBaseline <= xScale.min) { - if (yBaseline <= yScale.min) { - var rightTopQuadrant = { - name: 'top-right', - bbox: xRegion[0], - index: 2, - }; - this.regionData.push(rightTopQuadrant); - } - else { - var rightBottomQuadrant = { - name: 'bottom-right', - bbox: xRegion[0], - index: 3, - }; - this.regionData.push(rightBottomQuadrant); - } - } - else { - if (yBaseline <= yScale.min) { - var leftTopQuadrant = { - name: 'top-left', - bbox: xRegion[0], - index: 0, - }; - this.regionData.push(leftTopQuadrant); - } - else { - var leftBottomQuadrant = { - name: 'bottom-left', - bbox: xRegion[0], - index: 1, - }; - this.regionData.push(leftBottomQuadrant); - } - } - } - // 创建container - this.container = this.view.backgroundGroup.addGroup(); - }; - Quadrant.prototype.render = function () { - var _this = this; - if (this.regionData.length > 0) { - var defaultStyle_1 = this.getDefaultStyle(); - var regionStyle_1 = this.getRegionStyle(this.regionData); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(this.regionData, function (d) { - var index = d.index; - var group = _this.container.addGroup(); - var rect = group.addShape('rect', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: d.bbox.minX, y: d.bbox.minY, width: d.bbox.width, height: d.bbox.height }, regionStyle_1[index]), - name: 'quadrant', - }); - if (_this.options.label && _this.options.label.text) { - var labelOptions = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, defaultStyle_1.label, _this.options.label); - var labelCfg = _this.getLabelConfig(d, labelOptions); - var label = group.addShape('text', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, labelCfg), - name: 'quadrant-label', - }); - } - // rect.setSilent('data', d); - rect.set('data', d); - _this.quadrantGroups.push(group); - }); - // 绘制象限辅助线 - var lineStyle_1 = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, defaultStyle_1.line, this.options.lineStyle); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(this.lineData, function (d) { - _this.container.addShape('path', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: [ - ['M', d.start.x, d.start.y], - ['L', d.end.x, d.end.y], - ] }, lineStyle_1), - name: 'quadrant-line', - }); - }); - this.view.canvas.draw(); - } - }; - Quadrant.prototype.clear = function () { - if (this.container) { - this.container.clear(); - } - }; - Quadrant.prototype.destroy = function () { - if (this.container) { - this.container.remove(); - } - }; - Quadrant.prototype.getDefaultStyle = function () { - return { - line: { - stroke: '#9ba29a', - lineWidth: 1, - }, - regionStyle: [ - { fill: '#000000', opacity: 0.05 }, - { fill: '#ffffff', opacity: 0 }, - { fill: '#ffffff', opacity: 0 }, - { fill: '#000000', opacity: 0.05 }, - ], - label: { - position: 'outter-inner', - offset: 10, - style: { - fontSize: 14, - fill: '#ccc', - }, - }, - }; - }; - Quadrant.prototype.getRegionStyle = function (regionData) { - var defaultStyle = this.getDefaultStyle(); - var style = defaultStyle.regionStyle; - if (this.options.regionStyle) { - var regionStyle_2 = this.options.regionStyle; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(regionStyle_2)) { - style = style.map(function (s, index) { - if (regionStyle_2.length > index && regionStyle_2[index]) { - return regionStyle_2[index]; - } - return s; - }); - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(regionStyle_2)) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(regionData, function (d, index) { - style[index] = regionStyle_2(d); - }); - } - } - return style; - }; - Quadrant.prototype.getLabelConfig = function (region, labelOptions) { - var index = region.index; - var x = 0; - var y = 0; - var style = {}; - var text = labelOptions.text; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(text)) { - text = text(region); - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(text)) { - text = text[index]; - } - var position = labelOptions.position; - var pos = position.split('-'); - var dim = region.name.split('-'); - // x方向 - if (dim[1] === 'left') { - if (pos[0] === 'inner') { - x = region.bbox.maxX - labelOptions.offset; - style.textAlign = 'right'; - } - if (pos[0] === 'outter') { - x = region.bbox.minX + labelOptions.offset; - style.textAlign = 'left'; - } - } - else if (dim[1] === 'right') { - if (pos[0] === 'inner') { - x = region.bbox.minX + labelOptions.offset; - style.textAlign = 'left'; - } - if (pos[0] === 'outter') { - x = region.bbox.maxX - labelOptions.offset; - style.textAlign = 'right'; - } - } - // y方向 - if (dim[0] === 'top') { - if (pos[1] === 'inner') { - y = region.bbox.maxY - labelOptions.offset; - style.textBaseline = 'bottom'; - } - if (pos[1] === 'outter') { - y = region.bbox.minY + labelOptions.offset; - style.textBaseline = 'top'; - } - } - else if (dim[0] === 'bottom') { - if (pos[1] === 'inner') { - y = region.bbox.minY + labelOptions.offset; - style.textBaseline = 'top'; - } - if (pos[1] === 'outter') { - y = region.bbox.maxY - labelOptions.offset; - style.textBaseline = 'bottom'; - } - } - style = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, labelOptions.style, style); - style.lineHeight = style.fontSize; - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: x, - y: y, - text: text }, style); - }; - return Quadrant; -}()); -/* harmony default export */ __webpack_exports__["default"] = (Quadrant); -//# sourceMappingURL=quadrant.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/scatter/components/trendline.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/scatter/components/trendline.js ***! - \*****************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _antv_scale__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/scale */ "./node_modules/@antv/scale/esm/index.js"); -/* harmony import */ var d3_regression__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-regression */ "./node_modules/d3-regression/index.js"); -/* harmony import */ var _util_path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../util/path */ "./node_modules/@antv/g2plot/esm/util/path.js"); - - - - - -var REGRESSION_MAP = { - exp: d3_regression__WEBPACK_IMPORTED_MODULE_3__["regressionExp"], - linear: d3_regression__WEBPACK_IMPORTED_MODULE_3__["regressionLinear"], - loess: d3_regression__WEBPACK_IMPORTED_MODULE_3__["regressionLoess"], - log: d3_regression__WEBPACK_IMPORTED_MODULE_3__["regressionLog"], - poly: d3_regression__WEBPACK_IMPORTED_MODULE_3__["regressionPoly"], - pow: d3_regression__WEBPACK_IMPORTED_MODULE_3__["regressionPow"], - quad: d3_regression__WEBPACK_IMPORTED_MODULE_3__["regressionQuad"], -}; -function se95(p, n) { - return Math.sqrt((p * (1 - p)) / n) * 1.96; -} -var TrendLine = /** @class */ (function () { - function TrendLine(cfg) { - var defaultOptions = { - type: 'linear', - style: { - stroke: '#9ba29a', - lineWidth: 2, - opacity: 0.5, - lineJoin: 'round', - lineCap: 'round', - }, - showConfidence: false, - confidenceStyle: { - fill: '#ccc', - opacity: 0.1, - }, - }; - this.options = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, defaultOptions, cfg); - this.view = this.options.view; - this.init(); - } - TrendLine.prototype.init = function () { - // 处理数据 - var _a = this.options.plotOptions, xField = _a.xField, yField = _a.yField, data = _a.data; - var reg = REGRESSION_MAP[this.options.type]() - .x(function (d) { return d[xField]; }) - .y(function (d) { return d[yField]; }); - this.data = this.processData(reg(data)); - // 创建container - this.container = this.view.backgroundGroup.addGroup(); - }; - TrendLine.prototype.render = function () { - var xscale_view = this.view.getScaleByField(this.options.plotOptions.xField); - var yscale_view = this.view.getScaleByField(this.options.plotOptions.yField); - var coord = this.view.getCoordinate(); - var trendlineData = this.data.trendlineData; - // 创建图形绘制的scale - var LinearScale = Object(_antv_scale__WEBPACK_IMPORTED_MODULE_2__["getScale"])('linear'); - var xRange = this.adjustScale(xscale_view, trendlineData, 'x'); - var xScale = new LinearScale({ - min: xRange.min, - max: xRange.max, - }); - var yRange = this.adjustScale(yscale_view, trendlineData, 'y'); - var yScale = new LinearScale({ - min: yRange.min, - max: yRange.max, - }); - // 绘制置信区间曲线 - if (this.options.showConfidence) { - var confidencePath = this.getConfidencePath(xScale, yScale, coord); - this.container.addShape('path', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: confidencePath }, this.options.confidenceStyle), - name: 'confidence', - }); - } - // 绘制trendline - var points = this.getTrendlinePoints(xScale, yScale, coord); - var constraint = [ - [0, 0], - [1, 1], - ]; - var path = Object(_util_path__WEBPACK_IMPORTED_MODULE_4__["getSplinePath"])(points, false, constraint); - this.shape = this.container.addShape('path', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: path }, this.options.style), - name: 'trendline', - }); - }; - TrendLine.prototype.clear = function () { - if (this.container) { - this.container.clear(); - } - }; - TrendLine.prototype.destroy = function () { - if (this.container) { - this.container.destroy(); - } - }; - TrendLine.prototype.processData = function (data) { - var trendline = []; - var confidence = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(data, function (d) { - trendline.push({ x: d[0], y: d[1] }); - var conf = se95(data.rSquared, d[1]); - confidence.push({ x: d[0], y0: d[1] - conf, y1: d[1] + conf }); - }); - return { trendlineData: trendline, confidenceData: confidence }; - }; - TrendLine.prototype.getTrendlinePoints = function (xScale, yScale, coord) { - var points = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(this.data.trendlineData, function (d) { - var xRatio = xScale.scale(d.x); - var yRatio = yScale.scale(d.y); - var x = coord.start.x + coord.width * xRatio; - var y = coord.start.y - coord.height * yRatio; - points.push({ x: x, y: y }); - }); - return points; - }; - TrendLine.prototype.getConfidencePath = function (xScale, yScale, coord) { - var upperPoints = []; - var lowerPoints = []; - var path = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(this.data.confidenceData, function (d) { - var xRatio = xScale.scale(d.x); - var y0Ratio = yScale.scale(d.y0); - var y1Ratio = yScale.scale(d.y1); - var x = coord.start.x + coord.width * xRatio; - var y0 = coord.start.y - coord.height * y0Ratio; - var y1 = coord.start.y - coord.height * y1Ratio; - upperPoints.push({ x: x, y: y0 }); - lowerPoints.push({ x: x, y: y1 }); - }); - for (var i = 0; i < upperPoints.length; i++) { - var flag = i === 0 ? 'M' : 'L'; - var p = upperPoints[i]; - if (!isNaN(p.x) && !isNaN(p.y)) { - path.push([flag, p.x, p.y]); - } - } - for (var j = lowerPoints.length - 1; j > 0; j--) { - var p = lowerPoints[j]; - if (!isNaN(p.x) && !isNaN(p.y)) { - path.push(['L', p.x, p.y]); - } - } - return path; - }; - TrendLine.prototype.adjustScale = function (viewScale, trendlineData, dim) { - // 处理用户自行配置min max的情况 - var min = viewScale.min, max = viewScale.max; - var _a = this.options.plotOptions, data = _a.data, xField = _a.xField, yField = _a.yField; - var field = dim === 'x' ? xField : yField; - var dataMin = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["minBy"])(data, field)[field]; - var dataMax = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["maxBy"])(data, field)[field]; - var minRatio = (min - dataMin) / (dataMax - dataMin); - var maxRatio = (max - dataMax) / (dataMax - dataMin); - var trendMin = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["minBy"])(trendlineData, dim)[dim]; - var trendMax = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["maxBy"])(trendlineData, dim)[dim]; - return { - min: trendMin + minRatio * (trendMax - trendMin), - max: trendMax + maxRatio * (trendMax - trendMin), - }; - }; - return TrendLine; -}()); -/* harmony default export */ __webpack_exports__["default"] = (TrendLine); -//# sourceMappingURL=trendline.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/scatter/event.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/scatter/event.js ***! - \**************************************************************/ -/*! exports provided: EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["onEvent"]; }); - - - -var componentMap = { - Point: 'point', - Trendline: 'trendline', - Confidence: 'confidence', - Quadrant: 'quadrant', - QuadrantLabel: 'quadrant-label', - QuadrantLine: 'quadrant-line', -}; -var SHAPE_EVENT_MAP = Object(_util_event__WEBPACK_IMPORTED_MODULE_1__["getEventMap"])(componentMap); -Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(_util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"], SHAPE_EVENT_MAP); - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/scatter/index.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/scatter/index.js ***! - \**************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/scatter/layer.js"); - - - - -var Scatter = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Scatter, _super); - function Scatter() { - return _super !== null && _super.apply(this, arguments) || this; - } - Scatter.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'scatter'; - _super.prototype.createLayers.call(this, layerProps); - }; - Scatter.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return Scatter; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Scatter); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/scatter/layer.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/scatter/layer.js ***! - \**************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _base_view_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/view-layer */ "./node_modules/@antv/g2plot/esm/base/view-layer.js"); -/* harmony import */ var _geoms_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../geoms/factory */ "./node_modules/@antv/g2plot/esm/geoms/factory.js"); -/* harmony import */ var _util_scale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../util/scale */ "./node_modules/@antv/g2plot/esm/util/scale.js"); -/* harmony import */ var _components_quadrant__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/quadrant */ "./node_modules/@antv/g2plot/esm/plots/scatter/components/quadrant.js"); -/* harmony import */ var _components_trendline__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/trendline */ "./node_modules/@antv/g2plot/esm/plots/scatter/components/trendline.js"); -/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./event */ "./node_modules/@antv/g2plot/esm/plots/scatter/event.js"); -/* harmony import */ var _components_factory__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../components/factory */ "./node_modules/@antv/g2plot/esm/components/factory.js"); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./theme */ "./node_modules/@antv/g2plot/esm/plots/scatter/theme.js"); - - - - - - - - - - - -var G2_GEOM_MAP = { - scatter: 'point', -}; -var PLOT_GEOM_MAP = { - point: 'point', -}; -var ScatterLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ScatterLayer, _super); - function ScatterLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'scatter'; - return _this; - } - ScatterLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - pointSize: 4, - pointStyle: { - lineWidth: 1, - strokeOpacity: 1, - fillOpacity: 0.95, - stroke: '#fff', - }, - xAxis: { - nice: true, - grid: { - visible: true, - }, - line: { - visible: true, - }, - }, - yAxis: { - nice: true, - grid: { - visible: true, - }, - line: { - visible: true, - }, - }, - tooltip: { - visible: true, - // false 会造成 tooltip 只能显示一条数据,true 会造成 tooltip 在空白区域也会显示 - shared: null, - showMarkers: false, - showCrosshairs: false, - }, - label: { - visible: false, - }, - shape: 'circle', - }); - }; - ScatterLayer.prototype.afterRender = function () { - _super.prototype.afterRender.call(this); - if (this.quadrant) { - this.quadrant.destroy(); - } - if (this.trendline) { - this.trendline.destroy(); - } - if (this.options.quadrant && this.options.quadrant.visible) { - this.quadrant = new _components_quadrant__WEBPACK_IMPORTED_MODULE_6__["default"](Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ view: this.view, plotOptions: this.options }, this.options.quadrant)); - this.quadrant.render(); - } - if (this.options.trendline && this.options.trendline.visible) { - this.trendline = new _components_trendline__WEBPACK_IMPORTED_MODULE_7__["default"](Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ view: this.view, plotOptions: this.options }, this.options.trendline)); - this.trendline.render(); - } - }; - ScatterLayer.prototype.destroy = function () { - if (this.quadrant) { - this.quadrant.destroy(); - this.quadrant = null; - } - if (this.trendline) { - this.trendline.destroy(); - this.trendline = null; - } - _super.prototype.destroy.call(this); - }; - ScatterLayer.prototype.isValidLinearValue = function (value) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNil"])(value)) { - return false; - } - else if (Number.isNaN(Number(value))) { - return false; - } - return true; - }; - ScatterLayer.prototype.processData = function (data) { - var _this = this; - var _a = this.options, xField = _a.xField, yField = _a.yField; - var xAxisType = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.options, ['xAxis', 'type'], 'linear'); - var yAxisType = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.options, ['yAxis', 'type'], 'linear'); - if (xAxisType && yAxisType) { - var fiteredData = data - .filter(function (item) { - if (xAxisType === 'linear' && !_this.isValidLinearValue(item[xField])) { - return false; - } - if (yAxisType === 'linear' && !_this.isValidLinearValue(item[yField])) { - return false; - } - return true; - }) - .map(function (item) { - var _a; - return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, item), (_a = {}, _a[xField] = xAxisType === 'linear' ? Number(item[xField]) : String(item[xField]), _a[yField] = yAxisType === 'linear' ? Number(item[yField]) : String(item[yField]), _a)); - }); - return fiteredData; - } - return data; - }; - ScatterLayer.prototype.geometryParser = function (dim, type) { - if (dim === 'g2') { - return G2_GEOM_MAP[type]; - } - return PLOT_GEOM_MAP[type]; - }; - ScatterLayer.prototype.scale = function () { - var props = this.options; - var scales = {}; - /** 配置x-scale */ - scales[props.xField] = {}; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(props, 'xAxis')) { - Object(_util_scale__WEBPACK_IMPORTED_MODULE_5__["extractScale"])(scales[props.xField], props.xAxis); - } - /** 配置y-scale */ - scales[props.yField] = {}; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(props, 'yAxis')) { - Object(_util_scale__WEBPACK_IMPORTED_MODULE_5__["extractScale"])(scales[props.yField], props.yAxis); - } - this.setConfig('scales', scales); - _super.prototype.scale.call(this); - }; - ScatterLayer.prototype.coord = function () { }; - ScatterLayer.prototype.annotation = function () { }; - ScatterLayer.prototype.addGeometry = function () { - var points = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_4__["getGeom"])('point', 'circle', { - plot: this, - }); - this.points = points; - if (this.options.tooltip && this.options.tooltip.visible) { - this.points.tooltip = this.extractTooltip(); - this.setConfig('tooltip', Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ showTitle: false }, this.options.tooltip)); - } - if (this.options.label) { - this.label(); - } - this.setConfig('geometry', points); - }; - ScatterLayer.prototype.label = function () { - var props = this.options; - if (props.label.visible === false) { - if (this.points) { - this.points.label = false; - } - return; - } - var label = Object(_components_factory__WEBPACK_IMPORTED_MODULE_9__["getComponent"])('label', Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ fields: [props.yField] }, props.label), { plot: this })); - if (this.points) { - this.points.label = label; - } - }; - ScatterLayer.prototype.animation = function () { - _super.prototype.animation.call(this); - var props = this.options; - if (props.animation === false) { - /** 关闭动画 */ - this.points.animate = false; - } - }; - ScatterLayer.prototype.parseEvents = function (eventParser) { - // 气泡图继承散点图时,会存在 eventParser - _super.prototype.parseEvents.call(this, eventParser || _event__WEBPACK_IMPORTED_MODULE_8__); - }; - ScatterLayer.prototype.extractTooltip = function () { - this.points.tooltip = {}; - var tooltipOptions = this.options.tooltip; - if (tooltipOptions.fields) { - this.points.tooltip.fields = tooltipOptions.fields; - } - else { - this.points.tooltip.fields = [this.options.xField, this.options.yField]; - } - if (tooltipOptions.formatter) { - this.points.tooltip.callback = tooltipOptions.formatter; - if (this.options.colorField) { - this.points.tooltip.fields.push(this.options.colorField); - } - } - }; - return ScatterLayer; -}(_base_view_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (ScatterLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('scatter', ScatterLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/scatter/theme.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/scatter/theme.js ***! - \**************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme */ "./node_modules/@antv/g2plot/esm/theme/index.js"); - -var POINT_ACTIVE_STYLE = function (style) { - var stroke = style.stroke || '#000'; - return { - stroke: stroke, - }; -}; -var POINT_SELECTED_STYLE = function (style) { - var stroke = style.stroke || '#000'; - var lineWidth = style.lineWidth || 2; - return { - stroke: stroke, - lineWidth: lineWidth, - }; -}; -var POINT_INACTIVE_STYLE = function (style) { - var fillOpacity = style.fillOpacity || style.opacity || 0.3; - return { - fillOpacity: fillOpacity, - }; -}; -Object(_theme__WEBPACK_IMPORTED_MODULE_0__["registerTheme"])('scatter', { - pointStyle: { - normal: {}, - active: POINT_ACTIVE_STYLE, - selected: POINT_SELECTED_STYLE, - inactive: POINT_INACTIVE_STYLE, - }, -}); -//# sourceMappingURL=theme.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/stacked-area/component/index.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/stacked-area/component/index.js ***! - \*****************************************************************************/ -/*! exports provided: getPlotComponents */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPlotComponents", function() { return getPlotComponents; }); -/* harmony import */ var _label_line_label__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./label/line-label */ "./node_modules/@antv/g2plot/esm/plots/stacked-area/component/label/line-label.js"); -/* harmony import */ var _label_area_label__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./label/area-label */ "./node_modules/@antv/g2plot/esm/plots/stacked-area/component/label/area-label.js"); - - -var ComponentsInfo = { - lineLabel: { Ctr: _label_line_label__WEBPACK_IMPORTED_MODULE_0__["default"] }, - areaLabel: { Ctr: _label_area_label__WEBPACK_IMPORTED_MODULE_1__["default"] }, -}; -function getPlotComponents(plot, type, cfg) { - if (plot.options[type] && plot.options[type].visible) { - var componentInfo = ComponentsInfo[type]; - var component = new componentInfo.Ctr(cfg); - if (componentInfo.padding) { - plot.paddingController.registerPadding(component, componentInfo.padding); - } - return component; - } -} -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/stacked-area/component/label/area-label.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/stacked-area/component/label/area-label.js ***! - \****************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - - -var DEFAULT_SIZE = 12; -var TOLERANCE = 0.01; -var MAX_ITERATION = 100; -var MIN_HEIGHT = 12; -function getRange(points) { - var maxHeight = -Infinity; - var min = Infinity; - var max = -Infinity; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(points, function (p) { - min = Math.min(p.x, min); - max = Math.max(p.x, max); - var height = Math.abs(p.y[0] - p.y[1]); - maxHeight = Math.max(maxHeight, height); - }); - return { - xRange: [min, max], - maxHeight: maxHeight, - }; -} -function interpolateY(x, points, index) { - var leftPoint = points[0]; - var rightPoint = points[points.length - 1]; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(points, function (p) { - if (p.x === x) { - return p.y[index]; - } - if (p.x < x && p.x > leftPoint.x) { - leftPoint = p; - } - if (p.x > x && p.x < rightPoint.x) { - rightPoint = p; - } - }); - var t = (x - leftPoint.x) / (rightPoint.x - leftPoint.x); - return leftPoint.y[index] * (1 - t) + rightPoint.y[index] * t; -} -function getXIndex(data, x) { - // tslint:disable-next-line: prefer-for-of - var i; - for (i = 0; i < data.length; i++) { - var d = data[i]; - if (d.x === x || d.x > x) { - break; - } - } - return i; -} -var AreaLabel = /** @class */ (function () { - function AreaLabel(cfg) { - this.destroyed = false; - this.scaleFactor = []; - this.view = cfg.view; - this.plot = cfg.plot; - var defaultOptions = this.getDefaultOptions(); - this.options = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])(defaultOptions, cfg, {}); - this.init(); - } - AreaLabel.prototype.init = function () { - var _this = this; - this.container = this.getGeometry().labelsContainer; - this.view.on('beforerender', function () { - _this.clear(); - _this.plot.canvas.draw(); - }); - }; - AreaLabel.prototype.render = function () { - var _this = this; - var stackField = this.plot.options.stackField; - var groupedPoints = this.getGeometry().dataArray; - var labelPoints = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(groupedPoints, function (pointArray, name) { - var labelPoint = _this.drawLabel(pointArray, name); - if (labelPoint) { - labelPoints.push(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, pointArray[0], labelPoint)); - _this.scaleFactor.push(labelPoint.scaleFactor); - } - }); - var labelShapes = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(labelPoints, function (p, index) { - var _a = _this.options, style = _a.style, offsetX = _a.offsetX, offsetY = _a.offsetY; - var labelSize = _this.getFontSize(index); - var formatter = _this.options.formatter; - var content = formatter ? formatter(p._origin[stackField]) : p._origin[stackField]; - var text = _this.container.addShape('text', { - attrs: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, { - x: p.x + offsetX, - y: p.y + offsetY, - text: content, - fill: p.color, - fontSize: labelSize, - textAlign: 'center', - textBaseline: 'top', - }, style), - name: 'label', - }); - labelShapes.push(text); - }); - this.plot.canvas.draw(); - }; - AreaLabel.prototype.clear = function () { - if (this.container) { - this.container.clear(); - } - }; - AreaLabel.prototype.hide = function () { - this.container.set('visible', false); - this.plot.canvas.draw(); - }; - AreaLabel.prototype.show = function () { - this.container.set('visible', true); - this.plot.canvas.draw(); - }; - AreaLabel.prototype.destory = function () { - if (this.container) { - this.container.remove(); - } - this.destroyed = true; - }; - AreaLabel.prototype.getBBox = function () { }; - AreaLabel.prototype.getDefaultOptions = function () { - var theme = this.plot.theme; - var labelStyle = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(theme.label.style); - labelStyle.stroke = null; - delete labelStyle.fill; - return { - offsetX: 0, - offsetY: 0, - style: labelStyle, - autoScale: true, - }; - }; - AreaLabel.prototype.drawLabel = function (points, name) { - var _a = getRange(points), xRange = _a.xRange, maxHeight = _a.maxHeight; - // 根据area宽度在x方向各点间做插值 - var resolution = xRange[1] - xRange[0]; - var interpolatedPoints = this.getInterpolatedPoints(xRange[0], resolution, points); - // 获取label的bbox - var bbox = this.getLabelBbox(name); - var fitOption = { - xRange: xRange, - aspect: bbox.width / bbox.height, - data: interpolatedPoints, - justTest: true, - }; - var height = this.bisection(MIN_HEIGHT, maxHeight, this.testFit, fitOption, TOLERANCE, MAX_ITERATION); - if (height === null) { - return; - } - fitOption.justTest = false; - var fit = this.testFit(fitOption); - fit.x = fit.x; - fit.y = fit.y0 + (fit.y1 - fit.y0) / 2; - fit.scaleFactor = (height / bbox.height) * 0.2; - return fit; - }; - AreaLabel.prototype.getInterpolatedPoints = function (minX, resolution, points) { - var interpolatedPoints = []; - var step = 2; - for (var i = minX; i < resolution; i += step) { - var y0 = interpolateY(i, points, 0); - var y1 = interpolateY(i, points, 1); - interpolatedPoints.push({ - x: i, - y: [y0, y1], - }); - } - return interpolatedPoints; - }; - AreaLabel.prototype.bisection = function (min, max, test, testOption, tolerance, maxIteration) { - for (var i = 0; i < maxIteration; i++) { - var middle = (min + max) / 2; - var options = testOption; - options.height = middle; - options.width = middle * options.aspect; - var passesTest = test(options); - var withinTolerance = (max - min) / 2 < tolerance; - if (passesTest && withinTolerance) { - return middle; - } - if (passesTest) { - min = middle; - } - else { - max = middle; - } - } - return null; - }; - AreaLabel.prototype.testFit = function (option) { - var xRange = option.xRange, width = option.width, height = option.height, data = option.data, justTest = option.justTest; - for (var i = 0; i < data.length; i++) { - var d = data[i]; - var x0 = d.x; - var x1 = x0 + width; - if (x1 > xRange[1]) { - break; - } - var x1_index = getXIndex(data, x1); - var ceiling = -Infinity; - var ceilingFloor = null; // 保存ceiling时对应的bottom位置,ceil和floor不一定是一对坐标 - var floor = Infinity; - for (var j = i; j < x1_index; j++) { - var top_1 = data[j].y[1]; - var bottom = data[j].y[0]; - if (bottom < floor) { - floor = bottom; - } - if (top_1 > ceiling) { - ceiling = top_1; - ceilingFloor = bottom; - } - if (floor - ceiling < height) { - break; - } - } - if (floor - ceiling >= height) { - if (justTest) { - return true; - } - return { - x: x0, - y0: ceiling, - y1: ceilingFloor, - width: width, - height: height, - }; - } - } - return false; - }; - AreaLabel.prototype.getLabelBbox = function (text) { - var labelStyle = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(this.plot.theme.label.textStyle); - labelStyle.fontSize = DEFAULT_SIZE; - var tShape = this.container.addShape('text', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ text: text, x: 0, y: 0 }, labelStyle), - }); - var bbox = tShape.getBBox(); - tShape.remove(); - return bbox; - }; - AreaLabel.prototype.getGeometry = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["find"])(this.view.geometries, function (geom) { return geom.type === 'area'; }); - }; - AreaLabel.prototype.getFontSize = function (index) { - if (this.options.autoScale) { - var scaleFactor = this.scaleFactor[index]; - return DEFAULT_SIZE * scaleFactor; - } - return DEFAULT_SIZE; - }; - return AreaLabel; -}()); -/* harmony default export */ __webpack_exports__["default"] = (AreaLabel); -//# sourceMappingURL=area-label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/stacked-area/component/label/line-label.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/stacked-area/component/label/line-label.js ***! - \****************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _line_component_label_line_label__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../line/component/label/line-label */ "./node_modules/@antv/g2plot/esm/plots/line/component/label/line-label.js"); - - - -/** - * 复用扎线图的 label,并修改取值方式 - */ -var AreaLineLabel = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(AreaLineLabel, _super); - function AreaLineLabel() { - return _super !== null && _super.apply(this, arguments) || this; - } - AreaLineLabel.prototype.getShapeInfo = function (shape) { - var originPoints = shape.get('origin').points; - var lastPoint = originPoints[originPoints.length - 1]; - var color = shape.attr('stroke'); - var stackField = this.plot.options.stackField; - var name = shape.get('origin').data[0][stackField]; - var y = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["reduce"])(lastPoint.y, function (r, a) { - return r + a; - }, 0) / Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["size"])(lastPoint.y); - return { x: lastPoint.x, y: y, color: color, name: name }; - }; - return AreaLineLabel; -}(_line_component_label_line_label__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (AreaLineLabel); -//# sourceMappingURL=line-label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/stacked-area/index.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/stacked-area/index.js ***! - \*******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/stacked-area/layer.js"); - - - - -var StackedArea = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(StackedArea, _super); - function StackedArea() { - return _super !== null && _super.apply(this, arguments) || this; - } - StackedArea.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'stackedArea'; - _super.prototype.createLayers.call(this, layerProps); - }; - StackedArea.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return StackedArea; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (StackedArea); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/stacked-area/layer.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/stacked-area/layer.js ***! - \*******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _components_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/factory */ "./node_modules/@antv/g2plot/esm/components/factory.js"); -/* harmony import */ var _area_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../area/layer */ "./node_modules/@antv/g2plot/esm/plots/area/layer.js"); -/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./component */ "./node_modules/@antv/g2plot/esm/plots/stacked-area/component/index.js"); - - - - - - -var StackedAreaLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(StackedAreaLayer, _super); - function StackedAreaLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.plotComponents = []; - _this.type = 'stackedArea'; - return _this; - } - StackedAreaLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - label: { - visible: false, - type: 'area', - }, - }); - }; - StackedAreaLayer.prototype.beforeInit = function () { - var visible = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.options, ['label', 'visible']); - var type = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(this.options, ['label', 'type']); - var options = this.options; - if (visible) { - if (type === 'line') { - options.lineLabel = this.options.label; - } - if (type === 'area') { - options.areaLabel = this.options.label; - } - } - _super.prototype.beforeInit.call(this); - }; - StackedAreaLayer.prototype.label = function () { - var props = this.options; - var label = props.label; - if (label.visible === false) { - if (this.line) { - this.line.label = false; - } - if (this.point) { - this.point.label = false; - } - this.area.label = false; - return; - } - else if (label.type === 'point') { - this.area.label = Object(_components_factory__WEBPACK_IMPORTED_MODULE_3__["getComponent"])('label', { - fields: [props.yField], - plot: this, - }); - } - }; - StackedAreaLayer.prototype.adjustArea = function (ele) { - ele.adjust = [ - { - type: 'stack', - }, - ]; - }; - StackedAreaLayer.prototype.adjustLine = function (ele) { - ele.adjust = [ - { - type: 'stack', - }, - ]; - }; - StackedAreaLayer.prototype.adjustPoint = function (ele) { - ele.adjust = [ - { - type: 'stack', - }, - ]; - }; - StackedAreaLayer.prototype.afterRender = function () { - this.renderPlotComponents(); - this.options.responsive = false; - _super.prototype.afterRender.call(this); - }; - StackedAreaLayer.prototype.geometryTooltip = function () { - this.area.tooltip = {}; - var tooltipOptions = this.options.tooltip; - if (tooltipOptions.fields) { - this.area.tooltip.fields = tooltipOptions.fields; - } - if (tooltipOptions.formatter) { - this.area.tooltip.callback = tooltipOptions.formatter; - if (!tooltipOptions.fields) { - this.area.tooltip.fields = [this.options.xField, this.options.yField, this.options.stackField]; - } - } - }; - StackedAreaLayer.prototype.renderPlotComponents = function () { - var _this = this; - var componentsType = ['areaLabel', 'lineLabel']; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(componentsType, function (t) { - var cfg = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ view: _this.view, plot: _this }, _this.options[t]); - var component = Object(_component__WEBPACK_IMPORTED_MODULE_5__["getPlotComponents"])(_this, t, cfg); - if (component) { - component.render(); - _this.plotComponents.push(component); - } - }); - }; - return StackedAreaLayer; -}(_area_layer__WEBPACK_IMPORTED_MODULE_4__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (StackedAreaLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('stackedArea', StackedAreaLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/stacked-bar/component/label.js": -/*!****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/stacked-bar/component/label.js ***! - \****************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _bar_component_label__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../bar/component/label */ "./node_modules/@antv/g2plot/esm/plots/bar/component/label.js"); - - - -var DEFAULT_OFFSET = 8; -var StackBarLabel = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(StackBarLabel, _super); - function StackBarLabel() { - return _super !== null && _super.apply(this, arguments) || this; - } - StackBarLabel.prototype.getDefaultOptions = function () { - var theme = this.plot.theme; - var labelStyle = theme.label.style; - return { - offsetX: DEFAULT_OFFSET, - offsetY: 0, - style: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(labelStyle), - adjustPosition: true, - }; - }; - StackBarLabel.prototype.adjustLabel = function (label, shape) { - if (this.options.adjustPosition) { - var labelRange = label.getBBox(); - var shapeRange = this.getShapeBbox(shape); - if (shapeRange.width <= labelRange.width) { - // const xPosition = shapeRange.maxX + this.options.offsetX; - label.attr('text', ''); - } - } - }; - return StackBarLabel; -}(_bar_component_label__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (StackBarLabel); -//# sourceMappingURL=label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/stacked-bar/index.js": -/*!******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/stacked-bar/index.js ***! - \******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/stacked-bar/layer.js"); - - - - -var StackedBar = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(StackedBar, _super); - function StackedBar() { - return _super !== null && _super.apply(this, arguments) || this; - } - StackedBar.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'stackedBar'; - _super.prototype.createLayers.call(this, layerProps); - }; - StackedBar.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return StackedBar; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (StackedBar); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/stacked-bar/layer.js": -/*!******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/stacked-bar/layer.js ***! - \******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _bar_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../bar/layer */ "./node_modules/@antv/g2plot/esm/plots/bar/layer.js"); -/* harmony import */ var _component_label__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./component/label */ "./node_modules/@antv/g2plot/esm/plots/stacked-bar/component/label.js"); - - - - - -var StackedBarLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(StackedBarLayer, _super); - function StackedBarLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'stackedBar'; - return _this; - } - StackedBarLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - xAxis: { - visible: true, - autoRotateTitle: false, - grid: { - visible: true, - }, - line: { - visible: false, - }, - tickLine: { - visible: true, - }, - label: { - visible: true, - autoRotate: true, - autoHide: true, - }, - title: { - visible: true, - offset: 12, - }, - }, - yAxis: { - visible: true, - autoRotateTitle: true, - grid: { - visible: false, - }, - line: { - visible: false, - }, - tickLine: { - visible: false, - }, - label: { - visible: true, - autoRotate: true, - autoHide: true, - }, - title: { - visible: false, - offset: 12, - }, - }, - legend: { - visible: true, - position: 'top-left', - offsetY: 0, - }, - }); - }; - StackedBarLayer.prototype.adjustBar = function (bar) { - bar.adjust = [ - { - type: 'stack', - }, - ]; - }; - StackedBarLayer.prototype.renderLabel = function () { - var scales = this.config.scales; - var yField = this.options.yField; - var scale = scales[yField]; - if (this.options.label && this.options.label.visible) { - var label = new _component_label__WEBPACK_IMPORTED_MODULE_4__["default"](Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ view: this.view, plot: this, formatter: scale.formatter }, this.options.label)); - label.render(); - } - }; - StackedBarLayer.prototype.geometryTooltip = function () { - this.bar.tooltip = {}; - var tooltipOptions = this.options.tooltip; - if (tooltipOptions.fields) { - this.bar.tooltip.fields = tooltipOptions.fields; - } - if (tooltipOptions.formatter) { - this.bar.tooltip.callback = tooltipOptions.formatter; - if (!tooltipOptions.fields) { - this.bar.tooltip.fields = [this.options.xField, this.options.yField, this.options.stackField]; - } - } - }; - return StackedBarLayer; -}(_bar_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (StackedBarLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('stackedBar', StackedBarLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/stacked-column/component/label.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/stacked-column/component/label.js ***! - \*******************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _column_component_label__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../column/component/label */ "./node_modules/@antv/g2plot/esm/plots/column/component/label.js"); - - - -var StackColumnLabel = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(StackColumnLabel, _super); - function StackColumnLabel() { - return _super !== null && _super.apply(this, arguments) || this; - } - StackColumnLabel.prototype.getDefaultOptions = function () { - var theme = this.plot.theme; - var labelStyle = theme.label.style; - return { - offsetX: 0, - offsetY: 0, - style: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(labelStyle), - adjustPosition: true, - }; - }; - StackColumnLabel.prototype.adjustLabel = function (label, shape) { - if (this.options.adjustPosition) { - var labelRange = label.getBBox(); - var shapeRange = this.getShapeBbox(shape); - if (shapeRange.height <= labelRange.height) { - label.attr('text', ''); - } - } - }; - return StackColumnLabel; -}(_column_component_label__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (StackColumnLabel); -//# sourceMappingURL=label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/stacked-column/index.js": -/*!*********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/stacked-column/index.js ***! - \*********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/stacked-column/layer.js"); - - - - -var StackedColumn = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(StackedColumn, _super); - function StackedColumn() { - return _super !== null && _super.apply(this, arguments) || this; - } - StackedColumn.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'stackedColumn'; - _super.prototype.createLayers.call(this, layerProps); - }; - StackedColumn.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return StackedColumn; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (StackedColumn); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/stacked-column/layer.js": -/*!*********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/stacked-column/layer.js ***! - \*********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _components_connected_area__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/connected-area */ "./node_modules/@antv/g2plot/esm/components/connected-area.js"); -/* harmony import */ var _column_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../column/layer */ "./node_modules/@antv/g2plot/esm/plots/column/layer.js"); -/* harmony import */ var _component_label__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./component/label */ "./node_modules/@antv/g2plot/esm/plots/stacked-column/component/label.js"); - - - - - - -var StackedColumnLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(StackedColumnLayer, _super); - function StackedColumnLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'stackedColumn'; - return _this; - } - StackedColumnLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - legend: { - visible: true, - position: 'right-top', - }, - label: { - visible: false, - position: 'middle', - offset: 0, - adjustColor: true, - }, - connectedArea: { - visible: false, - triggerOn: 'mouseenter', - }, - }); - }; - StackedColumnLayer.prototype.init = function () { - if (this.options.connectedArea.visible) { - this.options.tooltip.crosshairs = null; - } - _super.prototype.init.call(this); - }; - StackedColumnLayer.prototype.afterRender = function () { - var props = this.options; - // 绘制区域连接组件 - if (props.connectedArea.visible) { - this.connectedArea = new _components_connected_area__WEBPACK_IMPORTED_MODULE_3__["default"](Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ view: this.view, field: props.stackField, animation: props.animation === false ? false : true }, props.connectedArea)); - } - _super.prototype.afterRender.call(this); - }; - StackedColumnLayer.prototype.adjustColumn = function (column) { - column.adjust = [ - { - type: 'stack', - }, - ]; - }; - StackedColumnLayer.prototype.renderLabel = function () { - var scales = this.config.scales; - var yField = this.options.yField; - var scale = scales[yField]; - if (this.options.label && this.options.label.visible) { - var label = new _component_label__WEBPACK_IMPORTED_MODULE_5__["default"](Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ view: this.view, plot: this, formatter: scale.formatter }, this.options.label)); - label.render(); - } - }; - StackedColumnLayer.prototype.geometryTooltip = function () { - this.column.tooltip = {}; - var tooltipOptions = this.options.tooltip; - if (tooltipOptions.fields) { - this.column.tooltip.fields = tooltipOptions.fields; - } - if (tooltipOptions.formatter) { - this.column.tooltip.callback = tooltipOptions.formatter; - if (!tooltipOptions.fields) { - this.column.tooltip.fields = [this.options.xField, this.options.yField, this.options.stackField]; - } - } - }; - return StackedColumnLayer; -}(_column_layer__WEBPACK_IMPORTED_MODULE_4__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (StackedColumnLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('stackedColumn', StackedColumnLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/stacked-rose/index.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/stacked-rose/index.js ***! - \*******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/stacked-rose/layer.js"); - - - - -var StackedRose = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(StackedRose, _super); - function StackedRose() { - return _super !== null && _super.apply(this, arguments) || this; - } - StackedRose.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'stackedRose'; - _super.prototype.createLayers.call(this, layerProps); - }; - StackedRose.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return StackedRose; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (StackedRose); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/stacked-rose/layer.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/stacked-rose/layer.js ***! - \*******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _rose_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../rose/layer */ "./node_modules/@antv/g2plot/esm/plots/rose/layer.js"); - - - - -var StackedRoseLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(StackedRoseLayer, _super); - function StackedRoseLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'stackedRose'; - return _this; - } - StackedRoseLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - xAxis: { - visible: true, - line: { - visible: false, - }, - tickLine: { - visible: false, - }, - grid: { - visible: true, - alignTick: false, - style: { - lineWidth: 0.5, - }, - }, - label: { - offset: 5, - autoRotate: true, - }, - }, - yAxis: { - visible: false, - }, - }); - }; - StackedRoseLayer.prototype.adjustRoseAdjust = function () { - return [ - { - type: 'stack', - }, - ]; - }; - StackedRoseLayer.prototype.geometryTooltip = function () { - this.rose.tooltip = {}; - var tooltipOptions = this.options.tooltip; - if (tooltipOptions.fields) { - this.rose.tooltip.fields = tooltipOptions.fields; - } - if (tooltipOptions.formatter) { - this.rose.tooltip.callback = tooltipOptions.formatter; - if (!tooltipOptions.fields) { - this.rose.tooltip.fields = [this.options.radiusField, this.options.categoryField, this.options.stackField]; - } - } - }; - return StackedRoseLayer; -}(_rose_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (StackedRoseLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('stackedRose', StackedRoseLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/step-line/index.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/step-line/index.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/step-line/layer.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); - - - - -var StepLine = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(StepLine, _super); - function StepLine() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * 复写父类方法 - * @param props - */ - StepLine.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'step-line'; - _super.prototype.createLayers.call(this, layerProps); - }; - StepLine.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_2__["StepLineLayer"].getDefaultOptions; - return StepLine; -}(_base_plot__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (StepLine); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/step-line/layer.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/step-line/layer.js ***! - \****************************************************************/ -/*! exports provided: StepLineLayer */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StepLineLayer", function() { return StepLineLayer; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _line_layer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../line/layer */ "./node_modules/@antv/g2plot/esm/plots/line/layer.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); - - - - -var StepLineLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(StepLineLayer, _super); - function StepLineLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'step-line'; // 覆写父类的 type - return _this; - } - StepLineLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - step: 'hv', - }); - }; - return StepLineLayer; -}(_line_layer__WEBPACK_IMPORTED_MODULE_2__["default"])); - -Object(_base_global__WEBPACK_IMPORTED_MODULE_3__["registerPlotType"])('step-line', StepLineLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/treemap/components/label.js": -/*!*************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/treemap/components/label.js ***! - \*************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/common */ "./node_modules/@antv/g2plot/esm/util/common.js"); - - -var LEAF_LABEL_OFFSET = 4; -var MIN_FONTSIZE = 8; -function isLeaf(data, maxLevel) { - return !data.children || data.depth >= maxLevel; -} -function textWrapper(label, width, container) { - var fontSize = label.attr('fontSize'); - var textContent = label.attr('text'); - var tShape = container.addShape('text', { - attrs: { - text: '', - x: 0, - y: 0, - fontSize: fontSize, - }, - }); - var textArr = textContent.split('\n'); - var wrappedTextArr = textArr.map(function (wrappedText) { - var text = ''; - var chars = wrappedText.split(''); - var breakIndex = []; - for (var i = 0; i < chars.length; i++) { - var item = chars[i]; - tShape.attr('text', (text += item)); - var currentWidth = tShape.getBBox().width - 1; - if (currentWidth > width) { - // 如果是第一个字符就大于宽度不做任何换行处理 - if (i === 0) { - break; - } - breakIndex.push(i); - text = ''; - } - } - return Object(_util_common__WEBPACK_IMPORTED_MODULE_1__["breakText"])(chars, breakIndex); - }); - tShape.remove(); - return wrappedTextArr.join('\n'); -} -function textAbbreviate(text, fontSize, width, container) { - var tailShape = container.addShape('text', { - attrs: { - text: '...', - x: 0, - y: 0, - fontSize: fontSize, - }, - }); - var tailWidth = tailShape.getBBox().width; - var tShape = container.addShape('text', { - attrs: { - text: '', - x: 0, - y: 0, - fontSize: fontSize, - }, - }); - var t = ''; - var abbreviateWidth = width - tailWidth; - for (var i = 0; i < text.length; i++) { - var item = text[i]; - tShape.attr('text', (t += item)); - var currentWidth = tShape.getBBox().width; - if (currentWidth >= abbreviateWidth) { - var string = t.substr(0, t.length - 1); - if (string.length > 0) { - return string + '...'; - } - } - } - tShape.remove(); - tailShape.remove(); - return t; -} -var TreemapLabel = /** @class */ (function () { - function TreemapLabel(cfg) { - this.destroyed = false; - this.view = cfg.view; - this.plot = cfg.plot; - var defaultOptions = this.getDefaultOptions(); - this.options = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])(defaultOptions, cfg, {}); - this.init(); - } - TreemapLabel.prototype.init = function () { - var _this = this; - this.container = this.getGeometry().labelsContainer; - this.view.on('beforerender', function () { - _this.clear(); - _this.plot.canvas.draw(); - }); - }; - TreemapLabel.prototype.render = function () { - var _this = this; - var elements = this.getGeometry().elements; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(elements, function (ele) { - var shape = ele.shape; - var data = shape.get('origin').data; - var isLeafNode = isLeaf(data, _this.plot.options.maxLevel); - if (data.showLabel) { - var style = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(_this.options.style); - var position = _this.getPosition(shape, isLeafNode); - var formatter = _this.options.formatter; - var content = formatter ? formatter(data.name) : data.name; - var textBaseline = _this.getTextBaseLine(isLeafNode); - var label = _this.container.addShape('text', { - attrs: Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])({}, style, { - x: position.x, - y: position.y, - text: content, - fill: 'black', - textAlign: 'center', - textBaseline: textBaseline, - fontWeight: isLeafNode ? 300 : 600, - }), - name: 'label', - }); - _this.adjustLabel(label, shape, isLeafNode); - } - }); - }; - TreemapLabel.prototype.clear = function () { - if (this.container) { - this.container.clear(); - } - }; - TreemapLabel.prototype.hide = function () { - this.container.set('visible', false); - this.plot.canvas.draw(); - }; - TreemapLabel.prototype.show = function () { - this.container.set('visible', true); - this.plot.canvas.draw(); - }; - TreemapLabel.prototype.destory = function () { - if (this.container) { - this.container.remove(); - } - this.destroyed = true; - }; - TreemapLabel.prototype.getBBox = function () { }; - TreemapLabel.prototype.getPosition = function (shape, isLeafNode) { - var shapeBbox = shape.getBBox(); - var x = 0; - var y = 0; - if (!isLeafNode) { - x = shapeBbox.x + shapeBbox.width / 2; - y = shapeBbox.y + 4; - } - else { - x = shapeBbox.minX + shapeBbox.width / 2; - y = shapeBbox.minY + shapeBbox.height / 2; - } - return { x: x, y: y }; - }; - TreemapLabel.prototype.getTextBaseLine = function (isLeafNode) { - return isLeafNode ? 'middle' : 'top'; - }; - TreemapLabel.prototype.adjustLabel = function (label, shape, isLeafNode) { - if (isLeafNode) { - this.adjustLeafLabel(label, shape); - } - else { - this.adjustParentLabel(label, shape); - } - }; - TreemapLabel.prototype.adjustLeafLabel = function (label, shape) { - var bbox = shape.getBBox(); - var labelBBox = label.getBBox(); - var labelText = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(label.attr('text')); - var sizeOffset = 2; - var fontSize = Math.max(label.attr('fontSize') - sizeOffset, MIN_FONTSIZE); - var centerX = bbox.x + bbox.width / 2; - var centerY = bbox.y + bbox.height / 2; - label.attr({ - x: centerX, - y: centerY, - textAlign: 'center', - textBaseline: 'middle', - lineHeight: fontSize, - fontSize: fontSize, - }); - var wrapperWidth = bbox.width - LEAF_LABEL_OFFSET * 2; - if (labelBBox.width > bbox.width && labelBBox.height > bbox.height) { - label.attr('text', ''); - return; - } - else if (wrapperWidth < fontSize) { - label.attr('text', ''); - return; - } - if (labelBBox.width > bbox.width) { - var wrappedText = textWrapper(label, wrapperWidth, this.container); - label.attr({ - lineHeight: label.attr('fontSize'), - text: wrappedText, - }); - var tem_bbox = label.getBBox(); - if (tem_bbox.height > bbox.height) { - var text = textAbbreviate(labelText, fontSize, wrapperWidth, this.container); - label.attr('text', text); - } - } - }; - TreemapLabel.prototype.adjustParentLabel = function (label, shape) { - var shapeBbox = shape.getBBox(); - var wrapperWidth = shapeBbox.width - LEAF_LABEL_OFFSET * 2; - if (label.getBBox().width > wrapperWidth) { - var text = textAbbreviate(label.attr('text'), label.attr('fontSize'), wrapperWidth, this.container); - label.attr('text', text); - } - }; - TreemapLabel.prototype.getDefaultOptions = function () { - var theme = this.plot.theme; - var labelStyle = theme.label.style; - return { - offsetX: 0, - offsetY: 0, - style: Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(labelStyle), - }; - }; - TreemapLabel.prototype.getGeometry = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["find"])(this.view.geometries, function (geom) { return geom.type === 'polygon'; }); - }; - return TreemapLabel; -}()); -/* harmony default export */ __webpack_exports__["default"] = (TreemapLabel); -//# sourceMappingURL=label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/treemap/event.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/treemap/event.js ***! - \**************************************************************/ -/*! exports provided: EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["onEvent"]; }); - - - -var componentMap = { - Rect: 'polygon', - Breadcrumb: 'breadcrumb', -}; -var SHAPE_EVENT_MAP = Object(_util_event__WEBPACK_IMPORTED_MODULE_1__["getEventMap"])(componentMap); -Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(_util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"], SHAPE_EVENT_MAP); - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/treemap/index.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/treemap/index.js ***! - \**************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/treemap/layer.js"); - - - - -var Treemap = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Treemap, _super); - function Treemap() { - return _super !== null && _super.apply(this, arguments) || this; - } - Treemap.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'treemap'; - _super.prototype.createLayers.call(this, layerProps); - }; - Treemap.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return Treemap; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Treemap); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/treemap/interaction/animation.js": -/*!******************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/treemap/interaction/animation.js ***! - \******************************************************************************/ -/*! exports provided: drillingDown, rollingUp */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drillingDown", function() { return drillingDown; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rollingUp", function() { return rollingUp; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_g_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/g-util */ "./node_modules/@antv/g2plot/esm/util/g-util.js"); - - -var ulMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1]; -var duration = 400; -var easing = 'easeQuadInOut'; -function drillingDown(target, view, callback) { - var rect = getRect(target); - var range = getRange(view); - var xRatio = range.width / rect.width; - var yRatio = range.height / rect.height; - var offsetX = (range.minX - rect.minX) * xRatio; - var offsetY = (range.minY - rect.minY) * yRatio; - var transformMatrix = Object(_util_g_util__WEBPACK_IMPORTED_MODULE_1__["transform"])([ - ['s', xRatio, yRatio], - ['t', offsetX, offsetY], - ]); - var geometry = view.geometries[0]; - hideLabel(geometry); - var tem_container = view.backgroundGroup.addGroup(); - tem_container.set('zIndex', -100); - tem_container.setClip({ - type: 'rect', - attrs: { - x: range.minX, - y: range.minY, - width: range.width, - height: range.height, - }, - }); - var tem_shapes = getTemShapes(geometry, tem_container); - geometry.container.set('visible', false); - view.canvas.draw(); - callback(); - window.setTimeout(function () { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(tem_shapes, function (shape, index) { - if (index === 0) { - shape.animate({ matrix: transformMatrix }, duration, easing, function () { - tem_container.remove(); - view.canvas.draw(); - }); - } - else { - shape.animate(_util_g_util__WEBPACK_IMPORTED_MODULE_1__["transform"], duration); - } - }); - geometry = view.geometries[0]; - hideLabel(geometry); - var shapes = geometry.getShapes(); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(shapes, function (shape) { - shape.attr('opacity', 0); - shape.animate({ - opacity: 1, - }, duration, easing); - }); - var container = geometry.container; - container.stopAnimate(); - container.set('visible', true); - container.attr('matrix', Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(ulMatrix)); - Object(_util_g_util__WEBPACK_IMPORTED_MODULE_1__["groupTransform"])(container, [ - ['s', rect.width / range.width, rect.height / range.height], - ['t', rect.minX, rect.minY], - ]); - var matrix = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(ulMatrix); - geometry.container.animate({ - matrix: matrix, - }, duration, easing, function () { - showLabel(geometry); - }); - view.canvas.draw(); - }, 16); -} -function getTemShapes(geometry, container) { - var shapes = geometry.getShapes(); - var tem_shapes = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(shapes, function (shape) { - var s = container.addShape('path', { - attrs: Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])({}, shape.attrs, { capture: false }), - }); - tem_shapes.push(s); - }); - return tem_shapes; -} -function rollingUp(name, view, callback) { - var geometry = view.geometries[0]; - hideLabel(geometry); - var container = geometry.container; - container.attr('matrix', Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(ulMatrix)); - var tem_container = view.backgroundGroup.addGroup(); - tem_container.set('zIndex', -100); - var tem_shapes = getTemShapes(geometry, tem_container); - container.set('visible', false); - view.canvas.draw(); - callback(); - geometry = view.geometries[0]; - hideLabel(geometry); - container = geometry.container; - var shape = findShapeByName(geometry.getShapes(), name); //根据name获得上一级shape - var rect = getRect(shape); - var range = getRange(view); - var containerParent = container.get('parent'); - if (!containerParent.get('clipShape')) { - container.setClip({ - type: 'rect', - attrs: { - x: range.minX, - y: range.minY, - width: range.width, - height: range.height, - }, - }); - } - shrinkTemp(tem_container, tem_shapes, rect, range); - var xRatio = range.width / rect.width; - var yRatio = range.height / rect.height; - var offsetX = (range.minX - rect.minX) * xRatio; - var offsetY = (range.minY - rect.minY) * yRatio; - var transformMatrix = Object(_util_g_util__WEBPACK_IMPORTED_MODULE_1__["transform"])([ - ['s', xRatio, yRatio], - ['t', offsetX, offsetY], - ]); - container.setMatrix(transformMatrix); - container.set('visible', true); - container.animate({ - matrix: ulMatrix, - }, duration, easing, function () { - showLabel(geometry); - }); -} -function findShapeByName(shapes, n) { - var shape; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(shapes, function (s) { - var name = s.get('origin').data.name; - if (name === n) { - shape = s; - } - }); - return shape; -} -function getRange(view) { - var viewRange = view.coordinateBBox; - var range = { - minX: viewRange.minX, - minY: viewRange.minY, - centerX: (viewRange.maxX - viewRange.minX) / 2, - centerY: (viewRange.maxY - viewRange.minY) / 2, - width: viewRange.width, - height: viewRange.height, - }; - return range; -} -function getRect(shape) { - var path = shape.attr('path'); - var x0 = path[0][1]; - var y1 = path[0][2]; - var x1 = path[1][1]; - var y0 = path[2][2]; - var rect = { - minX: x0, - minY: y0, - centerX: (x1 - x0) / 2, - centerY: (y1 - y0) / 2, - width: Math.abs(x1 - x0), - height: Math.abs(y1 - y0), - }; - return rect; -} -function shrinkTemp(container, shapes, rect, range) { - var xRatio = rect.width / range.width; - var yRatio = rect.height / range.height; - var transformMatrix = Object(_util_g_util__WEBPACK_IMPORTED_MODULE_1__["transform"])([ - ['s', xRatio, yRatio], - ['t', rect.minX, rect.minY], - ]); - container.animate({ matrix: transformMatrix }, duration, easing, function () { - container.remove(); - }); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(shapes, function (shape) { - shape.animate({ - opacity: 0, - }, duration, easing); - }); -} -function hideLabel(geometry) { - var labelContainer = geometry.labelsContainer; - labelContainer.set('visible', false); -} -function showLabel(geometry) { - var labelContainer = geometry.labelsContainer; - labelContainer.set('visible', true); -} -//# sourceMappingURL=animation.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/treemap/interaction/drillDown.js": -/*!******************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/treemap/interaction/drillDown.js ***! - \******************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _components_breadcrumb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../components/breadcrumb */ "./node_modules/@antv/g2plot/esm/components/breadcrumb.js"); -/* harmony import */ var _interaction_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../interaction/base */ "./node_modules/@antv/g2plot/esm/interaction/base.js"); -/* harmony import */ var _util_bbox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/bbox */ "./node_modules/@antv/g2plot/esm/util/bbox.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _animation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./animation */ "./node_modules/@antv/g2plot/esm/plots/treemap/interaction/animation.js"); - - - - - - -var DEFAULT_ITEM_WIDTH = 100; -var DEFAULT_ITEM_HEIGHT = 30; -var PADDING_TOP = 10; -var getValidBreadcrumbConfig = function (cfg) { - if (cfg === void 0) { cfg = {}; } - var _cfg = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ x: 0, y: 0, startNode: { name: 'root' }, itemWidth: DEFAULT_ITEM_WIDTH, itemHeight: DEFAULT_ITEM_HEIGHT, padding: [0, 0, 0, 0] }, cfg); - return _cfg; -}; -var DrillDownInteraction = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(DrillDownInteraction, _super); - function DrillDownInteraction() { - return _super !== null && _super.apply(this, arguments) || this; - } - DrillDownInteraction.getInteractionRange = function (layerRange, interaction) { - var config = getValidBreadcrumbConfig(interaction); - var _a = config.padding, paddingTop = _a[0], paddingBottom = _a[1]; - if (layerRange) { - return new _util_bbox__WEBPACK_IMPORTED_MODULE_3__["default"](layerRange.minX, layerRange.maxY - config.itemHeight - paddingTop - paddingBottom, layerRange.width, config.itemHeight + paddingTop + paddingBottom); - } - }; - DrillDownInteraction.prototype.start = function (ev) { - var _this = this; - var data = ev.data.data; - if (data.children) { - this.parentNode = { - color: ev.target.attr('fill'), - shape: ev.target, - data: { - name: Object(_antv_util__WEBPACK_IMPORTED_MODULE_4__["clone"])(this.currentNode.name), - value: Object(_antv_util__WEBPACK_IMPORTED_MODULE_4__["clone"])(this.currentNode.value), - }, - depth: Object(_antv_util__WEBPACK_IMPORTED_MODULE_4__["clone"])(this.currentDepth), - }; - this.currentDepth++; - Object(_animation__WEBPACK_IMPORTED_MODULE_5__["drillingDown"])(ev.target, this.view, function () { - _this.update(data); - }); - } - }; - DrillDownInteraction.prototype.update = function (data) { - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_4__["hasKey"])(this.cache, data.name)) { - this.cache[data.name] = data; - } - var tempoData = this.plot.getTreemapData(data, data.depth); - this.view.changeData(tempoData); - this.adjustScale(this.currentDepth); - this.currentNode = data; - this.render(); - }; - DrillDownInteraction.prototype.render = function () { - if (this.breadcrumb) { - var items = this.getItems(); - this.breadcrumb.update({ - items: items, - }); - this.layout(); - } - else { - this.initGeometry(); - this.cache = {}; - this.saveOriginMapping(); - this.container = this.plot.canvas.addGroup(); - if (!this.startNode) { - this.startNode = { - name: 'root', - }; - } - if (this.startNode.name === 'root') { - this.startNodeName = Object(_antv_util__WEBPACK_IMPORTED_MODULE_4__["hasKey"])(this.plot.options.data, 'name') ? this.plot.options.data.name : 'root'; - this.currentNode = this.plot.options.data; - this.currentDepth = 1; - } - else { - this.startNodeName = this.startNode.name; - this.currentNode = this.startNode; - } - this.y = this.view.coordinateBBox.maxY + PADDING_TOP; - this.breadcrumb = new _components_breadcrumb__WEBPACK_IMPORTED_MODULE_1__["default"]({ - container: this.container, - x: 0, - y: this.y, - items: this.getItems(), - }); - this.breadcrumb.render(); - this.plot.canvas.draw(); - this.layout(); - } - this.onInteraction(); - }; - DrillDownInteraction.prototype.clear = function () { }; - DrillDownInteraction.prototype.layout = function () { - var currentWidth = this.container.getBBox().width; - var x = (this.plot.width - currentWidth) / 2; - this.breadcrumb.update({ - x: x, - y: this.y, - }); - }; - DrillDownInteraction.prototype.getItems = function () { - var items = []; - if (this.currentNode.name && this.currentNode.name === this.startNodeName) { - var rootItem = this.getRootItem(); - items.push(rootItem); - } - else { - items = []; - var parents = []; - this.findParent(this.currentNode, parents); - items.push(this.getRootItem()); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_4__["each"])(parents, function (p, index) { - items.push({ key: String(index + 2), text: p.name, data: p }); - }); - items.push({ key: String(parents.length + 2), text: this.currentNode.name, data: this.currentNode }); - } - return items; - }; - DrillDownInteraction.prototype.findParent = function (data, parents) { - if (data.parent) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_4__["hasKey"])(this.cache, data.parent.name)) { - parents.push(this.cache[data.parent.name]); - } - else { - parents.push(data.parent); - } - this.findParent(data.parent, parents); - } - else { - return; - } - }; - DrillDownInteraction.prototype.onInteraction = function () { - var _this = this; - this.container.on('click', function (ev) { - var targetParent = ev.target.get('parent'); - if (targetParent && targetParent.get('class') === 'item-group') { - var data_1 = targetParent.get('data'); - if (data_1.data) { - if (data_1.text === _this.startNodeName) { - var targetDepth = 1; - //只有前后depth相邻才执行上卷动画,否则直接更新 - if (_this.currentDepth - 1 === targetDepth) { - Object(_animation__WEBPACK_IMPORTED_MODULE_5__["rollingUp"])(_this.currentNode.name, _this.view, function () { - _this.updateRoot(data_1); - }); - } - else { - _this.updateRoot(data_1); - } - _this.currentDepth = 1; - } - else if (_this.currentNode === data_1.data) { - return; - } - else { - var previousDepth = Object(_antv_util__WEBPACK_IMPORTED_MODULE_4__["clone"])(_this.currentDepth); - _this.currentDepth = parseInt(data_1.key); - if (previousDepth - 1 === _this.currentDepth) { - Object(_animation__WEBPACK_IMPORTED_MODULE_5__["rollingUp"])(_this.currentNode.name, _this.view, function () { - _this.update(data_1.data); - }); - } - else { - _this.update(data_1.data); - } - } - } - } - }); - }; - DrillDownInteraction.prototype.getRootItem = function () { - var rootData = this.plot.options.data; - var rootName = Object(_antv_util__WEBPACK_IMPORTED_MODULE_4__["hasKey"])(rootData, 'name') ? rootData.name : 'root'; - return { key: '1', text: rootName, data: this.plot.rootData }; - }; - DrillDownInteraction.prototype.saveOriginMapping = function () { - var _a = this.plot.options, colorField = _a.colorField, colors = _a.colors; - var mappingInfo = { field: colorField, values: colors }; - this.originMapping = mappingInfo; - }; - DrillDownInteraction.prototype.adjustScale = function (index) { - var view = this.view; - // 根据当前层级确定mapping配置项 - if (this.mapping && Object(_antv_util__WEBPACK_IMPORTED_MODULE_4__["hasKey"])(this.mapping, String(index))) { - var mappingCfg = Object(_antv_util__WEBPACK_IMPORTED_MODULE_4__["clone"])(this.mapping[index]); - if (mappingCfg.values && Object(_antv_util__WEBPACK_IMPORTED_MODULE_4__["isFunction"])(mappingCfg.values)) { - var values = mappingCfg.values(this.parentNode, this.currentNode); - mappingCfg.values = values; - } - this.view.geometries[0].color(mappingCfg.field, mappingCfg.values); - } - else { - var mappingCfg = Object(_antv_util__WEBPACK_IMPORTED_MODULE_4__["clone"])(this.originMapping); - this.view.geometries[0].color(mappingCfg.field, mappingCfg.values); - } - view.render(); - }; - DrillDownInteraction.prototype.initGeometry = function () { - this.geometry = this.view.geometries[0]; - var viewRange = this.view.viewBBox; - var container = this.geometry.container; - container.setClip({ - type: 'rect', - attrs: { - x: viewRange.minX, - y: viewRange.minY, - width: viewRange.width, - height: viewRange.height, - }, - }); - }; - DrillDownInteraction.prototype.updateRoot = function (data) { - this.view.changeData(data.data); - this.adjustScale(1); - this.currentNode = this.plot.options.data; - this.render(); - }; - return DrillDownInteraction; -}(_interaction_base__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (DrillDownInteraction); -_interaction_base__WEBPACK_IMPORTED_MODULE_2__["default"].registerInteraction('drilldown', DrillDownInteraction); -//# sourceMappingURL=drillDown.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/treemap/interaction/index.js": -/*!**************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/treemap/interaction/index.js ***! - \**************************************************************************/ -/*! exports provided: INTERACTION_MAP */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "INTERACTION_MAP", function() { return INTERACTION_MAP; }); -/* harmony import */ var _drillDown__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drillDown */ "./node_modules/@antv/g2plot/esm/plots/treemap/interaction/drillDown.js"); - -var INTERACTION_MAP = { - drilldown: _drillDown__WEBPACK_IMPORTED_MODULE_0__["default"], -}; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/treemap/layer.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/treemap/layer.js ***! - \**************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _base_view_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/view-layer */ "./node_modules/@antv/g2plot/esm/base/view-layer.js"); -/* harmony import */ var _layout_squarify__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./layout/squarify */ "./node_modules/@antv/g2plot/esm/plots/treemap/layout/squarify.js"); -/* harmony import */ var _interaction__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./interaction */ "./node_modules/@antv/g2plot/esm/plots/treemap/interaction/index.js"); -/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event */ "./node_modules/@antv/g2plot/esm/plots/treemap/event.js"); -/* harmony import */ var _components_label__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/label */ "./node_modules/@antv/g2plot/esm/plots/treemap/components/label.js"); - - - - - - - - -var PARENT_NODE_OFFSET = 4; -var BLOCK_MARGIN = 4; -var TreemapLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TreemapLayer, _super); - function TreemapLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'treemap'; - return _this; - } - TreemapLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - maxLevel: 2, - padding: [0, 0, 0, 0], - tooltip: { - visible: false, - showTitle: false, - showCrosshairs: false, - showMarkers: false, - shared: false, - }, - legend: { - visible: false, - }, - xAxis: { - visible: false, - }, - yAxis: { - visible: false, - }, - xField: 'x', - yField: 'y', - label: { - visible: true, - adjustPosition: true, - style: { - stroke: 'rgba(0,0,0,0)', - lineWidth: 0, - fontSize: 12, - }, - }, - meta: { - x: { - nice: false, - }, - y: { - nice: false, - }, - }, - interactions: [{ type: 'tooltip' }], - }); - }; - TreemapLayer.prototype.beforeInit = function () { - var _this = this; - _super.prototype.beforeInit.call(this); - var interactions = this.options.interactions; - if (interactions) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(interactions, function (interaction) { - if (interaction.type === 'drilldown') { - _this.isDrilldown = true; - _this.options.maxLevel = 1; - } - }); - } - var data = this.options.data; - var treemapData = this.getTreemapData(data); - this.rootData = treemapData; - }; - TreemapLayer.prototype.afterRender = function () { - _super.prototype.afterRender.call(this); - if (this.options.label && this.options.label.visible) { - var label = new _components_label__WEBPACK_IMPORTED_MODULE_7__["default"](Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ view: this.view, plot: this }, this.options.label)); - label.render(); - } - }; - TreemapLayer.prototype.geometryParser = function (dim, type) { - return 'polygon'; - }; - TreemapLayer.prototype.getTreemapData = function (data, level) { - var viewRange = this.getViewRange(); - var root = Object(_layout_squarify__WEBPACK_IMPORTED_MODULE_4__["default"])(data, viewRange.x, viewRange.y, viewRange.width, viewRange.height); - this.recursive(root, 1); - var treemapData = []; - this.getAllNodes(root, treemapData, level); - treemapData.sort(function (a, b) { - return a.depth - b.depth; - }); - this.options.xField = 'x'; - this.options.yField = 'y'; - return treemapData; - }; - TreemapLayer.prototype.processData = function () { - return this.rootData; - }; - TreemapLayer.prototype.coord = function () { }; - TreemapLayer.prototype.addGeometry = function () { - var _this = this; - var _a = this.options, data = _a.data, colorField = _a.colorField, color = _a.color; - var treemapData = this.getTreemapData(data); - this.rootData = treemapData; - var isNested = this.isNested(treemapData); - this.rect = { - type: 'polygon', - position: { - fields: ['x', 'y'], - }, - color: { - fields: [colorField], - values: color, - }, - style: { - fields: ['depth'], - callback: function (d) { - var defaultStyle = _this.adjustStyleByDepth(d, isNested); - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, defaultStyle, _this.options.rectStyle); - }, - }, - tooltip: { - fields: ['name', 'value'], - }, - }; - if (this.options.tooltip && this.options.tooltip.formatter) { - this.rect.tooltip.callback = this.options.tooltip.formatter; - } - this.setConfig('geometry', this.rect); - }; - TreemapLayer.prototype.applyInteractions = function () { - var _this = this; - var interactionCfg = this.options.interactions; - var interactions = this.view.interactions; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(interactionCfg, function (inter) { - var Ctr = _interaction__WEBPACK_IMPORTED_MODULE_5__["INTERACTION_MAP"][inter.type]; - if (Ctr) { - var interaction = new Ctr(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, { - view: _this.view, - plot: _this, - startEvent: 'polygon:click', - }, inter.cfg, Ctr.getInteractionRange(_this.layerBBox, inter.cfg))); - interactions[inter.type] = interaction; - } - }); - }; - TreemapLayer.prototype.animation = function () { - _super.prototype.animation.call(this); - if (this.isDrilldown) { - this.rect.animate = false; - } - }; - TreemapLayer.prototype.parseEvents = function (eventParser) { - _super.prototype.parseEvents.call(this, _event__WEBPACK_IMPORTED_MODULE_6__); - }; - TreemapLayer.prototype.recursive = function (rows, depth) { - var _this = this; - var colorField = this.options.colorField; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(rows, function (r) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(r.children, function (c) { - c.depth = depth; - if (depth > 1) - c.parent = r; - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["hasKey"])(c, colorField)) { - c[colorField] = r[colorField]; - } - c.showLabel = true; - var leaf = _this.isLeaf(c); - if (!leaf) { - var cliperHeight = Math.abs(c.y1 - c.y0); - var labelHeight = _this.getLabelHeight(); - var parentLabelOffset = cliperHeight / 2 > labelHeight ? labelHeight : BLOCK_MARGIN; - c.showLabel = parentLabelOffset === BLOCK_MARGIN ? false : true; - var c_rows = Object(_layout_squarify__WEBPACK_IMPORTED_MODULE_4__["default"])(c, c.x0 + BLOCK_MARGIN, c.y0 + parentLabelOffset, c.x1 - BLOCK_MARGIN, c.y1 - BLOCK_MARGIN); - _this.fillColorField(c_rows, colorField, c[colorField]); - _this.recursive(c_rows, c.depth + 1); - } - }); - }); - }; - TreemapLayer.prototype.getAllNodes = function (data, nodes, level) { - var _this = this; - var max = level ? level : this.options.maxLevel; - var viewRange = this.getViewRange(); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(data, function (d) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["hasKey"])(d, 'x0') && d.depth <= max) { - nodes.push(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, d), { x: [d.x0, d.x1, d.x1, d.x0], y: [viewRange.height - d.y1, viewRange.height - d.y1, viewRange.height - d.y0, viewRange.height - d.y0] })); - } - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["hasKey"])(d, 'children')) { - _this.getAllNodes(d.children, nodes); - } - }); - }; - TreemapLayer.prototype.fillColorField = function (rows, fieldName, value) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(rows, function (r) { - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["hasKey"])(r, fieldName)) { - r[fieldName] = value; - } - }); - }; - TreemapLayer.prototype.getLabelHeight = function () { - var label = this.options.label; - var fontSize = this.getPlotTheme().label.style.fontSize; - var size = 0; - if (label && label.visible) { - var labelStyle = label.style; - size = labelStyle && labelStyle.fontSize ? labelStyle.fontSize : fontSize; - } - return size + PARENT_NODE_OFFSET * 2; - }; - TreemapLayer.prototype.isLeaf = function (data) { - return !data.children || data.children.length === 0; - }; - TreemapLayer.prototype.isNested = function (data) { - var maxLevel = this.options.maxLevel; - if (maxLevel === 1) { - return false; - } - var nested = false; - for (var i = 0; i < data.length; i++) { - if (data[i].children) { - nested = true; - break; - } - } - return nested; - }; - TreemapLayer.prototype.adjustStyleByDepth = function (depth, isNested) { - var maxLevel = this.options.maxLevel; - if (!isNested) { - return { - lineWidth: 1, - stroke: 'rgba(0,0,0,0.9)', - opacity: 0.9, - }; - } - else if (depth === 1) { - return { - lineWidth: 1, - stroke: 'black', - opacity: depth / maxLevel, - }; - } - else { - return { - lineWidth: 1, - stroke: 'rgba(0,0,0,0.3)', - opacity: depth / maxLevel, - }; - } - }; - return TreemapLayer; -}(_base_view_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (TreemapLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('treemap', TreemapLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/treemap/layout/dice.js": -/*!********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/treemap/layout/dice.js ***! - \********************************************************************/ -/*! exports provided: dice */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dice", function() { return dice; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -function dice(root, x0, y0, x1, y1) { - var width = x1 - x0; - var children = root.children, value = root.value; - children.sort(function (a, b) { - return b.value - a.value; - }); - var k = width / value; - var node_x = x0; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(children, function (c) { - c.y0 = y0; - c.y1 = y1; - c.x0 = node_x; - node_x += c.value * k; - c.x1 = c.x0 + c.value * k; - }); -} -//# sourceMappingURL=dice.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/treemap/layout/slice.js": -/*!*********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/treemap/layout/slice.js ***! - \*********************************************************************/ -/*! exports provided: slice */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -function slice(root, x0, y0, x1, y1) { - var height = y1 - y0; - var children = root.children, value = root.value; - children.sort(function (a, b) { - return b.value - a.value; - }); - var k = height / value; - var node_y = y0; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(children, function (c) { - c.x0 = x0; - c.x1 = x1; - c.y0 = node_y; - node_y += c.value * k; - c.y1 = c.y0 + c.value * k; - }); -} -//# sourceMappingURL=slice.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/treemap/layout/squarify.js": -/*!************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/treemap/layout/squarify.js ***! - \************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return squarify; }); -/* harmony import */ var _dice__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice */ "./node_modules/@antv/g2plot/esm/plots/treemap/layout/dice.js"); -/* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice */ "./node_modules/@antv/g2plot/esm/plots/treemap/layout/slice.js"); - - -//reference: https://github.com/d3/d3-hierarchy/blob/master/src/treemap/squarify.js -// 黄金分割 -var ratio = (1 + Math.sqrt(5)) / 2; -function squarify(root, x0, y0, x1, y1) { - var children = root.children; - var value = root.value; - children.sort(function (a, b) { - return b.value - a.value; - }); - var rows = []; - var sumValue, maxValue, minValue; - var alpha, beta; - var newRatio, minRatio; - var nodeValue; - var i = 0, j = 0; - // todo: 剔除empty node - while (i < children.length) { - var width = x1 - x0; - var height = y1 - y0; - sumValue = children[j++].value; - maxValue = sumValue; - minValue = sumValue; - alpha = Math.max(height / width, width / height) / (value * ratio); - beta = sumValue * sumValue * alpha; - minRatio = Math.max(maxValue / beta, beta / minValue); - for (; j < children.length; j++) { - nodeValue = children[j].value; - sumValue += nodeValue; - if (nodeValue < minValue) - minValue = nodeValue; - if (nodeValue > maxValue) - maxValue = nodeValue; - beta = sumValue * sumValue * alpha; - newRatio = Math.max(maxValue / beta, beta / minValue); - if (newRatio > minRatio) { - sumValue -= nodeValue; - break; - } - minRatio = newRatio; - } - var row = { value: sumValue, dice: width < height, children: children.slice(i, j) }; - rows.push(row); - if (row.dice) { - var h = value ? (height * sumValue) / value : height; - Object(_dice__WEBPACK_IMPORTED_MODULE_0__["dice"])(row, x0, y0, x1, y0 + h); - if (value) { - y0 += h; - } - } - else { - var w = value ? (width * sumValue) / value : width; - Object(_slice__WEBPACK_IMPORTED_MODULE_1__["slice"])(row, x0, y0, x0 + w, y1); - if (value) { - x0 += w; - } - } - value -= sumValue; - i = j; - } - return rows; -} -//# sourceMappingURL=squarify.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/waterfall/component/label/diff-label.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/waterfall/component/label/diff-label.js ***! - \*************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../layer */ "./node_modules/@antv/g2plot/esm/plots/waterfall/layer.js"); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); - -/** - * Create By Bruce Too - * On 2020-02-18 - */ - - - -function getDefaultCfg() { - return { - fill: '#fff', - fontSize: 12, - lineHeight: 12, - stroke: 'rgba(0, 0, 0, 0.45)', - }; -} -var DiffLabel = /** @class */ (function () { - function DiffLabel(cfg) { - this.textAttrs = {}; - this.view = cfg.view; - this.fields = cfg.fields; - this.formatter = cfg.formatter; - this.textAttrs = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mix"])(getDefaultCfg(), cfg.style); - this._init(); - } - /** 绘制辅助labels */ - DiffLabel.prototype.draw = function () { - var _this = this; - if (!this.view || this.view.destroyed) { - return; - } - var data = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(this.view.getData()); - this.container = this.view.foregroundGroup.addGroup(); - var shapes = this.view.geometries[0].elements.map(function (value) { return value.shape; }); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(shapes, function (shape, idx) { - if (!shape.cfg.origin) - return; - var _origin = shape.cfg.origin.data; - var shapeBox = shape.getBBox(); - var values = _origin[_layer__WEBPACK_IMPORTED_MODULE_2__["VALUE_FIELD"]]; - var diff = values; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(values)) { - diff = values[1] - values[0]; - } - diff = diff > 0 ? "+" + diff : diff; - /** is total, total do not need `+` sign */ - if (_origin[_layer__WEBPACK_IMPORTED_MODULE_2__["IS_TOTAL"]]) { - diff = values[0] - values[1]; - } - var formattedText = diff; - if (_this.formatter) { - var color = shapes[idx].attr('fill'); - formattedText = _this.formatter("" + diff, { _origin: data[idx], color: color }, idx); - } - var text = _this.container.addShape('text', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ text: formattedText, textBaseline: 'middle', textAlign: 'center', x: (shapeBox.minX + shapeBox.maxX) / 2, y: (shapeBox.minY + shapeBox.maxY) / 2 }, _this.textAttrs), - name: 'dill-label', - }); - if (text.getBBox().height > shapeBox.height) { - text.set('visible', false); - } - }); - this.view.getCanvas().draw(); - }; - DiffLabel.prototype.clear = function () { - if (this.container) { - this.container.clear(); - } - }; - DiffLabel.prototype._init = function () { - var _this = this; - this.view.on(_dependents__WEBPACK_IMPORTED_MODULE_3__["VIEW_LIFE_CIRCLE"].BEFORE_RENDER, function () { - _this.clear(); - }); - this.view.on(_dependents__WEBPACK_IMPORTED_MODULE_3__["VIEW_LIFE_CIRCLE"].AFTER_RENDER, function () { - _this.draw(); - }); - }; - return DiffLabel; -}()); -/* harmony default export */ __webpack_exports__["default"] = (DiffLabel); -//# sourceMappingURL=diff-label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/waterfall/component/label/waterfall-label.js": -/*!******************************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/waterfall/component/label/waterfall-label.js ***! - \******************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _column_component_label__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../column/component/label */ "./node_modules/@antv/g2plot/esm/plots/column/component/label.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../layer */ "./node_modules/@antv/g2plot/esm/plots/waterfall/layer.js"); - -/** - * Create By Bruce Too - * On 2020-02-18 - */ - - - -var WaterfallLabels = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(WaterfallLabels, _super); - function WaterfallLabels(cfg) { - return _super.call(this, cfg) || this; - } - WaterfallLabels.prototype.adjustLabel = function (label, shape) { - var MARGIN = 2; - var shapeBox = shape.getBBox(); - var origin = shape.cfg.origin.data; - var values = origin[_layer__WEBPACK_IMPORTED_MODULE_3__["VALUE_FIELD"]]; - var diff = origin[this.plot.options.yField]; - var value = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(values) ? values[1] : values; - var yPos = (shapeBox.minY + shapeBox.maxY) / 2; - var textBaseline = 'bottom'; - if (diff < 0) { - yPos = shapeBox.maxY + MARGIN; - textBaseline = 'top'; - } - else { - yPos = shapeBox.minY - MARGIN; - } - label.attr('y', yPos); - label.attr('text', value); - label.attr('textBaseline', textBaseline); - }; - return WaterfallLabels; -}(_column_component_label__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (WaterfallLabels); -//# sourceMappingURL=waterfall-label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/waterfall/event.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/waterfall/event.js ***! - \****************************************************************/ -/*! exports provided: EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _column_event__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../column/event */ "./node_modules/@antv/g2plot/esm/plots/column/event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return _column_event__WEBPACK_IMPORTED_MODULE_0__["EVENT_MAP"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return _column_event__WEBPACK_IMPORTED_MODULE_0__["onEvent"]; }); - -/** - * Create By Bruce Too - * On 2020-02-18 - */ -/** - * @file events of waterfall chart is equal to column chart - */ - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/waterfall/geometry/shape/waterfall.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/waterfall/geometry/shape/waterfall.js ***! - \***********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); - -/** - * Create By Bruce Too - * On 2020-02-18 - */ - - -function getStyle(cfg, isStroke, isFill) { - var style = cfg.style, defaultStyle = cfg.defaultStyle, color = cfg.color; - var attrs = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, defaultStyle), style); - if (color) { - if (isStroke) { - attrs.stroke = color; - } - if (isFill) { - attrs.fill = color; - } - } - return attrs; -} -function getRectPath(points) { - var path = []; - var firstPoint = points[0]; - path.push(['M', firstPoint.x, firstPoint.y]); - for (var i = 1, len = points.length; i < len; i++) { - path.push(['L', points[i].x, points[i].y]); - } - path.push(['L', firstPoint.x, firstPoint.y]); // 需要闭合 - path.push(['z']); - return path; -} -// @ts-ignore -Object(_dependents__WEBPACK_IMPORTED_MODULE_2__["registerShape"])('interval', 'waterfall', { - // @ts-ignore - draw: function (cfg, container) { - var style = getStyle(cfg, false, true); - var path = this.parsePath(getRectPath(cfg.points)); - var shape = container.addShape('path', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, style), { path: path }), - name: 'interval', - }); - var leaderLine = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(cfg.style, 'leaderLine'); - if (leaderLine && leaderLine.visible) { - var lineStyle = leaderLine.style || {}; - // 2. 虚线连线 - if (cfg.nextPoints) { - var linkPath = [ - // @ts-ignore - ['M', cfg.points[2].x, cfg.points[2].y], - // @ts-ignore - ['L', cfg.nextPoints[0].x, cfg.nextPoints[0].y], - ]; - linkPath = this.parsePath(linkPath); - container.addShape('path', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: linkPath, stroke: '#d3d3d3', lineDash: [4, 2], lineWidth: 1 }, lineStyle), - name: 'leader-line', - }); - } - } - return shape; - }, -}); -//# sourceMappingURL=waterfall.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/waterfall/index.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/waterfall/index.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/waterfall/layer.js"); - -/** - * Create By Bruce Too - * On 2020-02-18 - */ - - - -var Waterfall = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Waterfall, _super); - function Waterfall() { - return _super !== null && _super.apply(this, arguments) || this; - } - Waterfall.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'waterfall'; - _super.prototype.createLayers.call(this, layerProps); - }; - Waterfall.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return Waterfall; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Waterfall); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/waterfall/layer.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/waterfall/layer.js ***! - \****************************************************************/ -/*! exports provided: VALUE_FIELD, IS_TOTAL, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VALUE_FIELD", function() { return VALUE_FIELD; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IS_TOTAL", function() { return IS_TOTAL; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _geometry_shape_waterfall__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./geometry/shape/waterfall */ "./node_modules/@antv/g2plot/esm/plots/waterfall/geometry/shape/waterfall.js"); -/* harmony import */ var _base_view_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../base/view-layer */ "./node_modules/@antv/g2plot/esm/base/view-layer.js"); -/* harmony import */ var _util_scale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../util/scale */ "./node_modules/@antv/g2plot/esm/util/scale.js"); -/* harmony import */ var _components_factory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/factory */ "./node_modules/@antv/g2plot/esm/components/factory.js"); -/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./event */ "./node_modules/@antv/g2plot/esm/plots/waterfall/event.js"); -/* harmony import */ var _component_label_waterfall_label__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./component/label/waterfall-label */ "./node_modules/@antv/g2plot/esm/plots/waterfall/component/label/waterfall-label.js"); -/* harmony import */ var _component_label_diff_label__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./component/label/diff-label */ "./node_modules/@antv/g2plot/esm/plots/waterfall/component/label/diff-label.js"); - -/** - * Create By Bruce Too - * On 2020-02-18 - */ - - - - - - - - - - -var G2_GEOM_MAP = { - waterfall: 'interval', -}; -var PLOT_GEOM_MAP = { - interval: 'waterfall', -}; -var VALUE_FIELD = '$$value$$'; -var IS_TOTAL = '$$total$$'; -var INDEX_FIELD = '$$index$$'; -var WaterfallLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(WaterfallLayer, _super); - function WaterfallLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'watarfall'; - return _this; - } - WaterfallLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - legend: { - visible: false, - position: 'bottom', - }, - label: { - visible: true, - adjustPosition: true, - }, - /** 差值 label */ - diffLabel: { - visible: true, - }, - /** 迁移线 */ - leaderLine: { - visible: true, - }, - /** 显示总计 */ - showTotal: { - visible: true, - label: '总计值', - }, - waterfallStyle: { - /** 默认无描边 */ - lineWidth: 0, - }, - tooltip: { - visible: true, - shared: true, - showCrosshairs: false, - showMarkers: false, - }, - }); - }; - WaterfallLayer.prototype.getOptions = function (props) { - var options = _super.prototype.getOptions.call(this, props); - this.adjustLegendOptions(options); - this.adjustMeta(options); - return options; - }; - WaterfallLayer.prototype.afterInit = function () { - _super.prototype.afterInit.call(this); - var options = this.options; - if (options.diffLabel && options.diffLabel.visible) { - this.diffLabel = new _component_label_diff_label__WEBPACK_IMPORTED_MODULE_9__["default"]({ - view: this.view, - fields: [options.xField, options.yField, VALUE_FIELD], - formatter: options.diffLabel.formatter, - style: options.diffLabel.style, - }); - } - else if (this.diffLabel) { - this.diffLabel.clear(); - this.diffLabel = null; - } - }; - WaterfallLayer.prototype.afterRender = function () { - _super.prototype.afterRender.call(this); - var options = this.options; - this.view.on('tooltip:change', function (e) { - var items = e.items; - for (var i = 0; i < items.length; i++) { - var item = items[i]; - var data = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(item, 'data', {}); - // 改变 tooltip 显示的name和value - item.name = data[options.xField]; - item.value = data[options.yField]; - if (!item.value && data[IS_TOTAL]) { - var values = data[VALUE_FIELD]; - item.value = values[0] - values[1]; - } - e.items[i] = item; - } - }); - this.renderLabel(); - }; - WaterfallLayer.prototype.renderLabel = function () { - if (this.options.label && this.options.label.visible) { - var label = new _component_label_waterfall_label__WEBPACK_IMPORTED_MODULE_8__["default"](Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ view: this.view, plot: this }, this.options.label)); - label.render(); - } - }; - WaterfallLayer.prototype.geometryParser = function (dim, type) { - if (dim === 'g2') { - return G2_GEOM_MAP[type]; - } - return PLOT_GEOM_MAP[type]; - }; - WaterfallLayer.prototype.interaction = function () { - this.setConfig('interactions', [{ type: 'tooltip' }, { type: 'active-region' }]); - }; - WaterfallLayer.prototype.addGeometry = function () { - var options = this.options; - var waterfall = { - type: 'interval', - position: { - fields: [options.xField, VALUE_FIELD], - }, - shape: { - values: ['waterfall'], - }, - }; - waterfall.style = this._parseStyle(); - waterfall.color = this._parseColor(); - this.waterfall = waterfall; - if (this.options.tooltip && (this.options.tooltip.fields || this.options.tooltip.formatter)) { - this.geometryTooltip(); - } - this.setConfig('geometry', waterfall); - }; - WaterfallLayer.prototype.processData = function (originData) { - var _a; - var plotData = []; - var xField = this.options.xField; - var yField = this.options.yField; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["map"])(originData, function (dataItem, idx) { - var _a; - var value = dataItem[yField]; - if (idx > 0) { - var prevValue = plotData[idx - 1][VALUE_FIELD]; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(prevValue)) { - value = [prevValue[1], dataItem[yField] + prevValue[1]]; - } - else { - value = [prevValue, dataItem[yField] + prevValue]; - } - } - plotData.push(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, dataItem), (_a = {}, _a[VALUE_FIELD] = value, _a[INDEX_FIELD] = idx, _a))); - }); - if (this.options.showTotal && this.options.showTotal.visible) { - var values = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["map"])(originData, function (o) { return o[yField]; }); - var totalValue = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["reduce"])(values, function (p, n) { return p + n; }, 0); - plotData.push((_a = {}, - _a[xField] = this.options.showTotal.label, - _a[yField] = null, - _a[VALUE_FIELD] = [totalValue, 0], - _a[INDEX_FIELD] = plotData.length, - _a[IS_TOTAL] = true, - _a)); - } - return plotData; - }; - WaterfallLayer.prototype.scale = function () { - var options = this.options; - var scales = {}; - /** 配置x-scale */ - scales[options.xField] = { type: 'cat' }; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(options, 'xAxis')) { - Object(_util_scale__WEBPACK_IMPORTED_MODULE_5__["extractScale"])(scales[options.xField], options.xAxis); - } - /** 配置y-scale */ - scales[VALUE_FIELD] = {}; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(options, 'yAxis')) { - Object(_util_scale__WEBPACK_IMPORTED_MODULE_5__["extractScale"])(scales[VALUE_FIELD], options.yAxis); - } - this.setConfig('scales', scales); - }; - /** @override */ - WaterfallLayer.prototype.axis = function () { - var xAxis_parser = Object(_components_factory__WEBPACK_IMPORTED_MODULE_6__["getComponent"])('axis', { - plot: this, - dim: 'x', - }); - var yAxis_parser = Object(_components_factory__WEBPACK_IMPORTED_MODULE_6__["getComponent"])('axis', { - plot: this, - dim: 'y', - }); - var axesConfig = { fields: {} }; - axesConfig.fields[this.options.xField] = xAxis_parser; - axesConfig.fields[VALUE_FIELD] = yAxis_parser; - /** 存储坐标轴配置项到config */ - this.setConfig('axes', axesConfig); - }; - WaterfallLayer.prototype.coord = function () { }; - WaterfallLayer.prototype.parseEvents = function (eventParser) { - _super.prototype.parseEvents.call(this, _event__WEBPACK_IMPORTED_MODULE_7__); - }; - WaterfallLayer.prototype.geometryTooltip = function () { - this.waterfall.tooltip = {}; - var tooltipOptions = this.options.tooltip; - if (tooltipOptions.fields) { - this.waterfall.tooltip.fields = tooltipOptions.fields; - } - if (tooltipOptions.formatter) { - this.waterfall.tooltip.callback = tooltipOptions.formatter; - if (!tooltipOptions.fields) { - this.waterfall.tooltip.fields = [this.options.xField, VALUE_FIELD]; - } - } - }; - /** 牵引线的样式注入到style中 */ - WaterfallLayer.prototype._parseStyle = function () { - var style = this.options.waterfallStyle; - var leaderLine = this.options.leaderLine; - var config = {}; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(style)) { - config.callback = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return Object.assign({}, style.apply(void 0, args), { leaderLine: leaderLine }); - }; - } - else { - config.cfg = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, style), { leaderLine: leaderLine }); - } - return config; - }; - WaterfallLayer.prototype._parseColor = function () { - var _this = this; - var options = this.options; - var _a = this.options, xField = _a.xField, yField = _a.yField; - var config = { - fields: [xField, yField, VALUE_FIELD, INDEX_FIELD], - }; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(options.color)) { - config.callback = options.color; - } - else { - var risingColor_1 = '#f4664a'; - var fallingColor_1 = '#30bf78'; - var totalColor_1 = 'rgba(0, 0, 0, 0.25)'; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isString"])(options.color)) { - risingColor_1 = fallingColor_1 = totalColor_1 = options.color; - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isObject"])(options.color)) { - var _b = options.color, rising = _b.rising, falling = _b.falling, total = _b.total; - risingColor_1 = rising; - fallingColor_1 = falling; - totalColor_1 = total; - } - config.callback = function (type, value, values, index) { - if (index === _this.options.data.length) { - return totalColor_1 || (values[0] >= 0 ? risingColor_1 : fallingColor_1); - } - return (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(values) ? values[1] - values[0] : values) >= 0 ? risingColor_1 : fallingColor_1; - }; - } - return config; - }; - /** 复写 legend 配置, 瀑布图默认无legend */ - WaterfallLayer.prototype.adjustLegendOptions = function (options) { - var legendOptions = options.legend; - if (legendOptions) { - legendOptions.visible = false; - } - }; - /** 复写 meta 配置 */ - WaterfallLayer.prototype.adjustMeta = function (options) { - var metaOptions = options.meta; - if (metaOptions) { - var valueFieldMeta = metaOptions ? metaOptions[options.yField] : {}; - valueFieldMeta.alias = valueFieldMeta.alias || options.yField; - options.meta[VALUE_FIELD] = valueFieldMeta; - } - }; - return WaterfallLayer; -}(_base_view_layer__WEBPACK_IMPORTED_MODULE_4__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (WaterfallLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('waterfall', WaterfallLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/word-cloud/index.js": -/*!*****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/word-cloud/index.js ***! - \*****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/plots/word-cloud/layer.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); - -/** - * Create By Bruce Too - * On 2020-02-14 - */ - - - - -var WordCloud = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(WordCloud, _super); - function WordCloud(container, props) { - var _this = this; - // only canvas works for now - props.renderer = 'canvas'; - _this = _super.call(this, container, props) || this; - return _this; - } - WordCloud.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'wordCloud'; - layerProps.container = this.containerDOM; - _super.prototype.createLayers.call(this, layerProps); - }; - return WordCloud; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (WordCloud); -Object(_base_global__WEBPACK_IMPORTED_MODULE_4__["registerPlotType"])('wordCloud', _layer__WEBPACK_IMPORTED_MODULE_3__["default"]); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/word-cloud/layer.js": -/*!*****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/word-cloud/layer.js ***! - \*****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_layer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/layer */ "./node_modules/@antv/g2plot/esm/base/layer.js"); -/* harmony import */ var _word_cloud_tooltips__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./word-cloud-tooltips */ "./node_modules/@antv/g2plot/esm/plots/word-cloud/word-cloud-tooltips.js"); -/* harmony import */ var _wordcloud2__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./wordcloud2 */ "./node_modules/@antv/g2plot/esm/plots/word-cloud/wordcloud2.js"); - - - - - -var WordCloudLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(WordCloudLayer, _super); - function WordCloudLayer(props) { - var _this = _super.call(this, props) || this; - _this._toolTipsAction = function (item, dimension, evt, start) { - if (dimension) { - _this._toolTips.update({ - items: [ - { - color: item.color || 'red', - name: item.word, - value: item.weight, - }, - ], - x: evt.offsetX, - y: evt.offsetY, - }); - _this._toolTips.show(); - } - else { - _this._toolTips.hide(); - } - _this._toolTips.render(); - _this._configHoverAction && _this._configHoverAction(item, dimension, evt, start); - }; - _this._configHoverAction = props.onWordCloudHover; - _this._enableToolTips = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["get"])(props, 'tooltip.visible', true); - _this.options = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, { - width: 400, - height: 400, - enableToolTips: true, - }, props, - // replace use config's hover action if needed, and trigger later - { - onWordCloudHover: _this._enableToolTips ? _this._toolTipsAction : _this._configHoverAction, - }); - return _this; - } - WordCloudLayer.prototype.init = function () { - _super.prototype.init.call(this); - this._initToolTips(); - }; - WordCloudLayer.prototype.render = function () { - _super.prototype.render.call(this); - this._render(); - }; - WordCloudLayer.prototype._initToolTips = function () { - this._toolTips = new _word_cloud_tooltips__WEBPACK_IMPORTED_MODULE_3__["default"]({ - showTitle: false, - visible: false, - parent: this.options.container, - follow: true, - inPanel: false, - items: [], - }); - this._toolTips.init(); - }; - WordCloudLayer.prototype._render = function () { - this._targetCanvas = this.canvas.get('el'); - if (this.options.maskImage) { - this._handleMaskImage(); - } - else { - // mask image not exist - this._start(); - } - }; - WordCloudLayer.prototype._handleMaskImage = function () { - var _this = this; - var image = new Image(); - image.src = this.options.maskImage + '?' + new Date().getTime(); - image.crossOrigin = 'Anonymous'; - image.onload = function () { - if (image.naturalHeight + image.naturalWidth === 0 || image.width + image.height === 0) { - _this._start(); - } - else { - // handle no-zero image silhouette - _this._startWithMaskImage(image); - } - }; - image.onerror = function () { - console.error('image %s load failed !!!', _this.options.maskImage); - // load image error, ignore this mask - _this._start(); - }; - }; - WordCloudLayer.prototype._start = function () { - this._handleG2PlotConfig(); - var targetCtx = this._targetCanvas.getContext('2d'); - // it's a trick, because 「g」 use context to scale canvas by pixelRatio, - // but here i need scale it back - var pixelRatio = this.canvas.get('width') / this.canvas.get('el').width; - targetCtx.scale(pixelRatio, pixelRatio); - Object(_wordcloud2__WEBPACK_IMPORTED_MODULE_4__["default"])(this._targetCanvas, this.options); - }; - WordCloudLayer.prototype._handleG2PlotConfig = function () { - var fontSize = this.options.wordStyle.fontSize || [10, 60]; - var rotation = this.options.wordStyle.rotation || [-Math.PI / 2, Math.PI / 2]; - var active, shadowColor, shadowBlur; - if (this.options.wordStyle.active) { - active = true; - shadowColor = this.options.wordStyle.active.shadowColor || '#333'; - shadowBlur = this.options.wordStyle.active.shadowBlur || 10; - } - else { - active = false; - } - this.options = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, this.options, { - minFontSize: fontSize[0], - maxFontSize: fontSize[1], - minRotation: rotation[0], - maxRotation: rotation[1], - active: active, - shadowColor: shadowColor, - shadowBlur: shadowBlur, - }); - }; - WordCloudLayer.prototype._startWithMaskImage = function (image) { - var _a = this._scaleMaskImageCanvas(this._transformWhite2BlackPixels(image)), maskImageCanvas = _a.maskImageCanvas, maskImageContext = _a.maskImageContext; - /* Determine bgPixel by creating - another canvas and fill the specified background color. */ - var bctx = document.createElement('canvas').getContext('2d'); - bctx.fillStyle = this.options.backgroundColor || '#fff'; - bctx.fillRect(0, 0, 1, 1); - var bgPixel = bctx.getImageData(0, 0, 1, 1).data; - var imageData = maskImageContext.getImageData(0, 0, maskImageCanvas.width, maskImageCanvas.height); - var newImageData = maskImageContext.createImageData(imageData); - for (var i = 0; i < imageData.data.length; i += 4) { - if (imageData.data[i + 3] > 128) { - // keep this area's data the same as pixel color - newImageData.data[i] = bgPixel[0]; - newImageData.data[i + 1] = bgPixel[1]; - newImageData.data[i + 2] = bgPixel[2]; - newImageData.data[i + 3] = bgPixel[3]; - } - else { - // This color must not be the same as the bgPixel. - // check wordcloud2.js#1192 's condition - newImageData.data[i] = bgPixel[0]; - newImageData.data[i + 1] = bgPixel[1]; - newImageData.data[i + 2] = bgPixel[2]; - newImageData.data[i + 3] = 254; // just for not same as the bg color - } - } - maskImageContext.putImageData(newImageData, 0, 0); - var targetCtx = this._targetCanvas.getContext('2d'); - targetCtx.drawImage(maskImageCanvas, 0, 0); - this.options = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, this.options, { clearCanvas: false }); - this._start(); - }; - WordCloudLayer.prototype._scaleMaskImageCanvas = function (maskImageCanvas) { - var maskCanvasScaled = document.createElement('canvas'); - // get real canvas determined by pixelRatio - maskCanvasScaled.width = this.canvas.get('width'); - maskCanvasScaled.height = this.canvas.get('height'); - var ctx = maskCanvasScaled.getContext('2d'); - // keep scale smooth - ctx.imageSmoothingEnabled = true; - // ctx.mozImageSmoothingEnabled = true; - // ctx.webkitImageSmoothingEnabled = true; - // ctx.msImageSmoothingEnabled = true; - ctx.drawImage(maskImageCanvas, 0, 0, maskImageCanvas.width, maskImageCanvas.height, 0, 0, maskCanvasScaled.width, maskCanvasScaled.height); - return { - maskImageCanvas: maskCanvasScaled, - maskImageContext: ctx, - }; - }; - WordCloudLayer.prototype._transformWhite2BlackPixels = function (image) { - var maskImageCanvas = document.createElement('canvas'); - maskImageCanvas.width = image.width; - maskImageCanvas.height = image.height; - var ctx = maskImageCanvas.getContext('2d'); - ctx.drawImage(image, 0, 0, image.width, image.height); - var imageData = ctx.getImageData(0, 0, maskImageCanvas.width, maskImageCanvas.height); - var SINGLE_COMPONENT_SIZE = 4; - var BLACK_PIXEL = 0; - var FULL_PIXEL = 255; - // R - G - B - A - for (var i = 0; i < imageData.data.length; i += SINGLE_COMPONENT_SIZE) { - var rgb = imageData.data[i] + imageData.data[i + 1] + imageData.data[i + 2]; - var alpha = imageData.data[i + 3]; - if (alpha < 128 || rgb > 250 * 3) { - // white area(not to draw) - imageData.data[i] = FULL_PIXEL; - imageData.data[i + 1] = FULL_PIXEL; - imageData.data[i + 2] = FULL_PIXEL; - imageData.data[i + 3] = BLACK_PIXEL; - } - else { - // black area wait to draw(image black silhouette) - imageData.data[i] = BLACK_PIXEL; - imageData.data[i + 1] = BLACK_PIXEL; - imageData.data[i + 2] = BLACK_PIXEL; - imageData.data[i + 3] = FULL_PIXEL; - } - } - ctx.putImageData(imageData, 0, 0); - return maskImageCanvas; - }; - return WordCloudLayer; -}(_base_layer__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (WordCloudLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/word-cloud/word-cloud-tooltips.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/word-cloud/word-cloud-tooltips.js ***! - \*******************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); - -/** - * Create By Bruce Too - * On 2020-02-14 - */ - - -var WordCloudTooltips = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(WordCloudTooltips, _super); - function WordCloudTooltips(cfg) { - var _this = this; - var newCfg = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, cfg, { - itemTpl: "
        \n \n {name}{value}
        ", - }, cfg); - _this = _super.call(this, newCfg) || this; - return _this; - } - return WordCloudTooltips; -}(_dependents__WEBPACK_IMPORTED_MODULE_2__["HtmlTooltip"])); -/* harmony default export */ __webpack_exports__["default"] = (WordCloudTooltips); -//# sourceMappingURL=word-cloud-tooltips.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/plots/word-cloud/wordcloud2.js": -/*!**********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/plots/word-cloud/wordcloud2.js ***! - \**********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/** - * Create By Bruce Too - * On 2020-02-14 - */ -/* eslint-disable */ -// @ts-nocheck -// TODO rewrite with typescript @brucetoo -/*! - * wordcloud2.js - * http://timdream.org/wordcloud2.js/ - * - * Copyright 2011 - 2013 Tim Chien - * Released under the MIT license - */ - -// setImmediate -if (!window.setImmediate) { - window.setImmediate = (function setupSetImmediate() { - return (window.msSetImmediate || - window.webkitSetImmediate || - window.mozSetImmediate || - window.oSetImmediate || - (function setupSetZeroTimeout() { - if (!window.postMessage || !window.addEventListener) { - return null; - } - var callbacks = [undefined]; - var message = 'zero-timeout-message'; - // Like setTimeout, but only takes a function argument. There's - // no time argument (always zero) and no arguments (you have to - // use a closure). - var setZeroTimeout = function setZeroTimeout(callback) { - var id = callbacks.length; - callbacks.push(callback); - window.postMessage(message + id.toString(36), '*'); - return id; - }; - window.addEventListener('message', function setZeroTimeoutMessage(evt) { - // Skipping checking event source, retarded IE confused this window - // object with another in the presence of iframe - if (typeof evt.data !== 'string' || - evt.data.substr(0, message.length) !== message /* || - evt.source !== window */) { - return; - } - evt.stopImmediatePropagation(); - var id = parseInt(evt.data.substr(message.length), 36); - if (!callbacks[id]) { - return; - } - callbacks[id](); - callbacks[id] = undefined; - }, true); - /* specify clearImmediate() here since we need the scope */ - window.clearImmediate = function clearZeroTimeout(id) { - if (!callbacks[id]) { - return; - } - callbacks[id] = undefined; - }; - return setZeroTimeout; - })() || - // fallback - function setImmediateFallback(fn) { - window.setTimeout(fn, 0); - }); - })(); -} -if (!window.clearImmediate) { - window.clearImmediate = (function setupClearImmediate() { - return (window.msClearImmediate || - window.webkitClearImmediate || - window.mozClearImmediate || - window.oClearImmediate || - // "clearZeroTimeout" is implement on the previous block || - // fallback - function clearImmediateFallback(timer) { - window.clearTimeout(timer); - }); - })(); -} -// Check if WordCloud can run on this browser -var isSupported = (function isSupported() { - var canvas = document.createElement('canvas'); - if (!canvas || !canvas.getContext) { - return false; - } - var ctx = canvas.getContext('2d'); - if (!ctx.getImageData) { - return false; - } - if (!ctx.fillText) { - return false; - } - if (!Array.prototype.some) { - return false; - } - if (!Array.prototype.push) { - return false; - } - return true; -})(); -// Find out if the browser impose minium font size by -// drawing small texts on a canvas and measure it's width. -var minFontSize = (function getMinFontSize() { - if (!isSupported) { - return; - } - var ctx = document.createElement('canvas').getContext('2d'); - // start from 20 - var size = 20; - // two sizes to measure - var hanWidth, mWidth; - while (size) { - ctx.font = size.toString(10) + 'px sans-serif'; - if (ctx.measureText('\uFF37').width === hanWidth && ctx.measureText('m').width === mWidth) { - return size + 1; - } - hanWidth = ctx.measureText('\uFF37').width; - mWidth = ctx.measureText('m').width; - size--; - } - return 0; -})(); -// Based on http://jsfromhell.com/array/shuffle -var shuffleArray = function shuffleArray(arr) { - for (var j, x, i = arr.length; i; j = Math.floor(Math.random() * i), x = arr[--i], arr[i] = arr[j], arr[j] = x) { } - return arr; -}; -var WordCloud = function WordCloud(elements, options) { - if (!isSupported) { - return; - } - if (!Array.isArray(elements)) { - elements = [elements]; - } - elements.forEach(function (el, i) { - if (typeof el === 'string') { - elements[i] = document.getElementById(el); - if (!elements[i]) { - throw 'The element id specified is not found.'; - } - } - else if (!el.tagName && !el.appendChild) { - throw 'You must pass valid HTML elements, or ID of the element.'; - } - }); - /* Default values to be overwritten by options object */ - var settings = { - data: [], - fontFamily: '"Trebuchet MS", "Heiti TC", "微軟正黑體", ' + '"Arial Unicode MS", "Droid Fallback Sans", sans-serif', - fontWeight: 'normal', - color: 'random-dark', - animatable: true, - minFontSize: minFontSize, - maxFontSize: 60, - clearCanvas: true, - backgroundColor: '#fff', - gridSize: 8, - drawOutOfBound: false, - origin: null, - drawMask: false, - maskColor: 'rgba(255,0,0,0.3)', - maskGapWidth: 0.3, - wait: 0, - abortThreshold: 0, - abort: function noop() { }, - minRotation: -Math.PI / 2, - maxRotation: Math.PI / 2, - rotateRatio: 0.5, - rotationSteps: 1, - shuffle: true, - shape: 'circle', - ellipticity: 1, - active: true, - animatable: true, - selected: -1, - shadowColor: '#333', - shadowBlur: 10, - classes: null, - onWordCloudHover: null, - onWordCloudClick: null, - }; - var interactionItems = []; - if (options) { - for (var key in options) { - if (key === 'wordStyle') { - for (var fontKey in options[key]) { - if (fontKey in settings) { - settings[fontKey] = options[key][fontKey]; - } - } - } - else { - if (key in settings) { - settings[key] = options[key]; - } - } - } - } - if (settings.minFontSize < minFontSize) { - // can't less than browse's min font size - settings.minFontSize = minFontSize; - } - if (settings.minFontSize > settings.maxFontSize) { - console.error('minSize cant bigger than maxSize'); - return; - } - var maxWeight = 0; - for (var i = 0; i < settings.data.length; i++) { - if (maxWeight < settings.data[i].weight) { - maxWeight = settings.data[i].weight; - } - } - var getRealFontSize = function getRealFontSize(weight) { - return Math.min(Math.max(settings.minFontSize, (settings.maxFontSize * weight) / maxWeight), settings.maxFontSize); - }; - var isCardioid = false; - /* Convert shape into a function */ - if (typeof settings.shape !== 'function') { - switch (settings.shape) { - case 'circle': - /* falls through */ - default: - // 'circle' is the default and a shortcut in the code loop. - settings.shape = 'circle'; - break; - case 'cardioid': - // https://baike.baidu.com/item/%E5%BF%83%E8%84%8F%E7%BA%BF/10323843?fromtitle=%E5%BF%83%E5%BD%A2%E7%BA%BF&fromid=10018818 - settings.shape = function shapeCardioid(theta) { - return 1 - Math.sin(theta); - }; - isCardioid = true; - break; - /* - To work out an X-gon, one has to calculate "m", - where 1/(cos(2*PI/X)+m*sin(2*PI/X)) = 1/(cos(0)+m*sin(0)) - http://www.wolframalpha.com/input/?i=1%2F%28cos%282*PI%2FX%29%2Bm*sin%28 - 2*PI%2FX%29%29+%3D+1%2F%28cos%280%29%2Bm*sin%280%29%29 - Copy the solution into polar equation r = 1/(cos(t') + m*sin(t')) - where t' equals to mod(t, 2PI/X); - */ - case 'diamond': - settings.shape = function shapeSquare(theta) { - var thetaPrime = theta % ((2 * Math.PI) / 4); - return 1 / (Math.cos(thetaPrime) + Math.sin(thetaPrime)); - }; - break; - case 'square': - // http://www.wolframalpha.com/input/?i=plot+r+%3D+1%2F%28cos%28mod+ - // %28t%2C+PI%2F2%29%29%2Bsin%28mod+%28t%2C+PI%2F2%29%29%29%2C+t+%3D - // +0+..+2*PI - settings.shape = function shapeSquare(theta) { - var thetaPrime = (theta + Math.PI / 4) % ((2 * Math.PI) / 4); - return 1 / (Math.cos(thetaPrime) + Math.sin(thetaPrime)); - }; - break; - case 'triangle-forward': - // http://www.wolframalpha.com/input/?i=plot+r+%3D+1%2F%28cos%28mod+ - // %28t%2C+2*PI%2F3%29%29%2Bsqrt%283%29sin%28mod+%28t%2C+2*PI%2F3%29 - // %29%29%2C+t+%3D+0+..+2*PI - settings.shape = function shapeTriangle(theta) { - var thetaPrime = theta % ((2 * Math.PI) / 3); - return 1 / (Math.cos(thetaPrime) + Math.sqrt(3) * Math.sin(thetaPrime)); - }; - break; - case 'triangle-backward': - settings.shape = function shapeTriangle(theta) { - var thetaPrime = (theta + Math.PI) % ((2 * Math.PI) / 3); - return 1 / (Math.cos(thetaPrime) + Math.sqrt(3) * Math.sin(thetaPrime)); - }; - break; - case 'triangle': - case 'triangle-up': - settings.shape = function shapeTriangle(theta) { - var thetaPrime = (theta + (Math.PI * 3) / 2) % ((2 * Math.PI) / 3); - return 1 / (Math.cos(thetaPrime) + Math.sqrt(3) * Math.sin(thetaPrime)); - }; - break; - case 'triangle-down': - settings.shape = function shapeTriangle(theta) { - var thetaPrime = (theta + (Math.PI * 5) / 2) % ((2 * Math.PI) / 3); - return 1 / (Math.cos(thetaPrime) + Math.sqrt(3) * Math.sin(thetaPrime)); - }; - break; - case 'pentagon': - settings.shape = function shapePentagon(theta) { - var thetaPrime = (theta + 0.955) % ((2 * Math.PI) / 5); - return 1 / (Math.cos(thetaPrime) + 0.726543 * Math.sin(thetaPrime)); - }; - break; - case 'star': - settings.shape = function shapeStar(theta) { - var thetaPrime = (theta + 0.955) % ((2 * Math.PI) / 10); - if (((theta + 0.955) % ((2 * Math.PI) / 5)) - (2 * Math.PI) / 10 >= 0) { - return (1 / (Math.cos((2 * Math.PI) / 10 - thetaPrime) + 3.07768 * Math.sin((2 * Math.PI) / 10 - thetaPrime))); - } - else { - return 1 / (Math.cos(thetaPrime) + 3.07768 * Math.sin(thetaPrime)); - } - }; - break; - } - } - /* Make sure gridSize is a whole number and is not smaller than 4px */ - settings.gridSize = Math.max(Math.floor(settings.gridSize), 4); - /* shorthand */ - var g = settings.gridSize; - var maskRectWidth = g - settings.maskGapWidth; - /* normalize rotation settings */ - var rotationRange = Math.abs(settings.maxRotation - settings.minRotation); - var minRotation = Math.min(settings.maxRotation, settings.minRotation); - var rotationSteps = settings.rotationSteps; - /* information/object available to all functions, set when start() */ - var grid, // 2d array containing filling information - ngx, ngy, // width and height of the grid - center, // position of the center of the cloud - maxRadius; - /* timestamp for measuring each putWord() action */ - var escapeTime; - /* function for getting the color of the text */ - var getTextColor; - function random_hsl_color(min, max) { - return ('hsl(' + - (Math.random() * 360).toFixed() + - ',' + - (Math.random() * 30 + 70).toFixed() + - '%,' + - (Math.random() * (max - min) + min).toFixed() + - '%)'); - } - switch (settings.color) { - case 'random-dark': - getTextColor = function getRandomDarkColor() { - return random_hsl_color(10, 50); - }; - break; - case 'random-light': - getTextColor = function getRandomLightColor() { - return random_hsl_color(50, 90); - }; - break; - default: - if (typeof settings.color === 'function') { - getTextColor = settings.color; - } - break; - } - /* function for getting the classes of the text */ - var getTextClasses = null; - if (typeof settings.classes === 'function') { - getTextClasses = settings.classes; - } - /* Interactive */ - var interactive = false; - var infoGrid = []; - var hovered; - var getInfoGridFromMouseTouchEvent = function getInfoGridFromMouseTouchEvent(evt) { - var canvas = evt.currentTarget; - var rect = canvas.getBoundingClientRect(); - var clientX; - var clientY; - /** Detect if touches are available */ - if (evt.touches) { - clientX = evt.touches[0].clientX; - clientY = evt.touches[0].clientY; - } - else { - clientX = evt.clientX; - clientY = evt.clientY; - } - var eventX = clientX - rect.left; - var eventY = clientY - rect.top; - var x = Math.floor((eventX * (canvas.width / rect.width || 1)) / g); - var y = Math.floor((eventY * (canvas.height / rect.height || 1)) / g); - return infoGrid && infoGrid[x] && infoGrid[x][y]; - }; - var defaultHoverAction = function defaultHoverAction(item, dimension, evt, start) { - if (item) { - start(item.id); - } - else { - start(-1); - } - }; - var wordcloudhover = function wordcloudhover(evt) { - var info = getInfoGridFromMouseTouchEvent(evt); - if (hovered === info) { - return; - } - if (!info) { - settings.onWordCloudHover(undefined, undefined, evt, start); - if (settings.active) { - defaultHoverAction(undefined, undefined, evt, start); - } - return; - } - settings.onWordCloudHover(info.item, info.dimension, evt, start); - if (settings.active) { - defaultHoverAction(info.item, info.dimension, evt, start); - } - hovered = info; - }; - var wordcloudclick = function wordcloudclick(evt) { - var info = getInfoGridFromMouseTouchEvent(evt); - if (!info) { - return; - } - settings.onWordCloudClick(info.item, info.dimension, evt); - evt.preventDefault(); - }; - /* Get points on the grid for a given radius away from the center */ - var pointsAtRadius = []; - var getPointsAtRadius = function getPointsAtRadius(radius) { - if (pointsAtRadius[radius]) { - return pointsAtRadius[radius]; - } - // Look for these number of points on each radius - var T = radius * 8; - // Getting all the points at this radius - var t = T; - var points = []; - if (radius === 0) { - points.push([center[0], center[1], 0]); - } - while (t--) { - // distort the radius to put the cloud in shape - var rx = 1; - if (settings.shape !== 'circle') { - rx = settings.shape((t / T) * 2 * Math.PI); // 0 to 1 - } - // Push [x, y, t]; t is used solely for getTextColor() - points.push([ - center[0] + radius * rx * Math.cos((-t / T) * 2 * Math.PI), - center[1] + radius * rx * Math.sin((-t / T) * 2 * Math.PI) * settings.ellipticity, - (t / T) * 2 * Math.PI, - ]); - } - pointsAtRadius[radius] = points; - return points; - }; - /* Return true if we had spent too much time */ - var exceedTime = function exceedTime() { - return settings.abortThreshold > 0 && new Date().getTime() - escapeTime > settings.abortThreshold; - }; - /* Get the deg of rotation according to settings, and luck. */ - var getRotateDeg = function getRotateDeg() { - if (settings.rotateRatio === 0) { - return 0; - } - if (Math.random() > settings.rotateRatio) { - return 0; - } - if (rotationRange === 0) { - return minRotation; - } - // return minRotation + Math.round(Math.random() * rotationRange / rotationSteps) * rotationSteps; - if (rotationSteps > 0) { - // Min rotation + zero or more steps * span of one step - return minRotation + (Math.floor(Math.random() * rotationSteps) * rotationRange) / rotationSteps; - } - else { - return minRotation + Math.random() * rotationRange; - } - }; - var getTextInfo = function getTextInfo(word, weight, rotateDeg) { - // calculate the acutal font size - // fontSize === 0 means wants the text skipped, - // and size < minSize means we cannot draw the text - var debug = false; - var fontSize = getRealFontSize(weight); - if (fontSize <= 0) { - return false; - } - // Scale factor here is to make sure fillText is not limited by - // the minium font size set by browser. - // It will always be 1 or 2n. - var mu = 1; - if (fontSize < minFontSize) { - mu = (function calculateScaleFactor() { - var mu = 2; - while (mu * fontSize < minFontSize) { - mu += 2; - } - return mu; - })(); - } - var fcanvas = document.createElement('canvas'); - var fctx = fcanvas.getContext('2d', { willReadFrequently: true }); - fctx.font = settings.fontWeight + ' ' + (fontSize * mu).toString(10) + 'px ' + settings.fontFamily; - // Estimate the dimension of the text with measureText(). - var fw = fctx.measureText(word).width / mu; - var fh = Math.max(fontSize * mu, fctx.measureText('m').width, fctx.measureText('\uFF37').width) / mu; - // Create a boundary box that is larger than our estimates, - // so text don't get cut of (it sill might) - var boxWidth = fw + fh * 2; - var boxHeight = fh * 3; - var fgw = Math.ceil(boxWidth / g); - var fgh = Math.ceil(boxHeight / g); - boxWidth = fgw * g; - boxHeight = fgh * g; - // Calculate the proper offsets to make the text centered at - // the preferred position. - // This is simply half of the width. - var fillTextOffsetX = -fw / 2; - // Instead of moving the box to the exact middle of the preferred - // position, for Y-offset we move 0.4 instead, so Latin alphabets look - // vertical centered. - var fillTextOffsetY = -fh * 0.4; - // Calculate the actual dimension of the canvas, considering the rotation. - var cgh = Math.ceil((boxWidth * Math.abs(Math.sin(rotateDeg)) + boxHeight * Math.abs(Math.cos(rotateDeg))) / g); - var cgw = Math.ceil((boxWidth * Math.abs(Math.cos(rotateDeg)) + boxHeight * Math.abs(Math.sin(rotateDeg))) / g); - var width = cgw * g; - var height = cgh * g; - fcanvas.setAttribute('width', width); - fcanvas.setAttribute('height', height); - if (debug) { - // Attach fcanvas to the DOM - document.body.appendChild(fcanvas); - // Save it's state so that we could restore and draw the grid correctly. - fctx.save(); - } - // Scale the canvas with |mu|. - fctx.scale(1 / mu, 1 / mu); - fctx.translate((width * mu) / 2, (height * mu) / 2); - fctx.rotate(-rotateDeg); - // Once the width/height is set, ctx info will be reset. - // Set it again here. - fctx.font = settings.fontWeight + ' ' + (fontSize * mu).toString(10) + 'px ' + settings.fontFamily; - // Fill the text into the fcanvas. - // XXX: We cannot because textBaseline = 'top' here because - // Firefox and Chrome uses different default line-height for canvas. - // Please read https://bugzil.la/737852#c6. - // Here, we use textBaseline = 'middle' and draw the text at exactly - // 0.5 * fontSize lower. - fctx.fillStyle = '#000'; - fctx.textBaseline = 'middle'; - fctx.fillText(word, fillTextOffsetX * mu, (fillTextOffsetY + fontSize * 0.5) * mu); - // Get the pixels of the text - var imageData; - try { - imageData = fctx.getImageData(0, 0, width, height).data; - } - catch (e) { - // data not long type - return false; - } - if (exceedTime()) { - return false; - } - if (debug) { - // Draw the box of the original estimation - fctx.strokeRect(fillTextOffsetX * mu, fillTextOffsetY, fw * mu, fh * mu); - fctx.restore(); - } - // Read the pixels and save the information to the occupied array - var occupied = []; - var gx = cgw, gy, x, y; - var bounds = [cgh / 2, cgw / 2, cgh / 2, cgw / 2]; - while (gx--) { - gy = cgh; - while (gy--) { - y = g; - singleGridLoop: { - while (y--) { - x = g; - while (x--) { - if (imageData[((gy * g + y) * width + (gx * g + x)) * 4 + 3]) { - occupied.push([gx, gy]); - if (gx < bounds[3]) { - bounds[3] = gx; - } - if (gx > bounds[1]) { - bounds[1] = gx; - } - if (gy < bounds[0]) { - bounds[0] = gy; - } - if (gy > bounds[2]) { - bounds[2] = gy; - } - if (debug) { - fctx.fillStyle = 'rgba(255, 0, 0, 0.5)'; - fctx.fillRect(gx * g, gy * g, g - 0.5, g - 0.5); - } - break singleGridLoop; - } - } - } - if (debug) { - fctx.fillStyle = 'rgba(0, 0, 255, 0.5)'; - fctx.fillRect(gx * g, gy * g, g - 0.5, g - 0.5); - } - } - } - } - if (debug) { - // real bounds - fctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; - fctx.fillRect(bounds[3] * g, bounds[0] * g, (bounds[1] - bounds[3] + 1) * g, (bounds[2] - bounds[0] + 1) * g); - } - // Return information needed to create the text on the real canvas - return { - mu: mu, - occupied: occupied, - bounds: bounds, - gw: cgw, - gh: cgh, - fillTextOffsetX: fillTextOffsetX, - fillTextOffsetY: fillTextOffsetY, - fillTextWidth: fw, - fillTextHeight: fh, - fontSize: fontSize, - }; - }; - /* Determine if there is room available in the given dimension */ - var canFitText = function canFitText(gx, gy, gw, gh, occupied) { - // Go through the occupied points, - // return false if the space is not available. - var i = occupied.length; - while (i--) { - var px = gx + occupied[i][0]; - var py = gy + occupied[i][1]; - if (px >= ngx || py >= ngy || px < 0 || py < 0) { - if (!settings.drawOutOfBound) { - return false; - } - continue; - } - if (!grid[px][py]) { - return false; - } - } - return true; - }; - /* Actually draw the text on the grid */ - var drawText = function drawText(gx, gy, info, word, weight, distance, theta, rotateDeg, attributes, id, refresh) { - var fontSize = info.fontSize; - var color = settings.color; - var classes = settings.classes; - if (!refresh) { - if (getTextColor) { - color = getTextColor(word, weight, fontSize, distance, theta); - } - else { - color = settings.color; - } - if (getTextClasses) { - classes = getTextClasses(word, weight, fontSize, distance, theta); - } - else { - classes = settings.classes; - } - } - else { - var find = getInteractionItemById(id); - color = find ? find.color : settings.color; - } - var dimension; - var bounds = info.bounds; - dimension = { - x: (gx + bounds[3]) * g, - y: (gy + bounds[0]) * g, - w: (bounds[1] - bounds[3] + 1) * g, - h: (bounds[2] - bounds[0] + 1) * g, - }; - elements.forEach(function (el) { - if (el.getContext) { - var ctx = el.getContext('2d'); - var mu = info.mu; - // Save the current state before messing it - ctx.save(); - var font = settings.fontWeight + ' ' + (fontSize * mu).toString(10) + 'px ' + settings.fontFamily; - ctx.scale(1 / mu, 1 / mu); - ctx.font = font; - ctx.fillStyle = color; - // Translate the canvas position to the origin coordinate of where - // the text should be put. - var transX = (gx + info.gw / 2) * g * mu; - var transY = (gy + info.gh / 2) * g * mu; - ctx.translate(transX, transY); - if (rotateDeg !== 0) { - ctx.rotate(-rotateDeg); - } - // Finally, fill the text. - // XXX: We cannot because textBaseline = 'top' here because - // Firefox and Chrome uses different default line-height for canvas. - // Please read https://bugzil.la/737852#c6. - // Here, we use textBaseline = 'middle' and draw the text at exactly - // 0.5 * fontSize lower. - ctx.textBaseline = 'middle'; - if (settings.selected === id) { - ctx.shadowColor = settings.shadowColor; - ctx.shadowBlur = settings.shadowBlur; - } - ctx.fillText(word, info.fillTextOffsetX * mu, (info.fillTextOffsetY + fontSize * 0.5) * mu); - // The below box is always matches how s are positioned - // ctx.strokeRect(info.fillTextOffsetX, info.fillTextOffsetY, - // info.fillTextWidth, info.fillTextHeight); - if (!refresh) { - interactionItems.push({ - gx: gx, - gy: gy, - info: info, - word: word, - weight: weight, - distance: distance, - theta: theta, - rotateDeg: rotateDeg, - attributes: attributes, - id: id, - color: color, - }); - } - // Restore the state. - ctx.restore(); - } - else { - // drawText on DIV element - var span = document.createElement('span'); - var transformRule = ''; - transformRule = 'rotate(' + (-rotateDeg / Math.PI) * 180 + 'deg) '; - if (info.mu !== 1) { - transformRule += 'translateX(-' + info.fillTextWidth / 4 + 'px) ' + 'scale(' + 1 / info.mu + ')'; - } - var styleRules = { - position: 'absolute', - display: 'block', - font: settings.fontWeight + ' ' + fontSize * info.mu + 'px ' + settings.fontFamily, - left: (gx + info.gw / 2) * g + info.fillTextOffsetX + 'px', - top: (gy + info.gh / 2) * g + info.fillTextOffsetY + 'px', - width: info.fillTextWidth + 'px', - height: info.fillTextHeight + 'px', - lineHeight: fontSize + 'px', - whiteSpace: 'nowrap', - transform: transformRule, - webkitTransform: transformRule, - msTransform: transformRule, - transformOrigin: '50% 40%', - webkitTransformOrigin: '50% 40%', - msTransformOrigin: '50% 40%', - }; - if (color) { - styleRules.color = color; - } - span.textContent = word; - for (var cssProp in styleRules) { - span.style[cssProp] = styleRules[cssProp]; - } - if (attributes) { - for (var attribute in attributes) { - span.setAttribute(attribute, attributes[attribute]); - } - } - if (classes) { - span.className += classes; - } - el.appendChild(span); - } - }); - }; - /* Help function to updateGrid */ - var fillGridAt = function fillGridAt(x, y, drawMask, dimension, item) { - if (x >= ngx || y >= ngy || x < 0 || y < 0) { - return; - } - grid[x][y] = false; - if (drawMask) { - var ctx = elements[0].getContext('2d'); - ctx.fillRect(x * g, y * g, maskRectWidth, maskRectWidth); - } - if (interactive) { - infoGrid[x][y] = { item: item, dimension: dimension }; - } - }; - /* Update the filling information of the given space with occupied points. - Draw the mask on the canvas if necessary. */ - var updateGrid = function updateGrid(gx, gy, gw, gh, info) { - var occupied = info.occupied; - var drawMask = settings.drawMask; - var ctx; - if (drawMask) { - ctx = elements[0].getContext('2d'); - ctx.save(); - ctx.fillStyle = settings.maskColor; - } - var dimension; - if (interactive) { - var bounds = info.bounds; - dimension = { - x: (gx + bounds[3]) * g, - y: (gy + bounds[0]) * g, - w: (bounds[1] - bounds[3] + 1) * g, - h: (bounds[2] - bounds[0] + 1) * g, - }; - } - var i = occupied.length; - while (i--) { - var px = gx + occupied[i][0]; - var py = gy + occupied[i][1]; - if (px >= ngx || py >= ngy || px < 0 || py < 0) { - continue; - } - // save item's color from info - var find = getInteractionItemById(info.item.id); - if (find) { - info.item.color = find.color; - } - fillGridAt(px, py, drawMask, dimension, info.item); - } - if (drawMask) { - ctx.restore(); - } - }; - var tryToPutWordAtPoint = function tryToPutWordAtPoint(gxy, info, word, weight, distance, rotateDeg, attributes, id) { - var gx = Math.floor(gxy[0] - info.gw / 2); - var gy = Math.floor(gxy[1] - info.gh / 2); - var gw = info.gw; - var gh = info.gh; - // If we cannot fit the text at this position, return false - // and go to the next position. - if (!canFitText(gx, gy, gw, gh, info.occupied)) { - return false; - } - // Actually put the text on the canvas - drawText(gx, gy, info, word, weight, distance, gxy[2], rotateDeg, attributes, id, false); - // Mark the spaces on the grid as filled - updateGrid(gx, gy, gw, gh, info); - return { - gx: gx, - gy: gy, - rot: rotateDeg, - info: info, - }; - }; - /* putWord() processes each item on the list, - calculate it's size and determine it's position, and actually - put it on the canvas. */ - var putWord = function putWord(item) { - var word, weight, attributes, id; - if (Array.isArray(item)) { - word = item[0]; - weight = item[1]; - } - else { - word = item.word; - weight = item.weight; - attributes = item.attributes; - id = item.id; - } - var rotateDeg = getRotateDeg(); - // get info needed to put the text onto the canvas - var info = getTextInfo(word, weight, rotateDeg); - if (info) { - info['item'] = item; - } - // not getting the info means we shouldn't be drawing this one. - if (!info) { - return false; - } - if (exceedTime()) { - return false; - } - // If drawOutOfBound is set to false, - // skip the loop if we have already know the bounding box of - // word is larger than the canvas. - if (!settings.drawOutOfBound) { - var bounds = info.bounds; - if (bounds[1] - bounds[3] + 1 > ngx || bounds[2] - bounds[0] + 1 > ngy) { - return false; - } - } - // Determine the position to put the text by - // start looking for the nearest points - var r = maxRadius + 1; - while (r--) { - var points = getPointsAtRadius(maxRadius - r); - if (settings.shuffle) { - points = [].concat(points); - shuffleArray(points); - } - // Try to fit the words by looking at each point. - // array.some() will stop and return true - // when putWordAtPoint() returns true. - for (var i = 0; i < points.length; i++) { - var res = tryToPutWordAtPoint(points[i], info, word, weight, maxRadius - r, rotateDeg, attributes, id); - if (res) { - return res; - } - } - // var drawn = points.some(tryToPutWordAtPoint); - // if (drawn) { - // // leave putWord() and return true - // return true; - // } - } - // we tried all distances but text won't fit, return null - return null; - }; - /* Send DOM event to all elements. Will stop sending event and return - if the previous one is canceled (for cancelable events). */ - var sendEvent = function sendEvent(type, cancelable, detail) { - if (cancelable) { - return !elements.some(function (el) { - var evt = document.createEvent('CustomEvent'); - evt.initCustomEvent(type, true, cancelable, detail || {}); - return !el.dispatchEvent(evt); - }, this); - } - else { - elements.forEach(function (el) { - var evt = document.createEvent('CustomEvent'); - evt.initCustomEvent(type, true, cancelable, detail || {}); - el.dispatchEvent(evt); - }, this); - } - }; - var getInteractionItemById = function getInteractionItemById(id) { - for (var i = 0; i < interactionItems.length; i++) { - var find = interactionItems[i]; - if (interactionItems[i].id === id) { - return find; - } - } - return undefined; - }; - /* Start drawing on a canvas */ - var start = function start(selected) { - if (selected !== undefined) { - // re-refresh canvas with selected - // work in canvas only for now - if (settings.selected !== selected && elements[0].getContext) { - settings.selected = selected; - var ctx = elements[0].getContext('2d'); - // draw background - ctx.fillStyle = settings.backgroundColor; - ctx.clearRect(0, 0, elements[0].width, elements[0].height); - ctx.fillRect(0, 0, elements[0].width, elements[0].height); - // draw text - for (var i_1 = 0; i_1 < interactionItems.length; i_1++) { - var find = interactionItems[i_1]; - drawText(find.gx, find.gy, find.info, find.word, find.weight, find.distance, find.theta, find.rotateDeg, find.attributes, find.id, true); - } - } - return; - } - // For dimensions, clearCanvas etc., - // we only care about the first element. - var canvas = elements[0]; - if (canvas.getContext) { - ngx = Math.ceil(canvas.width / g); - ngy = Math.ceil(canvas.height / g); - } - else { - var rect = canvas.getBoundingClientRect(); - ngx = Math.ceil(rect.width / g); - ngy = Math.ceil(rect.height / g); - } - // Sending a wordcloudstart event which cause the previous loop to stop. - // Do nothing if the event is canceled. - if (!sendEvent('wordcloudstart', true)) { - return; - } - // Determine the center of the word cloud - center = settings.origin ? [settings.origin[0] / g, settings.origin[1] / g] : [ngx / 2, ngy / (isCardioid ? 4 : 2)]; - // Maxium radius to look for space - maxRadius = Math.floor(Math.sqrt(ngx * ngx + ngy * ngy)); - /* Clear the canvas only if the clearCanvas is set, - if not, update the grid to the current canvas state */ - grid = []; - var gx, gy, i; - if (!canvas.getContext || settings.clearCanvas) { - elements.forEach(function (el) { - if (el.getContext) { - var ctx = el.getContext('2d'); - ctx.fillStyle = settings.backgroundColor; - ctx.clearRect(0, 0, ngx * (g + 1), ngy * (g + 1)); - ctx.fillRect(0, 0, ngx * (g + 1), ngy * (g + 1)); - } - else { - el.textContent = ''; - el.style.backgroundColor = settings.backgroundColor; - el.style.position = 'relative'; - } - }); - /* fill the grid with empty state */ - gx = ngx; - while (gx--) { - grid[gx] = []; - gy = ngy; - while (gy--) { - grid[gx][gy] = true; - } - } - } - else { - /* Determine bgPixel by creating - another canvas and fill the specified background color. */ - var bctx = document.createElement('canvas').getContext('2d'); - bctx.fillStyle = settings.backgroundColor; - bctx.fillRect(0, 0, 1, 1); - var bgPixel = bctx.getImageData(0, 0, 1, 1).data; - /* Read back the pixels of the canvas we got to tell which part of the - canvas is empty. - (no clearCanvas only works with a canvas, not divs) */ - var imageData = canvas.getContext('2d').getImageData(0, 0, ngx * g, ngy * g).data; - gx = ngx; - var x, y; - while (gx--) { - grid[gx] = []; - gy = ngy; - while (gy--) { - y = g; - singleGridLoop: while (y--) { - x = g; - while (x--) { - i = 4; - while (i--) { - if (imageData[((gy * g + y) * ngx * g + (gx * g + x)) * 4 + i] !== bgPixel[i]) { - grid[gx][gy] = false; - break singleGridLoop; - } - } - } - } - if (grid[gx][gy] !== false) { - grid[gx][gy] = true; - } - } - } - imageData = bctx = bgPixel = undefined; - } - // fill the infoGrid with empty state if we need it - if (settings.onWordCloudHover || settings.onWordCloudClick) { - interactive = true; - /* fill the grid with empty state */ - gx = ngx + 1; - while (gx--) { - infoGrid[gx] = []; - } - if (settings.onWordCloudHover) { - canvas.addEventListener('mousemove', wordcloudhover); - } - if (settings.onWordCloudClick) { - canvas.addEventListener('click', wordcloudclick); - canvas.addEventListener('touchstart', wordcloudclick); - canvas.addEventListener('touchend', function (e) { - e.preventDefault(); - }); - canvas.style.webkitTapHighlightColor = 'rgba(0, 0, 0, 0)'; - } - canvas.addEventListener('wordcloudstart', function stopInteraction() { - canvas.removeEventListener('wordcloudstart', stopInteraction); - canvas.removeEventListener('mousemove', wordcloudhover); - canvas.removeEventListener('click', wordcloudclick); - hovered = undefined; - }); - } - if (!settings.animatable) { - for (var i_2 = 0; i_2 < settings.data.length; i_2++) { - putWord(settings.data[i_2]); - } - } - else { - i = 0; - var loopingFunction, stoppingFunction; - if (settings.wait !== 0) { - loopingFunction = window.setTimeout; - stoppingFunction = window.clearTimeout; - } - else { - loopingFunction = window.setImmediate; - stoppingFunction = window.clearImmediate; - } - var addEventListener = function addEventListener(type, listener) { - elements.forEach(function (el) { - el.addEventListener(type, listener); - }, this); - }; - var removeEventListener = function removeEventListener(type, listener) { - elements.forEach(function (el) { - el.removeEventListener(type, listener); - }, this); - }; - var anotherWordCloudStart = function anotherWordCloudStart() { - removeEventListener('wordcloudstart', anotherWordCloudStart); - stoppingFunction(timer); - }; - addEventListener('wordcloudstart', anotherWordCloudStart); - var timer = loopingFunction(function loop() { - if (i >= settings.data.length) { - stoppingFunction(timer); - sendEvent('wordcloudstop', false); - removeEventListener('wordcloudstart', anotherWordCloudStart); - return; - } - escapeTime = new Date().getTime(); - var drawn = putWord(settings.data[i]); - var canceled = !sendEvent('wordclouddrawn', true, { - item: settings.data[i], - drawn: drawn, - }); - if (exceedTime() || canceled) { - stoppingFunction(timer); - settings.abort(); - sendEvent('wordcloudabort', false); - sendEvent('wordcloudstop', false); - removeEventListener('wordcloudstart', anotherWordCloudStart); - return; - } - i++; - timer = loopingFunction(loop, settings.wait); - }, settings.wait); - } - }; - // All set, start the drawing - start(); -}; -WordCloud.isSupported = isSupported; -WordCloud.minFontSize = minFontSize; -/* harmony default export */ __webpack_exports__["default"] = (WordCloud); -//# sourceMappingURL=wordcloud2.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/sparkline/progress/component/marker.js": -/*!******************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/sparkline/progress/component/marker.js ***! - \******************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - - -var Marker = /** @class */ (function () { - function Marker(cfg) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["assign"])(this, cfg); - this.init(); - } - Marker.prototype.destroy = function () { - if (this.shape) { - this.shape.destroy(); - } - }; - Marker.prototype.update = function (cfg, duration, easing) { - var updateCfg = {}; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["assign"])(this, cfg); - this.coord = this.view.geometries[0].coordinate; - if (cfg.value) { - var x = this.coord.convert({ x: 0, y: this.value }).x; - var matrix = [1, 0, 0, 0, 1, 0, x, 0, 1]; - updateCfg.matrix = matrix; - } - if (cfg.style) { - var shape = this.shape; - var origin_attr = shape.attrs; - var attrs = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, origin_attr, cfg.style); - updateCfg = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, attrs, updateCfg); - } - this.shape.stopAnimate(); - this.shape.animate(updateCfg, duration, easing); - }; - Marker.prototype.init = function () { - this.coord = this.view.geometries[0].coordinate; - this.container = this.view.foregroundGroup.addGroup(); - var x = this.coord.convert({ x: 0, y: this.value }).x; // progress坐标系是转置坐标系 - var y0 = this.coord.center.y - this.progressSize / 2 - 2; - var y1 = this.coord.center.y + this.progressSize / 2 + 2; - var style = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, { stroke: 'grey', lineWidth: 1 }, this.style); - this.shape = this.container.addShape('path', { - attrs: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ path: [ - ['M', 0, y0], - ['L', 0, y1], - ] }, style), - name: 'progress-marker', - }); - this.shape.move(x, 0); - this.canvas.draw(); - }; - return Marker; -}()); -/* harmony default export */ __webpack_exports__["default"] = (Marker); -//# sourceMappingURL=marker.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/sparkline/progress/event.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/sparkline/progress/event.js ***! - \*******************************************************************/ -/*! exports provided: EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["onEvent"]; }); - - - -var SHAPE_EVENT_MAP = { - onProgressClick: 'interval:click', - onProgressDblclick: 'interval:dblclick', - onProgressMousemove: 'interval:mousemove', - onProgressMousedown: 'interval:mousedown', - onProgressMouseup: 'interval:mouseup', - onProgressMouseenter: 'progress:mouseenter', - onProgressMouseleave: 'progress:mouseleave', - onProgressContextmenu: 'interval:contextmenu', -}; -Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(_util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"], SHAPE_EVENT_MAP); - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/sparkline/progress/index.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/sparkline/progress/index.js ***! - \*******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/sparkline/progress/layer.js"); - - - - -var Progress = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Progress, _super); - function Progress() { - return _super !== null && _super.apply(this, arguments) || this; - } - Progress.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'progress'; - _super.prototype.createLayers.call(this, layerProps); - }; - Progress.prototype.update = function (value, style) { - var layer = this.layers[0]; - layer.update(value, style); - }; - Progress.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return Progress; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Progress); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/sparkline/progress/layer.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/sparkline/progress/layer.js ***! - \*******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _geoms_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../geoms/factory */ "./node_modules/@antv/g2plot/esm/geoms/factory.js"); -/* harmony import */ var _tiny_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../tiny-layer */ "./node_modules/@antv/g2plot/esm/sparkline/tiny-layer.js"); -/* harmony import */ var _component_marker__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./component/marker */ "./node_modules/@antv/g2plot/esm/sparkline/progress/component/marker.js"); -/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event */ "./node_modules/@antv/g2plot/esm/sparkline/progress/event.js"); - - - - - - - -var G2_GEOM_MAP = { - progress: 'interval', -}; -var PLOT_GEOM_MAP = { - interval: 'progress', -}; -var DEFAULT_COLOR = ['#55A6F3', '#E8EDF3']; -var ProgressLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ProgressLayer, _super); - function ProgressLayer() { - /** - * 将进度条配置项转为堆叠条形图配置项 - */ - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'progress'; - _this.isEntered = false; - return _this; - } - ProgressLayer.prototype.processProps = function () { - var props = this.options; - props.data = this.processData(); - var cfg = { - padding: [0, 0, 0, 0], - xField: 'value', - yField: '1', - stackField: 'type', - barSize: props.size ? props.size : this.getSize(), - barStyle: props.progressStyle, - color: this.parseColorProps(props) || DEFAULT_COLOR, - }; - props = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mix"])(props, cfg); - }; - ProgressLayer.prototype.init = function () { - this.processProps(); - _super.prototype.init.call(this); - }; - ProgressLayer.prototype.beforeInit = function () { - var percent = this.options.percent; - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(percent)) { - throw new Error('Percent value is required, and the type of percent must be Number.'); - } - }; - ProgressLayer.prototype.update = function (cfg) { - var props = this.options; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["hasKey"])(cfg, 'percent')) { - props.percent = cfg.percent; - this.changeData(this.processData()); - } - if (cfg.style) { - this.styleUpdateAnimation(cfg.style); - this.updateColorConfigByStyle(cfg.style); - } - if (cfg.color) { - var style = void 0; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(cfg.color)) { - this.options.color = cfg.color; - style = [{ fill: cfg.color[0] }, { fill: cfg.color[1] }]; - } - else { - this.options.color[0] = cfg.color; - style = { fill: cfg.color }; - } - this.styleUpdateAnimation(style); - } - if (cfg.marker) { - this.updateMarkers(cfg.marker); - this.options.marker = cfg.marker; - } - }; - ProgressLayer.prototype.destroy = function () { - if (this.markers && this.markers.length > 0) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(this.markers, function (marker) { - marker.destroy(); - }); - this.markers = []; - } - _super.prototype.destroy.call(this); - }; - ProgressLayer.prototype.afterRender = function () { - var _this = this; - if (this.options.marker && !this.markers) { - this.markers = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(this.options.marker, function (cfg) { - var markerCfg = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mix"])({ - canvas: _this.canvas, - view: _this.view, - progressSize: _this.options.barSize, - }, cfg); - var marker = new _component_marker__WEBPACK_IMPORTED_MODULE_5__["default"](markerCfg); - _this.markers.push(marker); - }); - } - var progressContainer = this.view.geometries[0].container; - var bbox = progressContainer.getBBox(); - var rect = progressContainer.addShape('rect', { - attrs: { - width: bbox.width, - height: bbox.height, - x: bbox.minX, - y: bbox.minY, - fill: 'rgba(0,0,0,0)', - }, - }); - this.canvas.draw(); - rect.on('mouseenter', function (ev) { - _this.isEntered = true; - _this.view.emit('progress:mouseenter', ev); - }); - rect.on('mouseleave', function (ev) { - _this.isEntered = false; - _this.view.emit('progress:mouseleave', ev); - }); - var canvasDom = this.canvas.get('container'); - canvasDom.addEventListener('mouseleave', function (ev) { - if (_this.isEntered) { - _this.view.emit('progress:mouseleave', ev); - _this.isEntered = false; - } - }); - }; - ProgressLayer.prototype.geometryParser = function (dim, type) { - if (dim === 'g2') { - return G2_GEOM_MAP[type]; - } - return PLOT_GEOM_MAP[type]; - }; - ProgressLayer.prototype.coord = function () { - this.setConfig('coordinate', { - actions: [['transpose']], - }); - }; - ProgressLayer.prototype.addGeometry = function () { - var props = this.options; - var bar = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_3__["getGeom"])('interval', 'main', { - positionFields: [props.yField, props.xField], - plot: this, - }); - bar.adjust = [ - { - type: 'stack', - }, - ]; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["has"])(props, 'animation')) { - bar.animate = props.animation; - } - this.setConfig('geometry', bar); - }; - ProgressLayer.prototype.parseEvents = function (eventParser) { - _super.prototype.parseEvents.call(this, _event__WEBPACK_IMPORTED_MODULE_6__); - }; - ProgressLayer.prototype.parseColorProps = function (props) { - var colorOption; - if (props.color) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(props.color)) { - colorOption = props.color(props.percent); - } - else { - colorOption = props.color; - } - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isString"])(colorOption)) { - var color = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(DEFAULT_COLOR); - color[0] = colorOption; - return color; - } - else { - return colorOption; - } - } - return props.color; - }; - ProgressLayer.prototype.processData = function () { - var props = this.options; - var data = [ - { type: 'current', value: props.percent }, - { type: 'rest', value: 1.0 - props.percent }, - ]; - return data; - }; - ProgressLayer.prototype.updateMarkers = function (markerCfg) { - var markerLength = markerCfg.length; - var animationOptions = this.getUpdateAnimationOptions(); - // marker diff - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(this.markers, function (marker, index) { - if (index > markerLength - 1) { - marker.destroy(); - } - else { - marker.update(markerCfg[index], animationOptions.duration, animationOptions.easing); - } - }); - // add new markers - if (this.markers.length < markerLength) { - var startIndex = this.markers.length; - for (var i = startIndex; i < markerLength; i++) { - var cfg = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, { - canvas: this.canvas, - view: this.view, - progressSize: this.options.barSize, - }, markerCfg[i]); - var marker = new _component_marker__WEBPACK_IMPORTED_MODULE_5__["default"](cfg); - this.markers.push(marker); - } - } - }; - ProgressLayer.prototype.getSize = function () { - var height = this.height; - if (height >= 50) { - return 10; - } - return 4; - }; - ProgressLayer.prototype.styleUpdateAnimation = function (style) { - // style更新动画接受用户animation配置的透传 - var _a = this.getUpdateAnimationOptions(), duration = _a.duration, easing = _a.easing; - // get geometry shapes - var progressShapes = []; - var view = this.view; - var geometry = view.geometries; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(geometry, function (geom) { - if (geom.type === 'interval') { - var elements = geom.elements; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(elements, function (ele) { - progressShapes.push.apply(progressShapes, ele.shape); - }); - } - }); - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(style)) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(style, function (s, index) { - progressShapes[index].animate(s, duration, easing); - }); - } - else { - progressShapes[0].animate(style, duration, easing); - } - }; - ProgressLayer.prototype.getUpdateAnimationOptions = function () { - var duration = 450; - var easing = 'easeQuadInOut'; - var animationOptions = this.options.animation; - if (animationOptions && animationOptions.update) { - if (animationOptions.update.duration) { - duration = animationOptions.update.duration; - } - if (animationOptions.update.easing) { - easing = animationOptions.update.easing; - } - } - return { duration: duration, easing: easing }; - }; - ProgressLayer.prototype.updateColorConfigByStyle = function (style) { - var _this = this; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(style)) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(style, function (s, index) { - if (s.fill) { - _this.options.color[index] = s.fill; - } - }); - } - else if (style.fill) { - this.options.color[0] = style.fill; - } - }; - return ProgressLayer; -}(_tiny_layer__WEBPACK_IMPORTED_MODULE_4__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (ProgressLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('progress', ProgressLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/sparkline/ring-progress/event.js": -/*!************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/sparkline/ring-progress/event.js ***! - \************************************************************************/ -/*! exports provided: EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["onEvent"]; }); - - - -var SHAPE_EVENT_MAP = { - onRingProgressClick: 'interval:click', - onRingProgressDblclick: 'interval:dblclick', - onRingProgressMousemove: 'interval:mousemove', - onRingProgressMousedown: 'interval:mousedown', - onRingProgressMouseup: 'interval:mouseup', - onRingProgressMouseenter: 'interval:mouseenter', - onRingProgressMouseleave: 'interval:mouseleave', - onRingProgressContextmenu: 'interval:contextmenu', -}; -Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(_util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"], SHAPE_EVENT_MAP); - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/sparkline/ring-progress/index.js": -/*!************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/sparkline/ring-progress/index.js ***! - \************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/sparkline/ring-progress/layer.js"); - - - - -var RingProgress = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(RingProgress, _super); - function RingProgress() { - return _super !== null && _super.apply(this, arguments) || this; - } - RingProgress.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'ringProgress'; - _super.prototype.createLayers.call(this, layerProps); - }; - RingProgress.prototype.update = function (value) { - var layer = this.layers[0]; - layer.update(value); - }; - RingProgress.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return RingProgress; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (RingProgress); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/sparkline/ring-progress/layer.js": -/*!************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/sparkline/ring-progress/layer.js ***! - \************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _geoms_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../geoms/factory */ "./node_modules/@antv/g2plot/esm/geoms/factory.js"); -/* harmony import */ var _progress_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../progress/layer */ "./node_modules/@antv/g2plot/esm/sparkline/progress/layer.js"); -/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./event */ "./node_modules/@antv/g2plot/esm/sparkline/ring-progress/event.js"); - - - - - - -var DEFAULT_COLOR = ['#55A6F3', '#E8EDF3']; -var RingProgressLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(RingProgressLayer, _super); - function RingProgressLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'ringProgrsss'; - return _this; - } - RingProgressLayer.prototype.processProps = function () { - var props = this.options; - props.data = this.processData(); - var cfg = { - padding: [0, 0, 0, 0], - xField: 'value', - yField: '1', - stackField: 'type', - barStyle: props.progressStyle, - color: this.parseColorProps(props) || DEFAULT_COLOR, - }; - props = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mix"])(props, cfg); - }; - RingProgressLayer.prototype.coord = function () { - var coordConfig = { - type: 'theta', - cfg: { - radius: 1.0, - innerRadius: this.getThickness(this.options.size), - }, - }; - this.setConfig('coordinate', coordConfig); - }; - RingProgressLayer.prototype.annotation = function () { }; - RingProgressLayer.prototype.addGeometry = function () { - var props = this.options; - this.ring = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_3__["getGeom"])('interval', 'main', { - positionFields: [props.yField, props.xField], - plot: this, - }); - this.ring.adjust = [ - { - type: 'stack', - }, - ]; - this.setConfig('geometry', this.ring); - }; - RingProgressLayer.prototype.animation = function () { - this.ring.animate = { - appear: { - duration: 1000, - }, - }; - }; - RingProgressLayer.prototype.parseEvents = function (eventParser) { - _super.prototype.parseEvents.call(this, _event__WEBPACK_IMPORTED_MODULE_5__); - }; - RingProgressLayer.prototype.getThickness = function (value) { - var width = this.width; - var height = this.height; - var size = Math.min(width, height); - if (value) { - return 1.0 - value / size; - } - if (size >= 60) { - return 1.0 - 20 / size; - } - return 1.0 - 10 / size; - }; - return RingProgressLayer; -}(_progress_layer__WEBPACK_IMPORTED_MODULE_4__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (RingProgressLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('ringProgress', RingProgressLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/sparkline/tiny-area/event.js": -/*!********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/sparkline/tiny-area/event.js ***! - \********************************************************************/ -/*! exports provided: EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["onEvent"]; }); - - - -var SHAPE_EVENT_MAP = { - onAreaClick: 'area:click', - onAreaDblclick: 'area:dblclick', - onAreaMousemove: 'area:mousemove', - onAreaMousedown: 'area:mousedown', - onAreaMouseup: 'area:mouseup', - onAreaMouseenter: 'area:mouseenter', - onAreaMouseleave: 'area:mouseleave', - onAreaContextmenu: 'area:contextmenu', - onLineClick: 'line:click', - onLineDblclick: 'line:dblclick', - onLineMousemove: 'line:mousemove', - onLineMousedown: 'line:mousedown', - onLineMouseup: 'line:mouseup', - onLineMouseenter: 'line:mouseenter', - onLineMouseleave: 'line:mouseleave', - onLineContextmenu: 'line:contextmenu', -}; -Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(_util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"], SHAPE_EVENT_MAP); - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/sparkline/tiny-area/index.js": -/*!********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/sparkline/tiny-area/index.js ***! - \********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/sparkline/tiny-area/layer.js"); - - - - -var TinyArea = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TinyArea, _super); - function TinyArea() { - return _super !== null && _super.apply(this, arguments) || this; - } - TinyArea.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'tinyArea'; - _super.prototype.createLayers.call(this, layerProps); - }; - TinyArea.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return TinyArea; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (TinyArea); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/sparkline/tiny-area/layer.js": -/*!********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/sparkline/tiny-area/layer.js ***! - \********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _geoms_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../geoms/factory */ "./node_modules/@antv/g2plot/esm/geoms/factory.js"); -/* harmony import */ var _tiny_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../tiny-layer */ "./node_modules/@antv/g2plot/esm/sparkline/tiny-layer.js"); -/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./event */ "./node_modules/@antv/g2plot/esm/sparkline/tiny-area/event.js"); - - - - - -var GEOM_MAP = { - area: 'area', - line: 'line', -}; -var TinyAreaLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TinyAreaLayer, _super); - function TinyAreaLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'tinyArea'; - return _this; - } - TinyAreaLayer.prototype.geometryParser = function (dim, type) { - return GEOM_MAP[type]; - }; - TinyAreaLayer.prototype.addGeometry = function () { - this.area = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_2__["getGeom"])('area', 'mini', { - plot: this, - }); - this.setConfig('geometry', this.area); - this.line = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_2__["getGeom"])('line', 'mini', { - plot: this, - }); - this.setConfig('geometry', this.line); - }; - TinyAreaLayer.prototype.parseEvents = function (eventParser) { - _super.prototype.parseEvents.call(this, _event__WEBPACK_IMPORTED_MODULE_4__); - }; - return TinyAreaLayer; -}(_tiny_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (TinyAreaLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_1__["registerPlotType"])('tinyArea', TinyAreaLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/sparkline/tiny-column/event.js": -/*!**********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/sparkline/tiny-column/event.js ***! - \**********************************************************************/ -/*! exports provided: EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["onEvent"]; }); - - - -var SHAPE_EVENT_MAP = { - onColumnClick: 'interval:click', - onColumnDblclick: 'interval:dblclick', - onColumnMousemove: 'interval:mousemove', - onColumnMousedown: 'interval:mousedown', - onColumnMouseup: 'interval:mouseup', - onColumnMouseenter: 'interval:mouseenter', - onColumnMouseleave: 'interval:mouseleave', - onColumnContextmenu: 'interval:contextmenu', -}; -Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(_util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"], SHAPE_EVENT_MAP); - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/sparkline/tiny-column/index.js": -/*!**********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/sparkline/tiny-column/index.js ***! - \**********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/sparkline/tiny-column/layer.js"); - - - - -var TinyColumn = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TinyColumn, _super); - function TinyColumn() { - return _super !== null && _super.apply(this, arguments) || this; - } - TinyColumn.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'tinyColumn'; - _super.prototype.createLayers.call(this, layerProps); - }; - TinyColumn.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return TinyColumn; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (TinyColumn); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/sparkline/tiny-column/layer.js": -/*!**********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/sparkline/tiny-column/layer.js ***! - \**********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _geoms_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../geoms/factory */ "./node_modules/@antv/g2plot/esm/geoms/factory.js"); -/* harmony import */ var _tiny_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../tiny-layer */ "./node_modules/@antv/g2plot/esm/sparkline/tiny-layer.js"); -/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./event */ "./node_modules/@antv/g2plot/esm/sparkline/tiny-column/event.js"); - - - - - - -var WIDTH_RATIO = 0.6; -var G2_GEOM_MAP = { - column: 'interval', -}; -var PLOT_GEOM_MAP = { - interval: 'column', -}; -var TinyColumnLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TinyColumnLayer, _super); - function TinyColumnLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'tinyColumn'; - return _this; - } - TinyColumnLayer.prototype.init = function () { - this.processProps(); - _super.prototype.init.call(this); - }; - TinyColumnLayer.prototype.geometryParser = function (dim, type) { - if (dim === 'g2') { - return G2_GEOM_MAP[type]; - } - return PLOT_GEOM_MAP[type]; - }; - TinyColumnLayer.prototype.scale = function () { - var options = this.options; - var scales = {}; - /** 配置x-scale */ - scales[options.xField] = { type: 'cat' }; - this.setConfig('scales', scales); - }; - TinyColumnLayer.prototype.addGeometry = function () { - var props = this.options; - var column = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_3__["getGeom"])('interval', 'main', { - positionFields: [props.xField, props.yField], - plot: this, - }); - this.setConfig('geometry', column); - }; - TinyColumnLayer.prototype.parseEvents = function (eventParser) { - _super.prototype.parseEvents.call(this, _event__WEBPACK_IMPORTED_MODULE_5__); - }; - TinyColumnLayer.prototype.processProps = function () { - var props = this.options; - var cfg = { - padding: [0, 0, 0, 0], - columnSize: this.getSize(), - }; - props = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mix"])(props, cfg); - }; - TinyColumnLayer.prototype.getSize = function () { - var props = this.options; - var columnNumber = this.getColumnNum(props.data, props.xField); - var width = this.width; - return (width / columnNumber) * WIDTH_RATIO; - }; - TinyColumnLayer.prototype.getColumnNum = function (data, field) { - var values = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(data, function (d) { - var v = d[field]; - if (values.indexOf(v) < 0) { - values.push(v); - } - }); - return values.length; - }; - return TinyColumnLayer; -}(_tiny_layer__WEBPACK_IMPORTED_MODULE_4__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (TinyColumnLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_2__["registerPlotType"])('tinyColumn', TinyColumnLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/sparkline/tiny-layer.js": -/*!***************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/sparkline/tiny-layer.js ***! - \***************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_view_layer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/view-layer */ "./node_modules/@antv/g2plot/esm/base/view-layer.js"); -/* harmony import */ var _components_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components/factory */ "./node_modules/@antv/g2plot/esm/components/factory.js"); -/* harmony import */ var _geoms_line_mini__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geoms/line/mini */ "./node_modules/@antv/g2plot/esm/geoms/line/mini.js"); - - - - - -var TinyLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TinyLayer, _super); - function TinyLayer() { - return _super !== null && _super.apply(this, arguments) || this; - } - TinyLayer.getDefaultOptions = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, _super.getDefaultOptions.call(this), { - title: { - visible: false, - }, - description: { - visible: false, - }, - padding: [0, 0, 0, 0], - legend: { - visible: false, - }, - xAxis: { - visible: false, - }, - yAxis: { - visible: false, - }, - tooltip: { - visible: false, - }, - }); - }; - TinyLayer.prototype.coord = function () { }; - TinyLayer.prototype.addGeometry = function () { }; - TinyLayer.prototype.annotation = function () { - var _this = this; - var props = this.options; - var config = []; - var defaultGuidelineCfg = { - line: { - style: { - lineWidth: 1, - stroke: '#66d6a8', - }, - }, - }; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(props.guideLine, function (line) { - var guideLine = Object(_components_factory__WEBPACK_IMPORTED_MODULE_3__["getComponent"])('guideLine', { - plot: _this, - cfg: Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, defaultGuidelineCfg, line), - }); - config.push(guideLine); - }); - this.setConfig('annotations', config); - }; - return TinyLayer; -}(_base_view_layer__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (TinyLayer); -//# sourceMappingURL=tiny-layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/sparkline/tiny-line/event.js": -/*!********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/sparkline/tiny-line/event.js ***! - \********************************************************************/ -/*! exports provided: EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/event */ "./node_modules/@antv/g2plot/esm/util/event.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return _util_event__WEBPACK_IMPORTED_MODULE_1__["onEvent"]; }); - - - -var SHAPE_EVENT_MAP = { - onLineClick: 'line:click', - onLineDblclick: 'line:dblclick', - onLineMousemove: 'line:mousemove', - onLineMousedown: 'line:mousedown', - onLineMouseup: 'line:mouseup', - onLineMouseenter: 'line:mouseenter', - onLineMouseleave: 'line:mouseleave', - onLineContextmenu: 'line:contextmenu', -}; -Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(_util_event__WEBPACK_IMPORTED_MODULE_1__["EVENT_MAP"], SHAPE_EVENT_MAP); - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/sparkline/tiny-line/index.js": -/*!********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/sparkline/tiny-line/index.js ***! - \********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base_plot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/plot */ "./node_modules/@antv/g2plot/esm/base/plot.js"); -/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layer */ "./node_modules/@antv/g2plot/esm/sparkline/tiny-line/layer.js"); - - - - -var TinyLine = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TinyLine, _super); - function TinyLine() { - return _super !== null && _super.apply(this, arguments) || this; - } - TinyLine.prototype.createLayers = function (props) { - var layerProps = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["deepMix"])({}, props); - layerProps.type = 'tinyLine'; - _super.prototype.createLayers.call(this, layerProps); - }; - TinyLine.getDefaultOptions = _layer__WEBPACK_IMPORTED_MODULE_3__["default"].getDefaultOptions; - return TinyLine; -}(_base_plot__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (TinyLine); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/sparkline/tiny-line/layer.js": -/*!********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/sparkline/tiny-line/layer.js ***! - \********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _base_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../base/global */ "./node_modules/@antv/g2plot/esm/base/global.js"); -/* harmony import */ var _geoms_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../geoms/factory */ "./node_modules/@antv/g2plot/esm/geoms/factory.js"); -/* harmony import */ var _tiny_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../tiny-layer */ "./node_modules/@antv/g2plot/esm/sparkline/tiny-layer.js"); -/* harmony import */ var _event__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./event */ "./node_modules/@antv/g2plot/esm/sparkline/tiny-line/event.js"); - - - - - -var GEOM_MAP = { - line: 'line', -}; -var TinyLineLayer = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TinyLineLayer, _super); - function TinyLineLayer() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'tinyLine'; - return _this; - } - TinyLineLayer.prototype.geometryParser = function (dim, type) { - return GEOM_MAP[type]; - }; - TinyLineLayer.prototype.addGeometry = function () { - this.line = Object(_geoms_factory__WEBPACK_IMPORTED_MODULE_2__["getGeom"])('line', 'mini', { - plot: this, - }); - this.setConfig('geometry', this.line); - }; - TinyLineLayer.prototype.parseEvents = function (eventParser) { - _super.prototype.parseEvents.call(this, _event__WEBPACK_IMPORTED_MODULE_4__); - }; - return TinyLineLayer; -}(_tiny_layer__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (TinyLineLayer); -Object(_base_global__WEBPACK_IMPORTED_MODULE_1__["registerPlotType"])('tinyLine', TinyLineLayer); -//# sourceMappingURL=layer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/theme/dark.js": -/*!*****************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/theme/dark.js ***! - \*****************************************************/ -/*! exports provided: DEFAULT_DARK_THEME */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_DARK_THEME", function() { return DEFAULT_DARK_THEME; }); -/* harmony import */ var _default__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./default */ "./node_modules/@antv/g2plot/esm/theme/default.js"); - -var DEFAULT_DARK_THEME = { - backgroundStyle: { - fill: '#262626', - }, - defaultColor: '#5B8FF9', - width: 400, - height: 400, - bleeding: [_default__WEBPACK_IMPORTED_MODULE_0__["TOP_BLEEDING"], 24, _default__WEBPACK_IMPORTED_MODULE_0__["BOTTOM_BLEEDING"], 24], - padding: 'auto', - title: { - padding: [24, 24, 24, 24], - fontFamily: 'PingFang SC', - fontSize: 18, - fontWeight: 'bold', - fill: 'rgba(255,255,255,0.65)', - stroke: 'rgba(0,0,0,0.95)', - textAlign: 'left', - textBaseline: 'top', - lineHeight: 20, - alignWithAxis: false, - }, - description: { - padding: [10, 24, _default__WEBPACK_IMPORTED_MODULE_0__["DESCRIPTION_BOTTOM_MARGIN"], 24], - fontFamily: 'PingFang SC', - fontSize: 12, - fill: 'rgba(255, 255, 255, 0.65)', - stroke: 'rgba(0,0,0,0.95)', - textAlign: 'left', - textBaseline: 'top', - lineHeight: 16, - alignWithAxis: false, - }, - axis: { - y: { - visible: true, - position: 'left', - autoRotateTitle: true, - grid: { - visible: true, - line: { - style: { - stroke: 'rgba(255, 255, 255, 0.15)', - lineWidth: 1, - lineDash: null, - }, - }, - }, - line: { - visible: false, - style: { - stroke: 'rgba(255, 255, 255, 0.45)', - lineWidth: 1, - }, - }, - tickLine: { - visible: false, - style: { - stroke: 'rgba(255, 255, 255, 0.45)', - lineWidth: 0.5, - length: 4, - }, - }, - label: { - visible: true, - offset: 8, - autoRotate: false, - autoHide: true, - textStyle: { - fill: 'rgba(255, 255, 255, 0.45)', - fontSize: 12, - }, - }, - title: { - visible: false, - offset: 12, - style: { - fill: 'rgba(255, 255, 255, 0.65)', - fontSize: 12, - textBaseline: 'bottom', - }, - }, - }, - x: { - visible: true, - position: 'bottom', - autoRotateTitle: false, - grid: { - visible: false, - line: { - style: { - stroke: 'rgba(255, 255, 255, 0.15)', - lineWidth: 1, - lineDash: null, - }, - }, - }, - line: { - visible: false, - style: { - stroke: 'rgba(255, 255, 255, 0.45)', - }, - }, - tickLine: { - visible: true, - style: { - length: 4, - stroke: 'rgba(255, 255, 255, 0.45)', - lineWidth: 0.5, - }, - }, - label: { - visible: true, - textStyle: { - fill: 'rgba(255, 255, 255, 0.65)', - fontSize: 12, - }, - offset: 16, - autoHide: true, - autoRotate: true, - }, - title: { - visible: false, - offset: 12, - style: { - fill: 'rgba(255, 255, 255, 0.65)', - fontSize: 12, - }, - }, - }, - circle: { - autoRotateTitle: true, - // gridType: 'line', - grid: { - style: { - lineDash: null, - lineWidth: 1, - stroke: '#E3E8EC', - }, - }, - line: { - style: { - lineWidth: 1, - stroke: '#BFBFBF', - }, - }, - tickLine: { - style: { - lineWidth: 1, - stroke: '#bdc8d3', - length: 4, - alignWithLabel: true, - }, - }, - label: { - offset: 16, - textStyle: { - fill: '#a0a4aa', - fontSize: 12, - }, - autoRotate: true, - autoHide: true, - }, - title: { - offset: 12, - style: { fill: '#767b84', fontSize: 12 }, - }, - }, - radius: { - label: { - offset: 12, - textStyle: { - fill: '#a0a4aa', - fontSize: 12, - }, - }, - }, - }, - legend: { - flipPage: false, - position: 'bottom', - // 距离panelRange的距离 - innerPadding: [16, 16, 16, 16], - }, - label: { - offset: 12, - textStyle: { - fill: 'rgba(255, 255, 255, 0.65)', - }, - style: { - fill: 'rgba(255, 255, 255, 0.65)', - lineWidth: 1, - }, - }, - components: { - tooltip: { - domStyles: { - 'g2-tooltip': { - backgroundColor: 'rgba(33,33,33, 0.95)', - boxShadow: '0px 0px 8px rgba(0,0,0,0.65)', - color: 'rgba(255, 255, 255, 0.65)', - }, - }, - }, - }, -}; -//# sourceMappingURL=dark.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/theme/default.js": -/*!********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/theme/default.js ***! - \********************************************************/ -/*! exports provided: COLOR_PLATE_10, COLOR_PLATE_20, DESCRIPTION_BOTTOM_MARGIN, TOP_BLEEDING, BOTTOM_BLEEDING, DEFAULT_GLOBAL_THEME */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "COLOR_PLATE_10", function() { return COLOR_PLATE_10; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "COLOR_PLATE_20", function() { return COLOR_PLATE_20; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DESCRIPTION_BOTTOM_MARGIN", function() { return DESCRIPTION_BOTTOM_MARGIN; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TOP_BLEEDING", function() { return TOP_BLEEDING; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BOTTOM_BLEEDING", function() { return BOTTOM_BLEEDING; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_GLOBAL_THEME", function() { return DEFAULT_GLOBAL_THEME; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -var COLOR = '#5B8FF9'; -var COLOR_PLATE_10 = [ - '#5B8FF9', - '#5AD8A6', - '#5D7092', - '#F6BD16', - '#E8684A', - '#6DC8EC', - '#9270CA', - '#FF9D4D', - '#269A99', - '#FF99C3', -]; -var COLOR_PLATE_20 = [ - '#5B8FF9', - '#BDD2FD', - '#5AD8A6', - '#BDEFDB', - '#5D7092', - '#C2C8D5', - '#F6BD16', - '#FBE5A2', - '#E8684A', - '#F6C3B7', - '#6DC8EC', - '#B6E3F5', - '#9270CA', - '#D3C6EA', - '#FF9D4D', - '#FFD8B8', - '#269A99', - '#AAD8D8', - '#FF99C3', - '#FFD6E7', -]; - -var DESCRIPTION_BOTTOM_MARGIN = function (legendPosition) { - if (legendPosition && legendPosition.split('-')[0] === 'top') { - return 12; - } - return 24; -}; -var TOP_BLEEDING = function (props) { - var titleVisible = props.title && props.title.visible; - var descriptionVisible = props.description && props.description.visible; - if (titleVisible || descriptionVisible) { - // 由 title/description 的 bottom-padding 负责 - return 12; - } - return 24; -}; -var BOTTOM_BLEEDING = function (props) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["some"])(props.interactions || [], function (interaction) { - return (interaction.type === 'slider' || interaction.type === 'scrollbar') && - (interaction.cfg && interaction.cfg.type) !== 'vertical'; - })) { - return 8; - } - return 24; -}; -var DEFAULT_GLOBAL_THEME = { - width: 400, - height: 400, - bleeding: [TOP_BLEEDING, 24, BOTTOM_BLEEDING, 24], - padding: 'auto', - defaultColor: COLOR, - colors: COLOR_PLATE_10, - colors_20: COLOR_PLATE_20, - title: { - padding: [24, 24, 24, 24], - fontFamily: 'PingFang SC', - fontSize: 18, - fill: 'black', - textAlign: 'left', - textBaseline: 'top', - lineHeight: 20, - alignWithAxis: false, - }, - description: { - padding: [10, 24, DESCRIPTION_BOTTOM_MARGIN, 24], - fontFamily: 'PingFang SC', - fontSize: 12, - fill: 'grey', - textAlign: 'left', - textBaseline: 'top', - lineHeight: 16, - alignWithAxis: false, - }, - axis: { - y: { - visible: true, - position: 'left', - autoRotateTitle: true, - grid: { - visible: true, - line: { - style: { - stroke: 'rgba(0, 0, 0, 0.15)', - lineWidth: 1, - lineDash: [0, 0], - }, - }, - }, - line: { - visible: false, - style: { - stroke: 'rgba(0, 0, 0, 0.45)', - lineWidth: 1, - }, - }, - tickLine: { - visible: false, - style: { - stroke: 'rgba(0,0,0,0.45)', - lineWidth: 0.5, - length: 4, - }, - }, - label: { - visible: true, - offset: 8, - textStyle: { - fill: 'rgba(0,0,0,0.45)', - fontSize: 12, - }, - autoRotate: false, - autoHide: true, - }, - title: { - visible: false, - offset: 12, - style: { - fill: 'rgba(0, 0, 0, 0.65)', - fontSize: 12, - textBaseline: 'bottom', - }, - }, - }, - x: { - visible: true, - position: 'bottom', - autoRotateTitle: false, - grid: { - visible: false, - line: { - style: { - stroke: 'rgba(0, 0, 0, 0.15)', - lineWidth: 1, - lineDash: [0, 0], - }, - }, - }, - line: { - visible: false, - style: { - stroke: 'rgba(0, 0, 0, 0.45)', - lineWidth: 1, - }, - }, - tickLine: { - visible: true, - style: { - length: 4, - stroke: 'rgba(0, 0, 0, 0.45)', - lineWidth: 0.5, - }, - }, - label: { - visible: true, - textStyle: { - fill: 'rgba(0,0,0,0.45)', - fontSize: 12, - }, - offset: 16, - autoRotate: true, - autoHide: true, - }, - title: { - visible: false, - offset: 12, - style: { fill: 'rgba(0, 0, 0, 0.65)', fontSize: 12 }, - }, - }, - circle: { - autoHideLabel: false, - // gridType: 'line', - grid: { - line: { - style: { - lineDash: null, - lineWidth: 1, - stroke: 'rgba(0, 0, 0, 0.15)', - }, - }, - }, - line: { - style: { - lineWidth: 1, - stroke: 'rgba(0, 0, 0, 0.45)', - }, - }, - tickLine: { - style: { - lineWidth: 1, - stroke: 'rgba(0, 0, 0, 0.45)', - length: 4, - alignWithLabel: true, - }, - }, - label: { - offset: 16, - textStyle: { - fill: 'rgba(0,0,0,0.45)', - fontSize: 12, - }, - autoRotate: true, - autoHide: true, - }, - title: { - offset: 12, - style: { fill: 'rgba(0, 0, 0, 0.65)', fontSize: 12 }, - }, - }, - radius: { - label: { - textStyle: { - fill: 'rgba(0,0,0,0.45)', - fontSize: 12, - }, - }, - }, - }, - legend: { - flipPage: false, - position: 'bottom', - // 距离panelRange的距离 - innerPadding: [16, 16, 16, 16], - margin: [0, 24, 24, 24], - }, - label: { - offset: 12, - textStyle: { - fill: '#595959', - }, - style: { - fill: '#595959', - stroke: '#ffffff', - lineWidth: 2, - }, - }, - tooltip: { - 'g2-tooltip': { - boxShadow: '0px 0px 8px rgba(0,0,0,0.15)', - }, - offset: 10, - }, -}; -//# sourceMappingURL=default.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/theme/global.js": -/*!*******************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/theme/global.js ***! - \*******************************************************/ -/*! exports provided: registerGlobalTheme, getGlobalTheme */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerGlobalTheme", function() { return registerGlobalTheme; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getGlobalTheme", function() { return getGlobalTheme; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _default__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./default */ "./node_modules/@antv/g2plot/esm/theme/default.js"); -/* harmony import */ var _dark__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dark */ "./node_modules/@antv/g2plot/esm/theme/dark.js"); - - - -/** 所有的全局主题 */ -var GLOBAL_THEME_MAP = { - default: _default__WEBPACK_IMPORTED_MODULE_1__["DEFAULT_GLOBAL_THEME"], - dark: _dark__WEBPACK_IMPORTED_MODULE_2__["DEFAULT_DARK_THEME"], -}; -/** - * 注册全局主题 - * @param name - * @param theme - */ -function registerGlobalTheme(name, theme) { - var defaultTheme = getGlobalTheme(); - GLOBAL_THEME_MAP[name.toLowerCase()] = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])({}, defaultTheme, theme); -} -/** - * 获取默认主题 - * @param name 如果 name 为空,则返回默认的主题,否则返回指定 name 的主题 - */ -function getGlobalTheme(name) { - if (name === void 0) { name = 'default'; } - var theme = GLOBAL_THEME_MAP[name.toLowerCase()]; - if (theme) { - return theme; - } - // 如没有找到,则使用当前全局主题替代 - console.warn("error in theme: Can't find the theme named %s. Please register theme first.", name); - return _default__WEBPACK_IMPORTED_MODULE_1__["DEFAULT_GLOBAL_THEME"]; -} -//# sourceMappingURL=global.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/theme/index.js": -/*!******************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/theme/index.js ***! - \******************************************************/ -/*! exports provided: getGlobalTheme, registerGlobalTheme, getTheme, registerTheme, convertToG2Theme */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./global */ "./node_modules/@antv/g2plot/esm/theme/global.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getGlobalTheme", function() { return _global__WEBPACK_IMPORTED_MODULE_0__["getGlobalTheme"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "registerGlobalTheme", function() { return _global__WEBPACK_IMPORTED_MODULE_0__["registerGlobalTheme"]; }); - -/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./theme */ "./node_modules/@antv/g2plot/esm/theme/theme.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getTheme", function() { return _theme__WEBPACK_IMPORTED_MODULE_1__["getTheme"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "registerTheme", function() { return _theme__WEBPACK_IMPORTED_MODULE_1__["registerTheme"]; }); - -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./node_modules/@antv/g2plot/esm/theme/utils.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "convertToG2Theme", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["convertToG2Theme"]; }); - -// // defaultTheme 必须首先注册 -// import defaultTheme from './default'; -// -// import Theme from './theme'; -// -// export { Theme as default, defaultTheme }; -// 全局主题的方法 - -// 图表主题的方法 - -// 工具函数 - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/theme/theme.js": -/*!******************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/theme/theme.js ***! - \******************************************************/ -/*! exports provided: registerTheme, getTheme */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerTheme", function() { return registerTheme; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTheme", function() { return getTheme; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -/** - * 所有的 plot theme object,每个图类型只会存在一个 theme - */ -var PLOT_THEME_MAP = {}; -/** - * 将 主题 转换为 G2 主题配置 - * @param type plotType - */ -function convertThemeToG2Theme(type, theme) { - var styleMapShape = { - lineStyle: 'line.line', - columnStyle: 'interval.rect', - pointStyle: 'point.circle', - }; - var g2Theme = {}; - if (type === 'area') { - styleMapShape = { - areaStyle: 'area.area', - lineStyle: 'area.line', - pointStyle: 'point.circle', - }; - } - var geometryTheme = {}; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(theme, function (style, styleKey) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["has"])(styleMapShape, styleKey)) { - var shapePath_1 = styleMapShape[styleKey]; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(style, function (v, k) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["set"])(geometryTheme, shapePath_1 + "." + [k === 'normal' ? 'default' : k] + ".style", v); - }); - } - else { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["set"])(g2Theme, styleKey, style); - } - }); - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(geometryTheme)) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["set"])(g2Theme, 'geometries', geometryTheme); - } - return g2Theme; -} -/** - * 注册新的图表主题 - * @param type - * @param theme - */ -function registerTheme(type, theme) { - PLOT_THEME_MAP[type.toLowerCase()] = convertThemeToG2Theme(type, theme); -} -/** - * 根据类型获取主题 - * @param type plotType, such as line, column, bar, pie, bullet, radar and so on - */ -function getTheme(type) { - return PLOT_THEME_MAP[type.toLowerCase()] || {}; -} -//# sourceMappingURL=theme.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/theme/utils.js": -/*!******************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/theme/utils.js ***! - \******************************************************/ -/*! exports provided: convertToG2Theme */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertToG2Theme", function() { return convertToG2Theme; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -/** - * mutable 的方式修改 axis 配置 - * @param axis - */ -// function convertToG2Axis(axis: any): void { -// if (axis.line && axis.line.style) { -// const lineStyle = axis.line.style; -// delete axis.line.style; -// mix(axis.line, lineStyle); -// } -// if (axis.tickLine) { -// const tickLineStyle = axis.tickLine.style; -// delete axis.tickLine.style; -// mix(axis.tickLine, tickLineStyle); -// } -// if (axis.grid) { -// const gridStyle = axis.grid.style; -// delete axis.grid.style; -// mix(axis.grid, gridStyle); -// } -// if (axis.label) { -// if (axis.label.style) { -// axis.label.textStyle = axis.label.style; -// delete axis.label.style; -// } -// } -// if (axis.title) { -// if (axis.title.style) { -// axis.title.textStyle = axis.title.style; -// delete axis.title.style; -// } -// } -// } -/** - * 将图形主题转换成 g2 theme 格式 - * @param plotTheme - */ -function convertToG2Theme(plotTheme) { - var g2Theme = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(plotTheme); - /** tempo: legend margin设置为0 */ - if (!g2Theme.legend) { - g2Theme.legend = {}; - } - return g2Theme; -} -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/bbox.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/bbox.js ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var BBox = /** @class */ (function () { - function BBox(x, y, width, height) { - if (x === void 0) { x = 0; } - if (y === void 0) { y = 0; } - if (width === void 0) { width = 0; } - if (height === void 0) { height = 0; } - // range - this.height = height; - this.width = width; - this.x = x; - this.y = y; - } - BBox.fromBBoxObject = function (bbox) { - return new BBox(bbox.x, bbox.y, bbox.width, bbox.height); - }; - BBox.fromRange = function (minX, minY, maxX, maxY) { - return new BBox(minX, minY, maxX - minX, maxY - minY); - }; - BBox.prototype.equals = function (bbox) { - return this.x === bbox.x && this.y === bbox.y && this.width === bbox.width && this.height === bbox.height; - }; - Object.defineProperty(BBox.prototype, "minX", { - get: function () { - return this.x; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(BBox.prototype, "maxX", { - get: function () { - return this.x + this.width; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(BBox.prototype, "minY", { - get: function () { - return this.y; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(BBox.prototype, "maxY", { - get: function () { - return this.y + this.height; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(BBox.prototype, "tl", { - get: function () { - return { x: this.x, y: this.y }; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(BBox.prototype, "tr", { - get: function () { - return { x: this.maxX, y: this.y }; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(BBox.prototype, "bl", { - get: function () { - return { x: this.x, y: this.maxY }; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(BBox.prototype, "br", { - get: function () { - return { x: this.maxX, y: this.maxY }; - }, - enumerable: true, - configurable: true - }); - return BBox; -}()); -/* harmony default export */ __webpack_exports__["default"] = (BBox); -//# sourceMappingURL=bbox.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/color.js": -/*!*****************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/color.js ***! - \*****************************************************/ -/*! exports provided: rgb2arr, toHex, arr2rgb, mappingColor */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgb2arr", function() { return rgb2arr; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toHex", function() { return toHex; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arr2rgb", function() { return arr2rgb; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mappingColor", function() { return mappingColor; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -function rgb2arr(str) { - var arr = []; - arr.push(parseInt(str.substr(1, 2), 16)); - arr.push(parseInt(str.substr(3, 2), 16)); - arr.push(parseInt(str.substr(5, 2), 16)); - return arr; -} -function toHex(value) { - var v; - v = Math.round(value); - v = v.toString(16); - if (v.length === 1) { - v = "0" + value; - } - return v; -} -function arr2rgb(arr) { - return "#" + (toHex(arr[0]) + toHex(arr[1]) + toHex(arr[2])); -} -function mappingColor(band, gray) { - var reflect; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(band, function (b) { - var map = b; - if (gray >= map.from && gray < map.to) { - reflect = map.color; - } - }); - return reflect; -} -//# sourceMappingURL=color.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/common.js": -/*!******************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/common.js ***! - \******************************************************/ -/*! exports provided: isTextUsable, breakText, getAxisShapes, getLegendShapes, sortedLastIndex */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isTextUsable", function() { return isTextUsable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "breakText", function() { return breakText; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAxisShapes", function() { return getAxisShapes; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLegendShapes", function() { return getLegendShapes; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortedLastIndex", function() { return sortedLastIndex; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); - -/** - * 判断text是否可用, title description - * - * @param source - */ -function isTextUsable(source) { - if (!source) - return false; - if (source.visible === true && typeof source.text === 'string' && source.text.trim()) - return true; - return false; -} -/** - * 为字符串添加换行符 - * @param source - 字符串数组 ['a', 'b', 'c'] - * @param breaks - 要添加换行的index - * - * @example - * ```js - * breakText(['a','b','c'], [1]) - * - * // a\nbc - * ``` - */ -function breakText(source, breaks) { - var result = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArrays"])(source); - breaks.forEach(function (pos, index) { - result.splice(pos + index, 0, '\n'); - }); - return result.join(''); -} -function getAxisShapes(view) { - var axisShape = view.backgroundGroup.findAll(function (el) { - if (el.get('name')) { - var name_1 = el.get('name').split('-'); - return name_1[0] === 'axis'; - } - }); - return axisShape; -} -function getLegendShapes(view) { - var axisShape = view.foregroundGroup.findAll(function (el) { - if (el.get('name')) { - return el.get('name') === 'legend-item-group'; - } - }); - return axisShape; -} -function sortedLastIndex(arr, val) { - var i = arr.length; - while (i > 0) { - if (val >= arr[i - 1]) { - break; - } - i -= 1; - } - return i; -} -//# sourceMappingURL=common.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/data.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/data.js ***! - \****************************************************/ -/*! exports provided: transformDataPercentage */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformDataPercentage", function() { return transformDataPercentage; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - - -var transformDataPercentage = function (data, groupField, measures) { - // 按照groupBy字段计算各个group的总和 - var chain = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["groupBy"])(data, groupField); - chain = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mapValues"])(chain, function (items) { return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["map"])(items, function (item) { return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["map"])(measures, function (field) { return item[field]; }); }); }); - chain = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mapValues"])(chain, _antv_util__WEBPACK_IMPORTED_MODULE_1__["flatten"]); - chain = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mapValues"])(chain, function (vals) { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["map"])(vals, function (val) { - // @ts-ignore - var v = Number.parseFloat(val); - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(v) || isNaN(v)) { - return 0; - } - return v; - }); - }); - // @ts-ignore - var groupTotals = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["mapValues"])(chain, function (vals) { return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["reduce"])(vals, function (sum, val) { return sum + val; }, 0); }); - // 覆盖measures字段的值为对于的百分比 - var newData = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["map"])(data, function (item) { - var rst = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, item), { _origin: item, total: groupTotals[item[groupField]] }); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(measures, function (field) { - // @ts-ignore - rst[field] = item[field] / groupTotals[item[groupField]]; - }); - return rst; - }); - // 检查精度,确保总和为1 - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["groupBy"])(newData, groupField), function (items) { - var sum = 0; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(items, function (item, itemIdx) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(measures, function (field, fieldIdx) { - // @ts-ignore - if (sum + item[field] >= 1 || (itemIdx === items.length - 1 && fieldIdx === measures.length - 1)) { - item[field] = 1 - sum; - } - // @ts-ignore - sum += item[field]; - }); - }); - }); - // @ts-ignore - return newData; -}; -//# sourceMappingURL=data.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/date.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/date.js ***! - \****************************************************/ -/*! exports provided: DAY_MS, getDateRange, getYearRange, isLastWeekOfMonth, isLastDayOfMonth, getWeek, getDay, advanceBy */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DAY_MS", function() { return DAY_MS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDateRange", function() { return getDateRange; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getYearRange", function() { return getYearRange; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isLastWeekOfMonth", function() { return isLastWeekOfMonth; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isLastDayOfMonth", function() { return isLastDayOfMonth; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getWeek", function() { return getWeek; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDay", function() { return getDay; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "advanceBy", function() { return advanceBy; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var fecha__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! fecha */ "./node_modules/fecha/src/fecha.js"); -/* harmony import */ var _plots_calendar_constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../plots/calendar/constant */ "./node_modules/@antv/g2plot/esm/plots/calendar/constant.js"); - - - - -/** - * 一天多少 ms - */ -var DAY_MS = 86400000; -/** - * 获取最大最小日期范围 - * @param dates - */ -function getDateRange(dates) { - var ds = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArrays"])(dates).sort(function (a, b) { return a.getTime() - b.getTime(); }); - return [fecha__WEBPACK_IMPORTED_MODULE_2__["default"].format(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["head"])(ds), _plots_calendar_constant__WEBPACK_IMPORTED_MODULE_3__["FORMATTER"]), fecha__WEBPACK_IMPORTED_MODULE_2__["default"].format(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["last"])(ds), _plots_calendar_constant__WEBPACK_IMPORTED_MODULE_3__["FORMATTER"])]; -} -/** - * 日期对应年的范围 - * @param date - */ -function getYearRange(date) { - var curr = date ? date : new Date(); - return [ - fecha__WEBPACK_IMPORTED_MODULE_2__["default"].format(new Date(curr.getFullYear(), 0, 1), _plots_calendar_constant__WEBPACK_IMPORTED_MODULE_3__["FORMATTER"]), - fecha__WEBPACK_IMPORTED_MODULE_2__["default"].format(new Date(curr.getFullYear(), 11, 30), _plots_calendar_constant__WEBPACK_IMPORTED_MODULE_3__["FORMATTER"]), - ]; -} -/** - * 是否当前月的最后一周 - */ -function isLastWeekOfMonth(date) { - // 偏移 7 天之后,月份是否一样 - return date.getMonth() !== advanceBy(new Date(date), 7 * DAY_MS).getMonth(); -} -/** - * 是否是当月的最后一天 - */ -function isLastDayOfMonth(date) { - // 偏移 1 天之后,月份是否一样 - return date.getMonth() !== advanceBy(new Date(date), DAY_MS).getMonth(); -} -/** - * 获取 date 对应的周索引(国际标准:一年的第一个周四为第一周) - * @param date - */ -function getWeek(date) { - // 当年的第一天 - var oneJan = new Date(date.getFullYear(), 0, 1); - return Math.ceil(((date.getTime() - oneJan.getTime()) / DAY_MS + oneJan.getDay() + 1) / 7); -} -/** - * 获得一周的第几天(周日第 0 天) - * @param date - */ -function getDay(date) { - return date.getDay(); -} -/** - * 将 Date 前进 ms 时间 - * @param d - * @param ms - */ -function advanceBy(d, ms) { - d.setMilliseconds(d.getMilliseconds() + ms); - return d; -} -//# sourceMappingURL=date.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/event.js": -/*!*****************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/event.js ***! - \*****************************************************/ -/*! exports provided: getEventMap, EVENT_MAP, CANVAS_EVENT_MAP, LAYER_EVENT_MAP, onEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getEventMap", function() { return getEventMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EVENT_MAP", function() { return EVENT_MAP; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CANVAS_EVENT_MAP", function() { return CANVAS_EVENT_MAP; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LAYER_EVENT_MAP", function() { return LAYER_EVENT_MAP; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onEvent", function() { return onEvent; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -var EVENT_MAP = { - onViewClick: 'click', - onViewDblClick: 'dblclick', - onViewMousemove: 'mousemove', - onViewMousedown: 'mousedown', - onViewMouseup: 'mouseup', - onViewMouseenter: 'mouseenter', - onViewMouseleave: 'mouseleave', - onViewContextmenu: 'contextmenu', - onAxisClick: 'axis-label:click', - onAxisDblClick: 'axis-label:dblclick', - onAxisMousemove: 'axis-label:mousemove', - onAxisMousedown: 'axis-label:mousedown', - onAxisMouseup: 'axis-label:mouseup', - onAxisMouseenter: 'axis-label:mouseenter', - onAxisMouseleave: 'axis-label:mouseleave', - onAxisContextmenu: 'axis-label:contextmenu', - onLabelClick: 'label:click', - onLabelDblClick: 'label:dblclick', - onLabelMousemove: 'label:mousemove', - onLabelMouseup: 'label:mouseup', - onLabelMousedown: 'label:mousedown', - onLabelMouseenter: 'label:mouseenter', - onLabelMouseleave: 'label:mouseleave', - onLabelContextmenu: 'label:contextmenu', - onLegendClick: 'legend-item:click', - onLegendDblClick: 'legend-item:dblclick', - onLegendMouseMove: 'legend-item:mousemove', - onLegendMouseDown: 'legend-item:mousedown', - onLegendMouseUp: 'legend-item:mouseup', - onLegendMouseLeave: 'legend-item:mouseleave', - onLegendMouseEnter: 'legend-item:mouseenter', - onLegendContextmenu: 'legend-item:contextmenu', -}; -var CANVAS_EVENT_MAP = { - onPlotClick: 'click', - onPlotDblClick: 'dblclick', - onPlotMousemove: 'mousemove', - onPlotMousedown: 'mousedown', - onPlotMouseup: 'mouseup', - onPlotMouseenter: 'mouseenter', - onPlotMouseleave: 'mouseleave', - onPlotContextmenu: 'contextmenu', - onTitleClick: 'title:click', - onTitleDblClick: 'title:dblclick', - onTitleMousemove: 'title:mousemove', - onTitleMousedown: 'title:mousedown', - onTitleMouseup: 'title:mouseup', - onTitleMouseenter: 'title:mouseenter', - onTitleMouseleave: 'title:mouseleave', - onTitleContextmenu: 'title:contextmenu', - onDescriptionClick: 'description:click', - onDescriptionDblClick: 'description:dblclick', - onDescriptionMousemove: 'description:mousemove', - onDescriptionMousedown: 'description:mousedown', - onDescriptionMouseup: 'description:mouseup', - onDescriptionMouseenter: 'description:mouseenter', - onDescriptionMouseleave: 'description:mouseleave', - onDescriptionContextmenu: 'description:contextmenu', - onBreadcrumbClick: 'breadcrumb:click', - onBreadcrumbDblClick: 'breadcrumb:dblclick', - onBreadcrumbMousemove: 'breadcrumb:mousemove', - onBreadcrumbMousedown: 'breadcrumb:mousedown', - onBreadcrumbMouseup: 'breadcrumb:mouseup', - onBreadcrumbMouseenter: 'breadcrumb:mouseenter', - onBreadcrumbMouseleave: 'breadcrumb:mouseleave', - onBreadcrumbContextmenu: 'breadcrumb:contextmenu', -}; -var LAYER_EVENT_MAP = { - onLayerClick: 'click', - onLayerDblClick: 'dblclick', - onLayerMousemove: 'mousemove', - onLayerMousedown: 'mousedown', - onLayerMouseup: 'mouseup', - onLayerMouseenter: 'mouseenter', - onLayerMouseleave: 'mouseleave', - onLayerContextmenu: 'contextmenu', -}; -function onEvent(layer, eventName, handler) { - layer.view.on(eventName, handler); -} -var eventNames = [ - 'Click', - 'Dblclick', - 'Mousemove', - 'Mouseenter', - 'Mouseleave', - 'Mousedown', - 'Mouseup', - 'Contextmenu', -]; -function getEventMap(map) { - var eventMap = {}; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(map, function (item, key) { - var namePrefix = "on" + key; - var eventPrefix = item + ":"; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(eventNames, function (name) { - var eventKey = "" + namePrefix + name; - var eventName = name.toLowerCase(); - var event = "" + eventPrefix + eventName; - eventMap[eventKey] = event; - }); - }); - return eventMap; -} - -//# sourceMappingURL=event.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/formatter.js": -/*!*********************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/formatter.js ***! - \*********************************************************/ -/*! exports provided: combineFormatter, getNoopFormatter, getPrecisionFormatter, getSuffixFormatter */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineFormatter", function() { return combineFormatter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNoopFormatter", function() { return getNoopFormatter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPrecisionFormatter", function() { return getPrecisionFormatter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSuffixFormatter", function() { return getSuffixFormatter; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -var combineFormatter = function () { - var formatters = []; - for (var _i = 0; _i < arguments.length; _i++) { - formatters[_i] = arguments[_i]; - } - return function (text, item, idx) { - return formatters.reduce(function (curText, formatter) { return formatter(curText, item, idx); }, text); - }; -}; -var getNoopFormatter = function () { return function (text, item, idx) { return text; }; }; -var getPrecisionFormatter = function (precision) { return function (text, item, idx) { - var num = Number(text); - return isNaN(num) || Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(precision) ? text : num.toFixed(precision); -}; }; -var getSuffixFormatter = function (suffix) { return function (text, item, idx) { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(suffix) ? text : text + " " + suffix; -}; }; -//# sourceMappingURL=formatter.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/g-util.js": -/*!******************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/g-util.js ***! - \******************************************************/ -/*! exports provided: groupTransform, transform, move, translate, rotate */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groupTransform", function() { return groupTransform; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transform", function() { return transform; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "move", function() { return move; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "translate", function() { return translate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rotate", function() { return rotate; }); -/* harmony import */ var _antv_matrix_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/matrix-util */ "./node_modules/@antv/matrix-util/esm/index.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _dependents__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../dependents */ "./node_modules/@antv/g2plot/esm/dependents.js"); - - - -function groupTransform(group, actions) { - var ulMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1]; - var matrix = _antv_matrix_util__WEBPACK_IMPORTED_MODULE_0__["transform"](ulMatrix, actions); - group.setMatrix(matrix); -} -function transform(actions, matrix) { - var ulMatrix = matrix ? Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(matrix) : [1, 0, 0, 0, 1, 0, 0, 0, 1]; - return _antv_matrix_util__WEBPACK_IMPORTED_MODULE_0__["transform"](ulMatrix, actions); -} -function move(element, x, y, matrix) { - var ulMatrix = matrix ? Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(matrix) : [1, 0, 0, 0, 1, 0, 0, 0, 1]; - ulMatrix[6] = x; - ulMatrix[7] = y; - element.setMatrix(ulMatrix); -} -function translate(element, x, y) { - _dependents__WEBPACK_IMPORTED_MODULE_2__["Util"].translate(element, x, y); -} -function rotate(element, radian) { - _dependents__WEBPACK_IMPORTED_MODULE_2__["Util"].rotate(element, radian); -} -//# sourceMappingURL=g-util.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/math.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/math.js ***! - \****************************************************/ -/*! exports provided: applyMatrix, isBetween, getLineIntersect, isPointInPolygon, distBetweenPoints, distBetweenPointLine, isPolygonIntersection, minDistBetweenConvexPolygon, bboxOnRotate, dotProduct2D, crossProduct2D, crossProduct3D, sub2D, angleTo, lineSimplification, getMedian, getMean, sturges, dist2 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyMatrix", function() { return applyMatrix; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBetween", function() { return isBetween; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLineIntersect", function() { return getLineIntersect; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPointInPolygon", function() { return isPointInPolygon; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distBetweenPoints", function() { return distBetweenPoints; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distBetweenPointLine", function() { return distBetweenPointLine; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPolygonIntersection", function() { return isPolygonIntersection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "minDistBetweenConvexPolygon", function() { return minDistBetweenConvexPolygon; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bboxOnRotate", function() { return bboxOnRotate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dotProduct2D", function() { return dotProduct2D; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "crossProduct2D", function() { return crossProduct2D; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "crossProduct3D", function() { return crossProduct3D; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sub2D", function() { return sub2D; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "angleTo", function() { return angleTo; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineSimplification", function() { return lineSimplification; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMedian", function() { return getMedian; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMean", function() { return getMean; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sturges", function() { return sturges; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dist2", function() { return dist2; }); -/* harmony import */ var _antv_matrix_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/matrix-util */ "./node_modules/@antv/matrix-util/esm/index.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - - -function magnitude(v) { - var sum = 0; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(v, function (value) { - sum += value * value; - }); - return Math.sqrt(sum); -} -function dotProduct2D(va, vb) { - return va.x * vb.y + va.y * vb.x; -} -function angleTo(va, vb) { - var magA = magnitude(va); - var magB = magnitude(vb); - var dot = dotProduct2D(va, vb); - var angle = Math.acos(dot / magA / magB); - return angle; -} -function crossProduct2D(va, vb) { - var magA = magnitude(va); - var magB = magnitude(vb); - var dot = dotProduct2D(va, vb); - var angle = Math.acos(dot / magA / magB); - return magA * magB * Math.sin(angle); -} -function crossProduct3D(va, vb) { - var ax = va.x, ay = va.y, az = va.z; - var bx = vb.x, by = vb.y, bz = vb.z; - var x = ay * bz - az * by; - var y = az * bx - ax * bz; - var z = ax * by - ay * bx; - return { x: x, y: y, z: z }; -} -function sub2D(va, vb) { - return { x: va.x - vb.x, y: va.y - vb.y }; -} -function applyMatrix(point, matrix, tag) { - if (tag === void 0) { tag = 1; } - var vector = [point.x, point.y, tag]; - _antv_matrix_util__WEBPACK_IMPORTED_MODULE_0__["vec3"].transformMat3(vector, vector, matrix); - return { - x: vector[0], - y: vector[1], - }; -} -function isBetween(value, min, max) { - return value >= min && value <= max; -} -var tolerance = 0.001; -function getLineIntersect(p0, p1, p2, p3) { - var E = { - x: p2.x - p0.x, - y: p2.y - p0.y, - }; - var D0 = { - x: p1.x - p0.x, - y: p1.y - p0.y, - }; - var D1 = { - x: p3.x - p2.x, - y: p3.y - p2.y, - }; - var kross = D0.x * D1.y - D0.y * D1.x; - var sqrKross = kross * kross; - var sqrLen0 = D0.x * D0.x + D0.y * D0.y; - var sqrLen1 = D1.x * D1.x + D1.y * D1.y; - var point = null; - if (sqrKross > tolerance * sqrLen0 * sqrLen1) { - var s = (E.x * D1.y - E.y * D1.x) / kross; - var t = (E.x * D0.y - E.y * D0.x) / kross; - if (isBetween(s, 0, 1) && isBetween(t, 0, 1)) { - point = { - x: p0.x + s * D0.x, - y: p0.y + s * D0.y, - }; - } - } - return point; -} -function isPointInPolygon(p, polygon) { - /** 射线法 */ - var inside = false; - for (var i = 0, j = polygon.length - 1; i < polygon.length; j = i++) { - var xi = polygon[i].x; - var yi = polygon[i].y; - var xj = polygon[j].x; - var yj = polygon[j].y; - var intersect = yi > p.y !== yj > p.y && p.x <= ((xj - xi) * (p.y - yi)) / (yj - yi) + xi; - if (intersect) { - inside = !inside; - } - } - return inside; -} -function sqr(v) { - return v * v; -} -function dist2(a, b) { - return Math.sqrt(sqr(a.x - b.x) + sqr(a.y - b.y)); -} -function distBetweenPoints(a, b) { - return Math.sqrt(sqr(a.x - b.x) + sqr(a.y - b.y)); -} -function distBetweenPointLine(p, p1, p2) { - var l2 = dist2(p1, p2); - if (l2 === 0) { - return dist2(p, p1); - } - var t = ((p.x - p1.x) * (p2.x - p1.x) + (p.y - p1.y) * (p2.y - p1.y)) / l2; - t = Math.max(0, Math.min(1, t)); - var distSquare = dist2(p, { x: p1.x + t * (p2.x - p1.x), y: p1.y + t * (p2.y - p1.y) }); - return Math.sqrt(distSquare); -} -// todo:待优化 https://blog.csdn.net/WilliamSun0122/article/details/77994526 -function minDistBetweenPointPolygon(p, polygon) { - var min = Infinity; - /** vertice to vertice */ - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(polygon, function (v) { - var dist = Math.sqrt(dist2(v, p)); - if (min > dist) { - min = dist; - } - }); - /** vertice to edge */ - for (var i = 0, j = polygon.length - 1; i < polygon.length; j = i++) { - var xi = polygon[i].x; - var yi = polygon[i].y; - var xj = polygon[j].x; - var yj = polygon[j].y; - var dist = distBetweenPointLine(p, { x: xi, y: yi }, { x: xj, y: yj }); - if (min > dist) { - min = dist; - } - } - return min; -} -function isPolygonIntersection(polyA, polyB) { - for (var _i = 0, polyA_1 = polyA; _i < polyA_1.length; _i++) { - var p = polyA_1[_i]; - var inside = isPointInPolygon(p, polyB); - if (inside) { - return true; - } - } - return false; -} -function minDistBetweenConvexPolygon(polyA, polyB) { - if (isPolygonIntersection(polyA, polyB)) { - return 0; - } - var minA = Infinity; - var minB = Infinity; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(polyA, function (v) { - var localMin = minDistBetweenPointPolygon(v, polyB); - if (minA > localMin) { - minA = localMin; - } - }); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(polyB, function (v) { - var localMin = minDistBetweenPointPolygon(v, polyA); - if (minB > localMin) { - minB = localMin; - } - }); - return Math.min(minA, minB); -} -function bboxOnRotate(shape) { - var bbox = shape.getBBox(); - var x = bbox.minX; - var y = bbox.minY; - /* - * step1: 获得旋转后的shape包围盒 - * 将包围盒对齐到原点,apply旋转矩阵 - * 移回原来的位置 - */ - var bboxWidth = bbox.maxX - bbox.minX; - var bboxHeight = bbox.maxY - bbox.minY; - // const matrix = shape.getTotalMatrix(); - var matrix = shape.attr('matrix'); - var ulMatrix; - if (matrix) { - ulMatrix = [matrix[0], matrix[1], 0, matrix[3], matrix[4], 0, 0, 0, 1]; - } - else { - ulMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1]; - } - var top_left = applyMatrix({ x: 0, y: 0 }, ulMatrix); - top_left.x += x; - top_left.y += y; - var top_right = applyMatrix({ x: bboxWidth, y: 0 }, ulMatrix); - top_right.x += x; - top_right.y += y; - var bottom_left = applyMatrix({ x: 0, y: bboxHeight }, ulMatrix); - bottom_left.x += x; - bottom_left.y += y; - var bottom_right = applyMatrix({ x: bboxWidth, y: bboxHeight }, ulMatrix); - bottom_right.x += x; - bottom_right.y += y; - /** step2:根据旋转后的画布位置重新计算包围盒,以免图形进行旋转后上下颠倒 */ - var points = [top_left, top_right, bottom_left, bottom_right]; - points.sort(function (a, b) { - return a.y - b.y; - }); - var minY = points[0].y; - var maxY = points[points.length - 1].y; - var tops = [points[0], points[1]]; - var bottoms = [points[2], points[3]]; - var topLeft = tops[0].x < tops[1].x ? tops[0] : tops[1]; - var topRight = tops[0].x < tops[1].x ? tops[1] : tops[0]; - var bottomLeft = bottoms[0].x < bottoms[1].x ? bottoms[0] : bottoms[1]; - var bottomRight = bottoms[0].x < bottoms[1].x ? bottoms[1] : bottoms[0]; - points.sort(function (a, b) { - return a.x - b.x; - }); - var minX = points[0].x; - var maxX = points[points.length - 1].x; - var node = { - width: maxX - minX, - height: maxY - minY, - left: minX, - right: maxX, - top: minY, - bottom: maxY, - topLeft: topLeft, - topRight: topRight, - bottomLeft: bottomLeft, - bottomRight: bottomRight, - centerX: minX + (maxX - minX) / 2, - centerY: minY + (maxY - minY) / 2, - }; - return node; -} -/** - * 线简化算法 - */ -var THRESHOLD = 2; -function lineSimplification(points) { - if (points.length < 5) { - return points; - } - return DouglasPeucker(points, THRESHOLD); -} -// https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm -function DouglasPeucker(points, threshold) { - var result; - var max = -Infinity; - var index = 0; - var endIndex = points.length - 1; - for (var i = 1; i < endIndex; i++) { - var point = points[i]; - var line = { start: points[0], end: points[endIndex] }; - var dist = distBetweenPointLine(point, line.start, line.end); - if (dist > max) { - max = dist; - index = i; - } - } - if (max > threshold) { - var list1 = DouglasPeucker(points.slice(0, index + 1), threshold); - var list2 = DouglasPeucker(points.slice(index, points.length), threshold); - result = list1.concat(list2); - } - else { - result = [points[0], points[points.length - 1]]; - } - return result; -} -/** 统计的以后迁出去,暂时先放这里 */ -function getMedian(array) { - var list = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clone"])(array); - list.sort(function (a, b) { - return a - b; - }); - var half = Math.floor(list.length / 2); - if (list.length % 2) { - return list[half]; - } - return (list[half - 1] + list[half]) / 2.0; -} -function getMean(array) { - var sum = 0; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(array, function (num) { - sum += num; - }); - return sum / array.length; -} -function sturges(values) { - return Math.ceil(Math.log(values.length) / Math.LN2) + 1; -} - -//# sourceMappingURL=math.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/path.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/path.js ***! - \****************************************************/ -/*! exports provided: smoothBezier, catmullRom2bezier, getLinePath, getSplinePath, getPointRadius, getPointAngle, convertNormalPath, convertPolarPath */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "smoothBezier", function() { return smoothBezier; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "catmullRom2bezier", function() { return catmullRom2bezier; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLinePath", function() { return getLinePath; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSplinePath", function() { return getSplinePath; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPointRadius", function() { return getPointRadius; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPointAngle", function() { return getPointAngle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertNormalPath", function() { return convertNormalPath; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertPolarPath", function() { return convertPolarPath; }); -/* harmony import */ var _antv_matrix_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/matrix-util */ "./node_modules/@antv/matrix-util/esm/index.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/** - * @description path 计算、转换的辅助工具 - */ - - -var vector2 = _antv_matrix_util__WEBPACK_IMPORTED_MODULE_0__["vec2"]; -function _points2path(points, isInCircle) { - var path = []; - if (points.length) { - for (var i = 0, length_1 = points.length; i < length_1; i += 1) { - var item = points[i]; - var command = i === 0 ? 'M' : 'L'; - path.push([command, item.x, item.y]); - } - if (isInCircle) { - path.push(['Z']); - } - } - return path; -} -function _getPointRadius(coord, point) { - var center = coord.getCenter(); - var r = Math.sqrt(Math.pow(point.x - center.x, 2) + Math.pow(point.y - center.y, 2)); - return r; -} -function _convertArr(arr, coord) { - var tmp = [arr[0]]; - for (var i = 1, len = arr.length; i < len; i = i + 2) { - var point = coord.convertPoint({ - x: arr[i], - y: arr[i + 1], - }); - tmp.push(point.x, point.y); - } - return tmp; -} -function _convertPolarPath(pre, cur, coord) { - var isTransposed = coord.isTransposed, startAngle = coord.startAngle, endAngle = coord.endAngle; - var prePoint = { - x: pre[1], - y: pre[2], - }; - var curPoint = { - x: cur[1], - y: cur[2], - }; - var rst = []; - var xDim = isTransposed ? 'y' : 'x'; - var angleRange = Math.abs(curPoint[xDim] - prePoint[xDim]) * (endAngle - startAngle); - var direction = curPoint[xDim] >= prePoint[xDim] ? 1 : 0; // 圆弧的方向 - var flag = angleRange > Math.PI ? 1 : 0; // 大弧还是小弧标志位 - var convertPoint = coord.convertPoint(curPoint); - var r = _getPointRadius(coord, convertPoint); - if (r >= 0.5) { - // 小于1像素的圆在图像上无法识别 - if (angleRange === Math.PI * 2) { - var middlePoint = { - x: (curPoint.x + prePoint.x) / 2, - y: (curPoint.y + prePoint.y) / 2, - }; - var middleConvertPoint = coord.convertPoint(middlePoint); - rst.push(['A', r, r, 0, flag, direction, middleConvertPoint.x, middleConvertPoint.y]); - rst.push(['A', r, r, 0, flag, direction, convertPoint.x, convertPoint.y]); - } - else { - rst.push(['A', r, r, 0, flag, direction, convertPoint.x, convertPoint.y]); - } - } - return rst; -} -// 当存在整体的圆时,去除圆前面和后面的线,防止出现直线穿过整个圆的情形 -function _filterFullCirleLine(path) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(path, function (subPath, index) { - var cur = subPath; - if (cur[0].toLowerCase() === 'a') { - var pre = path[index - 1]; - var next = path[index + 1]; - if (next && next[0].toLowerCase() === 'a') { - if (pre && pre[0].toLowerCase() === 'l') { - pre[0] = 'M'; - } - } - else if (pre && pre[0].toLowerCase() === 'a') { - if (next && next[0].toLowerCase() === 'l') { - next[0] = 'M'; - } - } - } - }); -} -var smoothBezier = function (points, smooth, isLoop, constraint) { - var cps = []; - var prevPoint; - var nextPoint; - var hasConstraint = !!constraint; - var min; - var max; - if (hasConstraint) { - min = [Infinity, Infinity]; - max = [-Infinity, -Infinity]; - for (var i = 0, l = points.length; i < l; i++) { - var point = points[i]; - min = vector2.min([], min, point); - max = vector2.max([], max, point); - } - min = vector2.min([], min, constraint[0]); - max = vector2.max([], max, constraint[1]); - } - for (var i = 0, len = points.length; i < len; i++) { - var point = points[i]; - if (isLoop) { - prevPoint = points[i ? i - 1 : len - 1]; - nextPoint = points[(i + 1) % len]; - } - else { - if (i === 0 || i === len - 1) { - cps.push(point); - continue; - } - else { - prevPoint = points[i - 1]; - nextPoint = points[i + 1]; - } - } - var v = []; - v = vector2.sub(v, nextPoint, prevPoint); - v = vector2.scale(v, v, smooth); - var d0 = vector2.distance(point, prevPoint); - var d1 = vector2.distance(point, nextPoint); - var sum = d0 + d1; - if (sum !== 0) { - d0 /= sum; - d1 /= sum; - } - var v1 = vector2.scale([], v, -d0); - var v2 = vector2.scale([], v, d1); - var cp0 = vector2.add([], point, v1); - var cp1 = vector2.add([], point, v2); - if (hasConstraint) { - cp0 = vector2.max([], cp0, min); - cp0 = vector2.min([], cp0, max); - cp1 = vector2.max([], cp1, min); - cp1 = vector2.min([], cp1, max); - } - cps.push(cp0); - cps.push(cp1); - } - if (isLoop) { - cps.push(cps.shift()); - } - return cps; -}; -// 贝塞尔曲线 -function catmullRom2bezier(crp, z, constraint) { - var isLoop = !!z; - var pointList = []; - for (var i = 0, l = crp.length; i < l; i += 2) { - pointList.push([crp[i], crp[i + 1]]); - } - var controlPointList = smoothBezier(pointList, 0.4, isLoop, constraint); - var len = pointList.length; - var d1 = []; - var cp1; - var cp2; - var p; - for (var i = 0; i < len - 1; i++) { - cp1 = controlPointList[i * 2]; - cp2 = controlPointList[i * 2 + 1]; - p = pointList[i + 1]; - d1.push(['C', cp1[0], cp1[1], cp2[0], cp2[1], p[0], p[1]]); - } - if (isLoop) { - cp1 = controlPointList[len]; - cp2 = controlPointList[len + 1]; - p = pointList[0]; - d1.push(['C', cp1[0], cp1[1], cp2[0], cp2[1], p[0], p[1]]); - } - return d1; -} -// 将点连接成路径 path -function getLinePath(points, isInCircle) { - return _points2path(points, isInCircle); -} -// get spline: 限定了范围的平滑线 -function getSplinePath(points, isInCircle, constaint) { - var data = []; - var first = points[0]; - var prePoint = null; - if (points.length <= 2) { - // 两点以内直接绘制成路径 - return getLinePath(points, isInCircle); - } - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(points, function (point) { - if (!prePoint || !(prePoint.x === point.x && prePoint.y === point.y)) { - data.push(point.x); - data.push(point.y); - prePoint = point; - } - }); - var constraint = constaint || [ - // 范围 - [0, 0], - [1, 1], - ]; - var splinePath = catmullRom2bezier(data, isInCircle, constraint); - splinePath.unshift(['M', first.x, first.y]); - return splinePath; -} -// 获取点到圆心的距离 -function getPointRadius(coord, point) { - return _getPointRadius(coord, point); -} -// 获取点到圆心的夹角 -function getPointAngle(coord, point) { - var center = coord.getCenter(); - return Math.atan2(point.y - center.y, point.x - center.x); -} -function convertNormalPath(coord, path) { - var tmp = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(path, function (subPath) { - var action = subPath[0]; - switch (action.toLowerCase()) { - case 'm': - case 'l': - case 'c': - tmp.push(_convertArr(subPath, coord)); - break; - case 'z': - default: - tmp.push(subPath); - break; - } - }); - return tmp; -} -function convertPolarPath(coord, path) { - var tmp = []; - var pre; - var cur; - var transposed; - var equals; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(path, function (subPath, index) { - var action = subPath[0]; - switch (action.toLowerCase()) { - case 'm': - case 'c': - case 'q': - tmp.push(_convertArr(subPath, coord)); - break; - case 'l': - pre = path[index - 1]; - cur = subPath; - transposed = coord.isTransposed; - // 是否半径相同,转换成圆弧 - equals = transposed ? pre[pre.length - 2] === cur[1] : pre[pre.length - 1] === cur[2]; - if (equals) { - tmp = tmp.concat(_convertPolarPath(pre, cur, coord)); - } - else { - // y 不相等,所以直接转换 - tmp.push(_convertArr(subPath, coord)); - } - break; - case 'z': - default: - tmp.push(subPath); - break; - } - }); - _filterFullCirleLine(tmp); // 过滤多余的直线 - return tmp; -} -//# sourceMappingURL=path.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/apply/axis.js": -/*!*********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/apply/axis.js ***! - \*********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _node_shape_nodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../node/shape-nodes */ "./node_modules/@antv/g2plot/esm/util/responsive/node/shape-nodes.js"); -/* harmony import */ var _responsive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../responsive */ "./node_modules/@antv/g2plot/esm/util/responsive/responsive.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/g2plot/esm/util/responsive/apply/base.js"); - - - - - -var SCALE_MAPPER = { - cat: 'category', - timeCat: 'category', - time: 'dateTime', - linear: 'linear', -}; -var ApplyResponsiveAxis = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ApplyResponsiveAxis, _super); - function ApplyResponsiveAxis() { - return _super !== null && _super.apply(this, arguments) || this; - } - ApplyResponsiveAxis.prototype.init = function () { - this.axisInstance = this.getAxisInstance(); - _super.prototype.init.call(this); - }; - ApplyResponsiveAxis.prototype.shouldApply = function () { - var options = this.plot.options; - if (!this.responsiveTheme.axis) { - return false; - } - if (this.responsiveTheme.axis[this.dim] && - options[this.dim + "Axis"].visible && - options[this.dim + "Axis"].label && - options[this.dim + "Axis"].label.visible) { - return true; - } - return false; - }; - ApplyResponsiveAxis.prototype.apply = function () { - var _this = this; - var rawLabels = this.plot.view.backgroundGroup.findAll(function (el) { - var name = el.get('name'); - if (name === 'axis-label') { - var field = el.get('delegateObject').axis.get('field'); - if (field === _this.plot.options[_this.dim + "Field"]) { - return el; - } - } - }); - var shapes = []; - for (var i = 0; i < rawLabels.length; i++) { - shapes.push(rawLabels[i]); - } - var shapeNodes = new _node_shape_nodes__WEBPACK_IMPORTED_MODULE_2__["default"]({ - shapes: shapes, - }); - var _a = this.responsiveTheme.axis.x[this.type], constraints = _a.constraints, rules = _a.rules; - new _responsive__WEBPACK_IMPORTED_MODULE_3__["default"]({ - nodes: shapeNodes, - constraints: constraints, - region: this.plot.getViewRange(), - rules: rules, - plot: this.plot, - onEnd: function (nodes) { - _this.updateTicks(nodes.origion_nodes); - }, - }); - }; - ApplyResponsiveAxis.prototype.getType = function () { - var props = this.plot.options; - var axis = this.dim + "Axis"; - var field = this.dim + "Field"; - if (props[axis] && props[axis].type && props[axis].type === 'dateTime') { - return 'dateTime'; - } - var scaleType = this.plot.view.getScaleByField([props[field]]).type; - return SCALE_MAPPER[scaleType]; - }; - ApplyResponsiveAxis.prototype.getAxisInstance = function () { - var axisIndex = this.dim === 'x' ? 0 : 1; - var axis = this.plot.view.getController('axis').getComponents()[axisIndex].component; - return axis; - }; - ApplyResponsiveAxis.prototype.updateTicks = function (nodes) { - var _this = this; - var tickLineContainer = this.plot.view.backgroundGroup.findAll(function (el) { - var name = el.get('name'); - if (name === 'axis-tickline-group') { - var field = el.get('delegateObject').axis.get('field'); - if (field === _this.plot.options[_this.dim + "Field"]) { - return el; - } - } - })[0]; - if (tickLineContainer) { - var tickShapes_1 = tickLineContainer.get('children'); - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(nodes, function (n, index) { - if (n.shape.attr('text') === '') { - tickShapes_1[index].attr('opacity', 0); - } - }); - } - this.plot.canvas.draw(); - }; - return ApplyResponsiveAxis; -}(_base__WEBPACK_IMPORTED_MODULE_4__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (ApplyResponsiveAxis); -//# sourceMappingURL=axis.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/apply/base.js": -/*!*********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/apply/base.js ***! - \*********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -var ApplyResponsive = /** @class */ (function () { - function ApplyResponsive(cfg) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(this, cfg); - this.init(); - } - ApplyResponsive.prototype.init = function () { - this.type = this.getType(); - if (this.shouldApply()) { - this.apply(); - } - }; - return ApplyResponsive; -}()); -/* harmony default export */ __webpack_exports__["default"] = (ApplyResponsive); -//# sourceMappingURL=base.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/apply/label.js": -/*!**********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/apply/label.js ***! - \**********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _node_shape_nodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../node/shape-nodes */ "./node_modules/@antv/g2plot/esm/util/responsive/node/shape-nodes.js"); -/* harmony import */ var _responsive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../responsive */ "./node_modules/@antv/g2plot/esm/util/responsive/responsive.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/g2plot/esm/util/responsive/apply/base.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - - - - - -var ApplyResponsiveLabel = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ApplyResponsiveLabel, _super); - function ApplyResponsiveLabel() { - return _super !== null && _super.apply(this, arguments) || this; - } - ApplyResponsiveLabel.prototype.shouldApply = function () { - if (!this.responsiveTheme.label || !this.responsiveTheme.label[this.type]) { - return false; - } - return true; - }; - ApplyResponsiveLabel.prototype.apply = function () { - var labelShapesContainer = this.plot.view.geometries[0].labelsContainer.get('children'); - var labelShapes = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_4__["each"])(labelShapesContainer, function (c) { - labelShapes.push(c.get('children')[0]); - }); - var nodes = new _node_shape_nodes__WEBPACK_IMPORTED_MODULE_1__["default"]({ - shapes: labelShapes, - }); - var _a = this.responsiveTheme.label[this.type], constraints = _a.constraints, rules = _a.rules; - new _responsive__WEBPACK_IMPORTED_MODULE_2__["default"]({ - nodes: nodes, - constraints: constraints, - rules: rules, - plot: this.plot, - region: this.plot.view.coordinateBBox, - }); - }; - ApplyResponsiveLabel.prototype.getType = function () { - return null; - }; - return ApplyResponsiveLabel; -}(_base__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (ApplyResponsiveLabel); -//# sourceMappingURL=label.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/constraints/column-width.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/constraints/column-width.js ***! - \***********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -function columnWidth(node, region, cfg) { - if (cfg === void 0) { cfg = { ratio: 0.6 }; } - return region.width * cfg.ratio; -} -/* harmony default export */ __webpack_exports__["default"] = ({ - type: 'padding', - usage: 'assign', - expression: columnWidth, -}); -//# sourceMappingURL=column-width.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/constraints/element-collision.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/constraints/element-collision.js ***! - \****************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../math */ "./node_modules/@antv/g2plot/esm/util/math.js"); - -function elementCollision(a, b) { - var polygonA = [a.topLeft, a.topRight, a.bottomRight, a.bottomLeft]; // 顶点顺时针 - var polygonB = [b.topLeft, b.topRight, b.bottomRight, b.bottomLeft]; - var dist = _math__WEBPACK_IMPORTED_MODULE_0__["minDistBetweenConvexPolygon"](polygonA, polygonB); - return Math.round(dist) >= 2; -} -/* harmony default export */ __webpack_exports__["default"] = ({ - type: 'group', - usage: 'compare', - expression: elementCollision, -}); -//# sourceMappingURL=element-collision.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/constraints/element-dist-vertical.js": -/*!********************************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/constraints/element-dist-vertical.js ***! - \********************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -function elementDistVertical(a, b, cfg) { - if (cfg === void 0) { cfg = { value: 5 }; } - var dist = Math.abs(a.bottom - b.top); - return Math.round(dist) >= cfg.value; -} -/* harmony default export */ __webpack_exports__["default"] = ({ - type: 'chain', - usage: 'compare', - expression: elementDistVertical, -}); -//# sourceMappingURL=element-dist-vertical.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/constraints/element-dist.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/constraints/element-dist.js ***! - \***********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../math */ "./node_modules/@antv/g2plot/esm/util/math.js"); - -function elementDist(a, b, cfg) { - if (cfg === void 0) { cfg = { value: 4 }; } - var polygonA = [a.topLeft, a.topRight, a.bottomRight, a.bottomLeft]; // 顶点顺时针 - var polygonB = [b.topLeft, b.topRight, b.bottomRight, b.bottomLeft]; - var dist = _math__WEBPACK_IMPORTED_MODULE_0__["minDistBetweenConvexPolygon"](polygonA, polygonB); - return Math.round(dist) >= cfg.value; -} -/* harmony default export */ __webpack_exports__["default"] = ({ - type: 'chain', - usage: 'compare', - expression: elementDist, -}); -//# sourceMappingURL=element-dist.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/constraints/element-width.js": -/*!************************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/constraints/element-width.js ***! - \************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -function elementWidth(node, region, cfg) { - if (cfg === void 0) { cfg = { ratio: 0.15 }; } - return node.width < region.width * cfg.ratio; -} -/* harmony default export */ __webpack_exports__["default"] = ({ - type: 'padding', - usage: 'compare', - expression: elementWidth, -}); -//# sourceMappingURL=element-width.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/constraints/index.js": -/*!****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/constraints/index.js ***! - \****************************************************************************/ -/*! exports provided: constraintsLib, registerResponsiveConstraint */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "constraintsLib", function() { return constraintsLib; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerResponsiveConstraint", function() { return registerResponsiveConstraint; }); -/* harmony import */ var _column_width__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./column-width */ "./node_modules/@antv/g2plot/esm/util/responsive/constraints/column-width.js"); -/* harmony import */ var _element_collision__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./element-collision */ "./node_modules/@antv/g2plot/esm/util/responsive/constraints/element-collision.js"); -/* harmony import */ var _element_dist__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./element-dist */ "./node_modules/@antv/g2plot/esm/util/responsive/constraints/element-dist.js"); -/* harmony import */ var _element_dist_vertical__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./element-dist-vertical */ "./node_modules/@antv/g2plot/esm/util/responsive/constraints/element-dist-vertical.js"); -/* harmony import */ var _element_width__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./element-width */ "./node_modules/@antv/g2plot/esm/util/responsive/constraints/element-width.js"); -/* harmony import */ var _min_ring_thickness__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./min-ring-thickness */ "./node_modules/@antv/g2plot/esm/util/responsive/constraints/min-ring-thickness.js"); -/* harmony import */ var _ring_thickness__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ring-thickness */ "./node_modules/@antv/g2plot/esm/util/responsive/constraints/ring-thickness.js"); - - - - - - - -var constraintsLib = { - elementDist: _element_dist__WEBPACK_IMPORTED_MODULE_2__["default"], - elementDistVertical: _element_dist_vertical__WEBPACK_IMPORTED_MODULE_3__["default"], - elementCollision: _element_collision__WEBPACK_IMPORTED_MODULE_1__["default"], - elementWidth: _element_width__WEBPACK_IMPORTED_MODULE_4__["default"], - columnWidth: _column_width__WEBPACK_IMPORTED_MODULE_0__["default"], - ringThickness: _ring_thickness__WEBPACK_IMPORTED_MODULE_6__["default"], - minRingThickness: _min_ring_thickness__WEBPACK_IMPORTED_MODULE_5__["default"], -}; -function registerResponsiveConstraint(name, constraint) { - // todo: 防止覆盖 - constraintsLib[name] = constraint; -} -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/constraints/min-ring-thickness.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/constraints/min-ring-thickness.js ***! - \*****************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -function minRingThickness(node, region) { - var minThicknessPixel = 2; - var minThickness = region.coord.radius / minThicknessPixel; - return Math.min(minThickness, node.value); -} -/* harmony default export */ __webpack_exports__["default"] = ({ - type: 'padding', - usage: 'assign', - expression: minRingThickness, -}); -//# sourceMappingURL=min-ring-thickness.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/constraints/ring-thickness.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/constraints/ring-thickness.js ***! - \*************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -function ringThickness(node, region, cfg) { - if (cfg === void 0) { cfg = { ratio: 0.8 }; } - return region.radius * cfg.ratio; -} -/* harmony default export */ __webpack_exports__["default"] = ({ - type: 'padding', - usage: 'assign', - expression: ringThickness, -}); -//# sourceMappingURL=ring-thickness.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/default.js": -/*!******************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/default.js ***! - \******************************************************************/ -/*! exports provided: DEFAULT_RESPONSIVE_THEME */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_RESPONSIVE_THEME", function() { return DEFAULT_RESPONSIVE_THEME; }); -// 存储一些共用部分 -var DEFAULT_RESPONSIVE_THEME = { - axis: { - x: { - category: { - constraints: [{ name: 'elementDist' }], - rules: { - elementDist: [ - { - name: 'textWrapper', - option: { - lineNumber: 2, - }, - }, - { - name: 'textRotation', - option: { - degree: 45, - }, - }, - { - name: 'textRotation', - option: { - degree: 90, - }, - }, - { - name: 'textAbbreviate', - option: { - abbreviateBy: 'end', - }, - }, - { - name: 'textHide', - }, - ], - }, - }, - linear: { - constraints: [{ name: 'elementDist' }], - rules: { - elementDist: [ - { - name: 'nodesResampling', - option: { - keep: ['end'], - }, - }, - { - name: 'textRotation', - option: { - degree: 45, - }, - }, - { - name: 'textRotation', - option: { - degree: 90, - }, - }, - { - name: 'robustAbbrevaite', - option: { - unit: 'thousand', - decimal: 1, - abbreviateBy: 'end', - }, - }, - { - name: 'textHide', - }, - ], - }, - }, - dateTime: { - constraints: [{ name: 'elementDist' }], - rules: { - elementDist: [ - { - name: 'datetimeStringAbbrevaite', - }, - { - name: 'nodesResamplingByAbbrevate', - option: { - keep: ['end'], - }, - }, - { - name: 'textRotation', - option: { - degree: 45, - }, - }, - { - name: 'textRotation', - option: { - degree: 90, - }, - }, - { - name: 'nodesResampling', - }, - { - name: 'nodesResampling', - }, - { - name: 'textHide', - }, - ], - }, - }, - }, - y: { - linear: { - constraints: [{ name: 'elementDistVertical' }, { name: 'elementWidth' }], - rules: { - elementDistVertical: [{ name: 'nodesResampling' }, { name: 'textHide' }], - elementWidth: [{ name: 'digitsAbbreviate' }, { name: 'textHide' }], - }, - }, - category: { - constraints: [{ name: 'elementDistVertical' }, { name: 'elementWidth' }], - rules: { - elementDistVertical: [{ name: 'nodesResampling' }, { name: 'textHide' }], - elementWidth: [ - { - name: 'textAbbreviate', - option: { - abbreviateBy: 'end', - }, - }, - { name: 'textHide' }, - ], - }, - }, - }, - }, -}; -//# sourceMappingURL=default.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/node/shape-nodes.js": -/*!***************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/node/shape-nodes.js ***! - \***************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../math */ "./node_modules/@antv/g2plot/esm/util/math.js"); - - -var ShapeNodes = /** @class */ (function () { - function ShapeNodes(cfg) { - this.type = 'shape'; - this.shapes = cfg.shapes; - this.nodes = []; - this._parserNodes(); - this.origion_nodes = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])([], this.nodes); - } - ShapeNodes.prototype.measure = function (shape) { - var node = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])({}, _math__WEBPACK_IMPORTED_MODULE_1__["bboxOnRotate"](shape), { shape: shape }); - return node; - }; - ShapeNodes.prototype.measureNodes = function () { - var _this = this; - var nodes = []; - var shapes = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(this.shapes, function (shape, index) { - var node = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])({}, _this.nodes[index], _this.measure(shape)); - if (node.width !== 0 && node.height !== 0) { - nodes.push(node); - shapes.push(shape); - } - // this.nodes[index] = node; - }); - this.nodes = nodes; - this.shapes = shapes; - }; - ShapeNodes.prototype.updateShapes = function () { }; - ShapeNodes.prototype._parserNodes = function () { - var _this = this; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(this.shapes, function (shape) { - var node = _this.measure(shape); - _this.nodes.push(node); - }); - }; - return ShapeNodes; -}()); -/* harmony default export */ __webpack_exports__["default"] = (ShapeNodes); -//# sourceMappingURL=shape-nodes.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/node/variable-node.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/node/variable-node.js ***! - \*****************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -var VariableNodes = /** @class */ (function () { - function VariableNodes(cfg) { - this.type = 'variable'; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(this, cfg); - } - VariableNodes.prototype.normalize = function () { }; - return VariableNodes; -}()); -/* harmony default export */ __webpack_exports__["default"] = (VariableNodes); -//# sourceMappingURL=variable-node.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/responsive.js": -/*!*********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/responsive.js ***! - \*********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _constraints_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constraints/index */ "./node_modules/@antv/g2plot/esm/util/responsive/constraints/index.js"); -/* harmony import */ var _rules_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./rules/index */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/index.js"); - - - -var Responsive = /** @class */ (function () { - function Responsive(cfg) { - this.iterationTime = 10; - this.iterationIndex = 0; - this.rulesLocker = []; - this.constraintIndex = 0; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(this, cfg); - this.currentConstraint = this.constraints[0]; - if (this.rules) { - this.iterationTime = this.rules[this.currentConstraint.name].length; - } - this._start(); - this._run(); - this._end(); - } - Responsive.prototype._start = function () { - if (this.onStart) { - this.onStart(this.nodes); - } - }; - Responsive.prototype._iteration = function () { - var nodes; - if (this.nodes.type === 'shape') { - nodes = this.nodes; - } - else { - nodes = this.nodes; - } - if (nodes.type === 'shape') { - nodes.measureNodes(); - } - if (this.rules) { - this._applyRules(); - } - if (nodes.type === 'shape') { - nodes.measureNodes(); - } - if (this.onIteration) { - this.onIteration(this.nodes); - } - }; - Responsive.prototype._end = function () { - if (this.onEnd) { - this.onEnd(this.nodes); - } - }; - Responsive.prototype._run = function () { - var constraintPassed = this._constraintsTest(); - while (!constraintPassed) { - if (this.iterationIndex > this.iterationTime - 1) { - break; - } - this._iteration(); - constraintPassed = this._constraintsTest(); - this.iterationIndex++; - } - if (this.constraintIndex < this.constraints.length - 1) { - this.constraintIndex++; - this.currentConstraint = this.constraints[this.constraintIndex]; - this.iterationTime = this.rules ? this.rules[this.currentConstraint.name].length : 1; - this.iterationIndex = 0; - this._run(); - } - }; - Responsive.prototype._constraintsTest = function () { - var constraint = _constraints_index__WEBPACK_IMPORTED_MODULE_1__["constraintsLib"][this.currentConstraint.name]; - var constraintOption = this.currentConstraint.option; - if (constraint.usage === 'compare') { - return this._constraintCompare(constraint, constraintOption); - } - return this._constraintAssignment(constraint, constraintOption); - }; - Responsive.prototype._constraintCompare = function (constraint, option) { - var type = constraint.type, expression = constraint.expression; - var nodes = this.nodes.nodes; - if (type === 'chain') { - return this._chainConstraintCompare(expression, nodes, option); - } - if (type === 'padding') { - return this._paddingConstraintCompare(expression, this.region, nodes, option); - } - if (type === 'group') { - return this._groupConstraintCompare(expression, nodes, option); - } - }; - Responsive.prototype._chainConstraintCompare = function (expression, nodes, option) { - for (var i = 0; i < nodes.length - 1; i++) { - var a = nodes[i]; - var b = nodes[i + 1]; - if (expression(a, b, option) === false) { - return false; - } - } - return true; - }; - Responsive.prototype._paddingConstraintCompare = function (expression, region, nodes, option) { - if (region) { - for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) { - var node = nodes_1[_i]; - if (expression(node, region, option) === false) { - return false; - } - } - } - return true; - }; - Responsive.prototype._groupConstraintCompare = function (expression, nodes, option) { - for (var i = 0; i < nodes.length; i++) { - var a = nodes[i]; - for (var j = 0; j < nodes.length; j++) { - if (j !== i) { - var b = nodes[j]; - if (expression(a, b, option) === false) { - return false; - } - } - } - } - return true; - }; - Responsive.prototype._constraintAssignment = function (constraint, option) { - var type = constraint.type, expression = constraint.expression; - var nodes = this.nodes.nodes; - if (type === 'chain') { - return this._chainConstraintAssign(expression, nodes, option); - } - if (type === 'padding') { - return this._paddingConstraintAssign(expression, this.region, nodes, option); - } - }; - Responsive.prototype._chainConstraintAssign = function (expression, nodes, option) { - return true; - }; - Responsive.prototype._paddingConstraintAssign = function (expression, region, nodes, option) { - if (region) { - for (var _i = 0, nodes_2 = nodes; _i < nodes_2.length; _i++) { - var node = nodes_2[_i]; - var value = expression(node, region, option); - node.value = value; - } - } - return true; - }; - Responsive.prototype._applyRules = function () { - var ruleCfg = this.rules[this.currentConstraint.name][this.iterationIndex]; - // if (this.rulesLocker.indexOf(ruleCfg) < 0) { - var rule = _rules_index__WEBPACK_IMPORTED_MODULE_2__["rulesLib"][ruleCfg.name]; - var option = ruleCfg.option ? ruleCfg.option : {}; - var nodes = this.nodes.nodes; - for (var i = 0; i < nodes.length; i++) { - var node = nodes[i]; - /** apply rule上下文 */ - this._applyRule(node.shape, rule, option, i); - } - // this.rulesLocker.push(ruleCfg); - // } - }; - Responsive.prototype._applyRule = function (shape, rule, option, index) { - var cfg = { - nodes: this.nodes, - region: this.region, - plot: this.plot, - }; - // rule(shape, option, index, this); - rule(shape, option, index, cfg); - }; - return Responsive; -}()); -/* harmony default export */ __webpack_exports__["default"] = (Responsive); -//# sourceMappingURL=responsive.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/rules/clear-overlapping.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/rules/clear-overlapping.js ***! - \**********************************************************************************/ -/*! exports provided: default, isNodeOverlap */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return clearOverlapping; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNodeOverlap", function() { return isNodeOverlap; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _text_hide__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./text-hide */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/text-hide.js"); - - -function clearOverlapping(shape, option, index, cfg) { - var nodes = cfg.nodes.nodes; - var current = nodes[index]; - var overlapped = []; - /** 找到所有与当前点overlap的node */ - if (!current.shape.get('blank')) { - for (var i = 0; i < nodes.length; i++) { - var node = nodes[i]; - var _shape = node.shape; - if (i !== index && !_shape.get('blank')) { - var isOverlap = isNodeOverlap(current, node); - if (isOverlap) { - overlapped.push(node); - } - } - } - } - /** overlap处理逻辑 */ - if (overlapped.length > 0) { - overlapped.push(current); - overlapped.sort(function (a, b) { - return b.top - a.top; - }); - /** 隐藏除最高点以外的node */ - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(overlapped, function (node, idx) { - if (idx > 0) { - var _shape = node.shape; - Object(_text_hide__WEBPACK_IMPORTED_MODULE_1__["default"])(_shape); - _shape.set('blank', true); - } - }); - } -} -function isNodeOverlap(nodeA, nodeB) { - if (nodeA.bottom < nodeB.top || nodeB.bottom < nodeA.top) { - return false; - } - if (nodeA.right < nodeB.left || nodeB.right < nodeA.left) { - return false; - } - return true; -} -//# sourceMappingURL=clear-overlapping.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/rules/datetime-string-abbrevaite.js": -/*!*******************************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/rules/datetime-string-abbrevaite.js ***! - \*******************************************************************************************/ -/*! exports provided: default, isTime */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return datetimeStringAbbrevaite; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isTime", function() { return isTime; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var fecha__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fecha */ "./node_modules/fecha/src/fecha.js"); - - -var SECOND = 1000; -var MINUTE = 60 * SECOND; -var HOUR = 60 * MINUTE; -var DAY = 24 * HOUR; -var MONTH = 31 * DAY; -var YEAR = 365 * DAY; -function datetimeStringAbbrevaite(shape, option, index, cfg) { - var nodes = cfg.nodes.nodes; - var campareText; - if (index === nodes.length - 1) { - campareText = nodes[index - 1].shape.get('delegateObject').item.name; - } - else { - campareText = nodes[index + 1].shape.get('delegateObject').item.name; - } - var compare = new Date(campareText); - /** 获取时间周期和时间间隔 */ - var text = shape.get('delegateObject').item.name; - var current = new Date(text); - var startText = nodes[0].shape.get('delegateObject').item.name; - var start = new Date(startText); - var endText = nodes[nodes.length - 1].shape.get('delegateObject').item.name; - var end = new Date(endText); - var timeDuration = getDateTimeMode(start, end); - var timeCycle = getDateTimeMode(current, compare); // time frequency - // 如果duration和frequency在同一区间 - if (timeDuration === timeCycle) { - if (index !== 0 && index !== nodes.length - 1) { - var formatter = sameSectionFormatter(timeDuration); - shape.attr('text', fecha__WEBPACK_IMPORTED_MODULE_1__["default"].format(current, formatter)); - } - return; - } - if (index !== 0) { - var previousText = nodes[index - 1].shape.get('delegateObject').item.name; - var previous = new Date(previousText); - var isAbbreviate = needAbbrevaite(timeDuration, current, previous); - if (isAbbreviate) { - var formatter = getAbbrevaiteFormatter(timeDuration, timeCycle); - shape.attr('text', fecha__WEBPACK_IMPORTED_MODULE_1__["default"].format(current, formatter)); - return; - } - } -} -function needAbbrevaite(mode, current, previous) { - var currentStamp = getTime(current, mode); - var previousStamp = getTime(previous, mode); - if (currentStamp !== previousStamp) { - return false; - } - return true; -} -function getDateTimeMode(a, b) { - var mode; - var dist = Math.abs(a - b); - var mapper = { - minute: [MINUTE, HOUR], - hour: [HOUR, DAY], - day: [DAY, MONTH], - month: [MONTH, YEAR], - year: [YEAR, Infinity], - }; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(mapper, function (range, key) { - if (dist >= range[0] && dist < range[1]) { - mode = key; - } - }); - return mode; -} -function getAbbrevaiteFormatter(duration, cycle) { - var times = ['year', 'month', 'day', 'hour', 'minute']; - var formatters = ['YYYY', 'MM', 'DD', 'HH', 'MM']; - var startIndex = times.indexOf(duration) + 1; - var endIndex = times.indexOf(cycle); - var formatter = ''; - for (var i = startIndex; i <= endIndex; i++) { - formatter += formatters[i]; - if (i < endIndex) { - formatter += '-'; - } - } - return formatter; -} -function sameSectionFormatter(mode) { - var times = ['year', 'month', 'day', 'hour', 'minute']; - var formatters = ['YYYY', 'MM', 'DD', 'HH', 'MM']; - var index = times.indexOf(mode); - var formatter = formatters[index]; - return formatter; -} -function getTime(date, mode) { - if (mode === 'year') { - return date.getFullYear(); - } - if (mode === 'month') { - return date.getMonth() + 1; - } - if (mode === 'day') { - return date.getDay() + 1; - } - if (mode === 'hour') { - return date.getHours() + 1; - } - if (mode === 'minute') { - return date.getMinutes() + 1; - } -} -/*tslint:disable*/ -function isTime(string) { - var hourminExp = /^(?:(?:[0-2][0-3])|(?:[0-1][0-9])):[0-5][0-9]$/; - var hourminSecExp = /^(?:(?:[0-2][0-3])|(?:[0-1][0-9])):[0-5][0-9]:[0-5][0-9]$/; - return hourminExp.test(string) || hourminSecExp.test(string); -} -//# sourceMappingURL=datetime-string-abbrevaite.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/rules/digits-abbreviate.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/rules/digits-abbreviate.js ***! - \**********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return digitsAbbreviate; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../math */ "./node_modules/@antv/g2plot/esm/util/math.js"); - - -var unitMapper = { - k: { number: 1e3, index: 0 }, - m: { number: 1e6, index: 1 }, - b: { number: 1e9, index: 2 }, - t: { number: 1e12, index: 3 }, -}; -// https://gist.github.com/MartinMuzatko/1060fe584d17c7b9ca6e -// https://jburrows.wordpress.com/2014/11/18/abbreviating-numbers/ -/*tslint:disable*/ -function digitsAbbreviate(shape, option, index, cfg) { - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["has"])(cfg, 'node') || !Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["has"])(cfg.node, 'node')) { - return; - } - var nodes = cfg.nodes.nodes; - var number = parseFloat(shape.get('origin').text); - if (number === 0) { - return; - } - if (option.formatter) { - shape.attr('text', option.formatter(number)); - return; - } - if (option.unit) { - var _a = abbravateDigitsByUnit(option, number), num = _a.num, unitname = _a.unitname; - shape.attr('text', num + unitname); - } - else { - // 自动换算逻辑 - // 根据中位数得到换算单位 - var numbers = extractNumbers(nodes); - var median = Object(_math__WEBPACK_IMPORTED_MODULE_1__["getMedian"])(numbers); - var unitname = getUnitByNumber(median); - //根据数值的interval计算换算后保留的浮点数 - var unitNumber = unitMapper[unitname].number; - var interval = getLinearNodesInterval(nodes); - var decimal = getDigitsDecimal(interval, unitNumber); - var num = abbravateDigitsByUnit({ unit: unitname, decimal: decimal }, number).num; - shape.attr('text', num + unitname); - } -} -function abbravateDigitsByUnit(option, number) { - var units = ['k', 'm', 'b', 't']; - var num; - var unitname; - if (option.unit === 'auto') { - /** auto formatt k-m-b-t */ - var order = Math.floor(Math.log(number) / Math.log(1000)); - unitname = units[order - 1]; - num = (number / Math.pow(1000, order)).toFixed(option.decimal); - } - else if (option.unit) { - var unit = unitMapper[option.unit]; - unitname = option.unit; - num = (number / unit.number).toFixed(option.decimal); - } - return { num: num, unitname: unitname }; -} -function getUnitByNumber(number) { - var units = ['k', 'm', 'b', 't']; - var order = Math.floor(Math.log(number) / Math.log(1000)); - return units[order - 1]; -} -function extractNumbers(nodes) { - var numbers = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(nodes, function (node) { - var n = node; - var number = parseFloat(n.shape.get('origin').text); - numbers.push(number); - }); - return numbers; -} -function getLinearNodesInterval(nodes) { - if (nodes.length >= 2) { - var a = parseFloat(nodes[0].shape.get('origin').text); - var b = parseFloat(nodes[1].shape.get('origin').text); - return Math.abs(a - b); - } - return 0; -} -function getDigitsDecimal(interval, unitNumber) { - var unitBit = Math.floor(Math.log10(unitNumber)); - if (interval >= unitNumber) { - var remainder = interval % unitNumber; - if (remainder > 0) { - var remainderBit = Math.floor(Math.log10(remainder)); - return Math.abs(remainderBit - unitBit); - } - } - else { - var intervalBit = Math.floor(Math.log10(interval)); - return Math.abs(intervalBit - unitBit); - } - return 0; -} -//# sourceMappingURL=digits-abbreviate.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/rules/index.js": -/*!**********************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/rules/index.js ***! - \**********************************************************************/ -/*! exports provided: rulesLib, registerResponsiveRule */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rulesLib", function() { return rulesLib; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerResponsiveRule", function() { return registerResponsiveRule; }); -/* harmony import */ var _clear_overlapping__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./clear-overlapping */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/clear-overlapping.js"); -/* harmony import */ var _datetime_string_abbrevaite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./datetime-string-abbrevaite */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/datetime-string-abbrevaite.js"); -/* harmony import */ var _digits_abbreviate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./digits-abbreviate */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/digits-abbreviate.js"); -/* harmony import */ var _node_jitter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node-jitter */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/node-jitter.js"); -/* harmony import */ var _node_jitter_upward__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node-jitter-upward */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/node-jitter-upward.js"); -/* harmony import */ var _nodes_resampling__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./nodes-resampling */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/nodes-resampling.js"); -/* harmony import */ var _nodes_resampling_by_abbrevate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./nodes-resampling-by-abbrevate */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/nodes-resampling-by-abbrevate.js"); -/* harmony import */ var _nodes_resampling_by_change__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./nodes-resampling-by-change */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/nodes-resampling-by-change.js"); -/* harmony import */ var _nodes_resampling_by_state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./nodes-resampling-by-state */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/nodes-resampling-by-state.js"); -/* harmony import */ var _robust_abbrevaite__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./robust-abbrevaite */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/robust-abbrevaite.js"); -/* harmony import */ var _text_abbreviate__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./text-abbreviate */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/text-abbreviate.js"); -/* harmony import */ var _text_hide__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./text-hide */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/text-hide.js"); -/* harmony import */ var _text_rotation__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./text-rotation */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/text-rotation.js"); -/* harmony import */ var _text_wrapper__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./text-wrapper */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/text-wrapper.js"); - - - - - - - - - - - - - - -var rulesLib = { - textWrapper: _text_wrapper__WEBPACK_IMPORTED_MODULE_13__["default"], - textRotation: _text_rotation__WEBPACK_IMPORTED_MODULE_12__["default"], - textAbbreviate: _text_abbreviate__WEBPACK_IMPORTED_MODULE_10__["default"], - textHide: _text_hide__WEBPACK_IMPORTED_MODULE_11__["default"], - digitsAbbreviate: _digits_abbreviate__WEBPACK_IMPORTED_MODULE_2__["default"], - datetimeStringAbbrevaite: _datetime_string_abbrevaite__WEBPACK_IMPORTED_MODULE_1__["default"], - robustAbbrevaite: _robust_abbrevaite__WEBPACK_IMPORTED_MODULE_9__["default"], - nodesResampling: _nodes_resampling__WEBPACK_IMPORTED_MODULE_5__["default"], - nodesResamplingByAbbrevate: _nodes_resampling_by_abbrevate__WEBPACK_IMPORTED_MODULE_6__["default"], - nodesResamplingByChange: _nodes_resampling_by_change__WEBPACK_IMPORTED_MODULE_7__["default"], - nodesResamplingByState: _nodes_resampling_by_state__WEBPACK_IMPORTED_MODULE_8__["default"], - nodeJitter: _node_jitter__WEBPACK_IMPORTED_MODULE_3__["default"], - nodeJitterUpward: _node_jitter_upward__WEBPACK_IMPORTED_MODULE_4__["default"], - clearOverlapping: _clear_overlapping__WEBPACK_IMPORTED_MODULE_0__["default"], -}; -function registerResponsiveRule(name, method) { - // todo: 防止覆盖 - rulesLib[name] = method; -} -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/rules/node-jitter-upward.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/rules/node-jitter-upward.js ***! - \***********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nodeJitterUpward; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _clear_overlapping__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./clear-overlapping */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/clear-overlapping.js"); - - -/** 图形向上抖开并拉线 */ -// todo 允许设置offset和拉线样式 -function nodeJitterUpward(shape, option, index, cfg) { - var nodes = cfg.nodes.nodes; - if (index === 0) { - return; - } - var current = nodes[index]; - var previous = nodes[index - 1]; - if (Object(_clear_overlapping__WEBPACK_IMPORTED_MODULE_1__["isNodeOverlap"])(current, previous)) { - var element = cfg.plot.plot.get('elements')[0]; - var y = previous.top - current.height / 2; - var offset = 10; - if (y - offset > cfg.region.top) { - // 取到label对应的element-shape - var origin_1 = current.shape.get('origin'); - var shapeId = element.getShapeId(origin_1); - var shapes = element.getShapes(); - var shapeBbox = getShapeById(shapeId, shapes).get('box'); - var originX = shapeBbox.left + shapeBbox.width / 2; - var originY = shapeBbox.top; - // 拉线 - var container = element.get('labelController').labelsContainer; - var labelLine = container.addShape('path', { - attrs: { - path: [ - ['M', originX, originY], - ['L', current.shape.attr('x'), y], - ], - stroke: '#ccc', - lineWidth: 1, - }, - }); - /** 保存labelLine和label初始位置信息 */ - var origin_position = { x: shape.attr('x'), y: shape.attr('y') }; - // 更新标签位置,同步更新node - current.shape.attr('y', y - offset); - nodes[index] = cfg.nodes.measure(current.shape); - nodes[index].line = labelLine; - nodes[index].origin_position = origin_position; - } - } -} -function getShapeById(shapeId, shapes) { - var target; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(shapes, function (shape) { - var s = shape; - var id = s.get('id'); - if (id === shapeId) { - target = s; - } - }); - return target; -} -//# sourceMappingURL=node-jitter-upward.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/rules/node-jitter.js": -/*!****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/rules/node-jitter.js ***! - \****************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nodeJitter; }); -/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../math */ "./node_modules/@antv/g2plot/esm/util/math.js"); - -/** 图形在水平或垂直方向抖开 */ -function nodeJitter(shape, option, index, cfg) { - var nodes = cfg.nodes.nodes; - if (index === nodes.length - 1) { - return; - } - var current = nodes[index]; - var next = nodes[index + 1]; - var _a = alignDirection(current, next), dir = _a.dir, distX = _a.distX, distY = _a.distY; - var startPoint = shape.get('startPoint'); - if (dir === 'x') { - shape.attr('y', startPoint.y + 20); - } -} -function alignDirection(nodeA, nodeB) { - var dir; - /** 计算两个node 中心点向量的角度 */ - var vector = { x: nodeB.centerX - nodeA.centerX, y: nodeB.centerY - nodeA.centerY }; - var mag = Math.sqrt(vector.x * vector.x + vector.y * vector.y); - var vector_horizontal = { x: 10, y: 0 }; // 水平方向向量 - /*tslint:disable*/ - var mag_horizontal = Math.sqrt(vector_horizontal.x * vector_horizontal.x + vector_horizontal.y * vector_horizontal.y); - var dot = Object(_math__WEBPACK_IMPORTED_MODULE_0__["dotProduct2D"])(vector, vector_horizontal); - var angle = ((dot / (mag * mag_horizontal)) * 180) / Math.PI; - if (angle < 0) - angle = 360 - angle; - angle = adjustAngle(angle); // 将角度从0-360转换到0-90 - /** 计算两个node在x、y两个方向上的距离 */ - var distX = Math.abs(nodeA.centerX - nodeB.centerX); - var distY = Math.abs(nodeA.centerY - nodeB.centerY); - if (angle > 45) { - dir = 'x'; - } - else if (angle < 45) { - dir = 'y'; - } - return { dir: dir, distX: distX, distY: distY }; -} -function adjustAngle(angle) { - if (angle > 90 && angle <= 180) { - return 180 - angle; - } - if (angle > 180 && angle < 270) { - return angle - 180; - } - return 360 - angle; -} -//# sourceMappingURL=node-jitter.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/rules/nodes-resampling-by-abbrevate.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/rules/nodes-resampling-by-abbrevate.js ***! - \**********************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nodesResamplingByAbbrevate; }); -/* harmony import */ var _nodes_resampling__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./nodes-resampling */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/nodes-resampling.js"); -/* harmony import */ var _text_hide__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./text-hide */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/text-hide.js"); - - -function nodesResamplingByAbbrevate(shape, option, index, cfg) { - var nodes = cfg.nodes.nodes; - if (Object(_nodes_resampling__WEBPACK_IMPORTED_MODULE_0__["isKeep"])(option.keep, index, nodes)) { - return; - } - { - var currentText = shape.attr('text'); - var originText = shape.get('delegateObject').item.name; - if (currentText !== originText) { - Object(_text_hide__WEBPACK_IMPORTED_MODULE_1__["default"])(shape); - } - } -} -//# sourceMappingURL=nodes-resampling-by-abbrevate.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/rules/nodes-resampling-by-change.js": -/*!*******************************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/rules/nodes-resampling-by-change.js ***! - \*******************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nodesResamplingByChange; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _text_hide__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./text-hide */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/text-hide.js"); - - -/** 根据变化进行抽样,保留变化较大的点,类似于点简化算法 */ -function nodesResamplingByChange(shape, option, index, cfg) { - var nodes = cfg.nodes.nodes; - var tolerance = getGlobalTolerance(nodes); - if (index <= 1) { - return; - } - var current = nodes[index]; - // const previous = nodes[index-1]; - var previous = findPrevious(index, nodes); - var distX = previous.centerX - current.centerX; - var distY = previous.centerY - current.centerY; - var dist = Math.sqrt(distX * distX + distY * distY); - if (dist < tolerance) { - Object(_text_hide__WEBPACK_IMPORTED_MODULE_1__["default"])(shape); - shape.set('blank', true); - } -} -function findPrevious(index, nodes) { - for (var i = index - 1; i > 0; i--) { - var node = nodes[i]; - if (!node.shape.get('blank')) { - return node; - } - } -} -function getGlobalTolerance(nodes) { - var nodesClone = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])([], nodes); - nodesClone.sort(function (a, b) { - return b.width - a.width; - }); - return Math.round(nodesClone[0].width); -} -//# sourceMappingURL=nodes-resampling-by-change.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/rules/nodes-resampling-by-state.js": -/*!******************************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/rules/nodes-resampling-by-state.js ***! - \******************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nodesResamplingByState; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _text_hide__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./text-hide */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/text-hide.js"); - - -function nodesResamplingByState(shape, option, index, cfg) { - var nodes = cfg.nodes.nodes; - var current = nodes[index]; - if (current.line) { - current.line.remove(); - } - var data = cfg.plot.initialProps.data; - var field = cfg.plot[cfg.plot.type].label.fields[0]; - var stateNodes = getStateNodes(data, field, nodes); - var isState = false; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(stateNodes, function (node) { - // @ts-ignore - if (node.shape.get('origin') === current.shape.get('origin')) { - isState = true; - } - }); - if (isState) { - if (current.origin_position) { - var _a = current.origin_position, x = _a.x, y = _a.y; - shape.attr('x', x); - shape.attr('y', y); - } - } - else { - Object(_text_hide__WEBPACK_IMPORTED_MODULE_1__["default"])(shape); - } -} -function getStateNodes(data, field, nodes) { - var extract_data = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(data, function (d) { - extract_data.push(d[field]); - }); - extract_data.sort(function (a, b) { - return a - b; - }); - var min = extract_data[0]; - var min_node = getNodeByNumber(nodes, field, min); - var max = extract_data[extract_data.length - 1]; - var max_node = getNodeByNumber(nodes, field, max); - var median = getMedian(extract_data); - var median_node = getNodeByNumber(nodes, field, median); - return { min: min_node, max: max_node, median: median_node }; -} -function getMedian(array) { - var list = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(array); - list.sort(function (a, b) { - return a - b; - }); - var half = Math.floor(list.length / 2); - if (list.length % 2) { - return list[half]; - } - return list[half]; -} -function getNodeByNumber(nodes, field, num) { - for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) { - var node = nodes_1[_i]; - var d = node.shape.get('origin'); - if (d[field] === num) { - return node; - } - } -} -//# sourceMappingURL=nodes-resampling-by-state.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/rules/nodes-resampling.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/rules/nodes-resampling.js ***! - \*********************************************************************************/ -/*! exports provided: default, isKeep */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nodesResampling; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isKeep", function() { return isKeep; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _text_hide__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./text-hide */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/text-hide.js"); - - -function nodesResampling(shape, option, index, cfg) { - var nodes = cfg.nodes.nodes; - /** nodeLength为偶数,则奇数index的shape保留,反之则偶数index的shape保留 */ - var oddKeep = nodes.length % 2 === 0 ? false : true; - if (isKeep(option.keep, index, nodes)) { - return; - } - { - var isOdd = index % 2 === 0 ? true : false; - if ((!oddKeep && isOdd) || (oddKeep && !isOdd)) { - Object(_text_hide__WEBPACK_IMPORTED_MODULE_1__["default"])(shape); - } - } -} -function isKeep(keepCfg, index, nodes) { - /** 允许设置start end 或任意index */ - var conditions = []; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(keepCfg, function (cfg) { - if (cfg === 'start') { - conditions.push(index === 0); - } - else if (cfg === 'end') { - conditions.push(index === nodes.length - 1); - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNumber"])(cfg)) { - conditions.push(index === cfg); - } - }); - for (var _i = 0, conditions_1 = conditions; _i < conditions_1.length; _i++) { - var condition = conditions_1[_i]; - if (condition === true) { - return true; - } - } - return false; -} -//# sourceMappingURL=nodes-resampling.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/rules/robust-abbrevaite.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/rules/robust-abbrevaite.js ***! - \**********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return robustAbbrevaite; }); -/* harmony import */ var _datetime_string_abbrevaite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./datetime-string-abbrevaite */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/datetime-string-abbrevaite.js"); -/* harmony import */ var _digits_abbreviate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./digits-abbreviate */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/digits-abbreviate.js"); -/* harmony import */ var _text_abbreviate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./text-abbreviate */ "./node_modules/@antv/g2plot/esm/util/responsive/rules/text-abbreviate.js"); - - - -function robustAbbrevaite(shape, option, index, cfg) { - var nodes = cfg.nodes.nodes; - var text = shape.attr('text'); - /** 判断text类型: 数字、时间、文本 */ - var isnum = /^\d+$/.test(text); - if (isnum) { - Object(_digits_abbreviate__WEBPACK_IMPORTED_MODULE_1__["default"])(shape, option, index, nodes); - } - else if (Object(_datetime_string_abbrevaite__WEBPACK_IMPORTED_MODULE_0__["isTime"])(text)) { - Object(_datetime_string_abbrevaite__WEBPACK_IMPORTED_MODULE_0__["default"])(shape, option, index, nodes); - } - else { - Object(_text_abbreviate__WEBPACK_IMPORTED_MODULE_2__["default"])(shape, option); - } -} -//# sourceMappingURL=robust-abbrevaite.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/rules/text-abbreviate.js": -/*!********************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/rules/text-abbreviate.js ***! - \********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return textAbbreviate; }); -function textAbbreviate(shape, option) { - var abbreviateBy = option.abbreviateBy ? option.abbreviateBy : 'end'; - var text = shape.attr('text'); - var abbravateText; - if (abbreviateBy === 'end') { - abbravateText = text[0] + "..."; - } - if (abbreviateBy === 'start') { - abbravateText = "..." + text[text.length - 1]; - } - if (abbreviateBy === 'middle') { - abbravateText = text[0] + "..." + text[text.length - 1]; - } - shape.resetMatrix(); - shape.attr({ - text: abbravateText, - textAlign: 'center', - textBaseline: 'top', - }); -} -//# sourceMappingURL=text-abbreviate.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/rules/text-hide.js": -/*!**************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/rules/text-hide.js ***! - \**************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return textHide; }); -function textHide(shape) { - shape.attr('text', ''); -} -//# sourceMappingURL=text-hide.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/rules/text-rotation.js": -/*!******************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/rules/text-rotation.js ***! - \******************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return textRotation; }); -function textRotation(shape, option) { - shape.resetMatrix(); - shape.attr({ - rotate: 360 - option.degree, - textAlign: 'right', - textBaseline: 'middle', - }); -} -//# sourceMappingURL=text-rotation.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/rules/text-wrapper.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/rules/text-wrapper.js ***! - \*****************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return textWrapper; }); -function textWrapper(shape, option) { - var text = shape.attr('text'); - var step = Math.ceil(text.length / option.lineNumber); - var wrapperText = ''; - for (var i = 1; i < option.lineNumber; i++) { - var index = step * i; - wrapperText = text.slice(0, index) + "\n" + text.slice(index); - } - var fontSize = shape.attr('fontSize'); - shape.attr({ - text: wrapperText, - lineHeight: fontSize, - textAlign: 'center', - textBaseline: 'top', - }); -} -//# sourceMappingURL=text-wrapper.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/responsive/theme.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/responsive/theme.js ***! - \****************************************************************/ -/*! exports provided: registerResponsiveTheme, getResponsiveTheme */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerResponsiveTheme", function() { return registerResponsiveTheme; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getResponsiveTheme", function() { return getResponsiveTheme; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _default__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./default */ "./node_modules/@antv/g2plot/esm/util/responsive/default.js"); - - -/** - * 所有的响应式主题配置 - */ -var RESPONSIVE_THEME_MAP = { - default: _default__WEBPACK_IMPORTED_MODULE_1__["DEFAULT_RESPONSIVE_THEME"], -}; -/** - * 添加一个响应式主题配置 - * @param name - * @param theme - */ -function registerResponsiveTheme(name, theme) { - RESPONSIVE_THEME_MAP[name.toLowerCase()] = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["deepMix"])({}, _default__WEBPACK_IMPORTED_MODULE_1__["DEFAULT_RESPONSIVE_THEME"], theme); -} -/** - * 获取一个响应式主题配置,如果找不到则返回默认 - * @param name - */ -function getResponsiveTheme(name) { - var theme = RESPONSIVE_THEME_MAP[name.toLowerCase()]; - return theme ? theme : _default__WEBPACK_IMPORTED_MODULE_1__["DEFAULT_RESPONSIVE_THEME"]; -} -//# sourceMappingURL=theme.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/scale.js": -/*!*****************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/scale.js ***! - \*****************************************************/ -/*! exports provided: extractScale, trySetScaleMinToZero */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extractScale", function() { return extractScale; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "trySetScaleMinToZero", function() { return trySetScaleMinToZero; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _interface_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../interface/config */ "./node_modules/@antv/g2plot/esm/interface/config.js"); - - -function adjustTimeTickInterval(interval) { - var intervals = _interface_config__WEBPACK_IMPORTED_MODULE_1__["timeIntervals"]; - var intervalArr = interval.split(' '); - var basicInterval = intervals[intervalArr[1]]; - var intervalCount = parseInt(intervalArr[0], 10); - return [basicInterval.format, intervalCount * basicInterval.value]; -} -function extractScale(desScale, axisConfig) { - if (!axisConfig) { - return desScale; - } - if (Object.prototype.hasOwnProperty.call(axisConfig, 'tickCount')) { - desScale.tickCount = axisConfig.tickCount; - } - if (Object.prototype.hasOwnProperty.call(axisConfig, 'type')) { - // fixme: dateTime plot层处理 - if (axisConfig.type !== 'dateTime') { - desScale.type = axisConfig.type; - } - } - if (Object.prototype.hasOwnProperty.call(axisConfig, 'tickInterval')) { - if (axisConfig.type === 'time') { - desScale.tickInterval = adjustTimeTickInterval(axisConfig.tickInterval); - } - else { - desScale.tickInterval = axisConfig.tickInterval; - } - } - if (axisConfig.type === 'time' && axisConfig.mask) { - desScale.mask = axisConfig.mask; - } - if (Object.prototype.hasOwnProperty.call(axisConfig, 'min')) { - desScale.min = axisConfig.min; - } - if (Object.prototype.hasOwnProperty.call(axisConfig, 'max')) { - desScale.max = axisConfig.max; - } - if (Object.prototype.hasOwnProperty.call(axisConfig, 'minLimit')) { - desScale.minLimit = axisConfig.minLimit; - } - if (Object.prototype.hasOwnProperty.call(axisConfig, 'maxLimit')) { - desScale.maxLimit = axisConfig.maxLimit; - } - if (Object.prototype.hasOwnProperty.call(axisConfig, 'nice')) { - desScale.nice = axisConfig.nice; - } - if (Object.prototype.hasOwnProperty.call(axisConfig, 'formatter')) { - desScale.formatter = axisConfig.formatter; - } - if (axisConfig.tickMethod) { - desScale.tickMethod = axisConfig.tickMethod; - } -} -function trySetScaleMinToZero(desScale, data) { - var validData = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["filter"])(data, function (v) { return Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNumber"])(v); }); - var min = Math.min.apply(Math, validData); - var max = Math.max.apply(Math, validData); - if (min > 0) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(desScale.min)) { - desScale.min = 0; - } - } - else if (max < 0) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(desScale.max)) { - desScale.max = 0; - } - } -} -//# sourceMappingURL=scale.js.map - -/***/ }), - -/***/ "./node_modules/@antv/g2plot/esm/util/state-manager.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/g2plot/esm/util/state-manager.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_event_emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/event-emitter */ "./node_modules/@antv/event-emitter/lib/index.js"); -/* harmony import */ var _antv_event_emitter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_antv_event_emitter__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -/** - * 可插拔的状态量管理机 - */ -// todo: 后续还需要加入交互互斥的维护机制 - - -var StateManager = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(StateManager, _super); - function StateManager(cfg) { - var _this = _super.call(this) || this; - _this._states = {}; - _this._stateStack = {}; - return _this; - } - StateManager.prototype.setState = function (name, exp) { - this._stateStack[name] = exp; - this._onUpdate(); - }; - StateManager.prototype.getState = function (name) { - return this._states[name]; - }; - StateManager.prototype.getAllStates = function () { - return this._states; - }; - StateManager.prototype.clear = function () { - this._states = {}; - this._stateStack = {}; - if (this._changeTimer) { - clearTimeout(this._changeTimer); - this._changeTimer = null; - } - }; - StateManager.prototype._onUpdate = function () { - var _this = this; - var stateStack = this._stateStack; - if (this._changeTimer) { - clearTimeout(this._changeTimer); - this._changeTimer = null; - } - this._changeTimer = setTimeout(function () { - // for (const name in stateStack) { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(stateStack, function (exp, name) { - var state = stateStack[name]; - if (!_this._states[name] || _this._states[name] !== exp) { - // update states - _this._states[name] = exp; - // dispatch state event - _this._triggerEvent(name, state); - } - }); - // } - // clear stack - _this._stateStack = {}; - }, 16); - }; - StateManager.prototype._triggerEvent = function (name, exp) { - this.emit(name + ":change", { - name: name, - exp: exp, - }); - }; - return StateManager; -}(_antv_event_emitter__WEBPACK_IMPORTED_MODULE_1___default.a)); -/* harmony default export */ __webpack_exports__["default"] = (StateManager); -//# sourceMappingURL=state-manager.js.map - -/***/ }), - -/***/ "./node_modules/@antv/gl-matrix/lib/gl-matrix/common.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/gl-matrix/lib/gl-matrix/common.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.setMatrixArrayType = setMatrixArrayType; -exports.toRadian = toRadian; -exports.equals = equals; -/** - * Common utilities - * @module glMatrix - */ - -// Configuration Constants -var EPSILON = exports.EPSILON = 0.000001; -var ARRAY_TYPE = exports.ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array; -var RANDOM = exports.RANDOM = Math.random; - -/** - * Sets the type of array used when creating new vectors and matrices - * - * @param {Type} type Array type, such as Float32Array or Array - */ -function setMatrixArrayType(type) { - exports.ARRAY_TYPE = ARRAY_TYPE = type; -} - -var degree = Math.PI / 180; - -/** - * Convert Degree To Radian - * - * @param {Number} a Angle in Degrees - */ -function toRadian(a) { - return a * degree; -} - -/** - * Tests whether or not the arguments have approximately the same value, within an absolute - * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less - * than or equal to 1.0, and a relative tolerance is used for larger values) - * - * @param {Number} a The first number to test. - * @param {Number} b The second number to test. - * @returns {Boolean} True if the numbers are approximately equal, false otherwise. - */ -function equals(a, b) { - return Math.abs(a - b) <= EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b)); -} - -/***/ }), - -/***/ "./node_modules/@antv/gl-matrix/lib/gl-matrix/mat3.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/gl-matrix/lib/gl-matrix/mat3.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.sub = exports.mul = undefined; -exports.create = create; -exports.fromMat4 = fromMat4; -exports.clone = clone; -exports.copy = copy; -exports.fromValues = fromValues; -exports.set = set; -exports.identity = identity; -exports.transpose = transpose; -exports.invert = invert; -exports.adjoint = adjoint; -exports.determinant = determinant; -exports.multiply = multiply; -exports.translate = translate; -exports.rotate = rotate; -exports.scale = scale; -exports.fromTranslation = fromTranslation; -exports.fromRotation = fromRotation; -exports.fromScaling = fromScaling; -exports.fromMat2d = fromMat2d; -exports.fromQuat = fromQuat; -exports.normalFromMat4 = normalFromMat4; -exports.projection = projection; -exports.str = str; -exports.frob = frob; -exports.add = add; -exports.subtract = subtract; -exports.multiplyScalar = multiplyScalar; -exports.multiplyScalarAndAdd = multiplyScalarAndAdd; -exports.exactEquals = exactEquals; -exports.equals = equals; - -var _common = __webpack_require__(/*! ./common.js */ "./node_modules/@antv/gl-matrix/lib/gl-matrix/common.js"); - -var glMatrix = _interopRequireWildcard(_common); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -/** - * 3x3 Matrix - * @module mat3 - */ - -/** - * Creates a new identity mat3 - * - * @returns {mat3} a new 3x3 matrix - */ -function create() { - var out = new glMatrix.ARRAY_TYPE(9); - if (glMatrix.ARRAY_TYPE != Float32Array) { - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[5] = 0; - out[6] = 0; - out[7] = 0; - } - out[0] = 1; - out[4] = 1; - out[8] = 1; - return out; -} - -/** - * Copies the upper-left 3x3 values into the given mat3. - * - * @param {mat3} out the receiving 3x3 matrix - * @param {mat4} a the source 4x4 matrix - * @returns {mat3} out - */ -function fromMat4(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[4]; - out[4] = a[5]; - out[5] = a[6]; - out[6] = a[8]; - out[7] = a[9]; - out[8] = a[10]; - return out; -} - -/** - * Creates a new mat3 initialized with values from an existing matrix - * - * @param {mat3} a matrix to clone - * @returns {mat3} a new 3x3 matrix - */ -function clone(a) { - var out = new glMatrix.ARRAY_TYPE(9); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - return out; -} - -/** - * Copy the values from one mat3 to another - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the source matrix - * @returns {mat3} out - */ -function copy(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - return out; -} - -/** - * Create a new mat3 with the given values - * - * @param {Number} m00 Component in column 0, row 0 position (index 0) - * @param {Number} m01 Component in column 0, row 1 position (index 1) - * @param {Number} m02 Component in column 0, row 2 position (index 2) - * @param {Number} m10 Component in column 1, row 0 position (index 3) - * @param {Number} m11 Component in column 1, row 1 position (index 4) - * @param {Number} m12 Component in column 1, row 2 position (index 5) - * @param {Number} m20 Component in column 2, row 0 position (index 6) - * @param {Number} m21 Component in column 2, row 1 position (index 7) - * @param {Number} m22 Component in column 2, row 2 position (index 8) - * @returns {mat3} A new mat3 - */ -function fromValues(m00, m01, m02, m10, m11, m12, m20, m21, m22) { - var out = new glMatrix.ARRAY_TYPE(9); - out[0] = m00; - out[1] = m01; - out[2] = m02; - out[3] = m10; - out[4] = m11; - out[5] = m12; - out[6] = m20; - out[7] = m21; - out[8] = m22; - return out; -} - -/** - * Set the components of a mat3 to the given values - * - * @param {mat3} out the receiving matrix - * @param {Number} m00 Component in column 0, row 0 position (index 0) - * @param {Number} m01 Component in column 0, row 1 position (index 1) - * @param {Number} m02 Component in column 0, row 2 position (index 2) - * @param {Number} m10 Component in column 1, row 0 position (index 3) - * @param {Number} m11 Component in column 1, row 1 position (index 4) - * @param {Number} m12 Component in column 1, row 2 position (index 5) - * @param {Number} m20 Component in column 2, row 0 position (index 6) - * @param {Number} m21 Component in column 2, row 1 position (index 7) - * @param {Number} m22 Component in column 2, row 2 position (index 8) - * @returns {mat3} out - */ -function set(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) { - out[0] = m00; - out[1] = m01; - out[2] = m02; - out[3] = m10; - out[4] = m11; - out[5] = m12; - out[6] = m20; - out[7] = m21; - out[8] = m22; - return out; -} - -/** - * Set a mat3 to the identity matrix - * - * @param {mat3} out the receiving matrix - * @returns {mat3} out - */ -function identity(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 1; - out[5] = 0; - out[6] = 0; - out[7] = 0; - out[8] = 1; - return out; -} - -/** - * Transpose the values of a mat3 - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the source matrix - * @returns {mat3} out - */ -function transpose(out, a) { - // If we are transposing ourselves we can skip a few steps but have to cache some values - if (out === a) { - var a01 = a[1], - a02 = a[2], - a12 = a[5]; - out[1] = a[3]; - out[2] = a[6]; - out[3] = a01; - out[5] = a[7]; - out[6] = a02; - out[7] = a12; - } else { - out[0] = a[0]; - out[1] = a[3]; - out[2] = a[6]; - out[3] = a[1]; - out[4] = a[4]; - out[5] = a[7]; - out[6] = a[2]; - out[7] = a[5]; - out[8] = a[8]; - } - - return out; -} - -/** - * Inverts a mat3 - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the source matrix - * @returns {mat3} out - */ -function invert(out, a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2]; - var a10 = a[3], - a11 = a[4], - a12 = a[5]; - var a20 = a[6], - a21 = a[7], - a22 = a[8]; - - var b01 = a22 * a11 - a12 * a21; - var b11 = -a22 * a10 + a12 * a20; - var b21 = a21 * a10 - a11 * a20; - - // Calculate the determinant - var det = a00 * b01 + a01 * b11 + a02 * b21; - - if (!det) { - return null; - } - det = 1.0 / det; - - out[0] = b01 * det; - out[1] = (-a22 * a01 + a02 * a21) * det; - out[2] = (a12 * a01 - a02 * a11) * det; - out[3] = b11 * det; - out[4] = (a22 * a00 - a02 * a20) * det; - out[5] = (-a12 * a00 + a02 * a10) * det; - out[6] = b21 * det; - out[7] = (-a21 * a00 + a01 * a20) * det; - out[8] = (a11 * a00 - a01 * a10) * det; - return out; -} - -/** - * Calculates the adjugate of a mat3 - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the source matrix - * @returns {mat3} out - */ -function adjoint(out, a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2]; - var a10 = a[3], - a11 = a[4], - a12 = a[5]; - var a20 = a[6], - a21 = a[7], - a22 = a[8]; - - out[0] = a11 * a22 - a12 * a21; - out[1] = a02 * a21 - a01 * a22; - out[2] = a01 * a12 - a02 * a11; - out[3] = a12 * a20 - a10 * a22; - out[4] = a00 * a22 - a02 * a20; - out[5] = a02 * a10 - a00 * a12; - out[6] = a10 * a21 - a11 * a20; - out[7] = a01 * a20 - a00 * a21; - out[8] = a00 * a11 - a01 * a10; - return out; -} - -/** - * Calculates the determinant of a mat3 - * - * @param {mat3} a the source matrix - * @returns {Number} determinant of a - */ -function determinant(a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2]; - var a10 = a[3], - a11 = a[4], - a12 = a[5]; - var a20 = a[6], - a21 = a[7], - a22 = a[8]; - - return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20); -} - -/** - * Multiplies two mat3's - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the first operand - * @param {mat3} b the second operand - * @returns {mat3} out - */ -function multiply(out, a, b) { - var a00 = a[0], - a01 = a[1], - a02 = a[2]; - var a10 = a[3], - a11 = a[4], - a12 = a[5]; - var a20 = a[6], - a21 = a[7], - a22 = a[8]; - - var b00 = b[0], - b01 = b[1], - b02 = b[2]; - var b10 = b[3], - b11 = b[4], - b12 = b[5]; - var b20 = b[6], - b21 = b[7], - b22 = b[8]; - - out[0] = b00 * a00 + b01 * a10 + b02 * a20; - out[1] = b00 * a01 + b01 * a11 + b02 * a21; - out[2] = b00 * a02 + b01 * a12 + b02 * a22; - - out[3] = b10 * a00 + b11 * a10 + b12 * a20; - out[4] = b10 * a01 + b11 * a11 + b12 * a21; - out[5] = b10 * a02 + b11 * a12 + b12 * a22; - - out[6] = b20 * a00 + b21 * a10 + b22 * a20; - out[7] = b20 * a01 + b21 * a11 + b22 * a21; - out[8] = b20 * a02 + b21 * a12 + b22 * a22; - return out; -} - -/** - * Translate a mat3 by the given vector - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the matrix to translate - * @param {vec2} v vector to translate by - * @returns {mat3} out - */ -function translate(out, a, v) { - var a00 = a[0], - a01 = a[1], - a02 = a[2], - a10 = a[3], - a11 = a[4], - a12 = a[5], - a20 = a[6], - a21 = a[7], - a22 = a[8], - x = v[0], - y = v[1]; - - out[0] = a00; - out[1] = a01; - out[2] = a02; - - out[3] = a10; - out[4] = a11; - out[5] = a12; - - out[6] = x * a00 + y * a10 + a20; - out[7] = x * a01 + y * a11 + a21; - out[8] = x * a02 + y * a12 + a22; - return out; -} - -/** - * Rotates a mat3 by the given angle - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat3} out - */ -function rotate(out, a, rad) { - var a00 = a[0], - a01 = a[1], - a02 = a[2], - a10 = a[3], - a11 = a[4], - a12 = a[5], - a20 = a[6], - a21 = a[7], - a22 = a[8], - s = Math.sin(rad), - c = Math.cos(rad); - - out[0] = c * a00 + s * a10; - out[1] = c * a01 + s * a11; - out[2] = c * a02 + s * a12; - - out[3] = c * a10 - s * a00; - out[4] = c * a11 - s * a01; - out[5] = c * a12 - s * a02; - - out[6] = a20; - out[7] = a21; - out[8] = a22; - return out; -}; - -/** - * Scales the mat3 by the dimensions in the given vec2 - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the matrix to rotate - * @param {vec2} v the vec2 to scale the matrix by - * @returns {mat3} out - **/ -function scale(out, a, v) { - var x = v[0], - y = v[1]; - - out[0] = x * a[0]; - out[1] = x * a[1]; - out[2] = x * a[2]; - - out[3] = y * a[3]; - out[4] = y * a[4]; - out[5] = y * a[5]; - - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - return out; -} - -/** - * Creates a matrix from a vector translation - * This is equivalent to (but much faster than): - * - * mat3.identity(dest); - * mat3.translate(dest, dest, vec); - * - * @param {mat3} out mat3 receiving operation result - * @param {vec2} v Translation vector - * @returns {mat3} out - */ -function fromTranslation(out, v) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 1; - out[5] = 0; - out[6] = v[0]; - out[7] = v[1]; - out[8] = 1; - return out; -} - -/** - * Creates a matrix from a given angle - * This is equivalent to (but much faster than): - * - * mat3.identity(dest); - * mat3.rotate(dest, dest, rad); - * - * @param {mat3} out mat3 receiving operation result - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat3} out - */ -function fromRotation(out, rad) { - var s = Math.sin(rad), - c = Math.cos(rad); - - out[0] = c; - out[1] = s; - out[2] = 0; - - out[3] = -s; - out[4] = c; - out[5] = 0; - - out[6] = 0; - out[7] = 0; - out[8] = 1; - return out; -} - -/** - * Creates a matrix from a vector scaling - * This is equivalent to (but much faster than): - * - * mat3.identity(dest); - * mat3.scale(dest, dest, vec); - * - * @param {mat3} out mat3 receiving operation result - * @param {vec2} v Scaling vector - * @returns {mat3} out - */ -function fromScaling(out, v) { - out[0] = v[0]; - out[1] = 0; - out[2] = 0; - - out[3] = 0; - out[4] = v[1]; - out[5] = 0; - - out[6] = 0; - out[7] = 0; - out[8] = 1; - return out; -} - -/** - * Copies the values from a mat2d into a mat3 - * - * @param {mat3} out the receiving matrix - * @param {mat2d} a the matrix to copy - * @returns {mat3} out - **/ -function fromMat2d(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = 0; - - out[3] = a[2]; - out[4] = a[3]; - out[5] = 0; - - out[6] = a[4]; - out[7] = a[5]; - out[8] = 1; - return out; -} - -/** -* Calculates a 3x3 matrix from the given quaternion -* -* @param {mat3} out mat3 receiving operation result -* @param {quat} q Quaternion to create matrix from -* -* @returns {mat3} out -*/ -function fromQuat(out, q) { - var x = q[0], - y = q[1], - z = q[2], - w = q[3]; - var x2 = x + x; - var y2 = y + y; - var z2 = z + z; - - var xx = x * x2; - var yx = y * x2; - var yy = y * y2; - var zx = z * x2; - var zy = z * y2; - var zz = z * z2; - var wx = w * x2; - var wy = w * y2; - var wz = w * z2; - - out[0] = 1 - yy - zz; - out[3] = yx - wz; - out[6] = zx + wy; - - out[1] = yx + wz; - out[4] = 1 - xx - zz; - out[7] = zy - wx; - - out[2] = zx - wy; - out[5] = zy + wx; - out[8] = 1 - xx - yy; - - return out; -} - -/** -* Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix -* -* @param {mat3} out mat3 receiving operation result -* @param {mat4} a Mat4 to derive the normal matrix from -* -* @returns {mat3} out -*/ -function normalFromMat4(out, a) { - var a00 = a[0], - a01 = a[1], - a02 = a[2], - a03 = a[3]; - var a10 = a[4], - a11 = a[5], - a12 = a[6], - a13 = a[7]; - var a20 = a[8], - a21 = a[9], - a22 = a[10], - a23 = a[11]; - var a30 = a[12], - a31 = a[13], - a32 = a[14], - a33 = a[15]; - - var b00 = a00 * a11 - a01 * a10; - var b01 = a00 * a12 - a02 * a10; - var b02 = a00 * a13 - a03 * a10; - var b03 = a01 * a12 - a02 * a11; - var b04 = a01 * a13 - a03 * a11; - var b05 = a02 * a13 - a03 * a12; - var b06 = a20 * a31 - a21 * a30; - var b07 = a20 * a32 - a22 * a30; - var b08 = a20 * a33 - a23 * a30; - var b09 = a21 * a32 - a22 * a31; - var b10 = a21 * a33 - a23 * a31; - var b11 = a22 * a33 - a23 * a32; - - // Calculate the determinant - var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; - - if (!det) { - return null; - } - det = 1.0 / det; - - out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; - out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det; - out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det; - - out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det; - out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det; - out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det; - - out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det; - out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det; - out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det; - - return out; -} - -/** - * Generates a 2D projection matrix with the given bounds - * - * @param {mat3} out mat3 frustum matrix will be written into - * @param {number} width Width of your gl context - * @param {number} height Height of gl context - * @returns {mat3} out - */ -function projection(out, width, height) { - out[0] = 2 / width; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = -2 / height; - out[5] = 0; - out[6] = -1; - out[7] = 1; - out[8] = 1; - return out; -} - -/** - * Returns a string representation of a mat3 - * - * @param {mat3} a matrix to represent as a string - * @returns {String} string representation of the matrix - */ -function str(a) { - return 'mat3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ', ' + a[4] + ', ' + a[5] + ', ' + a[6] + ', ' + a[7] + ', ' + a[8] + ')'; -} - -/** - * Returns Frobenius norm of a mat3 - * - * @param {mat3} a the matrix to calculate Frobenius norm of - * @returns {Number} Frobenius norm - */ -function frob(a) { - return Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2)); -} - -/** - * Adds two mat3's - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the first operand - * @param {mat3} b the second operand - * @returns {mat3} out - */ -function add(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - out[4] = a[4] + b[4]; - out[5] = a[5] + b[5]; - out[6] = a[6] + b[6]; - out[7] = a[7] + b[7]; - out[8] = a[8] + b[8]; - return out; -} - -/** - * Subtracts matrix b from matrix a - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the first operand - * @param {mat3} b the second operand - * @returns {mat3} out - */ -function subtract(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - out[3] = a[3] - b[3]; - out[4] = a[4] - b[4]; - out[5] = a[5] - b[5]; - out[6] = a[6] - b[6]; - out[7] = a[7] - b[7]; - out[8] = a[8] - b[8]; - return out; -} - -/** - * Multiply each element of the matrix by a scalar. - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the matrix to scale - * @param {Number} b amount to scale the matrix's elements by - * @returns {mat3} out - */ -function multiplyScalar(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - out[4] = a[4] * b; - out[5] = a[5] * b; - out[6] = a[6] * b; - out[7] = a[7] * b; - out[8] = a[8] * b; - return out; -} - -/** - * Adds two mat3's after multiplying each element of the second operand by a scalar value. - * - * @param {mat3} out the receiving vector - * @param {mat3} a the first operand - * @param {mat3} b the second operand - * @param {Number} scale the amount to scale b's elements by before adding - * @returns {mat3} out - */ -function multiplyScalarAndAdd(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - out[3] = a[3] + b[3] * scale; - out[4] = a[4] + b[4] * scale; - out[5] = a[5] + b[5] * scale; - out[6] = a[6] + b[6] * scale; - out[7] = a[7] + b[7] * scale; - out[8] = a[8] + b[8] * scale; - return out; -} - -/** - * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) - * - * @param {mat3} a The first matrix. - * @param {mat3} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ -function exactEquals(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8]; -} - -/** - * Returns whether or not the matrices have approximately the same elements in the same position. - * - * @param {mat3} a The first matrix. - * @param {mat3} b The second matrix. - * @returns {Boolean} True if the matrices are equal, false otherwise. - */ -function equals(a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2], - a3 = a[3], - a4 = a[4], - a5 = a[5], - a6 = a[6], - a7 = a[7], - a8 = a[8]; - var b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3], - b4 = b[4], - b5 = b[5], - b6 = b[6], - b7 = b[7], - b8 = b[8]; - return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8)); -} - -/** - * Alias for {@link mat3.multiply} - * @function - */ -var mul = exports.mul = multiply; - -/** - * Alias for {@link mat3.subtract} - * @function - */ -var sub = exports.sub = subtract; - -/***/ }), - -/***/ "./node_modules/@antv/gl-matrix/lib/gl-matrix/vec2.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/gl-matrix/lib/gl-matrix/vec2.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.forEach = exports.sqrLen = exports.sqrDist = exports.dist = exports.div = exports.mul = exports.sub = exports.len = undefined; -exports.create = create; -exports.clone = clone; -exports.fromValues = fromValues; -exports.copy = copy; -exports.set = set; -exports.add = add; -exports.subtract = subtract; -exports.multiply = multiply; -exports.divide = divide; -exports.ceil = ceil; -exports.floor = floor; -exports.min = min; -exports.max = max; -exports.round = round; -exports.scale = scale; -exports.scaleAndAdd = scaleAndAdd; -exports.distance = distance; -exports.squaredDistance = squaredDistance; -exports.length = length; -exports.squaredLength = squaredLength; -exports.negate = negate; -exports.inverse = inverse; -exports.normalize = normalize; -exports.dot = dot; -exports.cross = cross; -exports.lerp = lerp; -exports.random = random; -exports.transformMat2 = transformMat2; -exports.transformMat2d = transformMat2d; -exports.transformMat3 = transformMat3; -exports.transformMat4 = transformMat4; -exports.rotate = rotate; -exports.angle = angle; -exports.str = str; -exports.exactEquals = exactEquals; -exports.equals = equals; - -var _common = __webpack_require__(/*! ./common.js */ "./node_modules/@antv/gl-matrix/lib/gl-matrix/common.js"); - -var glMatrix = _interopRequireWildcard(_common); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -/** - * 2 Dimensional Vector - * @module vec2 - */ - -/** - * Creates a new, empty vec2 - * - * @returns {vec2} a new 2D vector - */ -function create() { - var out = new glMatrix.ARRAY_TYPE(2); - if (glMatrix.ARRAY_TYPE != Float32Array) { - out[0] = 0; - out[1] = 0; - } - return out; -} - -/** - * Creates a new vec2 initialized with values from an existing vector - * - * @param {vec2} a vector to clone - * @returns {vec2} a new 2D vector - */ -function clone(a) { - var out = new glMatrix.ARRAY_TYPE(2); - out[0] = a[0]; - out[1] = a[1]; - return out; -} - -/** - * Creates a new vec2 initialized with the given values - * - * @param {Number} x X component - * @param {Number} y Y component - * @returns {vec2} a new 2D vector - */ -function fromValues(x, y) { - var out = new glMatrix.ARRAY_TYPE(2); - out[0] = x; - out[1] = y; - return out; -} - -/** - * Copy the values from one vec2 to another - * - * @param {vec2} out the receiving vector - * @param {vec2} a the source vector - * @returns {vec2} out - */ -function copy(out, a) { - out[0] = a[0]; - out[1] = a[1]; - return out; -} - -/** - * Set the components of a vec2 to the given values - * - * @param {vec2} out the receiving vector - * @param {Number} x X component - * @param {Number} y Y component - * @returns {vec2} out - */ -function set(out, x, y) { - out[0] = x; - out[1] = y; - return out; -} - -/** - * Adds two vec2's - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {vec2} out - */ -function add(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - return out; -} - -/** - * Subtracts vector b from vector a - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {vec2} out - */ -function subtract(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - return out; -} - -/** - * Multiplies two vec2's - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {vec2} out - */ -function multiply(out, a, b) { - out[0] = a[0] * b[0]; - out[1] = a[1] * b[1]; - return out; -} - -/** - * Divides two vec2's - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {vec2} out - */ -function divide(out, a, b) { - out[0] = a[0] / b[0]; - out[1] = a[1] / b[1]; - return out; -} - -/** - * Math.ceil the components of a vec2 - * - * @param {vec2} out the receiving vector - * @param {vec2} a vector to ceil - * @returns {vec2} out - */ -function ceil(out, a) { - out[0] = Math.ceil(a[0]); - out[1] = Math.ceil(a[1]); - return out; -} - -/** - * Math.floor the components of a vec2 - * - * @param {vec2} out the receiving vector - * @param {vec2} a vector to floor - * @returns {vec2} out - */ -function floor(out, a) { - out[0] = Math.floor(a[0]); - out[1] = Math.floor(a[1]); - return out; -} - -/** - * Returns the minimum of two vec2's - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {vec2} out - */ -function min(out, a, b) { - out[0] = Math.min(a[0], b[0]); - out[1] = Math.min(a[1], b[1]); - return out; -} - -/** - * Returns the maximum of two vec2's - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {vec2} out - */ -function max(out, a, b) { - out[0] = Math.max(a[0], b[0]); - out[1] = Math.max(a[1], b[1]); - return out; -} - -/** - * Math.round the components of a vec2 - * - * @param {vec2} out the receiving vector - * @param {vec2} a vector to round - * @returns {vec2} out - */ -function round(out, a) { - out[0] = Math.round(a[0]); - out[1] = Math.round(a[1]); - return out; -} - -/** - * Scales a vec2 by a scalar number - * - * @param {vec2} out the receiving vector - * @param {vec2} a the vector to scale - * @param {Number} b amount to scale the vector by - * @returns {vec2} out - */ -function scale(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - return out; -} - -/** - * Adds two vec2's after scaling the second operand by a scalar value - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @param {Number} scale the amount to scale b by before adding - * @returns {vec2} out - */ -function scaleAndAdd(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - return out; -} - -/** - * Calculates the euclidian distance between two vec2's - * - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {Number} distance between a and b - */ -function distance(a, b) { - var x = b[0] - a[0], - y = b[1] - a[1]; - return Math.sqrt(x * x + y * y); -} - -/** - * Calculates the squared euclidian distance between two vec2's - * - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {Number} squared distance between a and b - */ -function squaredDistance(a, b) { - var x = b[0] - a[0], - y = b[1] - a[1]; - return x * x + y * y; -} - -/** - * Calculates the length of a vec2 - * - * @param {vec2} a vector to calculate length of - * @returns {Number} length of a - */ -function length(a) { - var x = a[0], - y = a[1]; - return Math.sqrt(x * x + y * y); -} - -/** - * Calculates the squared length of a vec2 - * - * @param {vec2} a vector to calculate squared length of - * @returns {Number} squared length of a - */ -function squaredLength(a) { - var x = a[0], - y = a[1]; - return x * x + y * y; -} - -/** - * Negates the components of a vec2 - * - * @param {vec2} out the receiving vector - * @param {vec2} a vector to negate - * @returns {vec2} out - */ -function negate(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - return out; -} - -/** - * Returns the inverse of the components of a vec2 - * - * @param {vec2} out the receiving vector - * @param {vec2} a vector to invert - * @returns {vec2} out - */ -function inverse(out, a) { - out[0] = 1.0 / a[0]; - out[1] = 1.0 / a[1]; - return out; -} - -/** - * Normalize a vec2 - * - * @param {vec2} out the receiving vector - * @param {vec2} a vector to normalize - * @returns {vec2} out - */ -function normalize(out, a) { - var x = a[0], - y = a[1]; - var len = x * x + y * y; - if (len > 0) { - //TODO: evaluate use of glm_invsqrt here? - len = 1 / Math.sqrt(len); - out[0] = a[0] * len; - out[1] = a[1] * len; - } - return out; -} - -/** - * Calculates the dot product of two vec2's - * - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {Number} dot product of a and b - */ -function dot(a, b) { - return a[0] * b[0] + a[1] * b[1]; -} - -/** - * Computes the cross product of two vec2's - * Note that the cross product must by definition produce a 3D vector - * - * @param {vec3} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {vec3} out - */ -function cross(out, a, b) { - var z = a[0] * b[1] - a[1] * b[0]; - out[0] = out[1] = 0; - out[2] = z; - return out; -} - -/** - * Performs a linear interpolation between two vec2's - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {vec2} out - */ -function lerp(out, a, b, t) { - var ax = a[0], - ay = a[1]; - out[0] = ax + t * (b[0] - ax); - out[1] = ay + t * (b[1] - ay); - return out; -} - -/** - * Generates a random vector with the given scale - * - * @param {vec2} out the receiving vector - * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned - * @returns {vec2} out - */ -function random(out, scale) { - scale = scale || 1.0; - var r = glMatrix.RANDOM() * 2.0 * Math.PI; - out[0] = Math.cos(r) * scale; - out[1] = Math.sin(r) * scale; - return out; -} - -/** - * Transforms the vec2 with a mat2 - * - * @param {vec2} out the receiving vector - * @param {vec2} a the vector to transform - * @param {mat2} m matrix to transform with - * @returns {vec2} out - */ -function transformMat2(out, a, m) { - var x = a[0], - y = a[1]; - out[0] = m[0] * x + m[2] * y; - out[1] = m[1] * x + m[3] * y; - return out; -} - -/** - * Transforms the vec2 with a mat2d - * - * @param {vec2} out the receiving vector - * @param {vec2} a the vector to transform - * @param {mat2d} m matrix to transform with - * @returns {vec2} out - */ -function transformMat2d(out, a, m) { - var x = a[0], - y = a[1]; - out[0] = m[0] * x + m[2] * y + m[4]; - out[1] = m[1] * x + m[3] * y + m[5]; - return out; -} - -/** - * Transforms the vec2 with a mat3 - * 3rd vector component is implicitly '1' - * - * @param {vec2} out the receiving vector - * @param {vec2} a the vector to transform - * @param {mat3} m matrix to transform with - * @returns {vec2} out - */ -function transformMat3(out, a, m) { - var x = a[0], - y = a[1]; - out[0] = m[0] * x + m[3] * y + m[6]; - out[1] = m[1] * x + m[4] * y + m[7]; - return out; -} - -/** - * Transforms the vec2 with a mat4 - * 3rd vector component is implicitly '0' - * 4th vector component is implicitly '1' - * - * @param {vec2} out the receiving vector - * @param {vec2} a the vector to transform - * @param {mat4} m matrix to transform with - * @returns {vec2} out - */ -function transformMat4(out, a, m) { - var x = a[0]; - var y = a[1]; - out[0] = m[0] * x + m[4] * y + m[12]; - out[1] = m[1] * x + m[5] * y + m[13]; - return out; -} - -/** - * Rotate a 2D vector - * @param {vec2} out The receiving vec2 - * @param {vec2} a The vec2 point to rotate - * @param {vec2} b The origin of the rotation - * @param {Number} c The angle of rotation - * @returns {vec2} out - */ -function rotate(out, a, b, c) { - //Translate point to the origin - var p0 = a[0] - b[0], - p1 = a[1] - b[1], - sinC = Math.sin(c), - cosC = Math.cos(c); - - //perform rotation and translate to correct position - out[0] = p0 * cosC - p1 * sinC + b[0]; - out[1] = p0 * sinC + p1 * cosC + b[1]; - - return out; -} - -/** - * Get the angle between two 2D vectors - * @param {vec2} a The first operand - * @param {vec2} b The second operand - * @returns {Number} The angle in radians - */ -function angle(a, b) { - var x1 = a[0], - y1 = a[1], - x2 = b[0], - y2 = b[1]; - - var len1 = x1 * x1 + y1 * y1; - if (len1 > 0) { - //TODO: evaluate use of glm_invsqrt here? - len1 = 1 / Math.sqrt(len1); - } - - var len2 = x2 * x2 + y2 * y2; - if (len2 > 0) { - //TODO: evaluate use of glm_invsqrt here? - len2 = 1 / Math.sqrt(len2); - } - - var cosine = (x1 * x2 + y1 * y2) * len1 * len2; - - if (cosine > 1.0) { - return 0; - } else if (cosine < -1.0) { - return Math.PI; - } else { - return Math.acos(cosine); - } -} - -/** - * Returns a string representation of a vector - * - * @param {vec2} a vector to represent as a string - * @returns {String} string representation of the vector - */ -function str(a) { - return 'vec2(' + a[0] + ', ' + a[1] + ')'; -} - -/** - * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===) - * - * @param {vec2} a The first vector. - * @param {vec2} b The second vector. - * @returns {Boolean} True if the vectors are equal, false otherwise. - */ -function exactEquals(a, b) { - return a[0] === b[0] && a[1] === b[1]; -} - -/** - * Returns whether or not the vectors have approximately the same elements in the same position. - * - * @param {vec2} a The first vector. - * @param {vec2} b The second vector. - * @returns {Boolean} True if the vectors are equal, false otherwise. - */ -function equals(a, b) { - var a0 = a[0], - a1 = a[1]; - var b0 = b[0], - b1 = b[1]; - return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)); -} - -/** - * Alias for {@link vec2.length} - * @function - */ -var len = exports.len = length; - -/** - * Alias for {@link vec2.subtract} - * @function - */ -var sub = exports.sub = subtract; - -/** - * Alias for {@link vec2.multiply} - * @function - */ -var mul = exports.mul = multiply; - -/** - * Alias for {@link vec2.divide} - * @function - */ -var div = exports.div = divide; - -/** - * Alias for {@link vec2.distance} - * @function - */ -var dist = exports.dist = distance; - -/** - * Alias for {@link vec2.squaredDistance} - * @function - */ -var sqrDist = exports.sqrDist = squaredDistance; - -/** - * Alias for {@link vec2.squaredLength} - * @function - */ -var sqrLen = exports.sqrLen = squaredLength; - -/** - * Perform some operation over an array of vec2s. - * - * @param {Array} a the array of vectors to iterate over - * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed - * @param {Number} offset Number of elements to skip at the beginning of the array - * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array - * @param {Function} fn Function to call for each vector in the array - * @param {Object} [arg] additional argument to pass to fn - * @returns {Array} a - * @function - */ -var forEach = exports.forEach = function () { - var vec = create(); - - return function (a, stride, offset, count, fn, arg) { - var i = void 0, - l = void 0; - if (!stride) { - stride = 2; - } - - if (!offset) { - offset = 0; - } - - if (count) { - l = Math.min(count * stride + offset, a.length); - } else { - l = a.length; - } - - for (i = offset; i < l; i += stride) { - vec[0] = a[i];vec[1] = a[i + 1]; - fn(vec, vec, arg); - a[i] = vec[0];a[i + 1] = vec[1]; - } - - return a; - }; -}(); - -/***/ }), - -/***/ "./node_modules/@antv/gl-matrix/lib/gl-matrix/vec3.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/gl-matrix/lib/gl-matrix/vec3.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.forEach = exports.sqrLen = exports.len = exports.sqrDist = exports.dist = exports.div = exports.mul = exports.sub = undefined; -exports.create = create; -exports.clone = clone; -exports.length = length; -exports.fromValues = fromValues; -exports.copy = copy; -exports.set = set; -exports.add = add; -exports.subtract = subtract; -exports.multiply = multiply; -exports.divide = divide; -exports.ceil = ceil; -exports.floor = floor; -exports.min = min; -exports.max = max; -exports.round = round; -exports.scale = scale; -exports.scaleAndAdd = scaleAndAdd; -exports.distance = distance; -exports.squaredDistance = squaredDistance; -exports.squaredLength = squaredLength; -exports.negate = negate; -exports.inverse = inverse; -exports.normalize = normalize; -exports.dot = dot; -exports.cross = cross; -exports.lerp = lerp; -exports.hermite = hermite; -exports.bezier = bezier; -exports.random = random; -exports.transformMat4 = transformMat4; -exports.transformMat3 = transformMat3; -exports.transformQuat = transformQuat; -exports.rotateX = rotateX; -exports.rotateY = rotateY; -exports.rotateZ = rotateZ; -exports.angle = angle; -exports.str = str; -exports.exactEquals = exactEquals; -exports.equals = equals; - -var _common = __webpack_require__(/*! ./common.js */ "./node_modules/@antv/gl-matrix/lib/gl-matrix/common.js"); - -var glMatrix = _interopRequireWildcard(_common); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -/** - * 3 Dimensional Vector - * @module vec3 - */ - -/** - * Creates a new, empty vec3 - * - * @returns {vec3} a new 3D vector - */ -function create() { - var out = new glMatrix.ARRAY_TYPE(3); - if (glMatrix.ARRAY_TYPE != Float32Array) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - } - return out; -} - -/** - * Creates a new vec3 initialized with values from an existing vector - * - * @param {vec3} a vector to clone - * @returns {vec3} a new 3D vector - */ -function clone(a) { - var out = new glMatrix.ARRAY_TYPE(3); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - return out; -} - -/** - * Calculates the length of a vec3 - * - * @param {vec3} a vector to calculate length of - * @returns {Number} length of a - */ -function length(a) { - var x = a[0]; - var y = a[1]; - var z = a[2]; - return Math.sqrt(x * x + y * y + z * z); -} - -/** - * Creates a new vec3 initialized with the given values - * - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @returns {vec3} a new 3D vector - */ -function fromValues(x, y, z) { - var out = new glMatrix.ARRAY_TYPE(3); - out[0] = x; - out[1] = y; - out[2] = z; - return out; -} - -/** - * Copy the values from one vec3 to another - * - * @param {vec3} out the receiving vector - * @param {vec3} a the source vector - * @returns {vec3} out - */ -function copy(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - return out; -} - -/** - * Set the components of a vec3 to the given values - * - * @param {vec3} out the receiving vector - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @returns {vec3} out - */ -function set(out, x, y, z) { - out[0] = x; - out[1] = y; - out[2] = z; - return out; -} - -/** - * Adds two vec3's - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {vec3} out - */ -function add(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - return out; -} - -/** - * Subtracts vector b from vector a - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {vec3} out - */ -function subtract(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - return out; -} - -/** - * Multiplies two vec3's - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {vec3} out - */ -function multiply(out, a, b) { - out[0] = a[0] * b[0]; - out[1] = a[1] * b[1]; - out[2] = a[2] * b[2]; - return out; -} - -/** - * Divides two vec3's - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {vec3} out - */ -function divide(out, a, b) { - out[0] = a[0] / b[0]; - out[1] = a[1] / b[1]; - out[2] = a[2] / b[2]; - return out; -} - -/** - * Math.ceil the components of a vec3 - * - * @param {vec3} out the receiving vector - * @param {vec3} a vector to ceil - * @returns {vec3} out - */ -function ceil(out, a) { - out[0] = Math.ceil(a[0]); - out[1] = Math.ceil(a[1]); - out[2] = Math.ceil(a[2]); - return out; -} - -/** - * Math.floor the components of a vec3 - * - * @param {vec3} out the receiving vector - * @param {vec3} a vector to floor - * @returns {vec3} out - */ -function floor(out, a) { - out[0] = Math.floor(a[0]); - out[1] = Math.floor(a[1]); - out[2] = Math.floor(a[2]); - return out; -} - -/** - * Returns the minimum of two vec3's - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {vec3} out - */ -function min(out, a, b) { - out[0] = Math.min(a[0], b[0]); - out[1] = Math.min(a[1], b[1]); - out[2] = Math.min(a[2], b[2]); - return out; -} - -/** - * Returns the maximum of two vec3's - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {vec3} out - */ -function max(out, a, b) { - out[0] = Math.max(a[0], b[0]); - out[1] = Math.max(a[1], b[1]); - out[2] = Math.max(a[2], b[2]); - return out; -} - -/** - * Math.round the components of a vec3 - * - * @param {vec3} out the receiving vector - * @param {vec3} a vector to round - * @returns {vec3} out - */ -function round(out, a) { - out[0] = Math.round(a[0]); - out[1] = Math.round(a[1]); - out[2] = Math.round(a[2]); - return out; -} - -/** - * Scales a vec3 by a scalar number - * - * @param {vec3} out the receiving vector - * @param {vec3} a the vector to scale - * @param {Number} b amount to scale the vector by - * @returns {vec3} out - */ -function scale(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - return out; -} - -/** - * Adds two vec3's after scaling the second operand by a scalar value - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @param {Number} scale the amount to scale b by before adding - * @returns {vec3} out - */ -function scaleAndAdd(out, a, b, scale) { - out[0] = a[0] + b[0] * scale; - out[1] = a[1] + b[1] * scale; - out[2] = a[2] + b[2] * scale; - return out; -} - -/** - * Calculates the euclidian distance between two vec3's - * - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {Number} distance between a and b - */ -function distance(a, b) { - var x = b[0] - a[0]; - var y = b[1] - a[1]; - var z = b[2] - a[2]; - return Math.sqrt(x * x + y * y + z * z); -} - -/** - * Calculates the squared euclidian distance between two vec3's - * - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {Number} squared distance between a and b - */ -function squaredDistance(a, b) { - var x = b[0] - a[0]; - var y = b[1] - a[1]; - var z = b[2] - a[2]; - return x * x + y * y + z * z; -} - -/** - * Calculates the squared length of a vec3 - * - * @param {vec3} a vector to calculate squared length of - * @returns {Number} squared length of a - */ -function squaredLength(a) { - var x = a[0]; - var y = a[1]; - var z = a[2]; - return x * x + y * y + z * z; -} - -/** - * Negates the components of a vec3 - * - * @param {vec3} out the receiving vector - * @param {vec3} a vector to negate - * @returns {vec3} out - */ -function negate(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - out[2] = -a[2]; - return out; -} - -/** - * Returns the inverse of the components of a vec3 - * - * @param {vec3} out the receiving vector - * @param {vec3} a vector to invert - * @returns {vec3} out - */ -function inverse(out, a) { - out[0] = 1.0 / a[0]; - out[1] = 1.0 / a[1]; - out[2] = 1.0 / a[2]; - return out; -} - -/** - * Normalize a vec3 - * - * @param {vec3} out the receiving vector - * @param {vec3} a vector to normalize - * @returns {vec3} out - */ -function normalize(out, a) { - var x = a[0]; - var y = a[1]; - var z = a[2]; - var len = x * x + y * y + z * z; - if (len > 0) { - //TODO: evaluate use of glm_invsqrt here? - len = 1 / Math.sqrt(len); - out[0] = a[0] * len; - out[1] = a[1] * len; - out[2] = a[2] * len; - } - return out; -} - -/** - * Calculates the dot product of two vec3's - * - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {Number} dot product of a and b - */ -function dot(a, b) { - return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; -} - -/** - * Computes the cross product of two vec3's - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {vec3} out - */ -function cross(out, a, b) { - var ax = a[0], - ay = a[1], - az = a[2]; - var bx = b[0], - by = b[1], - bz = b[2]; - - out[0] = ay * bz - az * by; - out[1] = az * bx - ax * bz; - out[2] = ax * by - ay * bx; - return out; -} - -/** - * Performs a linear interpolation between two vec3's - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {vec3} out - */ -function lerp(out, a, b, t) { - var ax = a[0]; - var ay = a[1]; - var az = a[2]; - out[0] = ax + t * (b[0] - ax); - out[1] = ay + t * (b[1] - ay); - out[2] = az + t * (b[2] - az); - return out; -} - -/** - * Performs a hermite interpolation with two control points - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @param {vec3} c the third operand - * @param {vec3} d the fourth operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {vec3} out - */ -function hermite(out, a, b, c, d, t) { - var factorTimes2 = t * t; - var factor1 = factorTimes2 * (2 * t - 3) + 1; - var factor2 = factorTimes2 * (t - 2) + t; - var factor3 = factorTimes2 * (t - 1); - var factor4 = factorTimes2 * (3 - 2 * t); - - out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4; - out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4; - out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4; - - return out; -} - -/** - * Performs a bezier interpolation with two control points - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @param {vec3} c the third operand - * @param {vec3} d the fourth operand - * @param {Number} t interpolation amount, in the range [0-1], between the two inputs - * @returns {vec3} out - */ -function bezier(out, a, b, c, d, t) { - var inverseFactor = 1 - t; - var inverseFactorTimesTwo = inverseFactor * inverseFactor; - var factorTimes2 = t * t; - var factor1 = inverseFactorTimesTwo * inverseFactor; - var factor2 = 3 * t * inverseFactorTimesTwo; - var factor3 = 3 * factorTimes2 * inverseFactor; - var factor4 = factorTimes2 * t; - - out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4; - out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4; - out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4; - - return out; -} - -/** - * Generates a random vector with the given scale - * - * @param {vec3} out the receiving vector - * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned - * @returns {vec3} out - */ -function random(out, scale) { - scale = scale || 1.0; - - var r = glMatrix.RANDOM() * 2.0 * Math.PI; - var z = glMatrix.RANDOM() * 2.0 - 1.0; - var zScale = Math.sqrt(1.0 - z * z) * scale; - - out[0] = Math.cos(r) * zScale; - out[1] = Math.sin(r) * zScale; - out[2] = z * scale; - return out; -} - -/** - * Transforms the vec3 with a mat4. - * 4th vector component is implicitly '1' - * - * @param {vec3} out the receiving vector - * @param {vec3} a the vector to transform - * @param {mat4} m matrix to transform with - * @returns {vec3} out - */ -function transformMat4(out, a, m) { - var x = a[0], - y = a[1], - z = a[2]; - var w = m[3] * x + m[7] * y + m[11] * z + m[15]; - w = w || 1.0; - out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w; - out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w; - out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w; - return out; -} - -/** - * Transforms the vec3 with a mat3. - * - * @param {vec3} out the receiving vector - * @param {vec3} a the vector to transform - * @param {mat3} m the 3x3 matrix to transform with - * @returns {vec3} out - */ -function transformMat3(out, a, m) { - var x = a[0], - y = a[1], - z = a[2]; - out[0] = x * m[0] + y * m[3] + z * m[6]; - out[1] = x * m[1] + y * m[4] + z * m[7]; - out[2] = x * m[2] + y * m[5] + z * m[8]; - return out; -} - -/** - * Transforms the vec3 with a quat - * Can also be used for dual quaternions. (Multiply it with the real part) - * - * @param {vec3} out the receiving vector - * @param {vec3} a the vector to transform - * @param {quat} q quaternion to transform with - * @returns {vec3} out - */ -function transformQuat(out, a, q) { - // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed - var qx = q[0], - qy = q[1], - qz = q[2], - qw = q[3]; - var x = a[0], - y = a[1], - z = a[2]; - // var qvec = [qx, qy, qz]; - // var uv = vec3.cross([], qvec, a); - var uvx = qy * z - qz * y, - uvy = qz * x - qx * z, - uvz = qx * y - qy * x; - // var uuv = vec3.cross([], qvec, uv); - var uuvx = qy * uvz - qz * uvy, - uuvy = qz * uvx - qx * uvz, - uuvz = qx * uvy - qy * uvx; - // vec3.scale(uv, uv, 2 * w); - var w2 = qw * 2; - uvx *= w2; - uvy *= w2; - uvz *= w2; - // vec3.scale(uuv, uuv, 2); - uuvx *= 2; - uuvy *= 2; - uuvz *= 2; - // return vec3.add(out, a, vec3.add(out, uv, uuv)); - out[0] = x + uvx + uuvx; - out[1] = y + uvy + uuvy; - out[2] = z + uvz + uuvz; - return out; -} - -/** - * Rotate a 3D vector around the x-axis - * @param {vec3} out The receiving vec3 - * @param {vec3} a The vec3 point to rotate - * @param {vec3} b The origin of the rotation - * @param {Number} c The angle of rotation - * @returns {vec3} out - */ -function rotateX(out, a, b, c) { - var p = [], - r = []; - //Translate point to the origin - p[0] = a[0] - b[0]; - p[1] = a[1] - b[1]; - p[2] = a[2] - b[2]; - - //perform rotation - r[0] = p[0]; - r[1] = p[1] * Math.cos(c) - p[2] * Math.sin(c); - r[2] = p[1] * Math.sin(c) + p[2] * Math.cos(c); - - //translate to correct position - out[0] = r[0] + b[0]; - out[1] = r[1] + b[1]; - out[2] = r[2] + b[2]; - - return out; -} - -/** - * Rotate a 3D vector around the y-axis - * @param {vec3} out The receiving vec3 - * @param {vec3} a The vec3 point to rotate - * @param {vec3} b The origin of the rotation - * @param {Number} c The angle of rotation - * @returns {vec3} out - */ -function rotateY(out, a, b, c) { - var p = [], - r = []; - //Translate point to the origin - p[0] = a[0] - b[0]; - p[1] = a[1] - b[1]; - p[2] = a[2] - b[2]; - - //perform rotation - r[0] = p[2] * Math.sin(c) + p[0] * Math.cos(c); - r[1] = p[1]; - r[2] = p[2] * Math.cos(c) - p[0] * Math.sin(c); - - //translate to correct position - out[0] = r[0] + b[0]; - out[1] = r[1] + b[1]; - out[2] = r[2] + b[2]; - - return out; -} - -/** - * Rotate a 3D vector around the z-axis - * @param {vec3} out The receiving vec3 - * @param {vec3} a The vec3 point to rotate - * @param {vec3} b The origin of the rotation - * @param {Number} c The angle of rotation - * @returns {vec3} out - */ -function rotateZ(out, a, b, c) { - var p = [], - r = []; - //Translate point to the origin - p[0] = a[0] - b[0]; - p[1] = a[1] - b[1]; - p[2] = a[2] - b[2]; - - //perform rotation - r[0] = p[0] * Math.cos(c) - p[1] * Math.sin(c); - r[1] = p[0] * Math.sin(c) + p[1] * Math.cos(c); - r[2] = p[2]; - - //translate to correct position - out[0] = r[0] + b[0]; - out[1] = r[1] + b[1]; - out[2] = r[2] + b[2]; - - return out; -} - -/** - * Get the angle between two 3D vectors - * @param {vec3} a The first operand - * @param {vec3} b The second operand - * @returns {Number} The angle in radians - */ -function angle(a, b) { - var tempA = fromValues(a[0], a[1], a[2]); - var tempB = fromValues(b[0], b[1], b[2]); - - normalize(tempA, tempA); - normalize(tempB, tempB); - - var cosine = dot(tempA, tempB); - - if (cosine > 1.0) { - return 0; - } else if (cosine < -1.0) { - return Math.PI; - } else { - return Math.acos(cosine); - } -} - -/** - * Returns a string representation of a vector - * - * @param {vec3} a vector to represent as a string - * @returns {String} string representation of the vector - */ -function str(a) { - return 'vec3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ')'; -} - -/** - * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===) - * - * @param {vec3} a The first vector. - * @param {vec3} b The second vector. - * @returns {Boolean} True if the vectors are equal, false otherwise. - */ -function exactEquals(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2]; -} - -/** - * Returns whether or not the vectors have approximately the same elements in the same position. - * - * @param {vec3} a The first vector. - * @param {vec3} b The second vector. - * @returns {Boolean} True if the vectors are equal, false otherwise. - */ -function equals(a, b) { - var a0 = a[0], - a1 = a[1], - a2 = a[2]; - var b0 = b[0], - b1 = b[1], - b2 = b[2]; - return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)); -} - -/** - * Alias for {@link vec3.subtract} - * @function - */ -var sub = exports.sub = subtract; - -/** - * Alias for {@link vec3.multiply} - * @function - */ -var mul = exports.mul = multiply; - -/** - * Alias for {@link vec3.divide} - * @function - */ -var div = exports.div = divide; - -/** - * Alias for {@link vec3.distance} - * @function - */ -var dist = exports.dist = distance; - -/** - * Alias for {@link vec3.squaredDistance} - * @function - */ -var sqrDist = exports.sqrDist = squaredDistance; - -/** - * Alias for {@link vec3.length} - * @function - */ -var len = exports.len = length; - -/** - * Alias for {@link vec3.squaredLength} - * @function - */ -var sqrLen = exports.sqrLen = squaredLength; - -/** - * Perform some operation over an array of vec3s. - * - * @param {Array} a the array of vectors to iterate over - * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed - * @param {Number} offset Number of elements to skip at the beginning of the array - * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array - * @param {Function} fn Function to call for each vector in the array - * @param {Object} [arg] additional argument to pass to fn - * @returns {Array} a - * @function - */ -var forEach = exports.forEach = function () { - var vec = create(); - - return function (a, stride, offset, count, fn, arg) { - var i = void 0, - l = void 0; - if (!stride) { - stride = 3; - } - - if (!offset) { - offset = 0; - } - - if (count) { - l = Math.min(count * stride + offset, a.length); - } else { - l = a.length; - } - - for (i = offset; i < l; i += stride) { - vec[0] = a[i];vec[1] = a[i + 1];vec[2] = a[i + 2]; - fn(vec, vec, arg); - a[i] = vec[0];a[i + 1] = vec[1];a[i + 2] = vec[2]; - } - - return a; - }; -}(); - -/***/ }), - -/***/ "./node_modules/@antv/matrix-util/esm/index.js": -/*!*****************************************************!*\ - !*** ./node_modules/@antv/matrix-util/esm/index.js ***! - \*****************************************************/ -/*! exports provided: mat3, vec2, vec3, transform */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _mat3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mat3 */ "./node_modules/@antv/matrix-util/esm/mat3.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mat3", function() { return _mat3__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _vec2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./vec2 */ "./node_modules/@antv/matrix-util/esm/vec2.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "vec2", function() { return _vec2__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - -/* harmony import */ var _vec3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./vec3 */ "./node_modules/@antv/matrix-util/esm/vec3.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "vec3", function() { return _vec3__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - -/* harmony import */ var _transform__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./transform */ "./node_modules/@antv/matrix-util/esm/transform.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transform", function() { return _transform__WEBPACK_IMPORTED_MODULE_3__["default"]; }); - -// matrix - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/matrix-util/esm/mat3.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/matrix-util/esm/mat3.js ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_gl_matrix_lib_gl_matrix_mat3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/gl-matrix/lib/gl-matrix/mat3 */ "./node_modules/@antv/gl-matrix/lib/gl-matrix/mat3.js"); -/* harmony import */ var _antv_gl_matrix_lib_gl_matrix_mat3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_antv_gl_matrix_lib_gl_matrix_mat3__WEBPACK_IMPORTED_MODULE_0__); - -_antv_gl_matrix_lib_gl_matrix_mat3__WEBPACK_IMPORTED_MODULE_0__["translate"] = function (out, a, v) { - var transMat = new Array(9); - _antv_gl_matrix_lib_gl_matrix_mat3__WEBPACK_IMPORTED_MODULE_0__["fromTranslation"](transMat, v); - return _antv_gl_matrix_lib_gl_matrix_mat3__WEBPACK_IMPORTED_MODULE_0__["multiply"](out, transMat, a); -}; -_antv_gl_matrix_lib_gl_matrix_mat3__WEBPACK_IMPORTED_MODULE_0__["rotate"] = function (out, a, rad) { - var rotateMat = new Array(9); - _antv_gl_matrix_lib_gl_matrix_mat3__WEBPACK_IMPORTED_MODULE_0__["fromRotation"](rotateMat, rad); - return _antv_gl_matrix_lib_gl_matrix_mat3__WEBPACK_IMPORTED_MODULE_0__["multiply"](out, rotateMat, a); -}; -_antv_gl_matrix_lib_gl_matrix_mat3__WEBPACK_IMPORTED_MODULE_0__["scale"] = function (out, a, v) { - var scaleMat = new Array(9); - _antv_gl_matrix_lib_gl_matrix_mat3__WEBPACK_IMPORTED_MODULE_0__["fromScaling"](scaleMat, v); - return _antv_gl_matrix_lib_gl_matrix_mat3__WEBPACK_IMPORTED_MODULE_0__["multiply"](out, scaleMat, a); -}; -_antv_gl_matrix_lib_gl_matrix_mat3__WEBPACK_IMPORTED_MODULE_0__["transform"] = function (m, actions) { - var out = [].concat(m); - for (var i = 0, len = actions.length; i < len; i++) { - var action = actions[i]; - switch (action[0]) { - case 't': - _antv_gl_matrix_lib_gl_matrix_mat3__WEBPACK_IMPORTED_MODULE_0__["translate"](out, out, [action[1], action[2]]); - break; - case 's': - _antv_gl_matrix_lib_gl_matrix_mat3__WEBPACK_IMPORTED_MODULE_0__["scale"](out, out, [action[1], action[2]]); - break; - case 'r': - _antv_gl_matrix_lib_gl_matrix_mat3__WEBPACK_IMPORTED_MODULE_0__["rotate"](out, out, action[1]); - break; - default: - break; - } - } - return out; -}; -/* harmony default export */ __webpack_exports__["default"] = (_antv_gl_matrix_lib_gl_matrix_mat3__WEBPACK_IMPORTED_MODULE_0__); -//# sourceMappingURL=mat3.js.map - -/***/ }), - -/***/ "./node_modules/@antv/matrix-util/esm/transform.js": -/*!*********************************************************!*\ - !*** ./node_modules/@antv/matrix-util/esm/transform.js ***! - \*********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _mat3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mat3 */ "./node_modules/@antv/matrix-util/esm/mat3.js"); - - -/* harmony default export */ __webpack_exports__["default"] = (function (m, ts) { - // 上层使用时会传入为 null 的 matrix,此时按照单位矩阵处理 - var matrix = m ? Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["clone"])(m) : [1, 0, 0, 0, 1, 0, 0, 0, 1]; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(ts, function (t) { - switch (t[0]) { - case 't': - _mat3__WEBPACK_IMPORTED_MODULE_1__["default"].translate(matrix, matrix, [t[1], t[2]]); - break; - case 's': - _mat3__WEBPACK_IMPORTED_MODULE_1__["default"].scale(matrix, matrix, [t[1], t[2]]); - break; - case 'r': - _mat3__WEBPACK_IMPORTED_MODULE_1__["default"].rotate(matrix, matrix, t[1]); - break; - case 'm': - _mat3__WEBPACK_IMPORTED_MODULE_1__["default"].multiply(matrix, matrix, t[1]); - break; - default: - return false; - } - }); - return matrix; -}); -//# sourceMappingURL=transform.js.map - -/***/ }), - -/***/ "./node_modules/@antv/matrix-util/esm/vec2.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/matrix-util/esm/vec2.js ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_gl_matrix_lib_gl_matrix_vec2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/gl-matrix/lib/gl-matrix/vec2 */ "./node_modules/@antv/gl-matrix/lib/gl-matrix/vec2.js"); -/* harmony import */ var _antv_gl_matrix_lib_gl_matrix_vec2__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_antv_gl_matrix_lib_gl_matrix_vec2__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - - -_antv_gl_matrix_lib_gl_matrix_vec2__WEBPACK_IMPORTED_MODULE_0__["angle"] = function (v1, v2) { - var theta = _antv_gl_matrix_lib_gl_matrix_vec2__WEBPACK_IMPORTED_MODULE_0__["dot"](v1, v2) / (_antv_gl_matrix_lib_gl_matrix_vec2__WEBPACK_IMPORTED_MODULE_0__["length"](v1) * _antv_gl_matrix_lib_gl_matrix_vec2__WEBPACK_IMPORTED_MODULE_0__["length"](v2)); - return Math.acos(Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["clamp"])(theta, -1, 1)); -}; -/** - * 向量 v1 到 向量 v2 夹角的方向 - * @param {Array} v1 向量 - * @param {Array} v2 向量 - * @return {Boolean} >= 0 顺时针 < 0 逆时针 - */ -_antv_gl_matrix_lib_gl_matrix_vec2__WEBPACK_IMPORTED_MODULE_0__["direction"] = function (v1, v2) { - return v1[0] * v2[1] - v2[0] * v1[1]; -}; -_antv_gl_matrix_lib_gl_matrix_vec2__WEBPACK_IMPORTED_MODULE_0__["angleTo"] = function (v1, v2, direct) { - var angle = _antv_gl_matrix_lib_gl_matrix_vec2__WEBPACK_IMPORTED_MODULE_0__["angle"](v1, v2); - var angleLargeThanPI = _antv_gl_matrix_lib_gl_matrix_vec2__WEBPACK_IMPORTED_MODULE_0__["direction"](v1, v2) >= 0; - if (direct) { - if (angleLargeThanPI) { - return Math.PI * 2 - angle; - } - return angle; - } - if (angleLargeThanPI) { - return angle; - } - return Math.PI * 2 - angle; -}; -_antv_gl_matrix_lib_gl_matrix_vec2__WEBPACK_IMPORTED_MODULE_0__["vertical"] = function (out, v, flag) { - if (flag) { - out[0] = v[1]; - out[1] = -1 * v[0]; - } - else { - out[0] = -1 * v[1]; - out[1] = v[0]; - } - return out; -}; -/* harmony default export */ __webpack_exports__["default"] = (_antv_gl_matrix_lib_gl_matrix_vec2__WEBPACK_IMPORTED_MODULE_0__); -//# sourceMappingURL=vec2.js.map - -/***/ }), - -/***/ "./node_modules/@antv/matrix-util/esm/vec3.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/matrix-util/esm/vec3.js ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_gl_matrix_lib_gl_matrix_vec3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/gl-matrix/lib/gl-matrix/vec3 */ "./node_modules/@antv/gl-matrix/lib/gl-matrix/vec3.js"); -/* harmony import */ var _antv_gl_matrix_lib_gl_matrix_vec3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_antv_gl_matrix_lib_gl_matrix_vec3__WEBPACK_IMPORTED_MODULE_0__); - -/* harmony default export */ __webpack_exports__["default"] = (_antv_gl_matrix_lib_gl_matrix_vec3__WEBPACK_IMPORTED_MODULE_0__); -//# sourceMappingURL=vec3.js.map - -/***/ }), - -/***/ "./node_modules/@antv/path-util/esm/catmull-rom-2-bezier.js": -/*!******************************************************************!*\ - !*** ./node_modules/@antv/path-util/esm/catmull-rom-2-bezier.js ***! - \******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return catmullRom2Bezier; }); -// http://schepers.cc/getting-to-the-point -function catmullRom2Bezier(crp, z) { - var d = []; - // @ts-ignore - for (var i = 0, iLen = crp.length; iLen - 2 * !z > i; i += 2) { - var p = [{ - x: +crp[i - 2], - y: +crp[i - 1], - }, { - x: +crp[i], - y: +crp[i + 1], - }, { - x: +crp[i + 2], - y: +crp[i + 3], - }, { - x: +crp[i + 4], - y: +crp[i + 5], - }]; - if (z) { - if (!i) { - p[0] = { - x: +crp[iLen - 2], - y: +crp[iLen - 1], - }; - } - else if (iLen - 4 === i) { - p[3] = { - x: +crp[0], - y: +crp[1], - }; - } - else if (iLen - 2 === i) { - p[2] = { - x: +crp[0], - y: +crp[1], - }; - p[3] = { - x: +crp[2], - y: +crp[3], - }; - } - } - else { - if (iLen - 4 === i) { - p[3] = p[2]; - } - else if (!i) { - p[0] = { - x: +crp[i], - y: +crp[i + 1], - }; - } - } - d.push(['C', - (-p[0].x + 6 * p[1].x + p[2].x) / 6, - (-p[0].y + 6 * p[1].y + p[2].y) / 6, - (p[1].x + 6 * p[2].x - p[3].x) / 6, - (p[1].y + 6 * p[2].y - p[3].y) / 6, - p[2].x, - p[2].y, - ]); - } - return d; -} -//# sourceMappingURL=catmull-rom-2-bezier.js.map - -/***/ }), - -/***/ "./node_modules/@antv/path-util/esm/fill-path-by-diff.js": -/*!***************************************************************!*\ - !*** ./node_modules/@antv/path-util/esm/fill-path-by-diff.js ***! - \***************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return fillPathByDiff; }); -/* harmony import */ var _antv_util_lib_is_equal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util/lib/is-equal */ "./node_modules/@antv/util/lib/is-equal.js"); -/* harmony import */ var _antv_util_lib_is_equal__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_antv_util_lib_is_equal__WEBPACK_IMPORTED_MODULE_0__); - -function getMinDiff(del, add, modify) { - var type = null; - var min = modify; - if (add < min) { - min = add; - type = 'add'; - } - if (del < min) { - min = del; - type = 'del'; - } - return { - type: type, - min: min, - }; -} -/* - * https://en.wikipedia.org/wiki/Levenshtein_distance - * 计算两条path的编辑距离 - */ -var levenshteinDistance = function (source, target) { - var sourceLen = source.length; - var targetLen = target.length; - var sourceSegment, targetSegment; - var temp = 0; - if (sourceLen === 0 || targetLen === 0) { - return null; - } - var dist = []; - for (var i = 0; i <= sourceLen; i++) { - dist[i] = []; - dist[i][0] = { min: i }; - } - for (var j = 0; j <= targetLen; j++) { - dist[0][j] = { min: j }; - } - for (var i = 1; i <= sourceLen; i++) { - sourceSegment = source[i - 1]; - for (var j = 1; j <= targetLen; j++) { - targetSegment = target[j - 1]; - if (_antv_util_lib_is_equal__WEBPACK_IMPORTED_MODULE_0___default()(sourceSegment, targetSegment)) { - temp = 0; - } - else { - temp = 1; - } - var del = dist[i - 1][j].min + 1; - var add = dist[i][j - 1].min + 1; - var modify = dist[i - 1][j - 1].min + temp; - dist[i][j] = getMinDiff(del, add, modify); - } - } - return dist; -}; -function fillPathByDiff(source, target) { - var diffMatrix = levenshteinDistance(source, target); - var sourceLen = source.length; - var targetLen = target.length; - var changes = []; - var index = 1; - var minPos = 1; - // 如果source和target不是完全不相等 - // @ts-ignore - if (diffMatrix[sourceLen][targetLen] !== sourceLen) { - // 获取从source到target所需改动 - for (var i = 1; i <= sourceLen; i++) { - var min = diffMatrix[i][i].min; - minPos = i; - for (var j = index; j <= targetLen; j++) { - if (diffMatrix[i][j].min < min) { - min = diffMatrix[i][j].min; - minPos = j; - } - } - index = minPos; - if (diffMatrix[i][index].type) { - changes.push({ index: i - 1, type: diffMatrix[i][index].type }); - } - } - // 对source进行增删path - for (var i = changes.length - 1; i >= 0; i--) { - index = changes[i].index; - if (changes[i].type === 'add') { - // @ts-ignore - source.splice(index, 0, [].concat(source[index])); - } - else { - // @ts-ignore - source.splice(index, 1); - } - } - } - // source尾部补齐 - sourceLen = source.length; - if (sourceLen < targetLen) { - for (var i = 0; i < (targetLen - sourceLen); i++) { - if (source[sourceLen - 1][0] === 'z' || source[sourceLen - 1][0] === 'Z') { - // @ts-ignore - source.splice(sourceLen - 2, 0, source[sourceLen - 2]); - } - else { - // @ts-ignore - source.push(source[sourceLen - 1]); - } - } - } - return source; -} -//# sourceMappingURL=fill-path-by-diff.js.map - -/***/ }), - -/***/ "./node_modules/@antv/path-util/esm/fill-path.js": -/*!*******************************************************!*\ - !*** ./node_modules/@antv/path-util/esm/fill-path.js ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return fillPath; }); -function decasteljau(points, t) { - var left = []; - var right = []; - function recurse(points, t) { - if (points.length === 1) { - left.push(points[0]); - right.push(points[0]); - } - else { - var middlePoints = []; - for (var i = 0; i < points.length - 1; i++) { - if (i === 0) { - left.push(points[0]); - } - if (i === points.length - 2) { - right.push(points[i + 1]); - } - middlePoints[i] = [(1 - t) * points[i][0] + t * points[i + 1][0], (1 - t) * points[i][1] + t * points[i + 1][1]]; - } - recurse(middlePoints, t); - } - } - if (points.length) { - recurse(points, t); - } - return { left: left, right: right.reverse() }; -} -function splitCurve(start, end, count) { - var points = [[start[1], start[2]]]; - count = count || 2; - var segments = []; - if (end[0] === 'A') { - points.push(end[6]); - points.push(end[7]); - } - else if (end[0] === 'C') { - points.push([end[1], end[2]]); - points.push([end[3], end[4]]); - points.push([end[5], end[6]]); - } - else if (end[0] === 'S' || end[0] === 'Q') { - points.push([end[1], end[2]]); - points.push([end[3], end[4]]); - } - else { - points.push([end[1], end[2]]); - } - var leftSegments = points; - var t = 1 / count; - for (var i = 0; i < count - 1; i++) { - var rt = t / (1 - t * i); - var split = decasteljau(leftSegments, rt); - segments.push(split.left); - leftSegments = split.right; - } - segments.push(leftSegments); - var result = segments.map(function (segment) { - var cmd = []; - if (segment.length === 4) { - cmd.push('C'); - cmd = cmd.concat(segment[2]); - } - if (segment.length >= 3) { - if (segment.length === 3) { - cmd.push('Q'); - } - cmd = cmd.concat(segment[1]); - } - if (segment.length === 2) { - cmd.push('L'); - } - cmd = cmd.concat(segment[segment.length - 1]); - return cmd; - }); - return result; -} -function splitSegment(start, end, count) { - if (count === 1) { - return [[].concat(start)]; - } - var segments = []; - if (end[0] === 'L' || end[0] === 'C' || end[0] === 'Q') { - segments = segments.concat(splitCurve(start, end, count)); - } - else { - var temp = [].concat(start); - if (temp[0] === 'M') { - temp[0] = 'L'; - } - for (var i = 0; i <= count - 1; i++) { - segments.push(temp); - } - } - return segments; -} -function fillPath(source, target) { - if (source.length === 1) { - return source; - } - var sourceLen = source.length - 1; - var targetLen = target.length - 1; - var ratio = sourceLen / targetLen; - var segmentsToFill = []; - if (source.length === 1 && source[0][0] === 'M') { - for (var i = 0; i < targetLen - sourceLen; i++) { - source.push(source[0]); - } - return source; - } - for (var i = 0; i < targetLen; i++) { - var index = Math.floor(ratio * i); - segmentsToFill[index] = (segmentsToFill[index] || 0) + 1; - } - var filled = segmentsToFill.reduce(function (filled, count, i) { - if (i === sourceLen) { - return filled.concat(source[sourceLen]); - } - return filled.concat(splitSegment(source[i], source[i + 1], count)); - }, []); - filled.unshift(source[0]); - if (target[targetLen] === 'Z' || target[targetLen] === 'z') { - filled.push('Z'); - } - return filled; -} -//# sourceMappingURL=fill-path.js.map - -/***/ }), - -/***/ "./node_modules/@antv/path-util/esm/format-path.js": -/*!*********************************************************!*\ - !*** ./node_modules/@antv/path-util/esm/format-path.js ***! - \*********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatPath; }); -/* - * 抽取pathSegment中的关键点 - * M,L,A,Q,H,V一个端点 - * Q, S抽取一个端点,一个控制点 - * C抽取一个端点,两个控制点 - */ -function _getSegmentPoints(segment) { - var points = []; - switch (segment[0]) { - case 'M': - points.push([segment[1], segment[2]]); - break; - case 'L': - points.push([segment[1], segment[2]]); - break; - case 'A': - points.push([segment[6], segment[7]]); - break; - case 'Q': - points.push([segment[3], segment[4]]); - points.push([segment[1], segment[2]]); - break; - case 'T': - points.push([segment[1], segment[2]]); - break; - case 'C': - points.push([segment[5], segment[6]]); - points.push([segment[1], segment[2]]); - points.push([segment[3], segment[4]]); - break; - case 'S': - points.push([segment[3], segment[4]]); - points.push([segment[1], segment[2]]); - break; - case 'H': - points.push([segment[1], segment[1]]); - break; - case 'V': - points.push([segment[1], segment[1]]); - break; - default: - } - return points; -} -// 将两个点均分成count个点 -function _splitPoints(points, former, count) { - var result = [].concat(points); - var index; - var t = 1 / (count + 1); - var formerEnd = _getSegmentPoints(former)[0]; - for (var i = 1; i <= count; i++) { - t *= i; - index = Math.floor(points.length * t); - if (index === 0) { - result.unshift([formerEnd[0] * t + points[index][0] * (1 - t), formerEnd[1] * t + points[index][1] * (1 - t)]); - } - else { - result.splice(index, 0, [formerEnd[0] * t + points[index][0] * (1 - t), formerEnd[1] * t + points[index][1] * (1 - t)]); - } - } - return result; -} -function formatPath(fromPath, toPath) { - if (fromPath.length <= 1) { - return fromPath; - } - var points; - for (var i = 0; i < toPath.length; i++) { - if (fromPath[i][0] !== toPath[i][0]) { - // 获取fromPath的pathSegment的端点,根据toPath的指令对其改造 - points = _getSegmentPoints(fromPath[i]); - switch (toPath[i][0]) { - case 'M': - fromPath[i] = ['M'].concat(points[0]); - break; - case 'L': - fromPath[i] = ['L'].concat(points[0]); - break; - case 'A': - fromPath[i] = [].concat(toPath[i]); - fromPath[i][6] = points[0][0]; - fromPath[i][7] = points[0][1]; - break; - case 'Q': - if (points.length < 2) { - if (i > 0) { - points = _splitPoints(points, fromPath[i - 1], 1); - } - else { - fromPath[i] = toPath[i]; - break; - } - } - fromPath[i] = ['Q'].concat(points.reduce(function (arr, i) { return arr.concat(i); }, [])); - break; - case 'T': - fromPath[i] = ['T'].concat(points[0]); - break; - case 'C': - if (points.length < 3) { - if (i > 0) { - points = _splitPoints(points, fromPath[i - 1], 2); - } - else { - fromPath[i] = toPath[i]; - break; - } - } - fromPath[i] = ['C'].concat(points.reduce(function (arr, i) { return arr.concat(i); }, [])); - break; - case 'S': - if (points.length < 2) { - if (i > 0) { - points = _splitPoints(points, fromPath[i - 1], 1); - } - else { - fromPath[i] = toPath[i]; - break; - } - } - fromPath[i] = ['S'].concat(points.reduce(function (arr, i) { return arr.concat(i); }, [])); - break; - default: - fromPath[i] = toPath[i]; - } - } - } - return fromPath; -} -//# sourceMappingURL=format-path.js.map - -/***/ }), - -/***/ "./node_modules/@antv/path-util/esm/get-arc-params.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/path-util/esm/get-arc-params.js ***! - \************************************************************/ -/*! exports provided: isSamePoint, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSamePoint", function() { return isSamePoint; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getArcParams; }); -/* harmony import */ var _antv_util_lib_mod__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util/lib/mod */ "./node_modules/@antv/util/lib/mod.js"); -/* harmony import */ var _antv_util_lib_mod__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_antv_util_lib_mod__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _antv_util_lib_to_radian__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util/lib/to-radian */ "./node_modules/@antv/util/lib/to-radian.js"); -/* harmony import */ var _antv_util_lib_to_radian__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_antv_util_lib_to_radian__WEBPACK_IMPORTED_MODULE_1__); - - -// 向量长度 -function vMag(v) { - return Math.sqrt(v[0] * v[0] + v[1] * v[1]); -} -// u.v/|u||v|,计算夹角的余弦值 -function vRatio(u, v) { - // 当存在一个向量的长度为 0 时,夹角也为 0,即夹角的余弦值为 1 - return vMag(u) * vMag(v) ? (u[0] * v[0] + u[1] * v[1]) / (vMag(u) * vMag(v)) : 1; -} -// 向量角度 -function vAngle(u, v) { - return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vRatio(u, v)); -} -/** - * 判断两个点是否重合,点坐标的格式为 [x, y] - * @param {Array} point1 第一个点 - * @param {Array} point2 第二个点 - */ -function isSamePoint(point1, point2) { - return point1[0] === point2[0] && point1[1] === point2[1]; -} -// A 0:rx 1:ry 2:x-axis-rotation 3:large-arc-flag 4:sweep-flag 5: x 6: y -function getArcParams(startPoint, params) { - var rx = params[1]; - var ry = params[2]; - var xRotation = _antv_util_lib_mod__WEBPACK_IMPORTED_MODULE_0___default()(_antv_util_lib_to_radian__WEBPACK_IMPORTED_MODULE_1___default()(params[3]), Math.PI * 2); - var arcFlag = params[4]; - var sweepFlag = params[5]; - // 弧形起点坐标 - var x1 = startPoint[0]; - var y1 = startPoint[1]; - // 弧形终点坐标 - var x2 = params[6]; - var y2 = params[7]; - var xp = (Math.cos(xRotation) * (x1 - x2)) / 2.0 + (Math.sin(xRotation) * (y1 - y2)) / 2.0; - var yp = (-1 * Math.sin(xRotation) * (x1 - x2)) / 2.0 + (Math.cos(xRotation) * (y1 - y2)) / 2.0; - var lambda = (xp * xp) / (rx * rx) + (yp * yp) / (ry * ry); - if (lambda > 1) { - rx *= Math.sqrt(lambda); - ry *= Math.sqrt(lambda); - } - var diff = rx * rx * (yp * yp) + ry * ry * (xp * xp); - var f = diff ? Math.sqrt((rx * rx * (ry * ry) - diff) / diff) : 1; - if (arcFlag === sweepFlag) { - f *= -1; - } - if (isNaN(f)) { - f = 0; - } - // 旋转前的起点坐标,且当长半轴和短半轴的长度为 0 时,坐标按 (0, 0) 处理 - var cxp = ry ? (f * rx * yp) / ry : 0; - var cyp = rx ? (f * -ry * xp) / rx : 0; - // 椭圆圆心坐标 - var cx = (x1 + x2) / 2.0 + Math.cos(xRotation) * cxp - Math.sin(xRotation) * cyp; - var cy = (y1 + y2) / 2.0 + Math.sin(xRotation) * cxp + Math.cos(xRotation) * cyp; - // 起始点的单位向量 - var u = [(xp - cxp) / rx, (yp - cyp) / ry]; - // 终止点的单位向量 - var v = [(-1 * xp - cxp) / rx, (-1 * yp - cyp) / ry]; - // 计算起始点和圆心的连线,与 x 轴正方向的夹角 - var theta = vAngle([1, 0], u); - // 计算圆弧起始点和终止点与椭圆圆心连线的夹角 - var dTheta = vAngle(u, v); - if (vRatio(u, v) <= -1) { - dTheta = Math.PI; - } - if (vRatio(u, v) >= 1) { - dTheta = 0; - } - if (sweepFlag === 0 && dTheta > 0) { - dTheta = dTheta - 2 * Math.PI; - } - if (sweepFlag === 1 && dTheta < 0) { - dTheta = dTheta + 2 * Math.PI; - } - return { - cx: cx, - cy: cy, - // 弧形的起点和终点相同时,长轴和短轴的长度按 0 处理 - rx: isSamePoint(startPoint, [x2, y2]) ? 0 : rx, - ry: isSamePoint(startPoint, [x2, y2]) ? 0 : ry, - startAngle: theta, - endAngle: theta + dTheta, - xRotation: xRotation, - arcFlag: arcFlag, - sweepFlag: sweepFlag, - }; -} -//# sourceMappingURL=get-arc-params.js.map - -/***/ }), - -/***/ "./node_modules/@antv/path-util/esm/get-line-intersect.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/path-util/esm/get-line-intersect.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getLineIntersect; }); -var isBetween = function (value, min, max) { return value >= min && value <= max; }; -function getLineIntersect(p0, p1, p2, p3) { - var tolerance = 0.001; - var E = { - x: p2.x - p0.x, - y: p2.y - p0.y, - }; - var D0 = { - x: p1.x - p0.x, - y: p1.y - p0.y, - }; - var D1 = { - x: p3.x - p2.x, - y: p3.y - p2.y, - }; - var kross = D0.x * D1.y - D0.y * D1.x; - var sqrKross = kross * kross; - var sqrLen0 = D0.x * D0.x + D0.y * D0.y; - var sqrLen1 = D1.x * D1.x + D1.y * D1.y; - var point = null; - if (sqrKross > tolerance * sqrLen0 * sqrLen1) { - var s = (E.x * D1.y - E.y * D1.x) / kross; - var t = (E.x * D0.y - E.y * D0.x) / kross; - if (isBetween(s, 0, 1) && isBetween(t, 0, 1)) { - point = { - x: p0.x + s * D0.x, - y: p0.y + s * D0.y, - }; - } - } - return point; -} -; -//# sourceMappingURL=get-line-intersect.js.map - -/***/ }), - -/***/ "./node_modules/@antv/path-util/esm/index.js": -/*!***************************************************!*\ - !*** ./node_modules/@antv/path-util/esm/index.js ***! - \***************************************************/ -/*! exports provided: parsePath, catmullRom2Bezier, fillPath, fillPathByDiff, formatPath, pathIntersection, parsePathArray, parsePathString, path2Curve, path2Absolute, reactPath, getArcParams, path2Segments, getLineIntersect, isPolygonsIntersect, isPointInPolygon */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _parse_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./parse-path */ "./node_modules/@antv/path-util/esm/parse-path.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parsePath", function() { return _parse_path__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _catmull_rom_2_bezier__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./catmull-rom-2-bezier */ "./node_modules/@antv/path-util/esm/catmull-rom-2-bezier.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "catmullRom2Bezier", function() { return _catmull_rom_2_bezier__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - -/* harmony import */ var _fill_path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fill-path */ "./node_modules/@antv/path-util/esm/fill-path.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fillPath", function() { return _fill_path__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - -/* harmony import */ var _fill_path_by_diff__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fill-path-by-diff */ "./node_modules/@antv/path-util/esm/fill-path-by-diff.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fillPathByDiff", function() { return _fill_path_by_diff__WEBPACK_IMPORTED_MODULE_3__["default"]; }); - -/* harmony import */ var _format_path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./format-path */ "./node_modules/@antv/path-util/esm/format-path.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatPath", function() { return _format_path__WEBPACK_IMPORTED_MODULE_4__["default"]; }); - -/* harmony import */ var _path_intersection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./path-intersection */ "./node_modules/@antv/path-util/esm/path-intersection.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pathIntersection", function() { return _path_intersection__WEBPACK_IMPORTED_MODULE_5__["default"]; }); - -/* harmony import */ var _parse_path_array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./parse-path-array */ "./node_modules/@antv/path-util/esm/parse-path-array.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parsePathArray", function() { return _parse_path_array__WEBPACK_IMPORTED_MODULE_6__["default"]; }); - -/* harmony import */ var _parse_path_string__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./parse-path-string */ "./node_modules/@antv/path-util/esm/parse-path-string.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parsePathString", function() { return _parse_path_string__WEBPACK_IMPORTED_MODULE_7__["default"]; }); - -/* harmony import */ var _path_2_curve__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./path-2-curve */ "./node_modules/@antv/path-util/esm/path-2-curve.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "path2Curve", function() { return _path_2_curve__WEBPACK_IMPORTED_MODULE_8__["default"]; }); - -/* harmony import */ var _path_2_absolute__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./path-2-absolute */ "./node_modules/@antv/path-util/esm/path-2-absolute.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "path2Absolute", function() { return _path_2_absolute__WEBPACK_IMPORTED_MODULE_9__["default"]; }); - -/* harmony import */ var _rect_path__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./rect-path */ "./node_modules/@antv/path-util/esm/rect-path.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reactPath", function() { return _rect_path__WEBPACK_IMPORTED_MODULE_10__["default"]; }); - -/* harmony import */ var _get_arc_params__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./get-arc-params */ "./node_modules/@antv/path-util/esm/get-arc-params.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getArcParams", function() { return _get_arc_params__WEBPACK_IMPORTED_MODULE_11__["default"]; }); - -/* harmony import */ var _path_2_segments__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./path-2-segments */ "./node_modules/@antv/path-util/esm/path-2-segments.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "path2Segments", function() { return _path_2_segments__WEBPACK_IMPORTED_MODULE_12__["default"]; }); - -/* harmony import */ var _get_line_intersect__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./get-line-intersect */ "./node_modules/@antv/path-util/esm/get-line-intersect.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getLineIntersect", function() { return _get_line_intersect__WEBPACK_IMPORTED_MODULE_13__["default"]; }); - -/* harmony import */ var _is_polygons_intersect__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./is-polygons-intersect */ "./node_modules/@antv/path-util/esm/is-polygons-intersect.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isPolygonsIntersect", function() { return _is_polygons_intersect__WEBPACK_IMPORTED_MODULE_14__["default"]; }); - -/* harmony import */ var _point_in_polygon__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./point-in-polygon */ "./node_modules/@antv/path-util/esm/point-in-polygon.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isPointInPolygon", function() { return _point_in_polygon__WEBPACK_IMPORTED_MODULE_15__["default"]; }); - - - - - - - - - - - - - - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/path-util/esm/is-polygons-intersect.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@antv/path-util/esm/is-polygons-intersect.js ***! - \*******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isPolygonsIntersect; }); -/* harmony import */ var _point_in_polygon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./point-in-polygon */ "./node_modules/@antv/path-util/esm/point-in-polygon.js"); -/* harmony import */ var _get_line_intersect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./get-line-intersect */ "./node_modules/@antv/path-util/esm/get-line-intersect.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - - - -function parseToLines(points) { - var lines = []; - var count = points.length; - for (var i = 0; i < count - 1; i++) { - var point = points[i]; - var next = points[i + 1]; - lines.push({ - from: { - x: point[0], - y: point[1] - }, - to: { - x: next[0], - y: next[1] - } - }); - } - if (lines.length > 1) { - var first = points[0]; - var last = points[count - 1]; - lines.push({ - from: { - x: last[0], - y: last[1] - }, - to: { - x: first[0], - y: first[1] - } - }); - } - return lines; -} -function lineIntersectPolygon(lines, line) { - var isIntersect = false; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(lines, function (l) { - if (Object(_get_line_intersect__WEBPACK_IMPORTED_MODULE_1__["default"])(l.from, l.to, line.from, line.to)) { - isIntersect = true; - return false; - } - }); - return isIntersect; -} -function getBBox(points) { - var xArr = points.map(function (p) { return p[0]; }); - var yArr = points.map(function (p) { return p[1]; }); - return { - minX: Math.min.apply(null, xArr), - maxX: Math.max.apply(null, xArr), - minY: Math.min.apply(null, yArr), - maxY: Math.max.apply(null, yArr) - }; -} -function intersectBBox(box1, box2) { - return !(box2.minX > box1.maxX || box2.maxX < box1.minX || box2.minY > box1.maxY || box2.maxY < box1.minY); -} -function isPolygonsIntersect(points1, points2) { - // 空数组,或者一个点返回 false - if (points1.length < 2 || points2.length < 2) { - return false; - } - var bbox1 = getBBox(points1); - var bbox2 = getBBox(points2); - // 判定包围盒是否相交,比判定点是否在多边形内要快的多,可以筛选掉大多数情况 - if (!intersectBBox(bbox1, bbox2)) { - return false; - } - var isIn = false; - // 判定点是否在多边形内部,一旦有一个点在另一个多边形内,则返回 - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(points2, function (point) { - if (Object(_point_in_polygon__WEBPACK_IMPORTED_MODULE_0__["default"])(points1, point[0], point[1])) { - isIn = true; - return false; - } - }); - if (isIn) { - return true; - } - // 两个多边形都需要判定 - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(points1, function (point) { - if (Object(_point_in_polygon__WEBPACK_IMPORTED_MODULE_0__["default"])(points2, point[0], point[1])) { - isIn = true; - return false; - } - }); - if (isIn) { - return true; - } - var lines1 = parseToLines(points1); - var lines2 = parseToLines(points2); - var isIntersect = false; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_2__["each"])(lines2, function (line) { - if (lineIntersectPolygon(lines1, line)) { - isIntersect = true; - return false; - } - }); - return isIntersect; -} -//# sourceMappingURL=is-polygons-intersect.js.map - -/***/ }), - -/***/ "./node_modules/@antv/path-util/esm/parse-path-array.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/path-util/esm/parse-path-array.js ***! - \**************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return parsePathArray; }); -var p2s = /,?([a-z]),?/gi; -function parsePathArray(path) { - return path.join(',').replace(p2s, '$1'); -} -//# sourceMappingURL=parse-path-array.js.map - -/***/ }), - -/***/ "./node_modules/@antv/path-util/esm/parse-path-string.js": -/*!***************************************************************!*\ - !*** ./node_modules/@antv/path-util/esm/parse-path-string.js ***! - \***************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return parsePathString; }); -/* harmony import */ var _antv_util_lib_is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util/lib/is-array */ "./node_modules/@antv/util/lib/is-array.js"); -/* harmony import */ var _antv_util_lib_is_array__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_antv_util_lib_is_array__WEBPACK_IMPORTED_MODULE_0__); - -var SPACES = '\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029'; -var PATH_COMMAND = new RegExp('([a-z])[' + SPACES + ',]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?[' + SPACES + ']*,?[' + SPACES + ']*)+)', 'ig'); -var PATH_VALUES = new RegExp('(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)[' + SPACES + ']*,?[' + SPACES + ']*', 'ig'); -// Parses given path string into an array of arrays of path segments -function parsePathString(pathString) { - if (!pathString) { - return null; - } - if (_antv_util_lib_is_array__WEBPACK_IMPORTED_MODULE_0___default()(pathString)) { - return pathString; - } - var paramCounts = { - a: 7, - c: 6, - o: 2, - h: 1, - l: 2, - m: 2, - r: 4, - q: 4, - s: 4, - t: 2, - v: 1, - u: 3, - z: 0, - }; - var data = []; - String(pathString).replace(PATH_COMMAND, function (a, b, c) { - var params = []; - var name = b.toLowerCase(); - c.replace(PATH_VALUES, function (a, b) { - b && params.push(+b); - }); - if (name === 'm' && params.length > 2) { - data.push([b].concat(params.splice(0, 2))); - name = 'l'; - b = b === 'm' ? 'l' : 'L'; - } - if (name === 'o' && params.length === 1) { - data.push([b, params[0]]); - } - if (name === 'r') { - data.push([b].concat(params)); - } - else { - while (params.length >= paramCounts[name]) { - data.push([b].concat(params.splice(0, paramCounts[name]))); - if (!paramCounts[name]) { - break; - } - } - } - return ''; - }); - return data; -} -//# sourceMappingURL=parse-path-string.js.map - -/***/ }), - -/***/ "./node_modules/@antv/path-util/esm/parse-path.js": -/*!********************************************************!*\ - !*** ./node_modules/@antv/path-util/esm/parse-path.js ***! - \********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util_lib_each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util/lib/each */ "./node_modules/@antv/util/lib/each.js"); -/* harmony import */ var _antv_util_lib_each__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_antv_util_lib_each__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _antv_util_lib_is_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util/lib/is-array */ "./node_modules/@antv/util/lib/is-array.js"); -/* harmony import */ var _antv_util_lib_is_array__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_antv_util_lib_is_array__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _antv_util_lib_is_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antv/util/lib/is-string */ "./node_modules/@antv/util/lib/is-string.js"); -/* harmony import */ var _antv_util_lib_is_string__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_antv_util_lib_is_string__WEBPACK_IMPORTED_MODULE_2__); - - - -var regexTags = /[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/ig; -var regexDot = /[^\s\,]+/ig; -function parsePath(p) { - var path = p || []; - if (_antv_util_lib_is_array__WEBPACK_IMPORTED_MODULE_1___default()(path)) { - return path; - } - if (_antv_util_lib_is_string__WEBPACK_IMPORTED_MODULE_2___default()(path)) { - path = path.match(regexTags); - _antv_util_lib_each__WEBPACK_IMPORTED_MODULE_0___default()(path, function (item, index) { - // @ts-ignore - item = item.match(regexDot); - if (item[0].length > 1) { - var tag = item[0].charAt(0); - // @ts-ignore - item.splice(1, 0, item[0].substr(1)); - // @ts-ignore - item[0] = tag; - } - // @ts-ignore - _antv_util_lib_each__WEBPACK_IMPORTED_MODULE_0___default()(item, function (sub, i) { - if (!isNaN(sub)) { - // @ts-ignore - item[i] = +sub; - } - }); - // @ts-ignore - path[index] = item; - }); - return path; - } -} -/* harmony default export */ __webpack_exports__["default"] = (parsePath); -//# sourceMappingURL=parse-path.js.map - -/***/ }), - -/***/ "./node_modules/@antv/path-util/esm/path-2-absolute.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/path-util/esm/path-2-absolute.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return pathToAbsolute; }); -/* harmony import */ var _parse_path_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./parse-path-string */ "./node_modules/@antv/path-util/esm/parse-path-string.js"); - -var REGEX_MD = /[a-z]/; -function toSymmetry(p, c) { - return [ - c[0] + (c[0] - p[0]), - c[1] + (c[1] - p[1]), - ]; -} -function pathToAbsolute(pathString) { - var pathArray = Object(_parse_path_string__WEBPACK_IMPORTED_MODULE_0__["default"])(pathString); - if (!pathArray || !pathArray.length) { - return [ - ['M', 0, 0], - ]; - } - var needProcess = false; // 如果存在小写的命令或者 V,H,T,S 则需要处理 - for (var i = 0; i < pathArray.length; i++) { - var cmd = pathArray[i][0]; - // 如果存在相对位置的命令,则中断返回 - if (REGEX_MD.test(cmd) || ['V', 'H', 'T', 'S'].indexOf(cmd) >= 0) { - needProcess = true; - break; - } - } - // 如果不存在相对命令,则直接返回 - // 如果在业务上都写绝对路径,这种方式最快,仅做了一次检测 - if (!needProcess) { - return pathArray; - } - var res = []; - var x = 0; - var y = 0; - var mx = 0; - var my = 0; - var start = 0; - var pa0; - var dots; - var first = pathArray[0]; - if (first[0] === 'M' || first[0] === 'm') { - x = +first[1]; - y = +first[2]; - mx = x; - my = y; - start++; - res[0] = ['M', x, y]; - } - for (var i = start, ii = pathArray.length; i < ii; i++) { - var pa = pathArray[i]; - var preParams = res[i - 1]; // 取前一个已经处理后的节点,否则会出现问题 - var r = []; - var cmd = pa[0]; - var upCmd = cmd.toUpperCase(); - if (cmd !== upCmd) { - r[0] = upCmd; - switch (upCmd) { - case 'A': - r[1] = pa[1]; - r[2] = pa[2]; - r[3] = pa[3]; - r[4] = pa[4]; - r[5] = pa[5]; - r[6] = +pa[6] + x; - r[7] = +pa[7] + y; - break; - case 'V': - r[1] = +pa[1] + y; - break; - case 'H': - r[1] = +pa[1] + x; - break; - case 'M': - mx = +pa[1] + x; - my = +pa[2] + y; - break; // for lint - default: - for (var j = 1, jj = pa.length; j < jj; j++) { - r[j] = +pa[j] + ((j % 2) ? x : y); - } - } - } - else { // 如果本来已经大写,则不处理 - r = pathArray[i]; - } - // 需要在外面统一做,同时处理 V,H,S,T 等特殊指令 - switch (upCmd) { - case 'Z': - x = +mx; - y = +my; - break; - case 'H': - x = r[1]; - r = ['L', x, y]; - break; - case 'V': - y = r[1]; - r = ['L', x, y]; - break; - case 'T': - x = r[1]; - y = r[2]; - // 以 x, y 为中心的,上一个控制点的对称点 - // 需要假设上一个节点的命令为 Q - var symetricT = toSymmetry([preParams[1], preParams[2]], [preParams[3], preParams[4]]); - r = ['Q', symetricT[0], symetricT[1], x, y]; - break; - case 'S': - x = r[r.length - 2]; - y = r[r.length - 1]; - // 以 x,y 为中心,取上一个控制点, - // 需要假设上一个线段为 C 或者 S - var length_1 = preParams.length; - var symetricS = toSymmetry([preParams[length_1 - 4], preParams[length_1 - 3]], [preParams[length_1 - 2], preParams[length_1 - 1]]); - r = ['C', symetricS[0], symetricS[1], r[1], r[2], x, y]; - break; - case 'M': - mx = r[r.length - 2]; - my = r[r.length - 1]; - break; // for lint - default: - x = r[r.length - 2]; - y = r[r.length - 1]; - } - res.push(r); - } - return res; -} -//# sourceMappingURL=path-2-absolute.js.map - -/***/ }), - -/***/ "./node_modules/@antv/path-util/esm/path-2-curve.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/path-util/esm/path-2-curve.js ***! - \**********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return pathTocurve; }); -/* harmony import */ var _path_2_absolute__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./path-2-absolute */ "./node_modules/@antv/path-util/esm/path-2-absolute.js"); - -var a2c = function (x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) { - // for more information of where this math came from visit: - // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes - if (rx === ry) { - rx += 1; - } - var _120 = (Math.PI * 120) / 180; - var rad = (Math.PI / 180) * (+angle || 0); - var res = []; - var xy; - var f1; - var f2; - var cx; - var cy; - var rotate = function (x, y, rad) { - var X = x * Math.cos(rad) - y * Math.sin(rad); - var Y = x * Math.sin(rad) + y * Math.cos(rad); - return { - x: X, - y: Y, - }; - }; - if (!recursive) { - xy = rotate(x1, y1, -rad); - x1 = xy.x; - y1 = xy.y; - xy = rotate(x2, y2, -rad); - x2 = xy.x; - y2 = xy.y; - if (x1 === x2 && y1 === y2) { - // 若弧的起始点和终点重叠则错开一点 - x2 += 1; - y2 += 1; - } - // const cos = Math.cos(Math.PI / 180 * angle); - // const sin = Math.sin(Math.PI / 180 * angle); - var x = (x1 - x2) / 2; - var y = (y1 - y2) / 2; - var h = (x * x) / (rx * rx) + (y * y) / (ry * ry); - if (h > 1) { - h = Math.sqrt(h); - rx = h * rx; - ry = h * ry; - } - var rx2 = rx * rx; - var ry2 = ry * ry; - var k = (large_arc_flag === sweep_flag ? -1 : 1) * - Math.sqrt(Math.abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x))); - cx = (k * rx * y) / ry + (x1 + x2) / 2; - cy = (k * -ry * x) / rx + (y1 + y2) / 2; - f1 = Math.asin(Number(((y1 - cy) / ry).toFixed(9))); - f2 = Math.asin(Number(((y2 - cy) / ry).toFixed(9))); - f1 = x1 < cx ? Math.PI - f1 : f1; - f2 = x2 < cx ? Math.PI - f2 : f2; - f1 < 0 && (f1 = Math.PI * 2 + f1); - f2 < 0 && (f2 = Math.PI * 2 + f2); - if (sweep_flag && f1 > f2) { - f1 = f1 - Math.PI * 2; - } - if (!sweep_flag && f2 > f1) { - f2 = f2 - Math.PI * 2; - } - } - else { - f1 = recursive[0]; - f2 = recursive[1]; - cx = recursive[2]; - cy = recursive[3]; - } - var df = f2 - f1; - if (Math.abs(df) > _120) { - var f2old = f2; - var x2old = x2; - var y2old = y2; - f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1); - x2 = cx + rx * Math.cos(f2); - y2 = cy + ry * Math.sin(f2); - res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]); - } - df = f2 - f1; - var c1 = Math.cos(f1); - var s1 = Math.sin(f1); - var c2 = Math.cos(f2); - var s2 = Math.sin(f2); - var t = Math.tan(df / 4); - var hx = (4 / 3) * rx * t; - var hy = (4 / 3) * ry * t; - var m1 = [x1, y1]; - var m2 = [x1 + hx * s1, y1 - hy * c1]; - var m3 = [x2 + hx * s2, y2 - hy * c2]; - var m4 = [x2, y2]; - m2[0] = 2 * m1[0] - m2[0]; - m2[1] = 2 * m1[1] - m2[1]; - if (recursive) { - return [m2, m3, m4].concat(res); - } - res = [m2, m3, m4] - .concat(res) - .join() - .split(','); - var newres = []; - for (var i = 0, ii = res.length; i < ii; i++) { - newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x; - } - return newres; -}; -var l2c = function (x1, y1, x2, y2) { - return [x1, y1, x2, y2, x2, y2]; -}; -var q2c = function (x1, y1, ax, ay, x2, y2) { - var _13 = 1 / 3; - var _23 = 2 / 3; - return [_13 * x1 + _23 * ax, _13 * y1 + _23 * ay, _13 * x2 + _23 * ax, _13 * y2 + _23 * ay, x2, y2]; -}; -function pathTocurve(path, path2) { - var p = Object(_path_2_absolute__WEBPACK_IMPORTED_MODULE_0__["default"])(path); - var p2 = path2 && Object(_path_2_absolute__WEBPACK_IMPORTED_MODULE_0__["default"])(path2); - var attrs = { - x: 0, - y: 0, - bx: 0, - by: 0, - X: 0, - Y: 0, - qx: null, - qy: null, - }; - var attrs2 = { - x: 0, - y: 0, - bx: 0, - by: 0, - X: 0, - Y: 0, - qx: null, - qy: null, - }; - var pcoms1 = []; // path commands of original path p - var pcoms2 = []; // path commands of original path p2 - var pfirst = ''; // temporary holder for original path command - var pcom = ''; // holder for previous path command of original path - var ii; - var processPath = function (path, d, pcom) { - var nx, ny; - if (!path) { - return ['C', d.x, d.y, d.x, d.y, d.x, d.y]; - } - !(path[0] in - { - T: 1, - Q: 1, - }) && (d.qx = d.qy = null); - switch (path[0]) { - case 'M': - d.X = path[1]; - d.Y = path[2]; - break; - case 'A': - path = ['C'].concat(a2c.apply(0, [d.x, d.y].concat(path.slice(1)))); - break; - case 'S': - if (pcom === 'C' || pcom === 'S') { - // In "S" case we have to take into account, if the previous command is C/S. - nx = d.x * 2 - d.bx; // And reflect the previous - ny = d.y * 2 - d.by; // command's control point relative to the current point. - } - else { - // or some else or nothing - nx = d.x; - ny = d.y; - } - path = ['C', nx, ny].concat(path.slice(1)); - break; - case 'T': - if (pcom === 'Q' || pcom === 'T') { - // In "T" case we have to take into account, if the previous command is Q/T. - d.qx = d.x * 2 - d.qx; // And make a reflection similar - d.qy = d.y * 2 - d.qy; // to case "S". - } - else { - // or something else or nothing - d.qx = d.x; - d.qy = d.y; - } - path = ['C'].concat(q2c(d.x, d.y, d.qx, d.qy, path[1], path[2])); - break; - case 'Q': - d.qx = path[1]; - d.qy = path[2]; - path = ['C'].concat(q2c(d.x, d.y, path[1], path[2], path[3], path[4])); - break; - case 'L': - path = ['C'].concat(l2c(d.x, d.y, path[1], path[2])); - break; - case 'H': - path = ['C'].concat(l2c(d.x, d.y, path[1], d.y)); - break; - case 'V': - path = ['C'].concat(l2c(d.x, d.y, d.x, path[1])); - break; - case 'Z': - path = ['C'].concat(l2c(d.x, d.y, d.X, d.Y)); - break; - default: - break; - } - return path; - }; - var fixArc = function (pp, i) { - if (pp[i].length > 7) { - pp[i].shift(); - var pi = pp[i]; - while (pi.length) { - pcoms1[i] = 'A'; // if created multiple C:s, their original seg is saved - p2 && (pcoms2[i] = 'A'); // the same as above - pp.splice(i++, 0, ['C'].concat(pi.splice(0, 6))); - } - pp.splice(i, 1); - ii = Math.max(p.length, (p2 && p2.length) || 0); - } - }; - var fixM = function (path1, path2, a1, a2, i) { - if (path1 && path2 && path1[i][0] === 'M' && path2[i][0] !== 'M') { - path2.splice(i, 0, ['M', a2.x, a2.y]); - a1.bx = 0; - a1.by = 0; - a1.x = path1[i][1]; - a1.y = path1[i][2]; - ii = Math.max(p.length, (p2 && p2.length) || 0); - } - }; - ii = Math.max(p.length, (p2 && p2.length) || 0); - for (var i = 0; i < ii; i++) { - p[i] && (pfirst = p[i][0]); // save current path command - if (pfirst !== 'C') { - // C is not saved yet, because it may be result of conversion - pcoms1[i] = pfirst; // Save current path command - i && (pcom = pcoms1[i - 1]); // Get previous path command pcom - } - p[i] = processPath(p[i], attrs, pcom); // Previous path command is inputted to processPath - if (pcoms1[i] !== 'A' && pfirst === 'C') - pcoms1[i] = 'C'; // A is the only command - // which may produce multiple C:s - // so we have to make sure that C is also C in original path - fixArc(p, i); // fixArc adds also the right amount of A:s to pcoms1 - if (p2) { - // the same procedures is done to p2 - p2[i] && (pfirst = p2[i][0]); - if (pfirst !== 'C') { - pcoms2[i] = pfirst; - i && (pcom = pcoms2[i - 1]); - } - p2[i] = processPath(p2[i], attrs2, pcom); - if (pcoms2[i] !== 'A' && pfirst === 'C') { - pcoms2[i] = 'C'; - } - fixArc(p2, i); - } - fixM(p, p2, attrs, attrs2, i); - fixM(p2, p, attrs2, attrs, i); - var seg = p[i]; - var seg2 = p2 && p2[i]; - var seglen = seg.length; - var seg2len = p2 && seg2.length; - attrs.x = seg[seglen - 2]; - attrs.y = seg[seglen - 1]; - attrs.bx = parseFloat(seg[seglen - 4]) || attrs.x; - attrs.by = parseFloat(seg[seglen - 3]) || attrs.y; - attrs2.bx = p2 && (parseFloat(seg2[seg2len - 4]) || attrs2.x); - attrs2.by = p2 && (parseFloat(seg2[seg2len - 3]) || attrs2.y); - attrs2.x = p2 && seg2[seg2len - 2]; - attrs2.y = p2 && seg2[seg2len - 1]; - } - return p2 ? [p, p2] : p; -} -//# sourceMappingURL=path-2-curve.js.map - -/***/ }), - -/***/ "./node_modules/@antv/path-util/esm/path-2-segments.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/path-util/esm/path-2-segments.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getSegments; }); -/* harmony import */ var _get_arc_params__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./get-arc-params */ "./node_modules/@antv/path-util/esm/get-arc-params.js"); -/* harmony import */ var _parse_path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parse-path */ "./node_modules/@antv/path-util/esm/parse-path.js"); - - - -// 点对称 -function toSymmetry(point, center) { - return { - x: center.x + (center.x - point.x), - y: center.y + (center.y - point.y), - }; -} -function getSegments(path) { - path = Object(_parse_path__WEBPACK_IMPORTED_MODULE_1__["default"])(path); - var segments = []; - var currentPoint = null; // 当前图形 - var nextParams = null; // 下一节点的 path 参数 - var startMovePoint = null; // 开始 M 的点,可能会有多个 - var lastStartMovePointIndex = 0; // 最近一个开始点 M 的索引 - var count = path.length; - for (var i = 0; i < count; i++) { - var params = path[i]; - nextParams = path[i + 1]; - var command = params[0]; - // 数学定义上的参数,便于后面的计算 - var segment = { - command: command, - prePoint: currentPoint, - params: params, - startTangent: null, - endTangent: null, - }; - switch (command) { - case 'M': - startMovePoint = [params[1], params[2]]; - lastStartMovePointIndex = i; - break; - case 'A': - var arcParams = Object(_get_arc_params__WEBPACK_IMPORTED_MODULE_0__["default"])(currentPoint, params); - segment['arcParams'] = arcParams; - break; - default: - break; - } - if (command === 'Z') { - // 有了 Z 后,当前节点从开始 M 的点开始 - currentPoint = startMovePoint; - // 如果当前点的命令为 Z,相当于当前点为最近一个 M 点,则下一个点直接指向最近一个 M 点的下一个点 - nextParams = path[lastStartMovePointIndex + 1]; - } - else { - var len = params.length; - currentPoint = [params[len - 2], params[len - 1]]; - } - if (nextParams && nextParams[0] === 'Z') { - // 如果下一个点的命令为 Z,则下一个点直接指向最近一个 M 点 - nextParams = path[lastStartMovePointIndex]; - if (segments[lastStartMovePointIndex]) { - // 如果下一个点的命令为 Z,则最近一个 M 点的前一个点为当前点 - segments[lastStartMovePointIndex].prePoint = currentPoint; - } - } - segment['currentPoint'] = currentPoint; - // 如果当前点与最近一个 M 点相同,则最近一个 M 点的前一个点为当前点的前一个点 - if (segments[lastStartMovePointIndex] && - Object(_get_arc_params__WEBPACK_IMPORTED_MODULE_0__["isSamePoint"])(currentPoint, segments[lastStartMovePointIndex].currentPoint)) { - segments[lastStartMovePointIndex].prePoint = segment.prePoint; - } - var nextPoint = nextParams ? [nextParams[nextParams.length - 2], nextParams[nextParams.length - 1]] : null; - segment['nextPoint'] = nextPoint; - // Add startTangent and endTangent - var prePoint = segment.prePoint; - if (['L', 'H', 'V'].includes(command)) { - segment.startTangent = [prePoint[0] - currentPoint[0], prePoint[1] - currentPoint[1]]; - segment.endTangent = [currentPoint[0] - prePoint[0], currentPoint[1] - prePoint[1]]; - } - else if (command === 'Q') { - // 二次贝塞尔曲线只有一个控制点 - var cp = [params[1], params[2]]; - // 二次贝塞尔曲线的终点为 currentPoint - segment.startTangent = [prePoint[0] - cp[0], prePoint[1] - cp[1]]; - segment.endTangent = [currentPoint[0] - cp[0], currentPoint[1] - cp[1]]; - } - else if (command === 'T') { - var preSegment = segments[i - 1]; - var cp = toSymmetry(preSegment.currentPoint, prePoint); - if (preSegment.command === 'Q') { - segment.command = 'Q'; - segment.startTangent = [prePoint[0] - cp[0], prePoint[1] - cp[1]]; - segment.endTangent = [currentPoint[0] - cp[0], currentPoint[1] - cp[1]]; - } - else { - segment.command = 'TL'; - segment.startTangent = [prePoint[0] - currentPoint[0], prePoint[1] - currentPoint[1]]; - segment.endTangent = [currentPoint[0] - prePoint[0], currentPoint[1] - prePoint[1]]; - } - } - else if (command === 'C') { - // 三次贝塞尔曲线有两个控制点 - var cp1 = [params[1], params[2]]; - var cp2 = [params[3], params[4]]; - segment.startTangent = [prePoint[0] - cp1[0], prePoint[1] - cp1[1]]; - segment.endTangent = [currentPoint[0] - cp2[0], currentPoint[1] - cp2[1]]; - } - else if (command === 'S') { - var preSegment = segments[i - 1]; - var cp1 = toSymmetry(preSegment.currentPoint, prePoint); - var cp2 = [params[1], params[2]]; - if (preSegment.command === 'C') { - segment.command = 'C'; // 将 S 命令变换为 C 命令 - segment.startTangent = [prePoint[0] - cp1[0], prePoint[1] - cp1[1]]; - segment.endTangent = [currentPoint[0] - cp2[0], currentPoint[1] - cp2[1]]; - } - else { - segment.command = 'SQ'; // 将 S 命令变换为 SQ 命令 - segment.startTangent = [prePoint[0] - cp2[0], prePoint[1] - cp2[1]]; - segment.endTangent = [currentPoint[0] - cp2[0], currentPoint[1] - cp2[1]]; - } - } - else if (command === 'A') { - var d = 0.001; - var _a = segment['arcParams'] || {}, _b = _a.rx, rx = _b === void 0 ? 0 : _b, _c = _a.ry, ry = _c === void 0 ? 0 : _c, _d = _a.xRotation, xRotation = _d === void 0 ? 0 : _d, _e = _a.arcFlag, arcFlag = _e === void 0 ? 0 : _e, _f = _a.sweepFlag, sweepFlag = _f === void 0 ? 0 : _f, _g = _a.startAngle, startAngle = _g === void 0 ? 0 : _g, _h = _a.endAngle, endAngle = _h === void 0 ? 0 : _h; - if (sweepFlag === 0) { - d *= -1; - } - var dx1 = xRotation * Math.cos(startAngle - d) + rx; - var dy1 = arcFlag * Math.sin(startAngle - d) + ry; - segment.startTangent = [dx1 - startMovePoint[0], dy1 - startMovePoint[1]]; - var dx2 = xRotation * Math.cos(startAngle + endAngle + d) + rx; - var dy2 = arcFlag * Math.sin(startAngle + endAngle - d) + ry; - segment.endTangent = [prePoint.x - dx2, prePoint.y - dy2]; - } - segments.push(segment); - } - return segments; -} -//# sourceMappingURL=path-2-segments.js.map - -/***/ }), - -/***/ "./node_modules/@antv/path-util/esm/path-intersection.js": -/*!***************************************************************!*\ - !*** ./node_modules/@antv/path-util/esm/path-intersection.js ***! - \***************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return pathIntersection; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _rect_path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rect-path */ "./node_modules/@antv/path-util/esm/rect-path.js"); -/* harmony import */ var _path_2_curve__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./path-2-curve */ "./node_modules/@antv/path-util/esm/path-2-curve.js"); - - - -var base3 = function (t, p1, p2, p3, p4) { - var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4; - var t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3; - return t * t2 - 3 * p1 + 3 * p2; -}; -var bezlen = function (x1, y1, x2, y2, x3, y3, x4, y4, z) { - if (z === null) { - z = 1; - } - z = z > 1 ? 1 : z < 0 ? 0 : z; - var z2 = z / 2; - var n = 12; - var Tvalues = [-0.1252, 0.1252, -0.3678, 0.3678, -0.5873, 0.5873, -0.7699, 0.7699, -0.9041, 0.9041, -0.9816, 0.9816]; - var Cvalues = [0.2491, 0.2491, 0.2335, 0.2335, 0.2032, 0.2032, 0.1601, 0.1601, 0.1069, 0.1069, 0.0472, 0.0472]; - var sum = 0; - for (var i = 0; i < n; i++) { - var ct = z2 * Tvalues[i] + z2; - var xbase = base3(ct, x1, x2, x3, x4); - var ybase = base3(ct, y1, y2, y3, y4); - var comb = xbase * xbase + ybase * ybase; - sum += Cvalues[i] * Math.sqrt(comb); - } - return z2 * sum; -}; -var curveDim = function (x0, y0, x1, y1, x2, y2, x3, y3) { - var tvalues = []; - var bounds = [ - [], - [], - ]; - var a; - var b; - var c; - var t; - for (var i = 0; i < 2; ++i) { - if (i === 0) { - b = 6 * x0 - 12 * x1 + 6 * x2; - a = -3 * x0 + 9 * x1 - 9 * x2 + 3 * x3; - c = 3 * x1 - 3 * x0; - } - else { - b = 6 * y0 - 12 * y1 + 6 * y2; - a = -3 * y0 + 9 * y1 - 9 * y2 + 3 * y3; - c = 3 * y1 - 3 * y0; - } - if (Math.abs(a) < 1e-12) { - if (Math.abs(b) < 1e-12) { - continue; - } - t = -c / b; - if (t > 0 && t < 1) { - tvalues.push(t); - } - continue; - } - var b2ac = b * b - 4 * c * a; - var sqrtb2ac = Math.sqrt(b2ac); - if (b2ac < 0) { - continue; - } - var t1 = (-b + sqrtb2ac) / (2 * a); - if (t1 > 0 && t1 < 1) { - tvalues.push(t1); - } - var t2 = (-b - sqrtb2ac) / (2 * a); - if (t2 > 0 && t2 < 1) { - tvalues.push(t2); - } - } - var j = tvalues.length; - var jlen = j; - var mt; - while (j--) { - t = tvalues[j]; - mt = 1 - t; - bounds[0][j] = (mt * mt * mt * x0) + (3 * mt * mt * t * x1) + (3 * mt * t * t * x2) + (t * t * t * x3); - bounds[1][j] = (mt * mt * mt * y0) + (3 * mt * mt * t * y1) + (3 * mt * t * t * y2) + (t * t * t * y3); - } - bounds[0][jlen] = x0; - bounds[1][jlen] = y0; - bounds[0][jlen + 1] = x3; - bounds[1][jlen + 1] = y3; - bounds[0].length = bounds[1].length = jlen + 2; - return { - min: { - x: Math.min.apply(0, bounds[0]), - y: Math.min.apply(0, bounds[1]), - }, - max: { - x: Math.max.apply(0, bounds[0]), - y: Math.max.apply(0, bounds[1]), - }, - }; -}; -var intersect = function (x1, y1, x2, y2, x3, y3, x4, y4) { - if (Math.max(x1, x2) < Math.min(x3, x4) || - Math.min(x1, x2) > Math.max(x3, x4) || - Math.max(y1, y2) < Math.min(y3, y4) || - Math.min(y1, y2) > Math.max(y3, y4)) { - return; - } - var nx = (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4); - var ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4); - var denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4); - if (!denominator) { - return; - } - var px = nx / denominator; - var py = ny / denominator; - var px2 = +px.toFixed(2); - var py2 = +py.toFixed(2); - if (px2 < +Math.min(x1, x2).toFixed(2) || - px2 > +Math.max(x1, x2).toFixed(2) || - px2 < +Math.min(x3, x4).toFixed(2) || - px2 > +Math.max(x3, x4).toFixed(2) || - py2 < +Math.min(y1, y2).toFixed(2) || - py2 > +Math.max(y1, y2).toFixed(2) || - py2 < +Math.min(y3, y4).toFixed(2) || - py2 > +Math.max(y3, y4).toFixed(2)) { - return; - } - return { - x: px, - y: py, - }; -}; -var isPointInsideBBox = function (bbox, x, y) { - return x >= bbox.x && - x <= bbox.x + bbox.width && - y >= bbox.y && - y <= bbox.y + bbox.height; -}; -var box = function (x, y, width, height) { - if (x === null) { - x = y = width = height = 0; - } - if (y === null) { - y = x.y; - width = x.width; - height = x.height; - x = x.x; - } - return { - x: x, - y: y, - width: width, - w: width, - height: height, - h: height, - x2: x + width, - y2: y + height, - cx: x + width / 2, - cy: y + height / 2, - r1: Math.min(width, height) / 2, - r2: Math.max(width, height) / 2, - r0: Math.sqrt(width * width + height * height) / 2, - path: Object(_rect_path__WEBPACK_IMPORTED_MODULE_1__["default"])(x, y, width, height), - vb: [x, y, width, height].join(' '), - }; -}; -var isBBoxIntersect = function (bbox1, bbox2) { - // @ts-ignore - bbox1 = box(bbox1); - // @ts-ignore - bbox2 = box(bbox2); - return isPointInsideBBox(bbox2, bbox1.x, bbox1.y) || isPointInsideBBox(bbox2, bbox1.x2, bbox1.y) || isPointInsideBBox(bbox2, bbox1.x, bbox1.y2) || isPointInsideBBox(bbox2, bbox1.x2, bbox1.y2) || isPointInsideBBox(bbox1, bbox2.x, bbox2.y) || isPointInsideBBox(bbox1, bbox2.x2, bbox2.y) || isPointInsideBBox(bbox1, bbox2.x, bbox2.y2) || isPointInsideBBox(bbox1, bbox2.x2, bbox2.y2) || (bbox1.x < bbox2.x2 && bbox1.x > bbox2.x || bbox2.x < bbox1.x2 && bbox2.x > bbox1.x) && (bbox1.y < bbox2.y2 && bbox1.y > bbox2.y || bbox2.y < bbox1.y2 && bbox2.y > bbox1.y); -}; -var bezierBBox = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) { - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isArray"])(p1x)) { - p1x = [p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y]; - } - var bbox = curveDim.apply(null, p1x); - return box(bbox.min.x, bbox.min.y, bbox.max.x - bbox.min.x, bbox.max.y - bbox.min.y); -}; -var findDotsAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) { - var t1 = 1 - t; - var t13 = Math.pow(t1, 3); - var t12 = Math.pow(t1, 2); - var t2 = t * t; - var t3 = t2 * t; - var x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x; - var y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y; - var mx = p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x); - var my = p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y); - var nx = c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x); - var ny = c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y); - var ax = t1 * p1x + t * c1x; - var ay = t1 * p1y + t * c1y; - var cx = t1 * c2x + t * p2x; - var cy = t1 * c2y + t * p2y; - var alpha = (90 - Math.atan2(mx - nx, my - ny) * 180 / Math.PI); - // (mx > nx || my < ny) && (alpha += 180); - return { - x: x, - y: y, - m: { - x: mx, - y: my, - }, - n: { - x: nx, - y: ny, - }, - start: { - x: ax, - y: ay, - }, - end: { - x: cx, - y: cy, - }, - alpha: alpha, - }; -}; -var interHelper = function (bez1, bez2, justCount) { - // @ts-ignore - var bbox1 = bezierBBox(bez1); - // @ts-ignore - var bbox2 = bezierBBox(bez2); - if (!isBBoxIntersect(bbox1, bbox2)) { - return justCount ? 0 : []; - } - var l1 = bezlen.apply(0, bez1); - var l2 = bezlen.apply(0, bez2); - var n1 = ~~(l1 / 8); - var n2 = ~~(l2 / 8); - var dots1 = []; - var dots2 = []; - var xy = {}; - var res = justCount ? 0 : []; - for (var i = 0; i < n1 + 1; i++) { - var d = findDotsAtSegment.apply(0, bez1.concat(i / n1)); - dots1.push({ - x: d.x, - y: d.y, - t: i / n1, - }); - } - for (var i = 0; i < n2 + 1; i++) { - var d = findDotsAtSegment.apply(0, bez2.concat(i / n2)); - dots2.push({ - x: d.x, - y: d.y, - t: i / n2, - }); - } - for (var i = 0; i < n1; i++) { - for (var j = 0; j < n2; j++) { - var di = dots1[i]; - var di1 = dots1[i + 1]; - var dj = dots2[j]; - var dj1 = dots2[j + 1]; - var ci = Math.abs(di1.x - di.x) < 0.001 ? 'y' : 'x'; - var cj = Math.abs(dj1.x - dj.x) < 0.001 ? 'y' : 'x'; - var is = intersect(di.x, di.y, di1.x, di1.y, dj.x, dj.y, dj1.x, dj1.y); - if (is) { - if (xy[is.x.toFixed(4)] === is.y.toFixed(4)) { - continue; - } - xy[is.x.toFixed(4)] = is.y.toFixed(4); - var t1 = di.t + Math.abs((is[ci] - di[ci]) / (di1[ci] - di[ci])) * (di1.t - di.t); - var t2 = dj.t + Math.abs((is[cj] - dj[cj]) / (dj1[cj] - dj[cj])) * (dj1.t - dj.t); - if (t1 >= 0 && t1 <= 1 && t2 >= 0 && t2 <= 1) { - if (justCount) { - // @ts-ignore - res++; - } - else { - // @ts-ignore - res.push({ - x: is.x, - y: is.y, - t1: t1, - t2: t2, - }); - } - } - } - } - } - return res; -}; -var interPathHelper = function (path1, path2, justCount) { - // @ts-ignore - path1 = Object(_path_2_curve__WEBPACK_IMPORTED_MODULE_2__["default"])(path1); - // @ts-ignore - path2 = Object(_path_2_curve__WEBPACK_IMPORTED_MODULE_2__["default"])(path2); - var x1; - var y1; - var x2; - var y2; - var x1m; - var y1m; - var x2m; - var y2m; - var bez1; - var bez2; - var res = justCount ? 0 : []; - for (var i = 0, ii = path1.length; i < ii; i++) { - var pi = path1[i]; - if (pi[0] === 'M') { - x1 = x1m = pi[1]; - y1 = y1m = pi[2]; - } - else { - if (pi[0] === 'C') { - bez1 = [x1, y1].concat(pi.slice(1)); - x1 = bez1[6]; - y1 = bez1[7]; - } - else { - bez1 = [x1, y1, x1, y1, x1m, y1m, x1m, y1m]; - x1 = x1m; - y1 = y1m; - } - for (var j = 0, jj = path2.length; j < jj; j++) { - var pj = path2[j]; - if (pj[0] === 'M') { - x2 = x2m = pj[1]; - y2 = y2m = pj[2]; - } - else { - if (pj[0] === 'C') { - bez2 = [x2, y2].concat(pj.slice(1)); - x2 = bez2[6]; - y2 = bez2[7]; - } - else { - bez2 = [x2, y2, x2, y2, x2m, y2m, x2m, y2m]; - x2 = x2m; - y2 = y2m; - } - var intr = interHelper(bez1, bez2, justCount); - if (justCount) { - // @ts-ignore - res += intr; - } - else { - // @ts-ignore - for (var k = 0, kk = intr.length; k < kk; k++) { - intr[k].segment1 = i; - intr[k].segment2 = j; - intr[k].bez1 = bez1; - intr[k].bez2 = bez2; - } - // @ts-ignore - res = res.concat(intr); - } - } - } - } - } - return res; -}; -function pathIntersection(path1, path2) { - // @ts-ignore - return interPathHelper(path1, path2); -} -//# sourceMappingURL=path-intersection.js.map - -/***/ }), - -/***/ "./node_modules/@antv/path-util/esm/point-in-polygon.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/path-util/esm/point-in-polygon.js ***! - \**************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isInPolygon; }); -/** - * @fileoverview 判断点是否在多边形内 - * @author dxq613@gmail.com - */ -// 多边形的射线检测,参考:https://blog.csdn.net/WilliamSun0122/article/details/77994526 -var tolerance = 1e-6; -// 三态函数,判断两个double在eps精度下的大小关系 -function dcmp(x) { - if (Math.abs(x) < tolerance) { - return 0; - } - return x < 0 ? -1 : 1; -} -// 判断点Q是否在p1和p2的线段上 -function onSegment(p1, p2, q) { - if ((q[0] - p1[0]) * (p2[1] - p1[1]) === (p2[0] - p1[0]) * (q[1] - p1[1]) && - Math.min(p1[0], p2[0]) <= q[0] && - q[0] <= Math.max(p1[0], p2[0]) && - Math.min(p1[1], p2[1]) <= q[1] && - q[1] <= Math.max(p1[1], p2[1])) { - return true; - } - return false; -} -// 判断点P在多边形内-射线法 -function isInPolygon(points, x, y) { - var isHit = false; - var n = points.length; - if (n <= 2) { - // svg 中点小于 3 个时,不显示,也无法被拾取 - return false; - } - for (var i = 0; i < n; i++) { - var p1 = points[i]; - var p2 = points[(i + 1) % n]; - if (onSegment(p1, p2, [x, y])) { - // 点在多边形一条边上 - return true; - } - // 前一个判断min(p1[1],p2[1]) 0 !== dcmp(p2[1] - y) > 0 && - dcmp(x - ((y - p1[1]) * (p1[0] - p2[0])) / (p1[1] - p2[1]) - p1[0]) < 0) { - isHit = !isHit; - } - } - return isHit; -} -//# sourceMappingURL=point-in-polygon.js.map - -/***/ }), - -/***/ "./node_modules/@antv/path-util/esm/rect-path.js": -/*!*******************************************************!*\ - !*** ./node_modules/@antv/path-util/esm/rect-path.js ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return rectPath; }); -function rectPath(x, y, w, h, r) { - if (r) { - return [ - ['M', +x + (+r), y], - ['l', w - r * 2, 0], - ['a', r, r, 0, 0, 1, r, r], - ['l', 0, h - r * 2], - ['a', r, r, 0, 0, 1, -r, r], - ['l', r * 2 - w, 0], - ['a', r, r, 0, 0, 1, -r, -r], - ['l', 0, r * 2 - h], - ['a', r, r, 0, 0, 1, r, -r], - ['z'], - ]; - } - return [ - ['M', x, y], - ['l', w, 0], - ['l', 0, h], - ['l', -w, 0], - ['z'], - ]; - // res.parsePathArray = parsePathArray; -} -//# sourceMappingURL=rect-path.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/base.js": -/*!**********************************************!*\ - !*** ./node_modules/@antv/scale/esm/base.js ***! - \**********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _tick_method_register__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tick-method/register */ "./node_modules/@antv/scale/esm/tick-method/register.js"); - - -var Scale = /** @class */ (function () { - function Scale(cfg) { - /** - * 度量的类型 - */ - this.type = 'base'; - /** - * 是否分类类型的度量 - */ - this.isCategory = false; - /** - * 是否线性度量,有linear, time 度量 - */ - this.isLinear = false; - /** - * 是否连续类型的度量,linear,time,log, pow, quantile, quantize 都支持 - */ - this.isContinuous = false; - /** - * 是否是常量的度量,传入和传出一致 - */ - this.isIdentity = false; - this.values = []; - this.range = [0, 1]; - this.ticks = []; - this.__cfg__ = cfg; - this.initCfg(); - this.init(); - } - // 对于原始值的必要转换,如分类、时间字段需转换成数值,用transform/map命名可能更好 - Scale.prototype.translate = function (v) { - return v; - }; - /** 重新初始化 */ - Scale.prototype.change = function (cfg) { - // 覆盖配置项,而不替代 - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(this.__cfg__, cfg); - this.init(); - }; - Scale.prototype.clone = function () { - return this.constructor(this.__cfg__); - }; - /** 获取坐标轴需要的ticks */ - Scale.prototype.getTicks = function () { - var _this = this; - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["map"])(this.ticks, function (tick, idx) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isObject"])(tick)) { - // 仅当符合Tick类型时才有意义 - return tick; - } - return { - text: _this.getText(tick, idx), - tickValue: tick, - value: _this.scale(tick), - }; - }); - }; - /** 获取Tick的格式化结果 */ - Scale.prototype.getText = function (value, key) { - var formatter = this.formatter; - var res = formatter ? formatter(value, key) : value; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(res) || !Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(res.toString)) { - return ''; - } - return res.toString(); - }; - // 获取配置项中的值,当前 scale 上的值可能会被修改 - Scale.prototype.getConfig = function (key) { - return this.__cfg__[key]; - }; - // scale初始化 - Scale.prototype.init = function () { - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["assign"])(this, this.__cfg__); - this.setDomain(); - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(this.getConfig('ticks'))) { - this.ticks = this.calculateTicks(); - } - }; - // 子类上覆盖某些属性,不能直接在类上声明,否则会被覆盖 - Scale.prototype.initCfg = function () { }; - Scale.prototype.setDomain = function () { }; - Scale.prototype.calculateTicks = function () { - var tickMethod = this.tickMethod; - var ticks = []; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isString"])(tickMethod)) { - var method = Object(_tick_method_register__WEBPACK_IMPORTED_MODULE_1__["getTickMethod"])(tickMethod); - if (!method) { - throw new Error('There is no method to to calculate ticks!'); - } - ticks = method(this); - } - else if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(tickMethod)) { - ticks = tickMethod(this); - } - return ticks; - }; - // range 的最小值 - Scale.prototype.rangeMin = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["head"])(this.range); - }; - // range 的最大值 - Scale.prototype.rangeMax = function () { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["last"])(this.range); - }; - /** 定义域转 0~1 */ - Scale.prototype.calcPercent = function (value, min, max) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNumber"])(value)) { - return (value - min) / (max - min); - } - return NaN; - }; - /** 0~1转定义域 */ - Scale.prototype.calcValue = function (percent, min, max) { - return min + percent * (max - min); - }; - return Scale; -}()); -/* harmony default export */ __webpack_exports__["default"] = (Scale); -//# sourceMappingURL=base.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/category/base.js": -/*!*******************************************************!*\ - !*** ./node_modules/@antv/scale/esm/category/base.js ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base */ "./node_modules/@antv/scale/esm/base.js"); - - - -/** - * 分类度量 - * @class - */ -var Category = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Category, _super); - function Category() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'cat'; - _this.isCategory = true; - return _this; - } - Category.prototype.translate = function (value) { - var index = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["indexOf"])(this.values, value); - if (index === -1) { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(value) ? value : NaN; - } - return index; - }; - Category.prototype.scale = function (value) { - var order = this.translate(value); - // 分类数据允许 0.5 范围内调整 - // if (order < this.min - 0.5 || order > this.max + 0.5) { - // return NaN; - // } - var percent = this.calcPercent(order, this.min, this.max); - return this.calcValue(percent, this.rangeMin(), this.rangeMax()); - }; - Category.prototype.invert = function (scaledValue) { - var domainRange = this.max - this.min; - var percent = this.calcPercent(scaledValue, this.rangeMin(), this.rangeMax()); - var idx = Math.round(domainRange * percent) + this.min; - if (idx < this.min || idx > this.max) { - return NaN; - } - return this.values[idx]; - }; - Category.prototype.getText = function (value) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - var v = value; - // value为index - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(value) && !this.values.includes(value)) { - v = this.values[v]; - } - return _super.prototype.getText.apply(this, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArrays"])([v], args)); - }; - // 复写属性 - Category.prototype.initCfg = function () { - this.tickMethod = 'cat'; - }; - // 设置 min, max - Category.prototype.setDomain = function () { - // 用户有可能设置 min - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNil"])(this.getConfig('min'))) { - this.min = 0; - } - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNil"])(this.getConfig('max'))) { - var size = this.values.length; - this.max = size > 1 ? size - 1 : size; - } - }; - return Category; -}(_base__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Category); -//# sourceMappingURL=base.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/category/time.js": -/*!*******************************************************!*\ - !*** ./node_modules/@antv/scale/esm/category/time.js ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_time__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/time */ "./node_modules/@antv/scale/esm/util/time.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/scale/esm/category/base.js"); - - - - -/** - * 时间分类度量 - * @class - */ -var TimeCat = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TimeCat, _super); - function TimeCat() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * @override - */ - TimeCat.prototype.translate = function (value) { - value = Object(_util_time__WEBPACK_IMPORTED_MODULE_2__["toTimeStamp"])(value); - var index = this.values.indexOf(value); - if (index === -1) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(value) && value < this.values.length) { - index = value; - } - else { - index = NaN; - } - } - return index; - }; - /** - * 由于时间类型数据需要转换一下,所以复写 getText - * @override - */ - TimeCat.prototype.getText = function (value, tickIndex) { - var index = this.translate(value); - if (index > -1) { - var result = this.values[index]; - var formatter = this.formatter; - result = formatter ? formatter(result, tickIndex) : Object(_util_time__WEBPACK_IMPORTED_MODULE_2__["timeFormat"])(result, this.mask); - return result; - } - return value; - }; - TimeCat.prototype.initCfg = function () { - this.tickMethod = 'time-cat'; - this.mask = 'YYYY-MM-DD'; - this.tickCount = 7; // 一般时间数据会显示 7, 14, 30 天的数字 - }; - TimeCat.prototype.setDomain = function () { - var values = this.values; - // 针对时间分类类型,会将时间统一转换为时间戳 - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(values, function (v, i) { - values[i] = Object(_util_time__WEBPACK_IMPORTED_MODULE_2__["toTimeStamp"])(v); - }); - values.sort(function (v1, v2) { - return v1 - v2; - }); - _super.prototype.setDomain.call(this); - }; - return TimeCat; -}(_base__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (TimeCat); -//# sourceMappingURL=time.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/continuous/base.js": -/*!*********************************************************!*\ - !*** ./node_modules/@antv/scale/esm/continuous/base.js ***! - \*********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base */ "./node_modules/@antv/scale/esm/base.js"); - - - -/** - * 连续度量的基类 - * @class - */ -var Continuous = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Continuous, _super); - function Continuous() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.isContinuous = true; - return _this; - } - Continuous.prototype.scale = function (value) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNil"])(value)) { - return NaN; - } - var rangeMin = this.rangeMin(); - var rangeMax = this.rangeMax(); - var max = this.max; - var min = this.min; - if (max === min) { - return rangeMin; - } - var percent = this.getScalePercent(value); - return rangeMin + percent * (rangeMax - rangeMin); - }; - Continuous.prototype.init = function () { - _super.prototype.init.call(this); - // init 完成后保证 min, max 包含 ticks 的范围 - var ticks = this.ticks; - var firstTick = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["head"])(ticks); - var lastTick = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["last"])(ticks); - if (firstTick < this.min) { - this.min = firstTick; - } - if (lastTick > this.max) { - this.max = lastTick; - } - // strict-limit 方式 - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNil"])(this.minLimit)) { - this.min = firstTick; - } - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNil"])(this.maxLimit)) { - this.max = lastTick; - } - }; - Continuous.prototype.setDomain = function () { - var _a = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["getRange"])(this.values), min = _a.min, max = _a.max; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNil"])(this.min)) { - this.min = min; - } - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNil"])(this.max)) { - this.max = max; - } - if (this.min > this.max) { - this.min = min; - this.max = max; - } - }; - Continuous.prototype.calculateTicks = function () { - var _this = this; - var ticks = _super.prototype.calculateTicks.call(this); - if (!this.nice) { - ticks = Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["filter"])(ticks, function (tick) { - return tick >= _this.min && tick <= _this.max; - }); - } - return ticks; - }; - // 计算原始值值占的百分比 - Continuous.prototype.getScalePercent = function (value) { - var max = this.max; - var min = this.min; - return (value - min) / (max - min); - }; - Continuous.prototype.getInvertPercent = function (value) { - return (value - this.rangeMin()) / (this.rangeMax() - this.rangeMin()); - }; - return Continuous; -}(_base__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Continuous); -//# sourceMappingURL=base.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/continuous/linear.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/scale/esm/continuous/linear.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/scale/esm/continuous/base.js"); - - -/** - * 线性度量 - * @class - */ -var Linear = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Linear, _super); - function Linear() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'linear'; - _this.isLinear = true; - return _this; - } - Linear.prototype.invert = function (value) { - var percent = this.getInvertPercent(value); - return this.min + percent * (this.max - this.min); - }; - Linear.prototype.initCfg = function () { - this.tickMethod = 'wilkinson-extended'; - this.nice = false; - }; - return Linear; -}(_base__WEBPACK_IMPORTED_MODULE_1__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Linear); -//# sourceMappingURL=linear.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/continuous/log.js": -/*!********************************************************!*\ - !*** ./node_modules/@antv/scale/esm/continuous/log.js ***! - \********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _util_math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/math */ "./node_modules/@antv/scale/esm/util/math.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/scale/esm/continuous/base.js"); - - - -/** - * Log 度量,处理非均匀分布 - */ -var Log = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Log, _super); - function Log() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'log'; - return _this; - } - /** - * @override - */ - Log.prototype.invert = function (value) { - var base = this.base; - var max = Object(_util_math__WEBPACK_IMPORTED_MODULE_1__["log"])(base, this.max); - var rangeMin = this.rangeMin(); - var range = this.rangeMax() - rangeMin; - var min; - var positiveMin = this.positiveMin; - if (positiveMin) { - if (value === 0) { - return 0; - } - min = Object(_util_math__WEBPACK_IMPORTED_MODULE_1__["log"])(base, positiveMin / base); - var appendPercent = (1 / (max - min)) * range; // 0 到 positiveMin的占比 - if (value < appendPercent) { - // 落到 0 - positiveMin 之间 - return (value / appendPercent) * positiveMin; - } - } - else { - min = Object(_util_math__WEBPACK_IMPORTED_MODULE_1__["log"])(base, this.min); - } - var percent = (value - rangeMin) / range; - var tmp = percent * (max - min) + min; - return Math.pow(base, tmp); - }; - Log.prototype.initCfg = function () { - this.tickMethod = 'log'; - this.base = 10; - this.tickCount = 6; - this.nice = true; - }; - // 设置 - Log.prototype.setDomain = function () { - _super.prototype.setDomain.call(this); - var min = this.min; - if (min < 0) { - throw new Error('When you use log scale, the minimum value must be greater than zero!'); - } - if (min === 0) { - this.positiveMin = Object(_util_math__WEBPACK_IMPORTED_MODULE_1__["getLogPositiveMin"])(this.values, this.base, this.max); - } - }; - // 根据当前值获取占比 - Log.prototype.getScalePercent = function (value) { - var max = this.max; - var min = this.min; - if (max === min) { - return 0; - } - // 如果值小于等于0,则按照0处理 - if (value <= 0) { - return 0; - } - var base = this.base; - var positiveMin = this.positiveMin; - // 如果min == 0, 则根据比0大的最小值,计算比例关系。这个最小值作为坐标轴上的第二个tick,第一个是0但是不显示 - if (positiveMin) { - min = (positiveMin * 1) / base; - } - var percent; - // 如果数值小于次小值,那么就计算 value / 次小值 占整体的比例 - if (value < positiveMin) { - percent = value / positiveMin / (Object(_util_math__WEBPACK_IMPORTED_MODULE_1__["log"])(base, max) - Object(_util_math__WEBPACK_IMPORTED_MODULE_1__["log"])(base, min)); - } - else { - percent = (Object(_util_math__WEBPACK_IMPORTED_MODULE_1__["log"])(base, value) - Object(_util_math__WEBPACK_IMPORTED_MODULE_1__["log"])(base, min)) / (Object(_util_math__WEBPACK_IMPORTED_MODULE_1__["log"])(base, max) - Object(_util_math__WEBPACK_IMPORTED_MODULE_1__["log"])(base, min)); - } - return percent; - }; - return Log; -}(_base__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Log); -//# sourceMappingURL=log.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/continuous/pow.js": -/*!********************************************************!*\ - !*** ./node_modules/@antv/scale/esm/continuous/pow.js ***! - \********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _util_math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/math */ "./node_modules/@antv/scale/esm/util/math.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/scale/esm/continuous/base.js"); - - - -/** - * Pow 度量,处理非均匀分布 - */ -var Pow = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Pow, _super); - function Pow() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'pow'; - return _this; - } - /** - * @override - */ - Pow.prototype.invert = function (value) { - var percent = this.getInvertPercent(value); - var exponent = this.exponent; - var max = Object(_util_math__WEBPACK_IMPORTED_MODULE_1__["calBase"])(exponent, this.max); - var min = Object(_util_math__WEBPACK_IMPORTED_MODULE_1__["calBase"])(exponent, this.min); - var tmp = percent * (max - min) + min; - var factor = tmp >= 0 ? 1 : -1; - return Math.pow(tmp, exponent) * factor; - }; - Pow.prototype.initCfg = function () { - this.tickMethod = 'pow'; - this.exponent = 2; - this.tickCount = 5; - this.nice = true; - }; - // 获取度量计算时,value占的定义域百分比 - Pow.prototype.getScalePercent = function (value) { - var max = this.max; - var min = this.min; - if (max === min) { - return 0; - } - var exponent = this.exponent; - var percent = (Object(_util_math__WEBPACK_IMPORTED_MODULE_1__["calBase"])(exponent, value) - Object(_util_math__WEBPACK_IMPORTED_MODULE_1__["calBase"])(exponent, min)) / (Object(_util_math__WEBPACK_IMPORTED_MODULE_1__["calBase"])(exponent, max) - Object(_util_math__WEBPACK_IMPORTED_MODULE_1__["calBase"])(exponent, min)); - return percent; - }; - return Pow; -}(_base__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Pow); -//# sourceMappingURL=pow.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/continuous/quantile.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/scale/esm/continuous/quantile.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _quantize__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./quantize */ "./node_modules/@antv/scale/esm/continuous/quantize.js"); - - -var Quantile = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Quantile, _super); - function Quantile() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'quantile'; - return _this; - } - Quantile.prototype.initCfg = function () { - this.tickMethod = 'quantile'; - this.tickCount = 5; - this.nice = true; - }; - return Quantile; -}(_quantize__WEBPACK_IMPORTED_MODULE_1__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Quantile); -//# sourceMappingURL=quantile.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/continuous/quantize.js": -/*!*************************************************************!*\ - !*** ./node_modules/@antv/scale/esm/continuous/quantize.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/scale/esm/continuous/base.js"); - - - -/** - * 分段度量 - */ -var Quantize = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Quantize, _super); - function Quantize() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'quantize'; - return _this; - } - Quantize.prototype.invert = function (value) { - var ticks = this.ticks; - var length = ticks.length; - var percent = this.getInvertPercent(value); - var minIndex = Math.floor(percent * (length - 1)); - // 最后一个 - if (minIndex >= length - 1) { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["last"])(ticks); - } - // 超出左边界, 则取第一个 - if (minIndex < 0) { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["head"])(ticks); - } - var minTick = ticks[minIndex]; - var nextTick = ticks[minIndex + 1]; - // 比当前值小的 tick 在度量上的占比 - var minIndexPercent = minIndex / (length - 1); - var maxIndexPercent = (minIndex + 1) / (length - 1); - return minTick + (percent - minIndexPercent) / (maxIndexPercent - minIndexPercent) * (nextTick - minTick); - }; - Quantize.prototype.initCfg = function () { - this.tickMethod = 'r-pretty'; - this.tickCount = 5; - this.nice = true; - }; - Quantize.prototype.calculateTicks = function () { - var ticks = _super.prototype.calculateTicks.call(this); - if (!this.nice) { // 如果 nice = false ,补充 min, max - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["last"])(ticks) !== this.max) { - ticks.push(this.max); - } - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["head"])(ticks) !== this.min) { - ticks.unshift(this.min); - } - } - return ticks; - }; - // 计算当前值在刻度中的占比 - Quantize.prototype.getScalePercent = function (value) { - var ticks = this.ticks; - // 超出左边界 - if (value < Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["head"])(ticks)) { - return 0; - } - // 超出右边界 - if (value > Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["last"])(ticks)) { - return 1; - } - var minIndex = 0; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(ticks, function (tick, index) { - if (value >= tick) { - minIndex = index; - } - else { - return false; - } - }); - return minIndex / (ticks.length - 1); - }; - return Quantize; -}(_base__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Quantize); -//# sourceMappingURL=quantize.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/continuous/time.js": -/*!*********************************************************!*\ - !*** ./node_modules/@antv/scale/esm/continuous/time.js ***! - \*********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_time__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/time */ "./node_modules/@antv/scale/esm/util/time.js"); -/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./linear */ "./node_modules/@antv/scale/esm/continuous/linear.js"); - - - - -/** - * 时间度量 - * @class - */ -var Time = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Time, _super); - function Time() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'time'; - return _this; - } - /** - * @override - */ - Time.prototype.getText = function (value, index) { - var numberValue = this.translate(value); - var formatter = this.formatter; - return formatter ? formatter(numberValue, index) : Object(_util_time__WEBPACK_IMPORTED_MODULE_2__["timeFormat"])(numberValue, this.mask); - }; - /** - * @override - */ - Time.prototype.scale = function (value) { - var v = value; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isString"])(v) || Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isDate"])(v)) { - v = this.translate(v); - } - return _super.prototype.scale.call(this, v); - }; - /** - * 将时间转换成数字 - * @override - */ - Time.prototype.translate = function (v) { - return Object(_util_time__WEBPACK_IMPORTED_MODULE_2__["toTimeStamp"])(v); - }; - Time.prototype.initCfg = function () { - this.tickMethod = 'time-pretty'; - this.mask = 'YYYY-MM-DD'; - this.tickCount = 7; - this.nice = false; - }; - Time.prototype.setDomain = function () { - var values = this.values; - // 是否设置了 min, max,而不是直接取 this.min, this.max - var minConfig = this.getConfig('min'); - var maxConfig = this.getConfig('max'); - // 如果设置了 min,max 则转换成时间戳 - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNil"])(minConfig) || !Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(minConfig)) { - this.min = this.translate(this.min); - } - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNil"])(maxConfig) || !Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(maxConfig)) { - this.max = this.translate(this.max); - } - // 没有设置 min, max 时 - if (values && values.length) { - // 重新计算最大最小值 - var timeStamps_1 = []; - var min_1 = Infinity; // 最小值 - var secondMin_1 = min_1; // 次小值 - var max_1 = 0; - // 使用一个循环,计算min,max,secondMin - Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(values, function (v) { - var timeStamp = Object(_util_time__WEBPACK_IMPORTED_MODULE_2__["toTimeStamp"])(v); - if (isNaN(timeStamp)) { - throw new TypeError("Invalid Time: " + v + " in time scale!"); - } - if (min_1 > timeStamp) { - secondMin_1 = min_1; - min_1 = timeStamp; - } - else if (secondMin_1 > timeStamp) { - secondMin_1 = timeStamp; - } - if (max_1 < timeStamp) { - max_1 = timeStamp; - } - timeStamps_1.push(timeStamp); - }); - // 存在多个值时,设置最小间距 - if (values.length > 1) { - this.minTickInterval = secondMin_1 - min_1; - } - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNil"])(minConfig)) { - this.min = min_1; - } - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNil"])(maxConfig)) { - this.max = max_1; - } - } - }; - return Time; -}(_linear__WEBPACK_IMPORTED_MODULE_3__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Time); -//# sourceMappingURL=time.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/factory.js": -/*!*************************************************!*\ - !*** ./node_modules/@antv/scale/esm/factory.js ***! - \*************************************************/ -/*! exports provided: Scale, getScale, registerScale */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getScale", function() { return getClass; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerScale", function() { return registerClass; }); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/scale/esm/base.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scale", function() { return _base__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - - -var map = {}; -function getClass(key) { - return map[key]; -} -function registerClass(key, cls) { - if (getClass(key)) { - throw new Error("type '" + key + "' existed."); - } - map[key] = cls; -} - -//# sourceMappingURL=factory.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/identity/index.js": -/*!********************************************************!*\ - !*** ./node_modules/@antv/scale/esm/identity/index.js ***! - \********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base */ "./node_modules/@antv/scale/esm/base.js"); - - - -/** - * identity scale原则上是定义域和值域一致,scale/invert方法也是一致的 - * 参考R的实现:https://github.com/r-lib/scales/blob/master/R/pal-identity.r - * 参考d3的实现(做了下转型):https://github.com/d3/d3-scale/blob/master/src/identity.js - */ -var Identity = /** @class */ (function (_super) { - Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Identity, _super); - function Identity() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'identity'; - _this.isIdentity = true; - return _this; - } - Identity.prototype.calculateTicks = function () { - return this.values; - }; - Identity.prototype.scale = function (value) { - // 如果传入的值不等于 identity 的值,则直接返回,用于一维图时的 dodge - if (this.values[0] !== value && Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(value)) { - return value; - } - return this.range[0]; - }; - Identity.prototype.invert = function (value) { - var range = this.range; - if (value < range[0] || value > range[1]) { - return NaN; - } - return this.values[0]; - }; - return Identity; -}(_base__WEBPACK_IMPORTED_MODULE_2__["default"])); -/* harmony default export */ __webpack_exports__["default"] = (Identity); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/index.js": -/*!***********************************************!*\ - !*** ./node_modules/@antv/scale/esm/index.js ***! - \***********************************************/ -/*! exports provided: Category, Identity, Linear, Log, Pow, Time, TimeCat, Quantile, Quantize, Scale, getScale, registerScale, getTickMethod */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./node_modules/@antv/scale/esm/base.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scale", function() { return _base__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _category_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./category/base */ "./node_modules/@antv/scale/esm/category/base.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Category", function() { return _category_base__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - -/* harmony import */ var _category_time__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./category/time */ "./node_modules/@antv/scale/esm/category/time.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimeCat", function() { return _category_time__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - -/* harmony import */ var _continuous_linear__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./continuous/linear */ "./node_modules/@antv/scale/esm/continuous/linear.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Linear", function() { return _continuous_linear__WEBPACK_IMPORTED_MODULE_3__["default"]; }); - -/* harmony import */ var _continuous_log__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./continuous/log */ "./node_modules/@antv/scale/esm/continuous/log.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Log", function() { return _continuous_log__WEBPACK_IMPORTED_MODULE_4__["default"]; }); - -/* harmony import */ var _continuous_pow__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./continuous/pow */ "./node_modules/@antv/scale/esm/continuous/pow.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Pow", function() { return _continuous_pow__WEBPACK_IMPORTED_MODULE_5__["default"]; }); - -/* harmony import */ var _continuous_time__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./continuous/time */ "./node_modules/@antv/scale/esm/continuous/time.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Time", function() { return _continuous_time__WEBPACK_IMPORTED_MODULE_6__["default"]; }); - -/* harmony import */ var _continuous_quantize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./continuous/quantize */ "./node_modules/@antv/scale/esm/continuous/quantize.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Quantize", function() { return _continuous_quantize__WEBPACK_IMPORTED_MODULE_7__["default"]; }); - -/* harmony import */ var _continuous_quantile__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./continuous/quantile */ "./node_modules/@antv/scale/esm/continuous/quantile.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Quantile", function() { return _continuous_quantile__WEBPACK_IMPORTED_MODULE_8__["default"]; }); - -/* harmony import */ var _factory__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./factory */ "./node_modules/@antv/scale/esm/factory.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getScale", function() { return _factory__WEBPACK_IMPORTED_MODULE_9__["getScale"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "registerScale", function() { return _factory__WEBPACK_IMPORTED_MODULE_9__["registerScale"]; }); - -/* harmony import */ var _identity_index__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./identity/index */ "./node_modules/@antv/scale/esm/identity/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Identity", function() { return _identity_index__WEBPACK_IMPORTED_MODULE_10__["default"]; }); - -/* harmony import */ var _tick_method_index__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./tick-method/index */ "./node_modules/@antv/scale/esm/tick-method/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getTickMethod", function() { return _tick_method_index__WEBPACK_IMPORTED_MODULE_11__["getTickMethod"]; }); - - - - - - - - - - - - - -Object(_factory__WEBPACK_IMPORTED_MODULE_9__["registerScale"])('cat', _category_base__WEBPACK_IMPORTED_MODULE_1__["default"]); -Object(_factory__WEBPACK_IMPORTED_MODULE_9__["registerScale"])('category', _category_base__WEBPACK_IMPORTED_MODULE_1__["default"]); -Object(_factory__WEBPACK_IMPORTED_MODULE_9__["registerScale"])('identity', _identity_index__WEBPACK_IMPORTED_MODULE_10__["default"]); -Object(_factory__WEBPACK_IMPORTED_MODULE_9__["registerScale"])('linear', _continuous_linear__WEBPACK_IMPORTED_MODULE_3__["default"]); -Object(_factory__WEBPACK_IMPORTED_MODULE_9__["registerScale"])('log', _continuous_log__WEBPACK_IMPORTED_MODULE_4__["default"]); -Object(_factory__WEBPACK_IMPORTED_MODULE_9__["registerScale"])('pow', _continuous_pow__WEBPACK_IMPORTED_MODULE_5__["default"]); -Object(_factory__WEBPACK_IMPORTED_MODULE_9__["registerScale"])('time', _continuous_time__WEBPACK_IMPORTED_MODULE_6__["default"]); -Object(_factory__WEBPACK_IMPORTED_MODULE_9__["registerScale"])('timeCat', _category_time__WEBPACK_IMPORTED_MODULE_2__["default"]); -Object(_factory__WEBPACK_IMPORTED_MODULE_9__["registerScale"])('quantize', _continuous_quantize__WEBPACK_IMPORTED_MODULE_7__["default"]); -Object(_factory__WEBPACK_IMPORTED_MODULE_9__["registerScale"])('quantile', _continuous_quantile__WEBPACK_IMPORTED_MODULE_8__["default"]); - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/tick-method/cat.js": -/*!*********************************************************!*\ - !*** ./node_modules/@antv/scale/esm/tick-method/cat.js ***! - \*********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return calculateCatTicks; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_extended__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/extended */ "./node_modules/@antv/scale/esm/util/extended.js"); - - -/** - * 计算分类 ticks - * @param cfg 度量的配置项 - * @returns 计算后的 ticks - */ -function calculateCatTicks(cfg) { - var values = cfg.values, tickInterval = cfg.tickInterval, tickCount = cfg.tickCount; - var ticks = values; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNumber"])(tickInterval)) { - return Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["filter"])(ticks, function (__, i) { return i % tickInterval === 0; }); - } - var min = cfg.min, max = cfg.max; - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(min)) { - min = 0; - } - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(max)) { - max = values.length - 1; - } - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNumber"])(tickCount) && tickCount < max - min) { - // 简单过滤,部分情况下小数的倍数也可以是整数 - // tslint:disable-next-line: no-shadowed-variable - var ticks_1 = Object(_util_extended__WEBPACK_IMPORTED_MODULE_1__["default"])(min, max, tickCount, false, [1, 2, 5, 3, 4, 7, 6, 8, 9]).ticks; - var valid = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["filter"])(ticks_1, function (tick) { return tick >= min && tick <= max; }); - return valid.map(function (index) { return values[index]; }); - } - return values.slice(min, max + 1); -} -//# sourceMappingURL=cat.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/tick-method/d3-linear.js": -/*!***************************************************************!*\ - !*** ./node_modules/@antv/scale/esm/tick-method/d3-linear.js ***! - \***************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return d3LinearTickMethod; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_d3_linear__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/d3-linear */ "./node_modules/@antv/scale/esm/util/d3-linear.js"); -/* harmony import */ var _util_interval__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/interval */ "./node_modules/@antv/scale/esm/util/interval.js"); -/* harmony import */ var _util_strict_limit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/strict-limit */ "./node_modules/@antv/scale/esm/util/strict-limit.js"); - - - - -function d3LinearTickMethod(cfg) { - var min = cfg.min, max = cfg.max, tickInterval = cfg.tickInterval, minLimit = cfg.minLimit, maxLimit = cfg.maxLimit; - var ticks = Object(_util_d3_linear__WEBPACK_IMPORTED_MODULE_1__["default"])(cfg); - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(minLimit) || !Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(maxLimit)) { - return Object(_util_strict_limit__WEBPACK_IMPORTED_MODULE_3__["default"])(cfg, Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["head"])(ticks), Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["last"])(ticks)); - } - if (tickInterval) { - return Object(_util_interval__WEBPACK_IMPORTED_MODULE_2__["default"])(min, max, tickInterval).ticks; - } - return ticks; -} -//# sourceMappingURL=d3-linear.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/tick-method/index.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/scale/esm/tick-method/index.js ***! - \***********************************************************/ -/*! exports provided: getTickMethod */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _cat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cat */ "./node_modules/@antv/scale/esm/tick-method/cat.js"); -/* harmony import */ var _d3_linear__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./d3-linear */ "./node_modules/@antv/scale/esm/tick-method/d3-linear.js"); -/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear */ "./node_modules/@antv/scale/esm/tick-method/linear.js"); -/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./log */ "./node_modules/@antv/scale/esm/tick-method/log.js"); -/* harmony import */ var _pow__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pow */ "./node_modules/@antv/scale/esm/tick-method/pow.js"); -/* harmony import */ var _quantile__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./quantile */ "./node_modules/@antv/scale/esm/tick-method/quantile.js"); -/* harmony import */ var _r_prettry__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./r-prettry */ "./node_modules/@antv/scale/esm/tick-method/r-prettry.js"); -/* harmony import */ var _register__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./register */ "./node_modules/@antv/scale/esm/tick-method/register.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getTickMethod", function() { return _register__WEBPACK_IMPORTED_MODULE_7__["getTickMethod"]; }); - -/* harmony import */ var _time__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./time */ "./node_modules/@antv/scale/esm/tick-method/time.js"); -/* harmony import */ var _time_cat__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./time-cat */ "./node_modules/@antv/scale/esm/tick-method/time-cat.js"); -/* harmony import */ var _time_pretty__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./time-pretty */ "./node_modules/@antv/scale/esm/tick-method/time-pretty.js"); - - - - - - - - - - - -Object(_register__WEBPACK_IMPORTED_MODULE_7__["registerTickMethod"])('cat', _cat__WEBPACK_IMPORTED_MODULE_0__["default"]); -Object(_register__WEBPACK_IMPORTED_MODULE_7__["registerTickMethod"])('time-cat', _time_cat__WEBPACK_IMPORTED_MODULE_9__["default"]); -Object(_register__WEBPACK_IMPORTED_MODULE_7__["registerTickMethod"])('wilkinson-extended', _linear__WEBPACK_IMPORTED_MODULE_2__["default"]); -Object(_register__WEBPACK_IMPORTED_MODULE_7__["registerTickMethod"])('r-pretty', _r_prettry__WEBPACK_IMPORTED_MODULE_6__["default"]); -Object(_register__WEBPACK_IMPORTED_MODULE_7__["registerTickMethod"])('time', _time__WEBPACK_IMPORTED_MODULE_8__["default"]); -Object(_register__WEBPACK_IMPORTED_MODULE_7__["registerTickMethod"])('time-pretty', _time_pretty__WEBPACK_IMPORTED_MODULE_10__["default"]); -Object(_register__WEBPACK_IMPORTED_MODULE_7__["registerTickMethod"])('log', _log__WEBPACK_IMPORTED_MODULE_3__["default"]); -Object(_register__WEBPACK_IMPORTED_MODULE_7__["registerTickMethod"])('pow', _pow__WEBPACK_IMPORTED_MODULE_4__["default"]); -Object(_register__WEBPACK_IMPORTED_MODULE_7__["registerTickMethod"])('quantile', _quantile__WEBPACK_IMPORTED_MODULE_5__["default"]); -Object(_register__WEBPACK_IMPORTED_MODULE_7__["registerTickMethod"])('d3-linear', _d3_linear__WEBPACK_IMPORTED_MODULE_1__["default"]); - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/tick-method/linear.js": -/*!************************************************************!*\ - !*** ./node_modules/@antv/scale/esm/tick-method/linear.js ***! - \************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return linear; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_extended__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/extended */ "./node_modules/@antv/scale/esm/util/extended.js"); -/* harmony import */ var _util_interval__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/interval */ "./node_modules/@antv/scale/esm/util/interval.js"); -/* harmony import */ var _util_strict_limit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/strict-limit */ "./node_modules/@antv/scale/esm/util/strict-limit.js"); - - - - -/** - * 计算线性的 ticks,使用 wilkinson extended 方法 - * @param cfg 度量的配置项 - * @returns 计算后的 ticks - */ -function linear(cfg) { - var min = cfg.min, max = cfg.max, tickCount = cfg.tickCount, nice = cfg.nice, tickInterval = cfg.tickInterval, minLimit = cfg.minLimit, maxLimit = cfg.maxLimit; - var ticks = Object(_util_extended__WEBPACK_IMPORTED_MODULE_1__["default"])(min, max, tickCount, nice).ticks; - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(minLimit) || !Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(maxLimit)) { - return Object(_util_strict_limit__WEBPACK_IMPORTED_MODULE_3__["default"])(cfg, Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["head"])(ticks), Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["last"])(ticks)); - } - if (tickInterval) { - return Object(_util_interval__WEBPACK_IMPORTED_MODULE_2__["default"])(min, max, tickInterval).ticks; - } - return ticks; -} -//# sourceMappingURL=linear.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/tick-method/log.js": -/*!*********************************************************!*\ - !*** ./node_modules/@antv/scale/esm/tick-method/log.js ***! - \*********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return calculateLogTicks; }); -/* harmony import */ var _util_math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/math */ "./node_modules/@antv/scale/esm/util/math.js"); - -/** - * 计算 log 的 ticks,考虑 min = 0 的场景 - * @param cfg 度量的配置项 - * @returns 计算后的 ticks - */ -function calculateLogTicks(cfg) { - var base = cfg.base, tickCount = cfg.tickCount, min = cfg.min, max = cfg.max, values = cfg.values; - var minTick; - var maxTick = Object(_util_math__WEBPACK_IMPORTED_MODULE_0__["log"])(base, max); - if (min > 0) { - minTick = Math.floor(Object(_util_math__WEBPACK_IMPORTED_MODULE_0__["log"])(base, min)); - } - else { - var positiveMin = Object(_util_math__WEBPACK_IMPORTED_MODULE_0__["getLogPositiveMin"])(values, base, max); - minTick = Math.floor(Object(_util_math__WEBPACK_IMPORTED_MODULE_0__["log"])(base, positiveMin)); - } - var count = maxTick - minTick; - var avg = Math.ceil(count / tickCount); - var ticks = []; - for (var i = minTick; i < maxTick + avg; i = i + avg) { - ticks.push(Math.pow(base, i)); - } - if (min <= 0) { - // 最小值 <= 0 时显示 0 - ticks.unshift(0); - } - return ticks; -} -//# sourceMappingURL=log.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/tick-method/pow.js": -/*!*********************************************************!*\ - !*** ./node_modules/@antv/scale/esm/tick-method/pow.js ***! - \*********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return calculatePowTicks; }); -/* harmony import */ var _util_math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/math */ "./node_modules/@antv/scale/esm/util/math.js"); -/* harmony import */ var _util_pretty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/pretty */ "./node_modules/@antv/scale/esm/util/pretty.js"); - - -/** - * 计算 Pow 的 ticks - * @param cfg 度量的配置项 - * @returns 计算后的 ticks - */ -function calculatePowTicks(cfg) { - var exponent = cfg.exponent, tickCount = cfg.tickCount; - var max = Math.ceil(Object(_util_math__WEBPACK_IMPORTED_MODULE_0__["calBase"])(exponent, cfg.max)); - var min = Math.floor(Object(_util_math__WEBPACK_IMPORTED_MODULE_0__["calBase"])(exponent, cfg.min)); - var ticks = Object(_util_pretty__WEBPACK_IMPORTED_MODULE_1__["default"])(min, max, tickCount).ticks; - return ticks.map(function (tick) { - var factor = tick >= 0 ? 1 : -1; - return Math.pow(tick, exponent) * factor; - }); -} -//# sourceMappingURL=pow.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/tick-method/quantile.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/scale/esm/tick-method/quantile.js ***! - \**************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return calculateTicks; }); -/** - * 计算几分位 https://github.com/simple-statistics/simple-statistics/blob/master/src/quantile_sorted.js - * @param x 数组 - * @param p 百分比 - */ -function quantileSorted(x, p) { - var idx = x.length * p; - /*if (x.length === 0) { // 当前场景这些条件不可能命中 - throw new Error('quantile requires at least one value.'); - } else if (p < 0 || p > 1) { - throw new Error('quantiles must be between 0 and 1'); - } else */ - if (p === 1) { - // If p is 1, directly return the last element - return x[x.length - 1]; - } - else if (p === 0) { - // If p is 0, directly return the first element - return x[0]; - } - else if (idx % 1 !== 0) { - // If p is not integer, return the next element in array - return x[Math.ceil(idx) - 1]; - } - else if (x.length % 2 === 0) { - // If the list has even-length, we'll take the average of this number - // and the next value, if there is one - return (x[idx - 1] + x[idx]) / 2; - } - else { - // Finally, in the simple case of an integer value - // with an odd-length list, return the x value at the index. - return x[idx]; - } -} -function calculateTicks(cfg) { - var tickCount = cfg.tickCount, values = cfg.values; - if (!values || !values.length) { - return []; - } - var sorted = values.slice().sort(function (a, b) { - return a - b; - }); - var ticks = []; - for (var i = 0; i < tickCount; i++) { - var p = i / (tickCount - 1); - ticks.push(quantileSorted(sorted, p)); - } - return ticks; -} -//# sourceMappingURL=quantile.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/tick-method/r-prettry.js": -/*!***************************************************************!*\ - !*** ./node_modules/@antv/scale/esm/tick-method/r-prettry.js ***! - \***************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return linearPretty; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _util_interval__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/interval */ "./node_modules/@antv/scale/esm/util/interval.js"); -/* harmony import */ var _util_pretty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/pretty */ "./node_modules/@antv/scale/esm/util/pretty.js"); -/* harmony import */ var _util_strict_limit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/strict-limit */ "./node_modules/@antv/scale/esm/util/strict-limit.js"); - - - - -/** - * 计算线性的 ticks,使用 R's pretty 方法 - * @param cfg 度量的配置项 - * @returns 计算后的 ticks - */ -function linearPretty(cfg) { - var min = cfg.min, max = cfg.max, tickCount = cfg.tickCount, tickInterval = cfg.tickInterval, minLimit = cfg.minLimit, maxLimit = cfg.maxLimit; - var ticks = Object(_util_pretty__WEBPACK_IMPORTED_MODULE_2__["default"])(min, max, tickCount).ticks; - if (!Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(minLimit) || !Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(maxLimit)) { - return Object(_util_strict_limit__WEBPACK_IMPORTED_MODULE_3__["default"])(cfg, Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["head"])(ticks), Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["last"])(ticks)); - } - if (tickInterval) { - return Object(_util_interval__WEBPACK_IMPORTED_MODULE_1__["default"])(min, max, tickInterval).ticks; - } - return ticks; -} -//# sourceMappingURL=r-prettry.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/tick-method/register.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/scale/esm/tick-method/register.js ***! - \**************************************************************/ -/*! exports provided: getTickMethod, registerTickMethod */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTickMethod", function() { return getTickMethod; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerTickMethod", function() { return registerTickMethod; }); -var methodCache = {}; -/** - * 获取计算 ticks 的方法 - * @param key 键值 - * @returns 计算 ticks 的方法 - */ -function getTickMethod(key) { - return methodCache[key]; -} -/** - * 注册计算 ticks 的方法 - * @param key 键值 - * @param method 方法 - */ -function registerTickMethod(key, method) { - methodCache[key] = method; -} -//# sourceMappingURL=register.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/tick-method/time-cat.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/scale/esm/tick-method/time-cat.js ***! - \**************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return calculateTimeCatTicks; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var _cat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cat */ "./node_modules/@antv/scale/esm/tick-method/cat.js"); - - -/** - * 计算时间分类的 ticks, 保头,保尾 - * @param cfg 度量的配置项 - * @returns 计算后的 ticks - */ -function calculateTimeCatTicks(cfg) { - var ticks = Object(_cat__WEBPACK_IMPORTED_MODULE_1__["default"])(cfg); - var lastValue = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["last"])(cfg.values); - if (lastValue !== Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["last"])(ticks)) { - ticks.push(lastValue); - } - return ticks; -} -//# sourceMappingURL=time-cat.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/tick-method/time-pretty.js": -/*!*****************************************************************!*\ - !*** ./node_modules/@antv/scale/esm/tick-method/time-pretty.js ***! - \*****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return timePretty; }); -/* harmony import */ var _util_time__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/time */ "./node_modules/@antv/scale/esm/util/time.js"); - -function getYear(date) { - return new Date(date).getFullYear(); -} -function createYear(year) { - return new Date(year, 0, 1).getTime(); -} -function getMonth(date) { - return new Date(date).getMonth(); -} -function diffMonth(min, max) { - var minYear = getYear(min); - var maxYear = getYear(max); - var minMonth = getMonth(min); - var maxMonth = getMonth(max); - return (maxYear - minYear) * 12 + ((maxMonth - minMonth) % 12); -} -function creatMonth(year, month) { - return new Date(year, month, 1).getTime(); -} -function diffDay(min, max) { - return Math.ceil((max - min) / _util_time__WEBPACK_IMPORTED_MODULE_0__["DAY"]); -} -function diffHour(min, max) { - return Math.ceil((max - min) / _util_time__WEBPACK_IMPORTED_MODULE_0__["HOUR"]); -} -function diffMinus(min, max) { - return Math.ceil((max - min) / (60 * 1000)); -} -/** - * 计算 time 的 ticks,对 month, year 进行 pretty 处理 - * @param cfg 度量的配置项 - * @returns 计算后的 ticks - */ -function timePretty(cfg) { - var min = cfg.min, max = cfg.max, minTickInterval = cfg.minTickInterval; - var tickInterval = cfg.tickInterval; - var tickCount = cfg.tickCount; - var ticks = []; - // 指定 tickInterval 后 tickCount 不生效,需要重新计算 - if (!tickInterval) { - tickInterval = (max - min) / tickCount; - // 如果设置了最小间距,则使用最小间距 - if (minTickInterval && tickInterval < minTickInterval) { - tickInterval = minTickInterval; - } - } - var minYear = getYear(min); - // 如果间距大于 1 年,则将开始日期从整年开始 - if (tickInterval > _util_time__WEBPACK_IMPORTED_MODULE_0__["YEAR"]) { - var maxYear = getYear(max); - var yearInterval = Math.ceil(tickInterval / _util_time__WEBPACK_IMPORTED_MODULE_0__["YEAR"]); - for (var i = minYear; i <= maxYear + yearInterval; i = i + yearInterval) { - ticks.push(createYear(i)); - } - } - else if (tickInterval > _util_time__WEBPACK_IMPORTED_MODULE_0__["MONTH"]) { - // 大于月时 - var monthInterval = Math.ceil(tickInterval / _util_time__WEBPACK_IMPORTED_MODULE_0__["MONTH"]); - var mmMoth = getMonth(min); - var dMonths = diffMonth(min, max); - for (var i = 0; i <= dMonths + monthInterval; i = i + monthInterval) { - ticks.push(creatMonth(minYear, i + mmMoth)); - } - } - else if (tickInterval > _util_time__WEBPACK_IMPORTED_MODULE_0__["DAY"]) { - // 大于天 - var date = new Date(min); - var year = date.getFullYear(); - var month = date.getMonth(); - var mday = date.getDate(); - var day = Math.ceil(tickInterval / _util_time__WEBPACK_IMPORTED_MODULE_0__["DAY"]); - var ddays = diffDay(min, max); - for (var i = 0; i < ddays + day; i = i + day) { - ticks.push(new Date(year, month, mday + i).getTime()); - } - } - else if (tickInterval > _util_time__WEBPACK_IMPORTED_MODULE_0__["HOUR"]) { - // 大于小时 - var date = new Date(min); - var year = date.getFullYear(); - var month = date.getMonth(); - var day = date.getDate(); - var hour = date.getHours(); - var hours = Math.ceil(tickInterval / _util_time__WEBPACK_IMPORTED_MODULE_0__["HOUR"]); - var dHours = diffHour(min, max); - for (var i = 0; i <= dHours + hours; i = i + hours) { - ticks.push(new Date(year, month, day, hour + i).getTime()); - } - } - else if (tickInterval > _util_time__WEBPACK_IMPORTED_MODULE_0__["MINUTE"]) { - // 大于分钟 - var dMinus = diffMinus(min, max); - var minutes = Math.ceil(tickInterval / _util_time__WEBPACK_IMPORTED_MODULE_0__["MINUTE"]); - for (var i = 0; i <= dMinus + minutes; i = i + minutes) { - ticks.push(min + i * _util_time__WEBPACK_IMPORTED_MODULE_0__["MINUTE"]); - } - } - else { - // 小于分钟 - var interval = tickInterval; - if (interval < _util_time__WEBPACK_IMPORTED_MODULE_0__["SECOND"]) { - interval = _util_time__WEBPACK_IMPORTED_MODULE_0__["SECOND"]; - } - var minSecond = Math.floor(min / _util_time__WEBPACK_IMPORTED_MODULE_0__["SECOND"]) * _util_time__WEBPACK_IMPORTED_MODULE_0__["SECOND"]; - var dSeconds = Math.ceil((max - min) / _util_time__WEBPACK_IMPORTED_MODULE_0__["SECOND"]); - var seconds = Math.ceil(interval / _util_time__WEBPACK_IMPORTED_MODULE_0__["SECOND"]); - for (var i = 0; i < dSeconds + seconds; i = i + seconds) { - ticks.push(minSecond + i * _util_time__WEBPACK_IMPORTED_MODULE_0__["SECOND"]); - } - } - return ticks; -} -//# sourceMappingURL=time-pretty.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/tick-method/time.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/scale/esm/tick-method/time.js ***! - \**********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return calculateTimeTicks; }); -/* harmony import */ var _util_time__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/time */ "./node_modules/@antv/scale/esm/util/time.js"); - -function calculateTimeTicks(cfg) { - var min = cfg.min, max = cfg.max, minTickInterval = cfg.minTickInterval; - var tickInterval = cfg.tickInterval; - var tickCount = cfg.tickCount; - // 指定 tickInterval 后 tickCount 不生效,需要重新计算 - if (tickInterval) { - tickCount = Math.ceil((max - min) / tickInterval); - } - else { - tickInterval = Object(_util_time__WEBPACK_IMPORTED_MODULE_0__["getTickInterval"])(min, max, tickCount)[1]; - var count = (max - min) / tickInterval; - var ratio = count / tickCount; - if (ratio > 1) { - tickInterval = tickInterval * Math.ceil(ratio); - } - // 如果设置了最小间距,则使用最小间距 - if (minTickInterval && tickInterval < minTickInterval) { - tickInterval = minTickInterval; - } - } - var ticks = []; - for (var i = min; i < max + tickInterval; i += tickInterval) { - ticks.push(i); - } - return ticks; -} -//# sourceMappingURL=time.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/util/bisector.js": -/*!*******************************************************!*\ - !*** ./node_modules/@antv/scale/esm/util/bisector.js ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -/** - * 二分右侧查找 - * https://github.com/d3/d3-array/blob/master/src/bisector.js - */ -/* harmony default export */ __webpack_exports__["default"] = (function (getter) { - /** - * x: 目标值 - * lo: 起始位置 - * hi: 结束位置 - */ - return function (a, x, _lo, _hi) { - var lo = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(_lo) ? 0 : _lo; - var hi = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(_hi) ? a.length : _hi; - while (lo < hi) { - var mid = (lo + hi) >>> 1; - if (getter(a[mid]) > x) { - hi = mid; - } - else { - lo = mid + 1; - } - } - return lo; - }; -}); -//# sourceMappingURL=bisector.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/util/d3-linear.js": -/*!********************************************************!*\ - !*** ./node_modules/@antv/scale/esm/util/d3-linear.js ***! - \********************************************************/ -/*! exports provided: default, D3Linear */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return d3Linear; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D3Linear", function() { return D3Linear; }); -function d3Linear(cfg) { - var min = cfg.min, max = cfg.max, nice = cfg.nice, tickCount = cfg.tickCount; - var linear = new D3Linear(); - linear.domain([min, max]); - if (nice) { - linear.nice(tickCount); - } - return linear.ticks(tickCount); -} -var DEFAULT_COUNT = 5; -var e10 = Math.sqrt(50); -var e5 = Math.sqrt(10); -var e2 = Math.sqrt(2); -// https://github.com/d3/d3-scale -var D3Linear = /** @class */ (function () { - function D3Linear() { - this._domain = [0, 1]; - } - D3Linear.prototype.domain = function (domain) { - if (domain) { - this._domain = Array.from(domain, Number); - return this; - } - return this._domain.slice(); - }; - D3Linear.prototype.nice = function (count) { - var _a, _b; - if (count === void 0) { count = DEFAULT_COUNT; } - var d = this._domain.slice(); - var i0 = 0; - var i1 = this._domain.length - 1; - var start = this._domain[i0]; - var stop = this._domain[i1]; - var step; - if (stop < start) { - _a = [stop, start], start = _a[0], stop = _a[1]; - _b = [i1, i0], i0 = _b[0], i1 = _b[1]; - } - step = tickIncrement(start, stop, count); - if (step > 0) { - start = Math.floor(start / step) * step; - stop = Math.ceil(stop / step) * step; - step = tickIncrement(start, stop, count); - } - else if (step < 0) { - start = Math.ceil(start * step) / step; - stop = Math.floor(stop * step) / step; - step = tickIncrement(start, stop, count); - } - if (step > 0) { - d[i0] = Math.floor(start / step) * step; - d[i1] = Math.ceil(stop / step) * step; - this.domain(d); - } - else if (step < 0) { - d[i0] = Math.ceil(start * step) / step; - d[i1] = Math.floor(stop * step) / step; - this.domain(d); - } - return this; - }; - D3Linear.prototype.ticks = function (count) { - if (count === void 0) { count = DEFAULT_COUNT; } - return d3ArrayTicks(this._domain[0], this._domain[this._domain.length - 1], count || DEFAULT_COUNT); - }; - return D3Linear; -}()); - -function d3ArrayTicks(start, stop, count) { - var reverse; - var i = -1; - var n; - var ticks; - var step; - (stop = +stop), (start = +start), (count = +count); - if (start === stop && count > 0) { - return [start]; - } - // tslint:disable-next-line - if ((reverse = stop < start)) { - (n = start), (start = stop), (stop = n); - } - // tslint:disable-next-line - if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) { - return []; - } - if (step > 0) { - start = Math.ceil(start / step); - stop = Math.floor(stop / step); - ticks = new Array((n = Math.ceil(stop - start + 1))); - while (++i < n) { - ticks[i] = (start + i) * step; - } - } - else { - start = Math.floor(start * step); - stop = Math.ceil(stop * step); - ticks = new Array((n = Math.ceil(start - stop + 1))); - while (++i < n) { - ticks[i] = (start - i) / step; - } - } - if (reverse) { - ticks.reverse(); - } - return ticks; -} -function tickIncrement(start, stop, count) { - var step = (stop - start) / Math.max(0, count); - var power = Math.floor(Math.log(step) / Math.LN10); - var error = step / Math.pow(10, power); - return power >= 0 - ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power) - : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1); -} -//# sourceMappingURL=d3-linear.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/util/extended.js": -/*!*******************************************************!*\ - !*** ./node_modules/@antv/scale/esm/util/extended.js ***! - \*******************************************************/ -/*! exports provided: DEFAULT_Q, ALL_Q, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_Q", function() { return DEFAULT_Q; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ALL_Q", function() { return ALL_Q; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return extended; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -var DEFAULT_Q = [1, 5, 2, 2.5, 4, 3]; -var ALL_Q = [1, 5, 2, 2.5, 4, 3, 1.5, 7, 6, 8, 9]; -var eps = Number.EPSILON * 100; -// https://stackoverflow.com/questions/4467539/javascript-modulo-gives-a-negative-result-for-negative-numbers -function mod(n, m) { - return ((n % m) + m) % m; -} -function simplicity(q, Q, j, lmin, lmax, lstep) { - var n = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["size"])(Q); - var i = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["indexOf"])(Q, q); - var v = 0; - var m = mod(lmin, lstep); - if ((m < eps || lstep - m < eps) && lmin <= 0 && lmax >= 0) { - v = 1; - } - return 1 - i / (n - 1) - j + v; -} -function simplicityMax(q, Q, j) { - var n = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["size"])(Q); - var i = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["indexOf"])(Q, q); - var v = 1; - return 1 - i / (n - 1) - j + v; -} -function density(k, m, dmin, dmax, lmin, lmax) { - var r = (k - 1) / (lmax - lmin); - var rt = (m - 1) / (Math.max(lmax, dmax) - Math.min(dmin, lmin)); - return 2 - Math.max(r / rt, rt / r); -} -function densityMax(k, m) { - if (k >= m) { - return 2 - (k - 1) / (m - 1); - } - return 1; -} -function coverage(dmin, dmax, lmin, lmax) { - var range = dmax - dmin; - return 1 - (0.5 * (Math.pow(dmax - lmax, 2) + Math.pow(dmin - lmin, 2))) / Math.pow(0.1 * range, 2); -} -function coverageMax(dmin, dmax, span) { - var range = dmax - dmin; - if (span > range) { - var half = (span - range) / 2; - return 1 - Math.pow(half, 2) / Math.pow(0.1 * range, 2); - } - return 1; -} -function legibility() { - return 1; -} -/** - * An Extension of Wilkinson's Algorithm for Position Tick Labels on Axes - * https://www.yuque.com/preview/yuque/0/2019/pdf/185317/1546999150858-45c3b9c2-4e86-4223-bf1a-8a732e8195ed.pdf - * @param dmin 最小值 - * @param dmax 最大值 - * @param m tick个数 - * @param onlyLoose 是否允许扩展min、max,不绝对强制,例如[3, 97] - * @param Q nice numbers集合 - * @param w 四个优化组件的权重 - */ -function extended(dmin, dmax, m, onlyLoose, Q, w) { - if (m === void 0) { m = 5; } - if (onlyLoose === void 0) { onlyLoose = true; } - if (Q === void 0) { Q = DEFAULT_Q; } - if (w === void 0) { w = [0.25, 0.2, 0.5, 0.05]; } - if (dmin === dmax || m === 1) { - return { - min: dmin, - max: dmax, - ticks: [dmin], - }; - } - var best = { - score: -2, - lmin: 0, - lmax: 0, - lstep: 0, - }; - var j = 1; - while (j < Infinity) { - for (var _i = 0, Q_1 = Q; _i < Q_1.length; _i++) { - var q = Q_1[_i]; - var sm = simplicityMax(q, Q, j); - if (Number.isNaN(sm)) { - throw new Error('NaN'); - } - if (w[0] * sm + w[1] + w[2] + w[3] < best.score) { - j = Infinity; - break; - } - var k = 2; - while (k < Infinity) { - var dm = densityMax(k, m); - if (w[0] * sm + w[1] + w[2] * dm + w[3] < best.score) { - break; - } - var delta = (dmax - dmin) / (k + 1) / j / q; - var z = Math.ceil(Math.log10(delta)); - while (z < Infinity) { - var step = j * q * Math.pow(10, z); - var cm = coverageMax(dmin, dmax, step * (k - 1)); - if (w[0] * sm + w[1] * cm + w[2] * dm + w[3] < best.score) { - break; - } - var minStart = Math.floor(dmax / step) * j - (k - 1) * j; - var maxStart = Math.ceil(dmin / step) * j; - if (minStart > maxStart) { - z = z + 1; - continue; - } - for (var start = minStart; start <= maxStart; start = start + 1) { - var lmin = start * (step / j); - var lmax = lmin + step * (k - 1); - var lstep = step; - var s = simplicity(q, Q, j, lmin, lmax, lstep); - var c = coverage(dmin, dmax, lmin, lmax); - var g = density(k, m, dmin, dmax, lmin, lmax); - var l = legibility(); - var score = w[0] * s + w[1] * c + w[2] * g + w[3] * l; - if (score > best.score && (!onlyLoose || (lmin <= dmin && lmax >= dmax))) { - best.lmin = lmin; - best.lmax = lmax; - best.lstep = lstep; - best.score = score; - } - } - z = z + 1; - } - k = k + 1; - } - } - j = j + 1; - } - // 步长为浮点数时处理精度 - var toFixed = Number.isInteger(best.lstep) ? 0 : Math.ceil(Math.abs(Math.log10(best.lstep))); - var range = []; - for (var tick = best.lmin; tick <= best.lmax; tick += best.lstep) { - range.push(tick); - } - var ticks = toFixed ? Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["map"])(range, function (x) { return Number.parseFloat(x.toFixed(toFixed)); }) : range; - return { - min: Math.min(dmin, Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["head"])(ticks)), - max: Math.max(dmax, Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["last"])(ticks)), - ticks: ticks, - }; -} -//# sourceMappingURL=extended.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/util/interval.js": -/*!*******************************************************!*\ - !*** ./node_modules/@antv/scale/esm/util/interval.js ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return intervalTicks; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -function snapMultiple(v, base, snapType) { - var div; - if (snapType === 'ceil') { - div = Math.ceil(v / base); - } - else if (snapType === 'floor') { - div = Math.floor(v / base); - } - else { - div = Math.round(v / base); - } - return div * base; -} -function intervalTicks(min, max, interval) { - // 变成 interval 的倍数 - var minTick = snapMultiple(min, interval, 'floor'); - var maxTick = snapMultiple(max, interval, 'ceil'); - // 统一小数位数 - minTick = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["fixedBase"])(minTick, interval); - maxTick = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["fixedBase"])(maxTick, interval); - var ticks = []; - for (var i = minTick; i <= maxTick; i = i + interval) { - var tickValue = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["fixedBase"])(i, interval); // 防止浮点数加法出现问题 - ticks.push(tickValue); - } - return { - min: minTick, - max: maxTick, - ticks: ticks - }; -} -//# sourceMappingURL=interval.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/util/math.js": -/*!***************************************************!*\ - !*** ./node_modules/@antv/scale/esm/util/math.js ***! - \***************************************************/ -/*! exports provided: calBase, log, getLogPositiveMin */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calBase", function() { return calBase; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "log", function() { return log; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLogPositiveMin", function() { return getLogPositiveMin; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -// 求以a为次幂,结果为b的基数,如 x^^a = b;求x -// 虽然数学上 b 不支持负数,但是这里需要支持 负数 -function calBase(a, b) { - var e = Math.E; - var value; - if (b >= 0) { - value = Math.pow(e, Math.log(b) / a); // 使用换底公式求底 - } - else { - value = Math.pow(e, Math.log(-b) / a) * -1; // 使用换底公式求底 - } - return value; -} -function log(a, b) { - if (a === 1) { - return 1; - } - return Math.log(b) / Math.log(a); -} -function getLogPositiveMin(values, base, max) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(max)) { - max = Math.max.apply(null, values); - } - var positiveMin = max; - Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["each"])(values, function (value) { - if (value > 0 && value < positiveMin) { - positiveMin = value; - } - }); - if (positiveMin === max) { - positiveMin = max / base; - } - if (positiveMin > 1) { - positiveMin = 1; - } - return positiveMin; -} -//# sourceMappingURL=math.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/util/pretty.js": -/*!*****************************************************!*\ - !*** ./node_modules/@antv/scale/esm/util/pretty.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return pretty; }); -function pretty(min, max, n) { - if (n === void 0) { n = 5; } - var res = { - max: 0, - min: 0, - ticks: [], - }; - /* - R pretty: - https://svn.r-project.org/R/trunk/src/appl/pretty.c - https://www.rdocumentation.org/packages/base/versions/3.5.2/topics/pretty - */ - var h = 1.5; // high.u.bias - var h5 = 0.5 + 1.5 * h; // u5.bias - // 反正我也不会调参,跳过所有判断步骤 - var d = max - min; - var c = d / n; - // 当d非常小的时候触发,但似乎没什么用 - // const min_n = Math.floor(n / 3); - // const shrink_sml = Math.pow(2, 5); - // if (Math.log10(d) < -2) { - // c = (_.max([ Math.abs(max), Math.abs(min) ]) * shrink_sml) / min_n; - // } - var base = Math.pow(10, Math.floor(Math.log10(c))); - var toFixed = base < 1 ? Math.ceil(Math.abs(Math.log10(base))) : 0; - var unit = base; - if (2 * base - c < h * (c - unit)) { - unit = 2 * base; - if (5 * base - c < h5 * (c - unit)) { - unit = 5 * base; - if (10 * base - c < h * (c - unit)) { - unit = 10 * base; - } - } - } - var nu = Math.ceil(max / unit); - var ns = Math.floor(min / unit); - res.max = Math.max(nu * unit, max); - res.min = Math.min(ns * unit, min); - var x = Number.parseFloat((ns * unit).toFixed(toFixed)); - while (x < max) { - res.ticks.push(x); - x += unit; - if (toFixed) { - x = Number.parseFloat(x.toFixed(toFixed)); - } - } - res.ticks.push(x); - return res; -} -//# sourceMappingURL=pretty.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/util/strict-limit.js": -/*!***********************************************************!*\ - !*** ./node_modules/@antv/scale/esm/util/strict-limit.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return strictLimit; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); - -/** - * 按照给定的 minLimit/maxLimit/tickCount 均匀计算出刻度 ticks - * - * @param cfg Scale 配置项 - * @return ticks - */ -function strictLimit(cfg, defaultMin, defaultMax) { - var _a; - var minLimit = cfg.minLimit, maxLimit = cfg.maxLimit, min = cfg.min, max = cfg.max, _b = cfg.tickCount, tickCount = _b === void 0 ? 5 : _b; - var tickMin = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(minLimit) ? (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(defaultMin) ? min : defaultMin) : minLimit; - var tickMax = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(maxLimit) ? (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isNil"])(defaultMax) ? max : defaultMax) : maxLimit; - if (tickMin > tickMax) { - _a = [tickMin, tickMax], tickMax = _a[0], tickMin = _a[1]; - } - if (tickCount <= 2) { - return [tickMin, tickMax]; - } - var step = (tickMax - tickMin) / (tickCount - 1); - var ticks = []; - for (var i = 0; i < tickCount; i++) { - ticks.push(tickMin + step * i); - } - return ticks; -} -//# sourceMappingURL=strict-limit.js.map - -/***/ }), - -/***/ "./node_modules/@antv/scale/esm/util/time.js": -/*!***************************************************!*\ - !*** ./node_modules/@antv/scale/esm/util/time.js ***! - \***************************************************/ -/*! exports provided: timeFormat, toTimeStamp, SECOND, MINUTE, HOUR, DAY, MONTH, YEAR, getTickInterval */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeFormat", function() { return timeFormat; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toTimeStamp", function() { return toTimeStamp; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SECOND", function() { return SECOND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MINUTE", function() { return MINUTE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HOUR", function() { return HOUR; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DAY", function() { return DAY; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MONTH", function() { return MONTH; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "YEAR", function() { return YEAR; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTickInterval", function() { return getTickInterval; }); -/* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util */ "./node_modules/@antv/util/esm/index.js"); -/* harmony import */ var fecha__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fecha */ "./node_modules/fecha/src/fecha.js"); -/* harmony import */ var _bisector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bisector */ "./node_modules/@antv/scale/esm/util/bisector.js"); - - - - -var FORMAT_METHOD = 'format'; -function timeFormat(time, mask) { - var method = fecha__WEBPACK_IMPORTED_MODULE_1__[FORMAT_METHOD] || fecha__WEBPACK_IMPORTED_MODULE_1__["default"][FORMAT_METHOD]; - return method(time, mask); -} -/** - * 转换成时间戳 - * @param value 时间值 - */ -function toTimeStamp(value) { - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isString"])(value)) { - if (value.indexOf('T') > 0) { - value = new Date(value).getTime(); - } - else { - // new Date('2010/01/10') 和 new Date('2010-01-10') 的差别在于: - // 如果仅有年月日时,前者是带有时区的: Fri Jan 10 2020 02:40:13 GMT+0800 (中国标准时间) - // 后者会格式化成 Sun Jan 10 2010 08:00:00 GMT+0800 (中国标准时间) - value = new Date(value.replace(/-/gi, '/')).getTime(); - } - } - if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["isDate"])(value)) { - value = value.getTime(); - } - return value; -} -var SECOND = 1000; -var MINUTE = 60 * SECOND; -var HOUR = 60 * MINUTE; -var DAY = 24 * HOUR; -var MONTH = DAY * 31; -var YEAR = DAY * 365; - -var intervals = [ - ['HH:mm:ss', SECOND], - ['HH:mm:ss', SECOND * 10], - ['HH:mm:ss', SECOND * 30], - ['HH:mm', MINUTE], - ['HH:mm', MINUTE * 10], - ['HH:mm', MINUTE * 30], - ['HH', HOUR], - ['HH', HOUR * 6], - ['HH', HOUR * 12], - ['YYYY-MM-DD', DAY], - ['YYYY-MM-DD', DAY * 4], - ['YYYY-WW', DAY * 7], - ['YYYY-MM', MONTH], - ['YYYY-MM', MONTH * 4], - ['YYYY-MM', MONTH * 6], - ['YYYY', DAY * 380], -]; -function getTickInterval(min, max, tickCount) { - var target = (max - min) / tickCount; - var idx = Object(_bisector__WEBPACK_IMPORTED_MODULE_2__["default"])(function (o) { return o[1]; })(intervals, target) - 1; - var interval = intervals[idx]; - if (idx < 0) { - interval = intervals[0]; - } - else if (idx >= intervals.length) { - interval = Object(_antv_util__WEBPACK_IMPORTED_MODULE_0__["last"])(intervals); - } - return interval; -} -//# sourceMappingURL=time.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/augment.js": -/*!************************************************!*\ - !*** ./node_modules/@antv/util/esm/augment.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _mix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mix */ "./node_modules/@antv/util/esm/mix.js"); -/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-function */ "./node_modules/@antv/util/esm/is-function.js"); - - -var augment = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var c = args[0]; - for (var i = 1; i < args.length; i++) { - var obj = args[i]; - if (Object(_is_function__WEBPACK_IMPORTED_MODULE_1__["default"])(obj)) { - obj = obj.prototype; - } - Object(_mix__WEBPACK_IMPORTED_MODULE_0__["default"])(c.prototype, obj); - } -}; -/* harmony default export */ __webpack_exports__["default"] = (augment); -//# sourceMappingURL=augment.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/cache.js": -/*!**********************************************!*\ - !*** ./node_modules/@antv/util/esm/cache.js ***! - \**********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/** - * k-v 存储 - */ -var default_1 = /** @class */ (function () { - function default_1() { - this.map = {}; - } - default_1.prototype.has = function (key) { - return this.map[key] !== undefined; - }; - default_1.prototype.get = function (key, def) { - var v = this.map[key]; - return v === undefined ? def : v; - }; - default_1.prototype.set = function (key, value) { - this.map[key] = value; - }; - default_1.prototype.clear = function () { - this.map = {}; - }; - default_1.prototype.delete = function (key) { - delete this.map[key]; - }; - default_1.prototype.size = function () { - return Object.keys(this.map).length; - }; - return default_1; -}()); -/* harmony default export */ __webpack_exports__["default"] = (default_1); -//# sourceMappingURL=cache.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/clamp.js": -/*!**********************************************!*\ - !*** ./node_modules/@antv/util/esm/clamp.js ***! - \**********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var clamp = function (a, min, max) { - if (a < min) { - return min; - } - else if (a > max) { - return max; - } - return a; -}; -/* harmony default export */ __webpack_exports__["default"] = (clamp); -//# sourceMappingURL=clamp.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/clear-animation-frame.js": -/*!**************************************************************!*\ - !*** ./node_modules/@antv/util/esm/clear-animation-frame.js ***! - \**************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return cancelAnimationFrame; }); -function cancelAnimationFrame(handler) { - var method = window.cancelAnimationFrame || - window.webkitCancelAnimationFrame || - // @ts-ignore - window.mozCancelAnimationFrame || - // @ts-ignore - window.msCancelAnimationFrame || - clearTimeout; - method(handler); -} -; -//# sourceMappingURL=clear-animation-frame.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/clone.js": -/*!**********************************************!*\ - !*** ./node_modules/@antv/util/esm/clone.js ***! - \**********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ "./node_modules/@antv/util/esm/is-array.js"); - -var clone = function (obj) { - if (typeof obj !== 'object' || obj === null) { - return obj; - } - var rst; - if (Object(_is_array__WEBPACK_IMPORTED_MODULE_0__["default"])(obj)) { - rst = []; - for (var i = 0, l = obj.length; i < l; i++) { - if (typeof obj[i] === 'object' && obj[i] != null) { - rst[i] = clone(obj[i]); - } - else { - rst[i] = obj[i]; - } - } - } - else { - rst = {}; - for (var k in obj) { - if (typeof obj[k] === 'object' && obj[k] != null) { - rst[k] = clone(obj[k]); - } - else { - rst[k] = obj[k]; - } - } - } - return rst; -}; -/* harmony default export */ __webpack_exports__["default"] = (clone); -//# sourceMappingURL=clone.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/contains.js": -/*!*************************************************!*\ - !*** ./node_modules/@antv/util/esm/contains.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array-like */ "./node_modules/@antv/util/esm/is-array-like.js"); - -var contains = function (arr, value) { - if (!Object(_is_array_like__WEBPACK_IMPORTED_MODULE_0__["default"])(arr)) { - return false; - } - return arr.indexOf(value) > -1; -}; -/* harmony default export */ __webpack_exports__["default"] = (contains); -//# sourceMappingURL=contains.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/debounce.js": -/*!*************************************************!*\ - !*** ./node_modules/@antv/util/esm/debounce.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -function debounce(func, wait, immediate) { - var timeout; - return function () { - var context = this, args = arguments; - var later = function () { - timeout = null; - if (!immediate) { - func.apply(context, args); - } - }; - var callNow = immediate && !timeout; - clearTimeout(timeout); - timeout = setTimeout(later, wait); - if (callNow) { - func.apply(context, args); - } - }; -} -/* harmony default export */ __webpack_exports__["default"] = (debounce); -//# sourceMappingURL=debounce.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/deep-mix.js": -/*!*************************************************!*\ - !*** ./node_modules/@antv/util/esm/deep-mix.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ "./node_modules/@antv/util/esm/is-array.js"); -/* harmony import */ var _is_plain_object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-plain-object */ "./node_modules/@antv/util/esm/is-plain-object.js"); - - -var MAX_MIX_LEVEL = 5; -function _deepMix(dist, src, level, maxLevel) { - level = level || 0; - maxLevel = maxLevel || MAX_MIX_LEVEL; - for (var key in src) { - if (src.hasOwnProperty(key)) { - var value = src[key]; - if (value !== null && Object(_is_plain_object__WEBPACK_IMPORTED_MODULE_1__["default"])(value)) { - if (!Object(_is_plain_object__WEBPACK_IMPORTED_MODULE_1__["default"])(dist[key])) { - dist[key] = {}; - } - if (level < maxLevel) { - _deepMix(dist[key], value, level + 1, maxLevel); - } - else { - dist[key] = src[key]; - } - } - else if (Object(_is_array__WEBPACK_IMPORTED_MODULE_0__["default"])(value)) { - dist[key] = []; - dist[key] = dist[key].concat(value); - } - else if (value !== undefined) { - dist[key] = value; - } - } - } -} -// todo 重写 -var deepMix = function (rst) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - for (var i = 0; i < args.length; i += 1) { - _deepMix(rst, args[i]); - } - return rst; -}; -/* harmony default export */ __webpack_exports__["default"] = (deepMix); -//# sourceMappingURL=deep-mix.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/difference.js": -/*!***************************************************!*\ - !*** ./node_modules/@antv/util/esm/difference.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./filter */ "./node_modules/@antv/util/esm/filter.js"); -/* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./contains */ "./node_modules/@antv/util/esm/contains.js"); - - -/** - * Flattens `array` a single level deep. - * - * @param {Array} arr The array to inspect. - * @param {Array} values The values to exclude. - * @return {Array} Returns the new array of filtered values. - * @example - * difference([2, 1], [2, 3]); // => [1] - */ -var difference = function (arr, values) { - if (values === void 0) { values = []; } - return Object(_filter__WEBPACK_IMPORTED_MODULE_0__["default"])(arr, function (value) { return !Object(_contains__WEBPACK_IMPORTED_MODULE_1__["default"])(values, value); }); -}; -/* harmony default export */ __webpack_exports__["default"] = (difference); -//# sourceMappingURL=difference.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/each.js": -/*!*********************************************!*\ - !*** ./node_modules/@antv/util/esm/each.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ "./node_modules/@antv/util/esm/is-array.js"); -/* harmony import */ var _is_object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-object */ "./node_modules/@antv/util/esm/is-object.js"); - - -function each(elements, func) { - if (!elements) { - return; - } - var rst; - if (Object(_is_array__WEBPACK_IMPORTED_MODULE_0__["default"])(elements)) { - for (var i = 0, len = elements.length; i < len; i++) { - rst = func(elements[i], i); - if (rst === false) { - break; - } - } - } - else if (Object(_is_object__WEBPACK_IMPORTED_MODULE_1__["default"])(elements)) { - for (var k in elements) { - if (elements.hasOwnProperty(k)) { - rst = func(elements[k], k); - if (rst === false) { - break; - } - } - } - } -} -/* harmony default export */ __webpack_exports__["default"] = (each); -//# sourceMappingURL=each.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/ends-with.js": -/*!**************************************************!*\ - !*** ./node_modules/@antv/util/esm/ends-with.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ "./node_modules/@antv/util/esm/is-array.js"); -/* harmony import */ var _is_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-string */ "./node_modules/@antv/util/esm/is-string.js"); - - -function endsWith(arr, e) { - return (Object(_is_array__WEBPACK_IMPORTED_MODULE_0__["default"])(arr) || Object(_is_string__WEBPACK_IMPORTED_MODULE_1__["default"])(arr)) ? arr[arr.length - 1] === e : false; -} -/* harmony default export */ __webpack_exports__["default"] = (endsWith); -//# sourceMappingURL=ends-with.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/every.js": -/*!**********************************************!*\ - !*** ./node_modules/@antv/util/esm/every.js ***! - \**********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/** - * 只要有一个不满足条件就返回 false - * @param arr - * @param func - */ -var every = function (arr, func) { - for (var i = 0; i < arr.length; i++) { - if (!func(arr[i], i)) - return false; - } - return true; -}; -/* harmony default export */ __webpack_exports__["default"] = (every); -//# sourceMappingURL=every.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/extend.js": -/*!***********************************************!*\ - !*** ./node_modules/@antv/util/esm/extend.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _mix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mix */ "./node_modules/@antv/util/esm/mix.js"); -/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-function */ "./node_modules/@antv/util/esm/is-function.js"); - - -var extend = function (subclass, superclass, overrides, staticOverrides) { - // 如果只提供父类构造函数,则自动生成子类构造函数 - if (!Object(_is_function__WEBPACK_IMPORTED_MODULE_1__["default"])(superclass)) { - overrides = superclass; - superclass = subclass; - subclass = function () { }; - } - var create = Object.create ? - function (proto, c) { - return Object.create(proto, { - constructor: { - value: c - } - }); - } : - function (proto, c) { - function Tmp() { } - Tmp.prototype = proto; - var o = new Tmp(); - o.constructor = c; - return o; - }; - var superObj = create(superclass.prototype, subclass); // new superclass(),//实例化父类作为子类的prototype - subclass.prototype = Object(_mix__WEBPACK_IMPORTED_MODULE_0__["default"])(superObj, subclass.prototype); // 指定子类的prototype - subclass.superclass = create(superclass.prototype, superclass); - Object(_mix__WEBPACK_IMPORTED_MODULE_0__["default"])(superObj, overrides); - Object(_mix__WEBPACK_IMPORTED_MODULE_0__["default"])(subclass, staticOverrides); - return subclass; -}; -/* harmony default export */ __webpack_exports__["default"] = (extend); -//# sourceMappingURL=extend.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/filter.js": -/*!***********************************************!*\ - !*** ./node_modules/@antv/util/esm/filter.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./each */ "./node_modules/@antv/util/esm/each.js"); -/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-array-like */ "./node_modules/@antv/util/esm/is-array-like.js"); - - -var filter = function (arr, func) { - if (!Object(_is_array_like__WEBPACK_IMPORTED_MODULE_1__["default"])(arr)) { - return arr; - } - var result = []; - Object(_each__WEBPACK_IMPORTED_MODULE_0__["default"])(arr, function (value, index) { - if (func(value, index)) { - result.push(value); - } - }); - return result; -}; -/* harmony default export */ __webpack_exports__["default"] = (filter); -//# sourceMappingURL=filter.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/find-index.js": -/*!***************************************************!*\ - !*** ./node_modules/@antv/util/esm/find-index.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -function findIndex(arr, predicate, fromIndex) { - if (fromIndex === void 0) { fromIndex = 0; } - for (var i = fromIndex; i < arr.length; i++) { - if (predicate(arr[i], i)) { - // 找到终止循环 - return i; - } - } - return -1; -} -/* harmony default export */ __webpack_exports__["default"] = (findIndex); -//# sourceMappingURL=find-index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/find.js": -/*!*********************************************!*\ - !*** ./node_modules/@antv/util/esm/find.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-function */ "./node_modules/@antv/util/esm/is-function.js"); -/* harmony import */ var _is_match__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-match */ "./node_modules/@antv/util/esm/is-match.js"); -/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-array */ "./node_modules/@antv/util/esm/is-array.js"); -/* harmony import */ var _is_plain_object__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./is-plain-object */ "./node_modules/@antv/util/esm/is-plain-object.js"); - - - - -function find(arr, predicate) { - if (!Object(_is_array__WEBPACK_IMPORTED_MODULE_2__["default"])(arr)) - return null; - var _predicate; - if (Object(_is_function__WEBPACK_IMPORTED_MODULE_0__["default"])(predicate)) { - _predicate = predicate; - } - if (Object(_is_plain_object__WEBPACK_IMPORTED_MODULE_3__["default"])(predicate)) { - _predicate = function (a) { return Object(_is_match__WEBPACK_IMPORTED_MODULE_1__["default"])(a, predicate); }; - } - if (_predicate) { - for (var i = 0; i < arr.length; i += 1) { - if (_predicate(arr[i])) { - return arr[i]; - } - } - } - return null; -} -/* harmony default export */ __webpack_exports__["default"] = (find); -//# sourceMappingURL=find.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/first-value.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/util/esm/first-value.js ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_nil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-nil */ "./node_modules/@antv/util/esm/is-nil.js"); -/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-array */ "./node_modules/@antv/util/esm/is-array.js"); - - -var firstValue = function (data, name) { - var rst = null; - for (var i = 0; i < data.length; i++) { - var obj = data[i]; - var value = obj[name]; - if (!Object(_is_nil__WEBPACK_IMPORTED_MODULE_0__["default"])(value)) { - if (Object(_is_array__WEBPACK_IMPORTED_MODULE_1__["default"])(value)) { - rst = value[0]; // todo 这里是否应该使用递归,调用 firstValue @绝云 - } - else { - rst = value; - } - break; - } - } - return rst; -}; -/* harmony default export */ __webpack_exports__["default"] = (firstValue); -//# sourceMappingURL=first-value.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/fixed-base.js": -/*!***************************************************!*\ - !*** ./node_modules/@antv/util/esm/fixed-base.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var fixedBase = function (v, base) { - var str = base.toString(); - var index = str.indexOf('.'); - if (index === -1) { - return Math.round(v); - } - var length = str.substr(index + 1).length; - if (length > 20) { - length = 20; - } - return parseFloat(v.toFixed(length)); -}; -/* harmony default export */ __webpack_exports__["default"] = (fixedBase); -//# sourceMappingURL=fixed-base.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/flatten-deep.js": -/*!*****************************************************!*\ - !*** ./node_modules/@antv/util/esm/flatten-deep.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ "./node_modules/@antv/util/esm/is-array.js"); - -/** - * Flattens `array` a single level deep. - * - * @param {Array} arr The array to flatten. - * @param {Array} result The array to return. - * @return {Array} Returns the new flattened array. - * @example - * - * flattenDeep([1, [2, [3, [4]], 5]]); // => [1, 2, 3, 4, 5] - */ -var flattenDeep = function (arr, result) { - if (result === void 0) { result = []; } - if (!Object(_is_array__WEBPACK_IMPORTED_MODULE_0__["default"])(arr)) { - result.push(arr); - } - else { - for (var i = 0; i < arr.length; i += 1) { - flattenDeep(arr[i], result); - } - } - return result; -}; -/* harmony default export */ __webpack_exports__["default"] = (flattenDeep); -//# sourceMappingURL=flatten-deep.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/flatten.js": -/*!************************************************!*\ - !*** ./node_modules/@antv/util/esm/flatten.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ "./node_modules/@antv/util/esm/is-array.js"); - -/** - * Flattens `array` a single level deep. - * - * @param {Array} arr The array to flatten. - * @return {Array} Returns the new flattened array. - * @example - * - * flatten([1, [2, [3, [4]], 5]]); // => [1, 2, [3, [4]], 5] - */ -var flatten = function (arr) { - if (!Object(_is_array__WEBPACK_IMPORTED_MODULE_0__["default"])(arr)) { - return []; - } - var rst = []; - for (var i = 0; i < arr.length; i++) { - rst = rst.concat(arr[i]); - } - return rst; -}; -/* harmony default export */ __webpack_exports__["default"] = (flatten); -//# sourceMappingURL=flatten.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/for-in.js": -/*!***********************************************!*\ - !*** ./node_modules/@antv/util/esm/for-in.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./each */ "./node_modules/@antv/util/esm/each.js"); - -/* harmony default export */ __webpack_exports__["default"] = (_each__WEBPACK_IMPORTED_MODULE_0__["default"]); -//# sourceMappingURL=for-in.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/get-range.js": -/*!**************************************************!*\ - !*** ./node_modules/@antv/util/esm/get-range.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ "./node_modules/@antv/util/esm/is-array.js"); -/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter */ "./node_modules/@antv/util/esm/filter.js"); - - -var getRange = function (values) { - // 存在 NaN 时,min,max 判定会出问题 - values = Object(_filter__WEBPACK_IMPORTED_MODULE_1__["default"])(values, function (v) { - return !isNaN(v); - }); - if (!values.length) { // 如果没有数值则直接返回0 - return { - min: 0, - max: 0 - }; - } - if (Object(_is_array__WEBPACK_IMPORTED_MODULE_0__["default"])(values[0])) { - var tmp = []; - for (var i = 0; i < values.length; i++) { - tmp = tmp.concat(values[i]); - } - values = tmp; - } - var max = Math.max.apply(null, values); - var min = Math.min.apply(null, values); - return { - min: min, - max: max - }; -}; -/* harmony default export */ __webpack_exports__["default"] = (getRange); -//# sourceMappingURL=get-range.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/get-type.js": -/*!*************************************************!*\ - !*** ./node_modules/@antv/util/esm/get-type.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var toString = {}.toString; -var getType = function (value) { - return toString.call(value).replace(/^\[object /, '').replace(/]$/, ''); -}; -/* harmony default export */ __webpack_exports__["default"] = (getType); -//# sourceMappingURL=get-type.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/get-wrap-behavior.js": -/*!**********************************************************!*\ - !*** ./node_modules/@antv/util/esm/get-wrap-behavior.js ***! - \**********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/** - * 获取封装的事件 - * @protected - * @param {Object} obj 对象 - * @param {String} action 事件名称 - * @return {Function} 返回事件处理函数 - */ -function getWrapBehavior(obj, action) { - return obj['_wrap_' + action]; -} -/* harmony default export */ __webpack_exports__["default"] = (getWrapBehavior); -//# sourceMappingURL=get-wrap-behavior.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/get.js": -/*!********************************************!*\ - !*** ./node_modules/@antv/util/esm/get.js ***! - \********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-string */ "./node_modules/@antv/util/esm/is-string.js"); - -/** - * https://github.com/developit/dlv/blob/master/index.js - * @param obj - * @param key - * @param defaultValue - */ -/* harmony default export */ __webpack_exports__["default"] = (function (obj, key, defaultValue) { - var p = 0; - var keyArr = Object(_is_string__WEBPACK_IMPORTED_MODULE_0__["default"])(key) ? key.split('.') : key; - while (obj && p < keyArr.length) { - obj = obj[keyArr[p++]]; - } - return (obj === undefined || p < keyArr.length) ? defaultValue : obj; -}); -//# sourceMappingURL=get.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/group-by.js": -/*!*************************************************!*\ - !*** ./node_modules/@antv/util/esm/group-by.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./each */ "./node_modules/@antv/util/esm/each.js"); -/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-array */ "./node_modules/@antv/util/esm/is-array.js"); -/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-function */ "./node_modules/@antv/util/esm/is-function.js"); - - - -var hasOwnProperty = Object.prototype.hasOwnProperty; -function groupBy(data, condition) { - if (!condition || !Object(_is_array__WEBPACK_IMPORTED_MODULE_1__["default"])(data)) { - return {}; - } - var result = {}; - // 兼容方法和 字符串的写法 - var predicate = Object(_is_function__WEBPACK_IMPORTED_MODULE_2__["default"])(condition) ? condition : function (item) { return item[condition]; }; - var key; - Object(_each__WEBPACK_IMPORTED_MODULE_0__["default"])(data, function (item) { - key = predicate(item); - if (hasOwnProperty.call(result, key)) { - result[key].push(item); - } - else { - result[key] = [item]; - } - }); - return result; -} -/* harmony default export */ __webpack_exports__["default"] = (groupBy); -//# sourceMappingURL=group-by.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/group-to-map.js": -/*!*****************************************************!*\ - !*** ./node_modules/@antv/util/esm/group-to-map.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ "./node_modules/@antv/util/esm/is-array.js"); -/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-function */ "./node_modules/@antv/util/esm/is-function.js"); -/* harmony import */ var _group_by__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./group-by */ "./node_modules/@antv/util/esm/group-by.js"); - - - -var groupToMap = function (data, condition) { - if (!condition) { - return { - 0: data - }; - } - if (!Object(_is_function__WEBPACK_IMPORTED_MODULE_1__["default"])(condition)) { - var paramsCondition_1 = Object(_is_array__WEBPACK_IMPORTED_MODULE_0__["default"])(condition) ? condition : condition.replace(/\s+/g, '').split('*'); - condition = function (row) { - var unique = '_'; // 避免出现数字作为Key的情况,会进行按照数字的排序 - for (var i = 0, l = paramsCondition_1.length; i < l; i++) { - unique += row[paramsCondition_1[i]] && row[paramsCondition_1[i]].toString(); - } - return unique; - }; - } - var groups = Object(_group_by__WEBPACK_IMPORTED_MODULE_2__["default"])(data, condition); - return groups; -}; -/* harmony default export */ __webpack_exports__["default"] = (groupToMap); -//# sourceMappingURL=group-to-map.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/group.js": -/*!**********************************************!*\ - !*** ./node_modules/@antv/util/esm/group.js ***! - \**********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _group_to_map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./group-to-map */ "./node_modules/@antv/util/esm/group-to-map.js"); - -/* harmony default export */ __webpack_exports__["default"] = (function (data, condition) { - if (!condition) { - // 没有条件,则自身改成数组 - return [data]; - } - var groups = Object(_group_to_map__WEBPACK_IMPORTED_MODULE_0__["default"])(data, condition); - var array = []; - for (var i in groups) { - array.push(groups[i]); - } - return array; -}); -//# sourceMappingURL=group.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/has-key.js": -/*!************************************************!*\ - !*** ./node_modules/@antv/util/esm/has-key.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _has__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./has */ "./node_modules/@antv/util/esm/has.js"); - -/* harmony default export */ __webpack_exports__["default"] = (_has__WEBPACK_IMPORTED_MODULE_0__["default"]); -//# sourceMappingURL=has-key.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/has-value.js": -/*!**************************************************!*\ - !*** ./node_modules/@antv/util/esm/has-value.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./contains */ "./node_modules/@antv/util/esm/contains.js"); -/* harmony import */ var _values__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./values */ "./node_modules/@antv/util/esm/values.js"); - - -/* harmony default export */ __webpack_exports__["default"] = (function (obj, value) { return Object(_contains__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_values__WEBPACK_IMPORTED_MODULE_1__["default"])(obj), value); }); -//# sourceMappingURL=has-value.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/has.js": -/*!********************************************!*\ - !*** ./node_modules/@antv/util/esm/has.js ***! - \********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function (obj, key) { return obj.hasOwnProperty(key); }); -//# sourceMappingURL=has.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/head.js": -/*!*********************************************!*\ - !*** ./node_modules/@antv/util/esm/head.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return head; }); -/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array-like */ "./node_modules/@antv/util/esm/is-array-like.js"); - -function head(o) { - if (Object(_is_array_like__WEBPACK_IMPORTED_MODULE_0__["default"])(o)) { - return o[0]; - } - return undefined; -} -//# sourceMappingURL=head.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/identity.js": -/*!*************************************************!*\ - !*** ./node_modules/@antv/util/esm/identity.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function (v) { return v; }); -//# sourceMappingURL=identity.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/index-of.js": -/*!*************************************************!*\ - !*** ./node_modules/@antv/util/esm/index-of.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array-like */ "./node_modules/@antv/util/esm/is-array-like.js"); - -var indexOf = function (arr, obj) { - if (!Object(_is_array_like__WEBPACK_IMPORTED_MODULE_0__["default"])(arr)) { - return -1; - } - var m = Array.prototype.indexOf; - if (m) { - return m.call(arr, obj); - } - var index = -1; - for (var i = 0; i < arr.length; i++) { - if (arr[i] === obj) { - index = i; - break; - } - } - return index; -}; -/* harmony default export */ __webpack_exports__["default"] = (indexOf); -//# sourceMappingURL=index-of.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/index.js": -/*!**********************************************!*\ - !*** ./node_modules/@antv/util/esm/index.js ***! - \**********************************************/ -/*! exports provided: contains, includes, difference, find, findIndex, firstValue, flatten, flattenDeep, getRange, pull, pullAt, reduce, remove, sortBy, union, uniq, valuesOfKey, head, last, startsWith, endsWith, filter, every, some, group, groupBy, groupToMap, getWrapBehavior, wrapBehavior, number2color, parseRadius, clamp, fixedBase, isDecimal, isEven, isInteger, isNegative, isNumberEqual, isOdd, isPositive, maxBy, minBy, mod, toDegree, toInteger, toRadian, forIn, has, hasKey, hasValue, keys, isMatch, values, lowerCase, lowerFirst, substitute, upperCase, upperFirst, getType, isArguments, isArray, isArrayLike, isBoolean, isDate, isError, isFunction, isFinite, isNil, isNull, isNumber, isObject, isObjectLike, isPlainObject, isPrototype, isRegExp, isString, isType, isUndefined, isElement, requestAnimationFrame, clearAnimationFrame, augment, clone, debounce, memoize, deepMix, each, extend, indexOf, isEmpty, isEqual, isEqualWith, map, mapValues, mix, assign, get, set, pick, throttle, toArray, toString, uniqueId, noop, identity, size, Cache */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./contains */ "./node_modules/@antv/util/esm/contains.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contains", function() { return _contains__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "includes", function() { return _contains__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _difference__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./difference */ "./node_modules/@antv/util/esm/difference.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "difference", function() { return _difference__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - -/* harmony import */ var _find__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./find */ "./node_modules/@antv/util/esm/find.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "find", function() { return _find__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - -/* harmony import */ var _find_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./find-index */ "./node_modules/@antv/util/esm/find-index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return _find_index__WEBPACK_IMPORTED_MODULE_3__["default"]; }); - -/* harmony import */ var _first_value__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./first-value */ "./node_modules/@antv/util/esm/first-value.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "firstValue", function() { return _first_value__WEBPACK_IMPORTED_MODULE_4__["default"]; }); - -/* harmony import */ var _flatten__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./flatten */ "./node_modules/@antv/util/esm/flatten.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flatten", function() { return _flatten__WEBPACK_IMPORTED_MODULE_5__["default"]; }); - -/* harmony import */ var _flatten_deep__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./flatten-deep */ "./node_modules/@antv/util/esm/flatten-deep.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flattenDeep", function() { return _flatten_deep__WEBPACK_IMPORTED_MODULE_6__["default"]; }); - -/* harmony import */ var _get_range__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./get-range */ "./node_modules/@antv/util/esm/get-range.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getRange", function() { return _get_range__WEBPACK_IMPORTED_MODULE_7__["default"]; }); - -/* harmony import */ var _pull__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./pull */ "./node_modules/@antv/util/esm/pull.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pull", function() { return _pull__WEBPACK_IMPORTED_MODULE_8__["default"]; }); - -/* harmony import */ var _pull_at__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./pull-at */ "./node_modules/@antv/util/esm/pull-at.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pullAt", function() { return _pull_at__WEBPACK_IMPORTED_MODULE_9__["default"]; }); - -/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./reduce */ "./node_modules/@antv/util/esm/reduce.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _reduce__WEBPACK_IMPORTED_MODULE_10__["default"]; }); - -/* harmony import */ var _remove__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./remove */ "./node_modules/@antv/util/esm/remove.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "remove", function() { return _remove__WEBPACK_IMPORTED_MODULE_11__["default"]; }); - -/* harmony import */ var _sort_by__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./sort-by */ "./node_modules/@antv/util/esm/sort-by.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sortBy", function() { return _sort_by__WEBPACK_IMPORTED_MODULE_12__["default"]; }); - -/* harmony import */ var _union__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./union */ "./node_modules/@antv/util/esm/union.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "union", function() { return _union__WEBPACK_IMPORTED_MODULE_13__["default"]; }); - -/* harmony import */ var _uniq__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./uniq */ "./node_modules/@antv/util/esm/uniq.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "uniq", function() { return _uniq__WEBPACK_IMPORTED_MODULE_14__["default"]; }); - -/* harmony import */ var _values_of_key__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./values-of-key */ "./node_modules/@antv/util/esm/values-of-key.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "valuesOfKey", function() { return _values_of_key__WEBPACK_IMPORTED_MODULE_15__["default"]; }); - -/* harmony import */ var _head__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./head */ "./node_modules/@antv/util/esm/head.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "head", function() { return _head__WEBPACK_IMPORTED_MODULE_16__["default"]; }); - -/* harmony import */ var _last__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./last */ "./node_modules/@antv/util/esm/last.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "last", function() { return _last__WEBPACK_IMPORTED_MODULE_17__["default"]; }); - -/* harmony import */ var _starts_with__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./starts-with */ "./node_modules/@antv/util/esm/starts-with.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startsWith", function() { return _starts_with__WEBPACK_IMPORTED_MODULE_18__["default"]; }); - -/* harmony import */ var _ends_with__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./ends-with */ "./node_modules/@antv/util/esm/ends-with.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endsWith", function() { return _ends_with__WEBPACK_IMPORTED_MODULE_19__["default"]; }); - -/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./filter */ "./node_modules/@antv/util/esm/filter.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _filter__WEBPACK_IMPORTED_MODULE_20__["default"]; }); - -/* harmony import */ var _every__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./every */ "./node_modules/@antv/util/esm/every.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return _every__WEBPACK_IMPORTED_MODULE_21__["default"]; }); - -/* harmony import */ var _some__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./some */ "./node_modules/@antv/util/esm/some.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "some", function() { return _some__WEBPACK_IMPORTED_MODULE_22__["default"]; }); - -/* harmony import */ var _group__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./group */ "./node_modules/@antv/util/esm/group.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "group", function() { return _group__WEBPACK_IMPORTED_MODULE_23__["default"]; }); - -/* harmony import */ var _group_by__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./group-by */ "./node_modules/@antv/util/esm/group-by.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return _group_by__WEBPACK_IMPORTED_MODULE_24__["default"]; }); - -/* harmony import */ var _group_to_map__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./group-to-map */ "./node_modules/@antv/util/esm/group-to-map.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupToMap", function() { return _group_to_map__WEBPACK_IMPORTED_MODULE_25__["default"]; }); - -/* harmony import */ var _get_wrap_behavior__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./get-wrap-behavior */ "./node_modules/@antv/util/esm/get-wrap-behavior.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getWrapBehavior", function() { return _get_wrap_behavior__WEBPACK_IMPORTED_MODULE_26__["default"]; }); - -/* harmony import */ var _wrap_behavior__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./wrap-behavior */ "./node_modules/@antv/util/esm/wrap-behavior.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "wrapBehavior", function() { return _wrap_behavior__WEBPACK_IMPORTED_MODULE_27__["default"]; }); - -/* harmony import */ var _number2color__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./number2color */ "./node_modules/@antv/util/esm/number2color.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "number2color", function() { return _number2color__WEBPACK_IMPORTED_MODULE_28__["default"]; }); - -/* harmony import */ var _parse_radius__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./parse-radius */ "./node_modules/@antv/util/esm/parse-radius.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parseRadius", function() { return _parse_radius__WEBPACK_IMPORTED_MODULE_29__["default"]; }); - -/* harmony import */ var _clamp__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./clamp */ "./node_modules/@antv/util/esm/clamp.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "clamp", function() { return _clamp__WEBPACK_IMPORTED_MODULE_30__["default"]; }); - -/* harmony import */ var _fixed_base__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./fixed-base */ "./node_modules/@antv/util/esm/fixed-base.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fixedBase", function() { return _fixed_base__WEBPACK_IMPORTED_MODULE_31__["default"]; }); - -/* harmony import */ var _is_decimal__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./is-decimal */ "./node_modules/@antv/util/esm/is-decimal.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isDecimal", function() { return _is_decimal__WEBPACK_IMPORTED_MODULE_32__["default"]; }); - -/* harmony import */ var _is_even__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./is-even */ "./node_modules/@antv/util/esm/is-even.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEven", function() { return _is_even__WEBPACK_IMPORTED_MODULE_33__["default"]; }); - -/* harmony import */ var _is_integer__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./is-integer */ "./node_modules/@antv/util/esm/is-integer.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isInteger", function() { return _is_integer__WEBPACK_IMPORTED_MODULE_34__["default"]; }); - -/* harmony import */ var _is_negative__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./is-negative */ "./node_modules/@antv/util/esm/is-negative.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isNegative", function() { return _is_negative__WEBPACK_IMPORTED_MODULE_35__["default"]; }); - -/* harmony import */ var _is_number_equal__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./is-number-equal */ "./node_modules/@antv/util/esm/is-number-equal.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isNumberEqual", function() { return _is_number_equal__WEBPACK_IMPORTED_MODULE_36__["default"]; }); - -/* harmony import */ var _is_odd__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./is-odd */ "./node_modules/@antv/util/esm/is-odd.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isOdd", function() { return _is_odd__WEBPACK_IMPORTED_MODULE_37__["default"]; }); - -/* harmony import */ var _is_positive__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./is-positive */ "./node_modules/@antv/util/esm/is-positive.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isPositive", function() { return _is_positive__WEBPACK_IMPORTED_MODULE_38__["default"]; }); - -/* harmony import */ var _max_by__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./max-by */ "./node_modules/@antv/util/esm/max-by.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maxBy", function() { return _max_by__WEBPACK_IMPORTED_MODULE_39__["default"]; }); - -/* harmony import */ var _min_by__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./min-by */ "./node_modules/@antv/util/esm/min-by.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "minBy", function() { return _min_by__WEBPACK_IMPORTED_MODULE_40__["default"]; }); - -/* harmony import */ var _mod__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./mod */ "./node_modules/@antv/util/esm/mod.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mod", function() { return _mod__WEBPACK_IMPORTED_MODULE_41__["default"]; }); - -/* harmony import */ var _to_degree__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./to-degree */ "./node_modules/@antv/util/esm/to-degree.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toDegree", function() { return _to_degree__WEBPACK_IMPORTED_MODULE_42__["default"]; }); - -/* harmony import */ var _to_integer__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./to-integer */ "./node_modules/@antv/util/esm/to-integer.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toInteger", function() { return _to_integer__WEBPACK_IMPORTED_MODULE_43__["default"]; }); - -/* harmony import */ var _to_radian__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./to-radian */ "./node_modules/@antv/util/esm/to-radian.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toRadian", function() { return _to_radian__WEBPACK_IMPORTED_MODULE_44__["default"]; }); - -/* harmony import */ var _for_in__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./for-in */ "./node_modules/@antv/util/esm/for-in.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forIn", function() { return _for_in__WEBPACK_IMPORTED_MODULE_45__["default"]; }); - -/* harmony import */ var _has__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./has */ "./node_modules/@antv/util/esm/has.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "has", function() { return _has__WEBPACK_IMPORTED_MODULE_46__["default"]; }); - -/* harmony import */ var _has_key__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./has-key */ "./node_modules/@antv/util/esm/has-key.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hasKey", function() { return _has_key__WEBPACK_IMPORTED_MODULE_47__["default"]; }); - -/* harmony import */ var _has_value__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./has-value */ "./node_modules/@antv/util/esm/has-value.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hasValue", function() { return _has_value__WEBPACK_IMPORTED_MODULE_48__["default"]; }); - -/* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./keys */ "./node_modules/@antv/util/esm/keys.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return _keys__WEBPACK_IMPORTED_MODULE_49__["default"]; }); - -/* harmony import */ var _is_match__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./is-match */ "./node_modules/@antv/util/esm/is-match.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isMatch", function() { return _is_match__WEBPACK_IMPORTED_MODULE_50__["default"]; }); - -/* harmony import */ var _values__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./values */ "./node_modules/@antv/util/esm/values.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "values", function() { return _values__WEBPACK_IMPORTED_MODULE_51__["default"]; }); - -/* harmony import */ var _lower_case__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./lower-case */ "./node_modules/@antv/util/esm/lower-case.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lowerCase", function() { return _lower_case__WEBPACK_IMPORTED_MODULE_52__["default"]; }); - -/* harmony import */ var _lower_first__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./lower-first */ "./node_modules/@antv/util/esm/lower-first.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lowerFirst", function() { return _lower_first__WEBPACK_IMPORTED_MODULE_53__["default"]; }); - -/* harmony import */ var _substitute__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./substitute */ "./node_modules/@antv/util/esm/substitute.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "substitute", function() { return _substitute__WEBPACK_IMPORTED_MODULE_54__["default"]; }); - -/* harmony import */ var _upper_case__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./upper-case */ "./node_modules/@antv/util/esm/upper-case.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "upperCase", function() { return _upper_case__WEBPACK_IMPORTED_MODULE_55__["default"]; }); - -/* harmony import */ var _upper_first__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./upper-first */ "./node_modules/@antv/util/esm/upper-first.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "upperFirst", function() { return _upper_first__WEBPACK_IMPORTED_MODULE_56__["default"]; }); - -/* harmony import */ var _get_type__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./get-type */ "./node_modules/@antv/util/esm/get-type.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getType", function() { return _get_type__WEBPACK_IMPORTED_MODULE_57__["default"]; }); - -/* harmony import */ var _is_arguments__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./is-arguments */ "./node_modules/@antv/util/esm/is-arguments.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isArguments", function() { return _is_arguments__WEBPACK_IMPORTED_MODULE_58__["default"]; }); - -/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./is-array */ "./node_modules/@antv/util/esm/is-array.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return _is_array__WEBPACK_IMPORTED_MODULE_59__["default"]; }); - -/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./is-array-like */ "./node_modules/@antv/util/esm/is-array-like.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isArrayLike", function() { return _is_array_like__WEBPACK_IMPORTED_MODULE_60__["default"]; }); - -/* harmony import */ var _is_boolean__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./is-boolean */ "./node_modules/@antv/util/esm/is-boolean.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isBoolean", function() { return _is_boolean__WEBPACK_IMPORTED_MODULE_61__["default"]; }); - -/* harmony import */ var _is_date__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./is-date */ "./node_modules/@antv/util/esm/is-date.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isDate", function() { return _is_date__WEBPACK_IMPORTED_MODULE_62__["default"]; }); - -/* harmony import */ var _is_error__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./is-error */ "./node_modules/@antv/util/esm/is-error.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isError", function() { return _is_error__WEBPACK_IMPORTED_MODULE_63__["default"]; }); - -/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./is-function */ "./node_modules/@antv/util/esm/is-function.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isFunction", function() { return _is_function__WEBPACK_IMPORTED_MODULE_64__["default"]; }); - -/* harmony import */ var _is_finite__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./is-finite */ "./node_modules/@antv/util/esm/is-finite.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isFinite", function() { return _is_finite__WEBPACK_IMPORTED_MODULE_65__["default"]; }); - -/* harmony import */ var _is_nil__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./is-nil */ "./node_modules/@antv/util/esm/is-nil.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isNil", function() { return _is_nil__WEBPACK_IMPORTED_MODULE_66__["default"]; }); - -/* harmony import */ var _is_null__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./is-null */ "./node_modules/@antv/util/esm/is-null.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isNull", function() { return _is_null__WEBPACK_IMPORTED_MODULE_67__["default"]; }); - -/* harmony import */ var _is_number__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./is-number */ "./node_modules/@antv/util/esm/is-number.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isNumber", function() { return _is_number__WEBPACK_IMPORTED_MODULE_68__["default"]; }); - -/* harmony import */ var _is_object__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./is-object */ "./node_modules/@antv/util/esm/is-object.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return _is_object__WEBPACK_IMPORTED_MODULE_69__["default"]; }); - -/* harmony import */ var _is_object_like__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./is-object-like */ "./node_modules/@antv/util/esm/is-object-like.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isObjectLike", function() { return _is_object_like__WEBPACK_IMPORTED_MODULE_70__["default"]; }); - -/* harmony import */ var _is_plain_object__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./is-plain-object */ "./node_modules/@antv/util/esm/is-plain-object.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isPlainObject", function() { return _is_plain_object__WEBPACK_IMPORTED_MODULE_71__["default"]; }); - -/* harmony import */ var _is_prototype__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./is-prototype */ "./node_modules/@antv/util/esm/is-prototype.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isPrototype", function() { return _is_prototype__WEBPACK_IMPORTED_MODULE_72__["default"]; }); - -/* harmony import */ var _is_reg_exp__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./is-reg-exp */ "./node_modules/@antv/util/esm/is-reg-exp.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isRegExp", function() { return _is_reg_exp__WEBPACK_IMPORTED_MODULE_73__["default"]; }); - -/* harmony import */ var _is_string__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ./is-string */ "./node_modules/@antv/util/esm/is-string.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isString", function() { return _is_string__WEBPACK_IMPORTED_MODULE_74__["default"]; }); - -/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ./is-type */ "./node_modules/@antv/util/esm/is-type.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isType", function() { return _is_type__WEBPACK_IMPORTED_MODULE_75__["default"]; }); - -/* harmony import */ var _is_undefined__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ./is-undefined */ "./node_modules/@antv/util/esm/is-undefined.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isUndefined", function() { return _is_undefined__WEBPACK_IMPORTED_MODULE_76__["default"]; }); - -/* harmony import */ var _is_element__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ./is-element */ "./node_modules/@antv/util/esm/is-element.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isElement", function() { return _is_element__WEBPACK_IMPORTED_MODULE_77__["default"]; }); - -/* harmony import */ var _request_animation_frame__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ./request-animation-frame */ "./node_modules/@antv/util/esm/request-animation-frame.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "requestAnimationFrame", function() { return _request_animation_frame__WEBPACK_IMPORTED_MODULE_78__["default"]; }); - -/* harmony import */ var _clear_animation_frame__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ./clear-animation-frame */ "./node_modules/@antv/util/esm/clear-animation-frame.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "clearAnimationFrame", function() { return _clear_animation_frame__WEBPACK_IMPORTED_MODULE_79__["default"]; }); - -/* harmony import */ var _augment__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ./augment */ "./node_modules/@antv/util/esm/augment.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "augment", function() { return _augment__WEBPACK_IMPORTED_MODULE_80__["default"]; }); - -/* harmony import */ var _clone__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ./clone */ "./node_modules/@antv/util/esm/clone.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "clone", function() { return _clone__WEBPACK_IMPORTED_MODULE_81__["default"]; }); - -/* harmony import */ var _debounce__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! ./debounce */ "./node_modules/@antv/util/esm/debounce.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return _debounce__WEBPACK_IMPORTED_MODULE_82__["default"]; }); - -/* harmony import */ var _memoize__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! ./memoize */ "./node_modules/@antv/util/esm/memoize.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "memoize", function() { return _memoize__WEBPACK_IMPORTED_MODULE_83__["default"]; }); - -/* harmony import */ var _deep_mix__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(/*! ./deep-mix */ "./node_modules/@antv/util/esm/deep-mix.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deepMix", function() { return _deep_mix__WEBPACK_IMPORTED_MODULE_84__["default"]; }); - -/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(/*! ./each */ "./node_modules/@antv/util/esm/each.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "each", function() { return _each__WEBPACK_IMPORTED_MODULE_85__["default"]; }); - -/* harmony import */ var _extend__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(/*! ./extend */ "./node_modules/@antv/util/esm/extend.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return _extend__WEBPACK_IMPORTED_MODULE_86__["default"]; }); - -/* harmony import */ var _index_of__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(/*! ./index-of */ "./node_modules/@antv/util/esm/index-of.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "indexOf", function() { return _index_of__WEBPACK_IMPORTED_MODULE_87__["default"]; }); - -/* harmony import */ var _is_empty__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(/*! ./is-empty */ "./node_modules/@antv/util/esm/is-empty.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return _is_empty__WEBPACK_IMPORTED_MODULE_88__["default"]; }); - -/* harmony import */ var _is_equal__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(/*! ./is-equal */ "./node_modules/@antv/util/esm/is-equal.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEqual", function() { return _is_equal__WEBPACK_IMPORTED_MODULE_89__["default"]; }); - -/* harmony import */ var _is_equal_with__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(/*! ./is-equal-with */ "./node_modules/@antv/util/esm/is-equal-with.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEqualWith", function() { return _is_equal_with__WEBPACK_IMPORTED_MODULE_90__["default"]; }); - -/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(/*! ./map */ "./node_modules/@antv/util/esm/map.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _map__WEBPACK_IMPORTED_MODULE_91__["default"]; }); - -/* harmony import */ var _map_values__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(/*! ./map-values */ "./node_modules/@antv/util/esm/map-values.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapValues", function() { return _map_values__WEBPACK_IMPORTED_MODULE_92__["default"]; }); - -/* harmony import */ var _mix__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(/*! ./mix */ "./node_modules/@antv/util/esm/mix.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mix", function() { return _mix__WEBPACK_IMPORTED_MODULE_93__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "assign", function() { return _mix__WEBPACK_IMPORTED_MODULE_93__["default"]; }); - -/* harmony import */ var _get__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(/*! ./get */ "./node_modules/@antv/util/esm/get.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "get", function() { return _get__WEBPACK_IMPORTED_MODULE_94__["default"]; }); - -/* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(/*! ./set */ "./node_modules/@antv/util/esm/set.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "set", function() { return _set__WEBPACK_IMPORTED_MODULE_95__["default"]; }); - -/* harmony import */ var _pick__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(/*! ./pick */ "./node_modules/@antv/util/esm/pick.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pick", function() { return _pick__WEBPACK_IMPORTED_MODULE_96__["default"]; }); - -/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(/*! ./throttle */ "./node_modules/@antv/util/esm/throttle.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return _throttle__WEBPACK_IMPORTED_MODULE_97__["default"]; }); - -/* harmony import */ var _to_array__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(/*! ./to-array */ "./node_modules/@antv/util/esm/to-array.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return _to_array__WEBPACK_IMPORTED_MODULE_98__["default"]; }); - -/* harmony import */ var _to_string__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(/*! ./to-string */ "./node_modules/@antv/util/esm/to-string.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toString", function() { return _to_string__WEBPACK_IMPORTED_MODULE_99__["default"]; }); - -/* harmony import */ var _unique_id__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(/*! ./unique-id */ "./node_modules/@antv/util/esm/unique-id.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "uniqueId", function() { return _unique_id__WEBPACK_IMPORTED_MODULE_100__["default"]; }); - -/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(/*! ./noop */ "./node_modules/@antv/util/esm/noop.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return _noop__WEBPACK_IMPORTED_MODULE_101__["default"]; }); - -/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(/*! ./identity */ "./node_modules/@antv/util/esm/identity.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return _identity__WEBPACK_IMPORTED_MODULE_102__["default"]; }); - -/* harmony import */ var _size__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(/*! ./size */ "./node_modules/@antv/util/esm/size.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "size", function() { return _size__WEBPACK_IMPORTED_MODULE_103__["default"]; }); - -/* harmony import */ var _cache__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(/*! ./cache */ "./node_modules/@antv/util/esm/cache.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Cache", function() { return _cache__WEBPACK_IMPORTED_MODULE_104__["default"]; }); - -// array - - - - - - - - - - - - - - - - - - - - - - - - - - -// event - - -// format - - -// math - - - - - - - - - - - - - - - -// object - - - - - - - -// string - - - - - -// type - - - - - - - - - - - - - - - - - - - - - - - -// other - - - - - - - - - - - - - - - - - - - - - - - - -// 不知道为什么,需要把这个 export,不然 ts 会报类型错误 - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-arguments.js": -/*!*****************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-arguments.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-type */ "./node_modules/@antv/util/esm/is-type.js"); -/** - * 是否是参数类型 - * - * @param {Object} value 测试的值 - * @return {Boolean} - */ - -var isArguments = function (value) { - return Object(_is_type__WEBPACK_IMPORTED_MODULE_0__["default"])(value, 'Arguments'); -}; -/* harmony default export */ __webpack_exports__["default"] = (isArguments); -//# sourceMappingURL=is-arguments.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-array-like.js": -/*!******************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-array-like.js ***! - \******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var isArrayLike = function (value) { - /** - * isArrayLike([1, 2, 3]) => true - * isArrayLike(document.body.children) => true - * isArrayLike('abc') => true - * isArrayLike(Function) => false - */ - return value !== null && typeof value !== 'function' && isFinite(value.length); -}; -/* harmony default export */ __webpack_exports__["default"] = (isArrayLike); -//# sourceMappingURL=is-array-like.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-array.js": -/*!*************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-array.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-type */ "./node_modules/@antv/util/esm/is-type.js"); - -/* harmony default export */ __webpack_exports__["default"] = (function (value) { - return Array.isArray ? - Array.isArray(value) : - Object(_is_type__WEBPACK_IMPORTED_MODULE_0__["default"])(value, 'Array'); -}); -//# sourceMappingURL=is-array.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-boolean.js": -/*!***************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-boolean.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-type */ "./node_modules/@antv/util/esm/is-type.js"); -/** - * 是否是布尔类型 - * - * @param {Object} value 测试的值 - * @return {Boolean} - */ - -var isBoolean = function (value) { - return Object(_is_type__WEBPACK_IMPORTED_MODULE_0__["default"])(value, 'Boolean'); -}; -/* harmony default export */ __webpack_exports__["default"] = (isBoolean); -//# sourceMappingURL=is-boolean.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-date.js": -/*!************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-date.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-type */ "./node_modules/@antv/util/esm/is-type.js"); - -var isDate = function (value) { - return Object(_is_type__WEBPACK_IMPORTED_MODULE_0__["default"])(value, 'Date'); -}; -/* harmony default export */ __webpack_exports__["default"] = (isDate); -//# sourceMappingURL=is-date.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-decimal.js": -/*!***************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-decimal.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-number */ "./node_modules/@antv/util/esm/is-number.js"); - -var isDecimal = function (num) { - return Object(_is_number__WEBPACK_IMPORTED_MODULE_0__["default"])(num) && num % 1 !== 0; -}; -/* harmony default export */ __webpack_exports__["default"] = (isDecimal); -//# sourceMappingURL=is-decimal.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-element.js": -/*!***************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-element.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/** - * 判断是否HTML元素 - * @return {Boolean} 是否HTML元素 - */ -var isElement = function (o) { - return o instanceof Element || o instanceof HTMLDocument; -}; -/* harmony default export */ __webpack_exports__["default"] = (isElement); -//# sourceMappingURL=is-element.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-empty.js": -/*!*************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-empty.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_nil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-nil */ "./node_modules/@antv/util/esm/is-nil.js"); -/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-array-like */ "./node_modules/@antv/util/esm/is-array-like.js"); -/* harmony import */ var _get_type__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./get-type */ "./node_modules/@antv/util/esm/get-type.js"); -/* harmony import */ var _is_prototype__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./is-prototype */ "./node_modules/@antv/util/esm/is-prototype.js"); - - - - -var hasOwnProperty = Object.prototype.hasOwnProperty; -function isEmpty(value) { - /** - * isEmpty(null) => true - * isEmpty() => true - * isEmpty(true) => true - * isEmpty(1) => true - * isEmpty([1, 2, 3]) => false - * isEmpty('abc') => false - * isEmpty({ a: 1 }) => false - */ - if (Object(_is_nil__WEBPACK_IMPORTED_MODULE_0__["default"])(value)) { - return true; - } - if (Object(_is_array_like__WEBPACK_IMPORTED_MODULE_1__["default"])(value)) { - return !value.length; - } - var type = Object(_get_type__WEBPACK_IMPORTED_MODULE_2__["default"])(value); - if (type === 'Map' || type === 'Set') { - return !value.size; - } - if (Object(_is_prototype__WEBPACK_IMPORTED_MODULE_3__["default"])(value)) { - return !Object.keys(value).length; - } - for (var key in value) { - if (hasOwnProperty.call(value, key)) { - return false; - } - } - return true; -} -/* harmony default export */ __webpack_exports__["default"] = (isEmpty); -//# sourceMappingURL=is-empty.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-equal-with.js": -/*!******************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-equal-with.js ***! - \******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-function */ "./node_modules/@antv/util/esm/is-function.js"); -/* harmony import */ var _is_equal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-equal */ "./node_modules/@antv/util/esm/is-equal.js"); - - -/** - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [fn] The function to customize comparisons. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } - * - * function customizer(objValue, othValue) { - * if (isGreeting(objValue) && isGreeting(othValue)) { - * return true; - * } - * } - * - * var array = ['hello', 'goodbye']; - * var other = ['hi', 'goodbye']; - * - * isEqualWith(array, other, customizer); // => true - */ -/* harmony default export */ __webpack_exports__["default"] = (function (value, other, fn) { - if (!Object(_is_function__WEBPACK_IMPORTED_MODULE_0__["default"])(fn)) { - return Object(_is_equal__WEBPACK_IMPORTED_MODULE_1__["default"])(value, other); - } - return !!fn(value, other); -}); -//# sourceMappingURL=is-equal-with.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-equal.js": -/*!*************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-equal.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_object_like__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-object-like */ "./node_modules/@antv/util/esm/is-object-like.js"); -/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-array-like */ "./node_modules/@antv/util/esm/is-array-like.js"); -/* harmony import */ var _is_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-string */ "./node_modules/@antv/util/esm/is-string.js"); - - - -var isEqual = function (value, other) { - if (value === other) { - return true; - } - if (!value || !other) { - return false; - } - if (Object(_is_string__WEBPACK_IMPORTED_MODULE_2__["default"])(value) || Object(_is_string__WEBPACK_IMPORTED_MODULE_2__["default"])(other)) { - return false; - } - if (Object(_is_array_like__WEBPACK_IMPORTED_MODULE_1__["default"])(value) || Object(_is_array_like__WEBPACK_IMPORTED_MODULE_1__["default"])(other)) { - if (value.length !== other.length) { - return false; - } - var rst = true; - for (var i = 0; i < value.length; i++) { - rst = isEqual(value[i], other[i]); - if (!rst) { - break; - } - } - return rst; - } - if (Object(_is_object_like__WEBPACK_IMPORTED_MODULE_0__["default"])(value) || Object(_is_object_like__WEBPACK_IMPORTED_MODULE_0__["default"])(other)) { - var valueKeys = Object.keys(value); - var otherKeys = Object.keys(other); - if (valueKeys.length !== otherKeys.length) { - return false; - } - var rst = true; - for (var i = 0; i < valueKeys.length; i++) { - rst = isEqual(value[valueKeys[i]], other[valueKeys[i]]); - if (!rst) { - break; - } - } - return rst; - } - return false; -}; -/* harmony default export */ __webpack_exports__["default"] = (isEqual); -//# sourceMappingURL=is-equal.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-error.js": -/*!*************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-error.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-type */ "./node_modules/@antv/util/esm/is-type.js"); -/** - * 是否是参数类型 - * - * @param {Object} value 测试的值 - * @return {Boolean} - */ - -var isError = function (value) { - return Object(_is_type__WEBPACK_IMPORTED_MODULE_0__["default"])(value, 'Error'); -}; -/* harmony default export */ __webpack_exports__["default"] = (isError); -//# sourceMappingURL=is-error.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-even.js": -/*!************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-even.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-number */ "./node_modules/@antv/util/esm/is-number.js"); - -var isEven = function (num) { - return Object(_is_number__WEBPACK_IMPORTED_MODULE_0__["default"])(num) && num % 2 === 0; -}; -/* harmony default export */ __webpack_exports__["default"] = (isEven); -//# sourceMappingURL=is-even.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-finite.js": -/*!**************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-finite.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-number */ "./node_modules/@antv/util/esm/is-number.js"); -/** - * 判断是否为有限数 - * @return {Boolean} - */ - -/* harmony default export */ __webpack_exports__["default"] = (function (value) { - return Object(_is_number__WEBPACK_IMPORTED_MODULE_0__["default"])(value) && isFinite(value); -}); -//# sourceMappingURL=is-finite.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-function.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-function.js ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-type */ "./node_modules/@antv/util/esm/is-type.js"); -/** - * 是否为函数 - * @param {*} fn 对象 - * @return {Boolean} 是否函数 - */ - -/* harmony default export */ __webpack_exports__["default"] = (function (value) { - return Object(_is_type__WEBPACK_IMPORTED_MODULE_0__["default"])(value, 'Function'); -}); -//# sourceMappingURL=is-function.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-integer.js": -/*!***************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-integer.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-number */ "./node_modules/@antv/util/esm/is-number.js"); - -var isInteger = Number.isInteger ? Number.isInteger : function (num) { - return Object(_is_number__WEBPACK_IMPORTED_MODULE_0__["default"])(num) && num % 1 === 0; -}; -/* harmony default export */ __webpack_exports__["default"] = (isInteger); -//# sourceMappingURL=is-integer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-match.js": -/*!*************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-match.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_nil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-nil */ "./node_modules/@antv/util/esm/is-nil.js"); -/* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./keys */ "./node_modules/@antv/util/esm/keys.js"); - - -function isMatch(obj, attrs) { - var _keys = Object(_keys__WEBPACK_IMPORTED_MODULE_1__["default"])(attrs); - var length = _keys.length; - if (Object(_is_nil__WEBPACK_IMPORTED_MODULE_0__["default"])(obj)) - return !length; - for (var i = 0; i < length; i += 1) { - var key = _keys[i]; - if (attrs[key] !== obj[key] || !(key in obj)) { - return false; - } - } - return true; -} -/* harmony default export */ __webpack_exports__["default"] = (isMatch); -//# sourceMappingURL=is-match.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-negative.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-negative.js ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-number */ "./node_modules/@antv/util/esm/is-number.js"); - -var isNegative = function (num) { - return Object(_is_number__WEBPACK_IMPORTED_MODULE_0__["default"])(num) && num < 0; -}; -/* harmony default export */ __webpack_exports__["default"] = (isNegative); -//# sourceMappingURL=is-negative.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-nil.js": -/*!***********************************************!*\ - !*** ./node_modules/@antv/util/esm/is-nil.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -// isFinite, -var isNil = function (value) { - /** - * isNil(null) => true - * isNil() => true - */ - return value === null || value === undefined; -}; -/* harmony default export */ __webpack_exports__["default"] = (isNil); -//# sourceMappingURL=is-nil.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-null.js": -/*!************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-null.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var isNull = function (value) { - return value === null; -}; -/* harmony default export */ __webpack_exports__["default"] = (isNull); -//# sourceMappingURL=is-null.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-number-equal.js": -/*!********************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-number-equal.js ***! - \********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isNumberEqual; }); -var PRECISION = 0.00001; // numbers less than this is considered as 0 -function isNumberEqual(a, b, precision) { - if (precision === void 0) { precision = PRECISION; } - return Math.abs((a - b)) < precision; -} -; -//# sourceMappingURL=is-number-equal.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-number.js": -/*!**************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-number.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-type */ "./node_modules/@antv/util/esm/is-type.js"); -/** - * 判断是否数字 - * @return {Boolean} 是否数字 - */ - -var isNumber = function (value) { - return Object(_is_type__WEBPACK_IMPORTED_MODULE_0__["default"])(value, 'Number'); -}; -/* harmony default export */ __webpack_exports__["default"] = (isNumber); -//# sourceMappingURL=is-number.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-object-like.js": -/*!*******************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-object-like.js ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var isObjectLike = function (value) { - /** - * isObjectLike({}) => true - * isObjectLike([1, 2, 3]) => true - * isObjectLike(Function) => false - * isObjectLike(null) => false - */ - return typeof value === 'object' && value !== null; -}; -/* harmony default export */ __webpack_exports__["default"] = (isObjectLike); -//# sourceMappingURL=is-object-like.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-object.js": -/*!**************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-object.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function (value) { - /** - * isObject({}) => true - * isObject([1, 2, 3]) => true - * isObject(Function) => true - * isObject(null) => false - */ - var type = typeof value; - return value !== null && type === 'object' || type === 'function'; -}); -//# sourceMappingURL=is-object.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-odd.js": -/*!***********************************************!*\ - !*** ./node_modules/@antv/util/esm/is-odd.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-number */ "./node_modules/@antv/util/esm/is-number.js"); - -var isOdd = function (num) { - return Object(_is_number__WEBPACK_IMPORTED_MODULE_0__["default"])(num) && num % 2 !== 0; -}; -/* harmony default export */ __webpack_exports__["default"] = (isOdd); -//# sourceMappingURL=is-odd.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-plain-object.js": -/*!********************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-plain-object.js ***! - \********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_object_like__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-object-like */ "./node_modules/@antv/util/esm/is-object-like.js"); -/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-type */ "./node_modules/@antv/util/esm/is-type.js"); - - -var isPlainObject = function (value) { - /** - * isObjectLike(new Foo) => false - * isObjectLike([1, 2, 3]) => false - * isObjectLike({ x: 0, y: 0 }) => true - * isObjectLike(Object.create(null)) => true - */ - if (!Object(_is_object_like__WEBPACK_IMPORTED_MODULE_0__["default"])(value) || !Object(_is_type__WEBPACK_IMPORTED_MODULE_1__["default"])(value, 'Object')) { - return false; - } - if (Object.getPrototypeOf(value) === null) { - return true; - } - var proto = value; - while (Object.getPrototypeOf(proto) !== null) { - proto = Object.getPrototypeOf(proto); - } - return Object.getPrototypeOf(value) === proto; -}; -/* harmony default export */ __webpack_exports__["default"] = (isPlainObject); -//# sourceMappingURL=is-plain-object.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-positive.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-positive.js ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-number */ "./node_modules/@antv/util/esm/is-number.js"); - -var isPositive = function (num) { - return Object(_is_number__WEBPACK_IMPORTED_MODULE_0__["default"])(num) && num > 0; -}; -/* harmony default export */ __webpack_exports__["default"] = (isPositive); -//# sourceMappingURL=is-positive.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-prototype.js": -/*!*****************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-prototype.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var objectProto = Object.prototype; -var isPrototype = function (value) { - var Ctor = value && value.constructor; - var proto = (typeof Ctor === 'function' && Ctor.prototype) || objectProto; - return value === proto; -}; -/* harmony default export */ __webpack_exports__["default"] = (isPrototype); -//# sourceMappingURL=is-prototype.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-reg-exp.js": -/*!***************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-reg-exp.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-type */ "./node_modules/@antv/util/esm/is-type.js"); - -var isRegExp = function (str) { - return Object(_is_type__WEBPACK_IMPORTED_MODULE_0__["default"])(str, 'RegExp'); -}; -/* harmony default export */ __webpack_exports__["default"] = (isRegExp); -//# sourceMappingURL=is-reg-exp.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-string.js": -/*!**************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-string.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-type */ "./node_modules/@antv/util/esm/is-type.js"); - -/* harmony default export */ __webpack_exports__["default"] = (function (str) { - return Object(_is_type__WEBPACK_IMPORTED_MODULE_0__["default"])(str, 'String'); -}); -//# sourceMappingURL=is-string.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-type.js": -/*!************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-type.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var toString = {}.toString; -var isType = function (value, type) { return toString.call(value) === '[object ' + type + ']'; }; -/* harmony default export */ __webpack_exports__["default"] = (isType); -//# sourceMappingURL=is-type.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/is-undefined.js": -/*!*****************************************************!*\ - !*** ./node_modules/@antv/util/esm/is-undefined.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var isUndefined = function (value) { - return value === undefined; -}; -/* harmony default export */ __webpack_exports__["default"] = (isUndefined); -//# sourceMappingURL=is-undefined.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/keys.js": -/*!*********************************************!*\ - !*** ./node_modules/@antv/util/esm/keys.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./each */ "./node_modules/@antv/util/esm/each.js"); -/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-function */ "./node_modules/@antv/util/esm/is-function.js"); - - -var keys = Object.keys ? function (obj) { return Object.keys(obj); } : function (obj) { - var result = []; - Object(_each__WEBPACK_IMPORTED_MODULE_0__["default"])(obj, function (value, key) { - if (!(Object(_is_function__WEBPACK_IMPORTED_MODULE_1__["default"])(obj) && key === 'prototype')) { - result.push(key); - } - }); - return result; -}; -/* harmony default export */ __webpack_exports__["default"] = (keys); -//# sourceMappingURL=keys.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/last.js": -/*!*********************************************!*\ - !*** ./node_modules/@antv/util/esm/last.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return last; }); -/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array-like */ "./node_modules/@antv/util/esm/is-array-like.js"); - -function last(o) { - if (Object(_is_array_like__WEBPACK_IMPORTED_MODULE_0__["default"])(o)) { - var arr = o; - return arr[arr.length - 1]; - } - return undefined; -} -//# sourceMappingURL=last.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/lower-case.js": -/*!***************************************************!*\ - !*** ./node_modules/@antv/util/esm/lower-case.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./to-string */ "./node_modules/@antv/util/esm/to-string.js"); - -var lowerCase = function (str) { - return Object(_to_string__WEBPACK_IMPORTED_MODULE_0__["default"])(str).toLowerCase(); -}; -/* harmony default export */ __webpack_exports__["default"] = (lowerCase); -//# sourceMappingURL=lower-case.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/lower-first.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/util/esm/lower-first.js ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./to-string */ "./node_modules/@antv/util/esm/to-string.js"); - -var lowerFirst = function (value) { - var str = Object(_to_string__WEBPACK_IMPORTED_MODULE_0__["default"])(value); - return str.charAt(0).toLowerCase() + str.substring(1); -}; -/* harmony default export */ __webpack_exports__["default"] = (lowerFirst); -//# sourceMappingURL=lower-first.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/map-values.js": -/*!***************************************************!*\ - !*** ./node_modules/@antv/util/esm/map-values.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_nil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-nil */ "./node_modules/@antv/util/esm/is-nil.js"); -/* harmony import */ var _is_object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-object */ "./node_modules/@antv/util/esm/is-object.js"); - - -var identity = function (v) { return v; }; -/* harmony default export */ __webpack_exports__["default"] = (function (object, func) { - if (func === void 0) { func = identity; } - var r = {}; - if (Object(_is_object__WEBPACK_IMPORTED_MODULE_1__["default"])(object) && !Object(_is_nil__WEBPACK_IMPORTED_MODULE_0__["default"])(object)) { - Object.keys(object).forEach(function (key) { - // @ts-ignore - r[key] = func(object[key], key); - }); - } - return r; -}); -//# sourceMappingURL=map-values.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/map.js": -/*!********************************************!*\ - !*** ./node_modules/@antv/util/esm/map.js ***! - \********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./each */ "./node_modules/@antv/util/esm/each.js"); -/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-array-like */ "./node_modules/@antv/util/esm/is-array-like.js"); - - -var map = function (arr, func) { - if (!Object(_is_array_like__WEBPACK_IMPORTED_MODULE_1__["default"])(arr)) { - // @ts-ignore - return arr; - } - var result = []; - Object(_each__WEBPACK_IMPORTED_MODULE_0__["default"])(arr, function (value, index) { - result.push(func(value, index)); - }); - return result; -}; -/* harmony default export */ __webpack_exports__["default"] = (map); -//# sourceMappingURL=map.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/max-by.js": -/*!***********************************************!*\ - !*** ./node_modules/@antv/util/esm/max-by.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./each */ "./node_modules/@antv/util/esm/each.js"); -/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-array */ "./node_modules/@antv/util/esm/is-array.js"); -/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-function */ "./node_modules/@antv/util/esm/is-function.js"); - - - -/** - * @param {Array} arr The array to iterate over. - * @param {Function} [fn] The iteratee invoked per element. - * @return {*} Returns the maximum value. - * @example - * - * var objects = [{ 'n': 1 }, { 'n': 2 }]; - * - * maxBy(objects, function(o) { return o.n; }); - * // => { 'n': 2 } - * - * maxBy(objects, 'n'); - * // => { 'n': 2 } - */ -/* harmony default export */ __webpack_exports__["default"] = (function (arr, fn) { - if (!Object(_is_array__WEBPACK_IMPORTED_MODULE_1__["default"])(arr)) { - return undefined; - } - var max = arr[0]; - var maxData; - if (Object(_is_function__WEBPACK_IMPORTED_MODULE_2__["default"])(fn)) { - maxData = fn(arr[0]); - } - else { - maxData = arr[0][fn]; - } - var data; - Object(_each__WEBPACK_IMPORTED_MODULE_0__["default"])(arr, function (val) { - if (Object(_is_function__WEBPACK_IMPORTED_MODULE_2__["default"])(fn)) { - data = fn(val); - } - else { - data = val[fn]; - } - if (data > maxData) { - max = val; - maxData = data; - } - }); - return max; -}); -//# sourceMappingURL=max-by.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/memoize.js": -/*!************************************************!*\ - !*** ./node_modules/@antv/util/esm/memoize.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-function */ "./node_modules/@antv/util/esm/is-function.js"); - -/** - * _.memoize(calColor); - * _.memoize(calColor, (...args) => args[0]); - * @param f - * @param resolver - */ -/* harmony default export */ __webpack_exports__["default"] = (function (f, resolver) { - if (!Object(_is_function__WEBPACK_IMPORTED_MODULE_0__["default"])(f)) { - throw new TypeError('Expected a function'); - } - var memoized = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - // 使用方法构造 key,如果不存在 resolver,则直接取第一个参数作为 key - var key = resolver ? resolver.apply(this, args) : args[0]; - var cache = memoized.cache; - if (cache.has(key)) { - return cache.get(key); - } - var result = f.apply(this, args); - // 缓存起来 - cache.set(key, result); - return result; - }; - memoized.cache = new Map(); - return memoized; -}); -//# sourceMappingURL=memoize.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/min-by.js": -/*!***********************************************!*\ - !*** ./node_modules/@antv/util/esm/min-by.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./each */ "./node_modules/@antv/util/esm/each.js"); -/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-array */ "./node_modules/@antv/util/esm/is-array.js"); -/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-function */ "./node_modules/@antv/util/esm/is-function.js"); - - - -/** - * @param {Array} arr The array to iterate over. - * @param {Function} [fn] The iteratee invoked per element. - * @return {*} Returns the minimum value. - * @example - * - * var objects = [{ 'n': 1 }, { 'n': 2 }]; - * - * minBy(objects, function(o) { return o.n; }); - * // => { 'n': 1 } - * - * minBy(objects, 'n'); - * // => { 'n': 1 } - */ -/* harmony default export */ __webpack_exports__["default"] = (function (arr, fn) { - if (!Object(_is_array__WEBPACK_IMPORTED_MODULE_1__["default"])(arr)) { - return undefined; - } - var min = arr[0]; - var minData; - if (Object(_is_function__WEBPACK_IMPORTED_MODULE_2__["default"])(fn)) { - minData = fn(arr[0]); - } - else { - minData = arr[0][fn]; - } - var data; - Object(_each__WEBPACK_IMPORTED_MODULE_0__["default"])(arr, function (val) { - if (Object(_is_function__WEBPACK_IMPORTED_MODULE_2__["default"])(fn)) { - data = fn(val); - } - else { - data = val[fn]; - } - if (data < minData) { - min = val; - minData = data; - } - }); - return min; -}); -//# sourceMappingURL=min-by.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/mix.js": -/*!********************************************!*\ - !*** ./node_modules/@antv/util/esm/mix.js ***! - \********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return mix; }); -// FIXME: Mutable param should be forbidden in static lang. -function _mix(dist, obj) { - for (var key in obj) { - if (obj.hasOwnProperty(key) && key !== 'constructor' && obj[key] !== undefined) { - dist[key] = obj[key]; - } - } -} -function mix(dist, src1, src2, src3) { - if (src1) - _mix(dist, src1); - if (src2) - _mix(dist, src2); - if (src3) - _mix(dist, src3); - return dist; -} -//# sourceMappingURL=mix.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/mod.js": -/*!********************************************!*\ - !*** ./node_modules/@antv/util/esm/mod.js ***! - \********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var mod = function (n, m) { - return ((n % m) + m) % m; -}; -/* harmony default export */ __webpack_exports__["default"] = (mod); -//# sourceMappingURL=mod.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/noop.js": -/*!*********************************************!*\ - !*** ./node_modules/@antv/util/esm/noop.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function () { }); -//# sourceMappingURL=noop.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/number2color.js": -/*!*****************************************************!*\ - !*** ./node_modules/@antv/util/esm/number2color.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var numColorCache = {}; -function numberToColor(num) { - // 增加缓存 - var color = numColorCache[num]; - if (!color) { - var str = num.toString(16); - for (var i = str.length; i < 6; i++) { - str = '0' + str; - } - color = '#' + str; - numColorCache[num] = color; - } - return color; -} -/* harmony default export */ __webpack_exports__["default"] = (numberToColor); -//# sourceMappingURL=number2color.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/parse-radius.js": -/*!*****************************************************!*\ - !*** ./node_modules/@antv/util/esm/parse-radius.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ "./node_modules/@antv/util/esm/is-array.js"); - -function parseRadius(radius) { - var r1 = 0, r2 = 0, r3 = 0, r4 = 0; - if (Object(_is_array__WEBPACK_IMPORTED_MODULE_0__["default"])(radius)) { - if (radius.length === 1) { - r1 = r2 = r3 = r4 = radius[0]; - } - else if (radius.length === 2) { - r1 = r3 = radius[0]; - r2 = r4 = radius[1]; - } - else if (radius.length === 3) { - r1 = radius[0]; - r2 = r4 = radius[1]; - r3 = radius[2]; - } - else { - r1 = radius[0]; - r2 = radius[1]; - r3 = radius[2]; - r4 = radius[3]; - } - } - else { - r1 = r2 = r3 = r4 = radius; - } - return { - r1: r1, - r2: r2, - r3: r3, - r4: r4 - }; -} -/* harmony default export */ __webpack_exports__["default"] = (parseRadius); -//# sourceMappingURL=parse-radius.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/pick.js": -/*!*********************************************!*\ - !*** ./node_modules/@antv/util/esm/pick.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./each */ "./node_modules/@antv/util/esm/each.js"); -/* harmony import */ var _is_plain_object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-plain-object */ "./node_modules/@antv/util/esm/is-plain-object.js"); - - -var hasOwnProperty = Object.prototype.hasOwnProperty; -/* harmony default export */ __webpack_exports__["default"] = (function (object, keys) { - if (object === null || !Object(_is_plain_object__WEBPACK_IMPORTED_MODULE_1__["default"])(object)) { - return {}; - } - var result = {}; - Object(_each__WEBPACK_IMPORTED_MODULE_0__["default"])(keys, function (key) { - if (hasOwnProperty.call(object, key)) { - result[key] = object[key]; - } - }); - return result; -}); -//# sourceMappingURL=pick.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/pull-at.js": -/*!************************************************!*\ - !*** ./node_modules/@antv/util/esm/pull-at.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array-like */ "./node_modules/@antv/util/esm/is-array-like.js"); - -var splice = Array.prototype.splice; -var pullAt = function pullAt(arr, indexes) { - if (!Object(_is_array_like__WEBPACK_IMPORTED_MODULE_0__["default"])(arr)) { - return []; - } - var length = arr ? indexes.length : 0; - var last = length - 1; - while (length--) { - var previous = void 0; - var index = indexes[length]; - if (length === last || index !== previous) { - previous = index; - splice.call(arr, index, 1); - } - } - return arr; -}; -/* harmony default export */ __webpack_exports__["default"] = (pullAt); -//# sourceMappingURL=pull-at.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/pull.js": -/*!*********************************************!*\ - !*** ./node_modules/@antv/util/esm/pull.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var arrPrototype = Array.prototype; -var splice = arrPrototype.splice; -var indexOf = arrPrototype.indexOf; -var pull = function (arr) { - var values = []; - for (var _i = 1; _i < arguments.length; _i++) { - values[_i - 1] = arguments[_i]; - } - for (var i = 0; i < values.length; i++) { - var value = values[i]; - var fromIndex = -1; - while ((fromIndex = indexOf.call(arr, value)) > -1) { - splice.call(arr, fromIndex, 1); - } - } - return arr; -}; -/* harmony default export */ __webpack_exports__["default"] = (pull); -//# sourceMappingURL=pull.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/reduce.js": -/*!***********************************************!*\ - !*** ./node_modules/@antv/util/esm/reduce.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./each */ "./node_modules/@antv/util/esm/each.js"); -/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-array */ "./node_modules/@antv/util/esm/is-array.js"); -/* harmony import */ var _is_plain_object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-plain-object */ "./node_modules/@antv/util/esm/is-plain-object.js"); - - - -var reduce = function (arr, fn, init) { - if (!Object(_is_array__WEBPACK_IMPORTED_MODULE_1__["default"])(arr) && !Object(_is_plain_object__WEBPACK_IMPORTED_MODULE_2__["default"])(arr)) { - return arr; - } - var result = init; - Object(_each__WEBPACK_IMPORTED_MODULE_0__["default"])(arr, function (data, i) { - result = fn(result, data, i); - }); - return result; -}; -/* harmony default export */ __webpack_exports__["default"] = (reduce); -//# sourceMappingURL=reduce.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/remove.js": -/*!***********************************************!*\ - !*** ./node_modules/@antv/util/esm/remove.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array-like */ "./node_modules/@antv/util/esm/is-array-like.js"); -/* harmony import */ var _pull_at__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pull-at */ "./node_modules/@antv/util/esm/pull-at.js"); - - -var remove = function (arr, predicate) { - /** - * const arr = [1, 2, 3, 4] - * const evens = remove(arr, n => n % 2 == 0) - * console.log(arr) // => [1, 3] - * console.log(evens) // => [2, 4] - */ - var result = []; - if (!Object(_is_array_like__WEBPACK_IMPORTED_MODULE_0__["default"])(arr)) { - return result; - } - var i = -1; - var indexes = []; - var length = arr.length; - while (++i < length) { - var value = arr[i]; - if (predicate(value, i, arr)) { - result.push(value); - indexes.push(i); - } - } - Object(_pull_at__WEBPACK_IMPORTED_MODULE_1__["default"])(arr, indexes); - return result; -}; -/* harmony default export */ __webpack_exports__["default"] = (remove); -//# sourceMappingURL=remove.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/request-animation-frame.js": -/*!****************************************************************!*\ - !*** ./node_modules/@antv/util/esm/request-animation-frame.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return requestAnimationFrame; }); -function requestAnimationFrame(fn) { - var method = window.requestAnimationFrame || - window.webkitRequestAnimationFrame || - // @ts-ignore - window.mozRequestAnimationFrame || - // @ts-ignore - window.msRequestAnimationFrame || - function (f) { - return setTimeout(f, 16); - }; - return method(fn); -} -; -//# sourceMappingURL=request-animation-frame.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/set.js": -/*!********************************************!*\ - !*** ./node_modules/@antv/util/esm/set.js ***! - \********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_object__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-object */ "./node_modules/@antv/util/esm/is-object.js"); -/* harmony import */ var _is_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-string */ "./node_modules/@antv/util/esm/is-string.js"); -/* harmony import */ var _is_number__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-number */ "./node_modules/@antv/util/esm/is-number.js"); - - - -/** - * https://github.com/developit/dlv/blob/master/index.js - * @param obj - * @param path - * @param value - */ -/* harmony default export */ __webpack_exports__["default"] = (function (obj, path, value) { - var o = obj; - var keyArr = Object(_is_string__WEBPACK_IMPORTED_MODULE_1__["default"])(path) ? path.split('.') : path; - keyArr.forEach(function (key, idx) { - // 不是最后一个 - if (idx < keyArr.length - 1) { - if (!Object(_is_object__WEBPACK_IMPORTED_MODULE_0__["default"])(o[key])) { - o[key] = Object(_is_number__WEBPACK_IMPORTED_MODULE_2__["default"])(keyArr[idx + 1]) ? [] : {}; - } - o = o[key]; - } - else { - o[key] = value; - } - }); - return obj; -}); -//# sourceMappingURL=set.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/size.js": -/*!*********************************************!*\ - !*** ./node_modules/@antv/util/esm/size.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return size; }); -/* harmony import */ var _is_nil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-nil */ "./node_modules/@antv/util/esm/is-nil.js"); -/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-array-like */ "./node_modules/@antv/util/esm/is-array-like.js"); - - -function size(o) { - if (Object(_is_nil__WEBPACK_IMPORTED_MODULE_0__["default"])(o)) { - return 0; - } - if (Object(_is_array_like__WEBPACK_IMPORTED_MODULE_1__["default"])(o)) { - return o.length; - } - return Object.keys(o).length; -} -//# sourceMappingURL=size.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/some.js": -/*!*********************************************!*\ - !*** ./node_modules/@antv/util/esm/some.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/** - * 只要有一个满足条件就返回 true - * @param arr - * @param func - */ -var some = function (arr, func) { - for (var i = 0; i < arr.length; i++) { - if (func(arr[i], i)) - return true; - } - return false; -}; -/* harmony default export */ __webpack_exports__["default"] = (some); -//# sourceMappingURL=some.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/sort-by.js": -/*!************************************************!*\ - !*** ./node_modules/@antv/util/esm/sort-by.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ "./node_modules/@antv/util/esm/is-array.js"); -/* harmony import */ var _is_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-string */ "./node_modules/@antv/util/esm/is-string.js"); -/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-function */ "./node_modules/@antv/util/esm/is-function.js"); - - - -function sortBy(arr, key) { - var comparer; - if (Object(_is_function__WEBPACK_IMPORTED_MODULE_2__["default"])(key)) { - comparer = function (a, b) { return key(a) - key(b); }; - } - else { - var keys_1 = []; - if (Object(_is_string__WEBPACK_IMPORTED_MODULE_1__["default"])(key)) { - keys_1.push(key); - } - else if (Object(_is_array__WEBPACK_IMPORTED_MODULE_0__["default"])(key)) { - keys_1 = key; - } - comparer = function (a, b) { - for (var i = 0; i < keys_1.length; i += 1) { - var prop = keys_1[i]; - if (a[prop] > b[prop]) { - return 1; - } - if (a[prop] < b[prop]) { - return -1; - } - } - return 0; - }; - } - arr.sort(comparer); - return arr; -} -/* harmony default export */ __webpack_exports__["default"] = (sortBy); -//# sourceMappingURL=sort-by.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/starts-with.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/util/esm/starts-with.js ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ "./node_modules/@antv/util/esm/is-array.js"); -/* harmony import */ var _is_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-string */ "./node_modules/@antv/util/esm/is-string.js"); - - -function startsWith(arr, e) { - return (Object(_is_array__WEBPACK_IMPORTED_MODULE_0__["default"])(arr) || Object(_is_string__WEBPACK_IMPORTED_MODULE_1__["default"])(arr)) ? arr[0] === e : false; -} -/* harmony default export */ __webpack_exports__["default"] = (startsWith); -//# sourceMappingURL=starts-with.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/substitute.js": -/*!***************************************************!*\ - !*** ./node_modules/@antv/util/esm/substitute.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -function substitute(str, o) { - if (!str || !o) { - return str; - } - return str.replace(/\\?\{([^{}]+)\}/g, function (match, name) { - if (match.charAt(0) === '\\') { - return match.slice(1); - } - return (o[name] === undefined) ? '' : o[name]; - }); -} -/* harmony default export */ __webpack_exports__["default"] = (substitute); -//# sourceMappingURL=substitute.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/throttle.js": -/*!*************************************************!*\ - !*** ./node_modules/@antv/util/esm/throttle.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function (func, wait, options) { - var timeout, context, args, result; - var previous = 0; - if (!options) - options = {}; - var later = function () { - previous = options.leading === false ? 0 : Date.now(); - timeout = null; - result = func.apply(context, args); - if (!timeout) - context = args = null; - }; - var throttled = function () { - var now = Date.now(); - if (!previous && options.leading === false) - previous = now; - var remaining = wait - (now - previous); - context = this; - args = arguments; - if (remaining <= 0 || remaining > wait) { - if (timeout) { - clearTimeout(timeout); - timeout = null; - } - previous = now; - result = func.apply(context, args); - if (!timeout) - context = args = null; - } - else if (!timeout && options.trailing !== false) { - timeout = setTimeout(later, remaining); - } - return result; - }; - throttled.cancel = function () { - clearTimeout(timeout); - previous = 0; - timeout = context = args = null; - }; - return throttled; -}); -//# sourceMappingURL=throttle.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/to-array.js": -/*!*************************************************!*\ - !*** ./node_modules/@antv/util/esm/to-array.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_array_like__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array-like */ "./node_modules/@antv/util/esm/is-array-like.js"); - -/* harmony default export */ __webpack_exports__["default"] = (function (value) { - return Object(_is_array_like__WEBPACK_IMPORTED_MODULE_0__["default"])(value) ? Array.prototype.slice.call(value) : []; -}); -//# sourceMappingURL=to-array.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/to-degree.js": -/*!**************************************************!*\ - !*** ./node_modules/@antv/util/esm/to-degree.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var DEGREE = 180 / Math.PI; -var toDegree = function (radian) { - return DEGREE * radian; -}; -/* harmony default export */ __webpack_exports__["default"] = (toDegree); -//# sourceMappingURL=to-degree.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/to-integer.js": -/*!***************************************************!*\ - !*** ./node_modules/@antv/util/esm/to-integer.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (parseInt); -//# sourceMappingURL=to-integer.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/to-radian.js": -/*!**************************************************!*\ - !*** ./node_modules/@antv/util/esm/to-radian.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var RADIAN = Math.PI / 180; -var toRadian = function (degree) { - return RADIAN * degree; -}; -/* harmony default export */ __webpack_exports__["default"] = (toRadian); -//# sourceMappingURL=to-radian.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/to-string.js": -/*!**************************************************!*\ - !*** ./node_modules/@antv/util/esm/to-string.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _is_nil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-nil */ "./node_modules/@antv/util/esm/is-nil.js"); - -/* harmony default export */ __webpack_exports__["default"] = (function (value) { - if (Object(_is_nil__WEBPACK_IMPORTED_MODULE_0__["default"])(value)) - return ''; - return value.toString(); -}); -//# sourceMappingURL=to-string.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/union.js": -/*!**********************************************!*\ - !*** ./node_modules/@antv/util/esm/union.js ***! - \**********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _uniq__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./uniq */ "./node_modules/@antv/util/esm/uniq.js"); - -var union = function () { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - return Object(_uniq__WEBPACK_IMPORTED_MODULE_0__["default"])([].concat.apply([], sources)); -}; -/* harmony default export */ __webpack_exports__["default"] = (union); -//# sourceMappingURL=union.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/uniq.js": -/*!*********************************************!*\ - !*** ./node_modules/@antv/util/esm/uniq.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./contains */ "./node_modules/@antv/util/esm/contains.js"); -/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./each */ "./node_modules/@antv/util/esm/each.js"); - - -var uniq = function (arr) { - var resultArr = []; - Object(_each__WEBPACK_IMPORTED_MODULE_1__["default"])(arr, function (item) { - if (!Object(_contains__WEBPACK_IMPORTED_MODULE_0__["default"])(resultArr, item)) { - resultArr.push(item); - } - }); - return resultArr; -}; -/* harmony default export */ __webpack_exports__["default"] = (uniq); -//# sourceMappingURL=uniq.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/unique-id.js": -/*!**************************************************!*\ - !*** ./node_modules/@antv/util/esm/unique-id.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var map = {}; -/* harmony default export */ __webpack_exports__["default"] = (function (prefix) { - prefix = prefix || 'g'; - if (!map[prefix]) { - map[prefix] = 1; - } - else { - map[prefix] += 1; - } - return prefix + map[prefix]; -}); -//# sourceMappingURL=unique-id.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/upper-case.js": -/*!***************************************************!*\ - !*** ./node_modules/@antv/util/esm/upper-case.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./to-string */ "./node_modules/@antv/util/esm/to-string.js"); - -var upperCase = function (str) { - return Object(_to_string__WEBPACK_IMPORTED_MODULE_0__["default"])(str).toUpperCase(); -}; -/* harmony default export */ __webpack_exports__["default"] = (upperCase); -//# sourceMappingURL=upper-case.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/upper-first.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/util/esm/upper-first.js ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./to-string */ "./node_modules/@antv/util/esm/to-string.js"); - -var upperFirst = function (value) { - var str = Object(_to_string__WEBPACK_IMPORTED_MODULE_0__["default"])(value); - return str.charAt(0).toUpperCase() + str.substring(1); -}; -/* harmony default export */ __webpack_exports__["default"] = (upperFirst); -//# sourceMappingURL=upper-first.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/values-of-key.js": -/*!******************************************************!*\ - !*** ./node_modules/@antv/util/esm/values-of-key.js ***! - \******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./each */ "./node_modules/@antv/util/esm/each.js"); -/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-array */ "./node_modules/@antv/util/esm/is-array.js"); -/* harmony import */ var _is_nil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-nil */ "./node_modules/@antv/util/esm/is-nil.js"); - - - -/* harmony default export */ __webpack_exports__["default"] = (function (data, name) { - var rst = []; - var tmpMap = {}; - data.forEach(function (obj) { - var value = obj[name]; - if (!Object(_is_nil__WEBPACK_IMPORTED_MODULE_2__["default"])(value)) { - // flatten - if (!Object(_is_array__WEBPACK_IMPORTED_MODULE_1__["default"])(value)) { - value = [value]; - } - Object(_each__WEBPACK_IMPORTED_MODULE_0__["default"])(value, function (val) { - // unique - if (!tmpMap[val]) { - rst.push(val); - tmpMap[val] = true; - } - }); - } - }); - return rst; -}); -//# sourceMappingURL=values-of-key.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/values.js": -/*!***********************************************!*\ - !*** ./node_modules/@antv/util/esm/values.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./each */ "./node_modules/@antv/util/esm/each.js"); -/* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-function */ "./node_modules/@antv/util/esm/is-function.js"); - - -// @ts-ignore -var values = Object.values ? function (obj) { return Object.values(obj); } : function (obj) { - var result = []; - Object(_each__WEBPACK_IMPORTED_MODULE_0__["default"])(obj, function (value, key) { - if (!(Object(_is_function__WEBPACK_IMPORTED_MODULE_1__["default"])(obj) && key === 'prototype')) { - result.push(value); - } - }); - return result; -}; -/* harmony default export */ __webpack_exports__["default"] = (values); -//# sourceMappingURL=values.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/esm/wrap-behavior.js": -/*!******************************************************!*\ - !*** ./node_modules/@antv/util/esm/wrap-behavior.js ***! - \******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/** - * 封装事件,便于使用上下文this,和便于解除事件时使用 - * @protected - * @param {Object} obj 对象 - * @param {String} action 事件名称 - * @return {Function} 返回事件处理函数 - */ -function wrapBehavior(obj, action) { - if (obj['_wrap_' + action]) { - return obj['_wrap_' + action]; - } - var method = function (e) { - obj[action](e); - }; - obj['_wrap_' + action] = method; - return method; -} -/* harmony default export */ __webpack_exports__["default"] = (wrapBehavior); -//# sourceMappingURL=wrap-behavior.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/lib/each.js": -/*!*********************************************!*\ - !*** ./node_modules/@antv/util/lib/each.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var is_array_1 = __webpack_require__(/*! ./is-array */ "./node_modules/@antv/util/lib/is-array.js"); -var is_object_1 = __webpack_require__(/*! ./is-object */ "./node_modules/@antv/util/lib/is-object.js"); -function each(elements, func) { - if (!elements) { - return; - } - var rst; - if (is_array_1.default(elements)) { - for (var i = 0, len = elements.length; i < len; i++) { - rst = func(elements[i], i); - if (rst === false) { - break; - } - } - } - else if (is_object_1.default(elements)) { - for (var k in elements) { - if (elements.hasOwnProperty(k)) { - rst = func(elements[k], k); - if (rst === false) { - break; - } - } - } - } -} -exports.default = each; -//# sourceMappingURL=each.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/lib/is-array-like.js": -/*!******************************************************!*\ - !*** ./node_modules/@antv/util/lib/is-array-like.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var isArrayLike = function (value) { - /** - * isArrayLike([1, 2, 3]) => true - * isArrayLike(document.body.children) => true - * isArrayLike('abc') => true - * isArrayLike(Function) => false - */ - return value !== null && typeof value !== 'function' && isFinite(value.length); -}; -exports.default = isArrayLike; -//# sourceMappingURL=is-array-like.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/lib/is-array.js": -/*!*************************************************!*\ - !*** ./node_modules/@antv/util/lib/is-array.js ***! - \*************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var is_type_1 = __webpack_require__(/*! ./is-type */ "./node_modules/@antv/util/lib/is-type.js"); -exports.default = (function (value) { - return Array.isArray ? - Array.isArray(value) : - is_type_1.default(value, 'Array'); -}); -//# sourceMappingURL=is-array.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/lib/is-equal.js": -/*!*************************************************!*\ - !*** ./node_modules/@antv/util/lib/is-equal.js ***! - \*************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var is_object_like_1 = __webpack_require__(/*! ./is-object-like */ "./node_modules/@antv/util/lib/is-object-like.js"); -var is_array_like_1 = __webpack_require__(/*! ./is-array-like */ "./node_modules/@antv/util/lib/is-array-like.js"); -var is_string_1 = __webpack_require__(/*! ./is-string */ "./node_modules/@antv/util/lib/is-string.js"); -var isEqual = function (value, other) { - if (value === other) { - return true; - } - if (!value || !other) { - return false; - } - if (is_string_1.default(value) || is_string_1.default(other)) { - return false; - } - if (is_array_like_1.default(value) || is_array_like_1.default(other)) { - if (value.length !== other.length) { - return false; - } - var rst = true; - for (var i = 0; i < value.length; i++) { - rst = isEqual(value[i], other[i]); - if (!rst) { - break; - } - } - return rst; - } - if (is_object_like_1.default(value) || is_object_like_1.default(other)) { - var valueKeys = Object.keys(value); - var otherKeys = Object.keys(other); - if (valueKeys.length !== otherKeys.length) { - return false; - } - var rst = true; - for (var i = 0; i < valueKeys.length; i++) { - rst = isEqual(value[valueKeys[i]], other[valueKeys[i]]); - if (!rst) { - break; - } - } - return rst; - } - return false; -}; -exports.default = isEqual; -//# sourceMappingURL=is-equal.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/lib/is-function.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/util/lib/is-function.js ***! - \****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * 是否为函数 - * @param {*} fn 对象 - * @return {Boolean} 是否函数 - */ -var is_type_1 = __webpack_require__(/*! ./is-type */ "./node_modules/@antv/util/lib/is-type.js"); -exports.default = (function (value) { - return is_type_1.default(value, 'Function'); -}); -//# sourceMappingURL=is-function.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/lib/is-nil.js": -/*!***********************************************!*\ - !*** ./node_modules/@antv/util/lib/is-nil.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -// isFinite, -var isNil = function (value) { - /** - * isNil(null) => true - * isNil() => true - */ - return value === null || value === undefined; -}; -exports.default = isNil; -//# sourceMappingURL=is-nil.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/lib/is-object-like.js": -/*!*******************************************************!*\ - !*** ./node_modules/@antv/util/lib/is-object-like.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var isObjectLike = function (value) { - /** - * isObjectLike({}) => true - * isObjectLike([1, 2, 3]) => true - * isObjectLike(Function) => false - * isObjectLike(null) => false - */ - return typeof value === 'object' && value !== null; -}; -exports.default = isObjectLike; -//# sourceMappingURL=is-object-like.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/lib/is-object.js": -/*!**************************************************!*\ - !*** ./node_modules/@antv/util/lib/is-object.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = (function (value) { - /** - * isObject({}) => true - * isObject([1, 2, 3]) => true - * isObject(Function) => true - * isObject(null) => false - */ - var type = typeof value; - return value !== null && type === 'object' || type === 'function'; -}); -//# sourceMappingURL=is-object.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/lib/is-string.js": -/*!**************************************************!*\ - !*** ./node_modules/@antv/util/lib/is-string.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var is_type_1 = __webpack_require__(/*! ./is-type */ "./node_modules/@antv/util/lib/is-type.js"); -exports.default = (function (str) { - return is_type_1.default(str, 'String'); -}); -//# sourceMappingURL=is-string.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/lib/is-type.js": -/*!************************************************!*\ - !*** ./node_modules/@antv/util/lib/is-type.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var toString = {}.toString; -var isType = function (value, type) { return toString.call(value) === '[object ' + type + ']'; }; -exports.default = isType; -//# sourceMappingURL=is-type.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/lib/mix.js": -/*!********************************************!*\ - !*** ./node_modules/@antv/util/lib/mix.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -// FIXME: Mutable param should be forbidden in static lang. -function _mix(dist, obj) { - for (var key in obj) { - if (obj.hasOwnProperty(key) && key !== 'constructor' && obj[key] !== undefined) { - dist[key] = obj[key]; - } - } -} -function mix(dist, src1, src2, src3) { - if (src1) - _mix(dist, src1); - if (src2) - _mix(dist, src2); - if (src3) - _mix(dist, src3); - return dist; -} -exports.default = mix; -//# sourceMappingURL=mix.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/lib/mod.js": -/*!********************************************!*\ - !*** ./node_modules/@antv/util/lib/mod.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var mod = function (n, m) { - return ((n % m) + m) % m; -}; -exports.default = mod; -//# sourceMappingURL=mod.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/lib/to-radian.js": -/*!**************************************************!*\ - !*** ./node_modules/@antv/util/lib/to-radian.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var RADIAN = Math.PI / 180; -var toRadian = function (degree) { - return RADIAN * degree; -}; -exports.default = toRadian; -//# sourceMappingURL=to-radian.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/lib/to-string.js": -/*!**************************************************!*\ - !*** ./node_modules/@antv/util/lib/to-string.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var is_nil_1 = __webpack_require__(/*! ./is-nil */ "./node_modules/@antv/util/lib/is-nil.js"); -exports.default = (function (value) { - if (is_nil_1.default(value)) - return ''; - return value.toString(); -}); -//# sourceMappingURL=to-string.js.map - -/***/ }), - -/***/ "./node_modules/@antv/util/lib/upper-first.js": -/*!****************************************************!*\ - !*** ./node_modules/@antv/util/lib/upper-first.js ***! - \****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var to_string_1 = __webpack_require__(/*! ./to-string */ "./node_modules/@antv/util/lib/to-string.js"); -var upperFirst = function (value) { - var str = to_string_1.default(value); - return str.charAt(0).toUpperCase() + str.substring(1); -}; -exports.default = upperFirst; -//# sourceMappingURL=upper-first.js.map - -/***/ }), - -/***/ "./node_modules/d3-color/src/color.js": -/*!********************************************!*\ - !*** ./node_modules/d3-color/src/color.js ***! - \********************************************/ -/*! exports provided: Color, darker, brighter, default, rgbConvert, rgb, Rgb, hslConvert, hsl */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "darker", function() { return darker; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brighter", function() { return brighter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return color; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbConvert", function() { return rgbConvert; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgb", function() { return rgb; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rgb", function() { return Rgb; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hslConvert", function() { return hslConvert; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hsl", function() { return hsl; }); -/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ "./node_modules/d3-color/src/define.js"); - - -function Color() {} - -var darker = 0.7; -var brighter = 1 / darker; - -var reI = "\\s*([+-]?\\d+)\\s*", - reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", - reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", - reHex = /^#([0-9a-f]{3,8})$/, - reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"), - reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"), - reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"), - reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"), - reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"), - reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$"); - -var named = { - aliceblue: 0xf0f8ff, - antiquewhite: 0xfaebd7, - aqua: 0x00ffff, - aquamarine: 0x7fffd4, - azure: 0xf0ffff, - beige: 0xf5f5dc, - bisque: 0xffe4c4, - black: 0x000000, - blanchedalmond: 0xffebcd, - blue: 0x0000ff, - blueviolet: 0x8a2be2, - brown: 0xa52a2a, - burlywood: 0xdeb887, - cadetblue: 0x5f9ea0, - chartreuse: 0x7fff00, - chocolate: 0xd2691e, - coral: 0xff7f50, - cornflowerblue: 0x6495ed, - cornsilk: 0xfff8dc, - crimson: 0xdc143c, - cyan: 0x00ffff, - darkblue: 0x00008b, - darkcyan: 0x008b8b, - darkgoldenrod: 0xb8860b, - darkgray: 0xa9a9a9, - darkgreen: 0x006400, - darkgrey: 0xa9a9a9, - darkkhaki: 0xbdb76b, - darkmagenta: 0x8b008b, - darkolivegreen: 0x556b2f, - darkorange: 0xff8c00, - darkorchid: 0x9932cc, - darkred: 0x8b0000, - darksalmon: 0xe9967a, - darkseagreen: 0x8fbc8f, - darkslateblue: 0x483d8b, - darkslategray: 0x2f4f4f, - darkslategrey: 0x2f4f4f, - darkturquoise: 0x00ced1, - darkviolet: 0x9400d3, - deeppink: 0xff1493, - deepskyblue: 0x00bfff, - dimgray: 0x696969, - dimgrey: 0x696969, - dodgerblue: 0x1e90ff, - firebrick: 0xb22222, - floralwhite: 0xfffaf0, - forestgreen: 0x228b22, - fuchsia: 0xff00ff, - gainsboro: 0xdcdcdc, - ghostwhite: 0xf8f8ff, - gold: 0xffd700, - goldenrod: 0xdaa520, - gray: 0x808080, - green: 0x008000, - greenyellow: 0xadff2f, - grey: 0x808080, - honeydew: 0xf0fff0, - hotpink: 0xff69b4, - indianred: 0xcd5c5c, - indigo: 0x4b0082, - ivory: 0xfffff0, - khaki: 0xf0e68c, - lavender: 0xe6e6fa, - lavenderblush: 0xfff0f5, - lawngreen: 0x7cfc00, - lemonchiffon: 0xfffacd, - lightblue: 0xadd8e6, - lightcoral: 0xf08080, - lightcyan: 0xe0ffff, - lightgoldenrodyellow: 0xfafad2, - lightgray: 0xd3d3d3, - lightgreen: 0x90ee90, - lightgrey: 0xd3d3d3, - lightpink: 0xffb6c1, - lightsalmon: 0xffa07a, - lightseagreen: 0x20b2aa, - lightskyblue: 0x87cefa, - lightslategray: 0x778899, - lightslategrey: 0x778899, - lightsteelblue: 0xb0c4de, - lightyellow: 0xffffe0, - lime: 0x00ff00, - limegreen: 0x32cd32, - linen: 0xfaf0e6, - magenta: 0xff00ff, - maroon: 0x800000, - mediumaquamarine: 0x66cdaa, - mediumblue: 0x0000cd, - mediumorchid: 0xba55d3, - mediumpurple: 0x9370db, - mediumseagreen: 0x3cb371, - mediumslateblue: 0x7b68ee, - mediumspringgreen: 0x00fa9a, - mediumturquoise: 0x48d1cc, - mediumvioletred: 0xc71585, - midnightblue: 0x191970, - mintcream: 0xf5fffa, - mistyrose: 0xffe4e1, - moccasin: 0xffe4b5, - navajowhite: 0xffdead, - navy: 0x000080, - oldlace: 0xfdf5e6, - olive: 0x808000, - olivedrab: 0x6b8e23, - orange: 0xffa500, - orangered: 0xff4500, - orchid: 0xda70d6, - palegoldenrod: 0xeee8aa, - palegreen: 0x98fb98, - paleturquoise: 0xafeeee, - palevioletred: 0xdb7093, - papayawhip: 0xffefd5, - peachpuff: 0xffdab9, - peru: 0xcd853f, - pink: 0xffc0cb, - plum: 0xdda0dd, - powderblue: 0xb0e0e6, - purple: 0x800080, - rebeccapurple: 0x663399, - red: 0xff0000, - rosybrown: 0xbc8f8f, - royalblue: 0x4169e1, - saddlebrown: 0x8b4513, - salmon: 0xfa8072, - sandybrown: 0xf4a460, - seagreen: 0x2e8b57, - seashell: 0xfff5ee, - sienna: 0xa0522d, - silver: 0xc0c0c0, - skyblue: 0x87ceeb, - slateblue: 0x6a5acd, - slategray: 0x708090, - slategrey: 0x708090, - snow: 0xfffafa, - springgreen: 0x00ff7f, - steelblue: 0x4682b4, - tan: 0xd2b48c, - teal: 0x008080, - thistle: 0xd8bfd8, - tomato: 0xff6347, - turquoise: 0x40e0d0, - violet: 0xee82ee, - wheat: 0xf5deb3, - white: 0xffffff, - whitesmoke: 0xf5f5f5, - yellow: 0xffff00, - yellowgreen: 0x9acd32 -}; - -Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Color, color, { - copy: function(channels) { - return Object.assign(new this.constructor, this, channels); - }, - displayable: function() { - return this.rgb().displayable(); - }, - hex: color_formatHex, // Deprecated! Use color.formatHex. - formatHex: color_formatHex, - formatHsl: color_formatHsl, - formatRgb: color_formatRgb, - toString: color_formatRgb -}); - -function color_formatHex() { - return this.rgb().formatHex(); -} - -function color_formatHsl() { - return hslConvert(this).formatHsl(); -} - -function color_formatRgb() { - return this.rgb().formatRgb(); -} - -function color(format) { - var m, l; - format = (format + "").trim().toLowerCase(); - return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000 - : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00 - : l === 8 ? new Rgb(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000 - : l === 4 ? new Rgb((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000 - : null) // invalid hex - : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) - : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) - : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) - : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) - : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) - : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) - : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins - : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) - : null; -} - -function rgbn(n) { - return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); -} - -function rgba(r, g, b, a) { - if (a <= 0) r = g = b = NaN; - return new Rgb(r, g, b, a); -} - -function rgbConvert(o) { - if (!(o instanceof Color)) o = color(o); - if (!o) return new Rgb; - o = o.rgb(); - return new Rgb(o.r, o.g, o.b, o.opacity); -} - -function rgb(r, g, b, opacity) { - return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); -} - -function Rgb(r, g, b, opacity) { - this.r = +r; - this.g = +g; - this.b = +b; - this.opacity = +opacity; -} - -Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Rgb, rgb, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); - }, - rgb: function() { - return this; - }, - displayable: function() { - return (-0.5 <= this.r && this.r < 255.5) - && (-0.5 <= this.g && this.g < 255.5) - && (-0.5 <= this.b && this.b < 255.5) - && (0 <= this.opacity && this.opacity <= 1); - }, - hex: rgb_formatHex, // Deprecated! Use color.formatHex. - formatHex: rgb_formatHex, - formatRgb: rgb_formatRgb, - toString: rgb_formatRgb -})); - -function rgb_formatHex() { - return "#" + hex(this.r) + hex(this.g) + hex(this.b); -} - -function rgb_formatRgb() { - var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); - return (a === 1 ? "rgb(" : "rgba(") - + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " - + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " - + Math.max(0, Math.min(255, Math.round(this.b) || 0)) - + (a === 1 ? ")" : ", " + a + ")"); -} - -function hex(value) { - value = Math.max(0, Math.min(255, Math.round(value) || 0)); - return (value < 16 ? "0" : "") + value.toString(16); -} - -function hsla(h, s, l, a) { - if (a <= 0) h = s = l = NaN; - else if (l <= 0 || l >= 1) h = s = NaN; - else if (s <= 0) h = NaN; - return new Hsl(h, s, l, a); -} - -function hslConvert(o) { - if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity); - if (!(o instanceof Color)) o = color(o); - if (!o) return new Hsl; - if (o instanceof Hsl) return o; - o = o.rgb(); - var r = o.r / 255, - g = o.g / 255, - b = o.b / 255, - min = Math.min(r, g, b), - max = Math.max(r, g, b), - h = NaN, - s = max - min, - l = (max + min) / 2; - if (s) { - if (r === max) h = (g - b) / s + (g < b) * 6; - else if (g === max) h = (b - r) / s + 2; - else h = (r - g) / s + 4; - s /= l < 0.5 ? max + min : 2 - max - min; - h *= 60; - } else { - s = l > 0 && l < 1 ? 0 : h; - } - return new Hsl(h, s, l, o.opacity); -} - -function hsl(h, s, l, opacity) { - return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); -} - -function Hsl(h, s, l, opacity) { - this.h = +h; - this.s = +s; - this.l = +l; - this.opacity = +opacity; -} - -Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Hsl, hsl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Hsl(this.h, this.s, this.l * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Hsl(this.h, this.s, this.l * k, this.opacity); - }, - rgb: function() { - var h = this.h % 360 + (this.h < 0) * 360, - s = isNaN(h) || isNaN(this.s) ? 0 : this.s, - l = this.l, - m2 = l + (l < 0.5 ? l : 1 - l) * s, - m1 = 2 * l - m2; - return new Rgb( - hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), - hsl2rgb(h, m1, m2), - hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), - this.opacity - ); - }, - displayable: function() { - return (0 <= this.s && this.s <= 1 || isNaN(this.s)) - && (0 <= this.l && this.l <= 1) - && (0 <= this.opacity && this.opacity <= 1); - }, - formatHsl: function() { - var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); - return (a === 1 ? "hsl(" : "hsla(") - + (this.h || 0) + ", " - + (this.s || 0) * 100 + "%, " - + (this.l || 0) * 100 + "%" - + (a === 1 ? ")" : ", " + a + ")"); - } -})); - -/* From FvD 13.37, CSS Color Module Level 3 */ -function hsl2rgb(h, m1, m2) { - return (h < 60 ? m1 + (m2 - m1) * h / 60 - : h < 180 ? m2 - : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 - : m1) * 255; -} - - -/***/ }), - -/***/ "./node_modules/d3-color/src/cubehelix.js": -/*!************************************************!*\ - !*** ./node_modules/d3-color/src/cubehelix.js ***! - \************************************************/ -/*! exports provided: default, Cubehelix */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return cubehelix; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cubehelix", function() { return Cubehelix; }); -/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ "./node_modules/d3-color/src/define.js"); -/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-color/src/color.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-color/src/math.js"); - - - - -var A = -0.14861, - B = +1.78277, - C = -0.29227, - D = -0.90649, - E = +1.97294, - ED = E * D, - EB = E * B, - BC_DA = B * C - D * A; - -function cubehelixConvert(o) { - if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity); - if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["rgbConvert"])(o); - var r = o.r / 255, - g = o.g / 255, - b = o.b / 255, - l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB), - bl = b - l, - k = (E * (g - l) - C * bl) / D, - s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1 - h = s ? Math.atan2(k, bl) * _math_js__WEBPACK_IMPORTED_MODULE_2__["rad2deg"] - 120 : NaN; - return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity); -} - -function cubehelix(h, s, l, opacity) { - return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity); -} - -function Cubehelix(h, s, l, opacity) { - this.h = +h; - this.s = +s; - this.l = +l; - this.opacity = +opacity; -} - -Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Cubehelix, cubehelix, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"], { - brighter: function(k) { - k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__["brighter"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__["brighter"], k); - return new Cubehelix(this.h, this.s, this.l * k, this.opacity); - }, - darker: function(k) { - k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__["darker"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__["darker"], k); - return new Cubehelix(this.h, this.s, this.l * k, this.opacity); - }, - rgb: function() { - var h = isNaN(this.h) ? 0 : (this.h + 120) * _math_js__WEBPACK_IMPORTED_MODULE_2__["deg2rad"], - l = +this.l, - a = isNaN(this.s) ? 0 : this.s * l * (1 - l), - cosh = Math.cos(h), - sinh = Math.sin(h); - return new _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"]( - 255 * (l + a * (A * cosh + B * sinh)), - 255 * (l + a * (C * cosh + D * sinh)), - 255 * (l + a * (E * cosh)), - this.opacity - ); - } -})); - - -/***/ }), - -/***/ "./node_modules/d3-color/src/define.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-color/src/define.js ***! - \*********************************************/ -/*! exports provided: default, extend */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return extend; }); -/* harmony default export */ __webpack_exports__["default"] = (function(constructor, factory, prototype) { - constructor.prototype = factory.prototype = prototype; - prototype.constructor = constructor; -}); - -function extend(parent, definition) { - var prototype = Object.create(parent.prototype); - for (var key in definition) prototype[key] = definition[key]; - return prototype; -} - - -/***/ }), - -/***/ "./node_modules/d3-color/src/index.js": -/*!********************************************!*\ - !*** ./node_modules/d3-color/src/index.js ***! - \********************************************/ -/*! exports provided: color, rgb, hsl, lab, hcl, lch, gray, cubehelix */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-color/src/color.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "color", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rgb", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__["rgb"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hsl", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__["hsl"]; }); - -/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lab.js */ "./node_modules/d3-color/src/lab.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lab", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hcl", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["hcl"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lch", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["lch"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gray", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["gray"]; }); - -/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubehelix.js */ "./node_modules/d3-color/src/cubehelix.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cubehelix", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - - - - - - -/***/ }), - -/***/ "./node_modules/d3-color/src/lab.js": -/*!******************************************!*\ - !*** ./node_modules/d3-color/src/lab.js ***! - \******************************************/ -/*! exports provided: gray, default, Lab, lch, hcl, Hcl */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gray", function() { return gray; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lab; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Lab", function() { return Lab; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lch", function() { return lch; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hcl", function() { return hcl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hcl", function() { return Hcl; }); -/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ "./node_modules/d3-color/src/define.js"); -/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-color/src/color.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-color/src/math.js"); - - - - -// https://observablehq.com/@mbostock/lab-and-rgb -var K = 18, - Xn = 0.96422, - Yn = 1, - Zn = 0.82521, - t0 = 4 / 29, - t1 = 6 / 29, - t2 = 3 * t1 * t1, - t3 = t1 * t1 * t1; - -function labConvert(o) { - if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity); - if (o instanceof Hcl) return hcl2lab(o); - if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["rgbConvert"])(o); - var r = rgb2lrgb(o.r), - g = rgb2lrgb(o.g), - b = rgb2lrgb(o.b), - y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z; - if (r === g && g === b) x = z = y; else { - x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn); - z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn); - } - return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity); -} - -function gray(l, opacity) { - return new Lab(l, 0, 0, opacity == null ? 1 : opacity); -} - -function lab(l, a, b, opacity) { - return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity); -} - -function Lab(l, a, b, opacity) { - this.l = +l; - this.a = +a; - this.b = +b; - this.opacity = +opacity; -} - -Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Lab, lab, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"], { - brighter: function(k) { - return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity); - }, - darker: function(k) { - return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity); - }, - rgb: function() { - var y = (this.l + 16) / 116, - x = isNaN(this.a) ? y : y + this.a / 500, - z = isNaN(this.b) ? y : y - this.b / 200; - x = Xn * lab2xyz(x); - y = Yn * lab2xyz(y); - z = Zn * lab2xyz(z); - return new _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"]( - lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z), - lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z), - lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z), - this.opacity - ); - } -})); - -function xyz2lab(t) { - return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0; -} - -function lab2xyz(t) { - return t > t1 ? t * t * t : t2 * (t - t0); -} - -function lrgb2rgb(x) { - return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); -} - -function rgb2lrgb(x) { - return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4); -} - -function hclConvert(o) { - if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity); - if (!(o instanceof Lab)) o = labConvert(o); - if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity); - var h = Math.atan2(o.b, o.a) * _math_js__WEBPACK_IMPORTED_MODULE_2__["rad2deg"]; - return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity); -} - -function lch(l, c, h, opacity) { - return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity); -} - -function hcl(h, c, l, opacity) { - return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity); -} - -function Hcl(h, c, l, opacity) { - this.h = +h; - this.c = +c; - this.l = +l; - this.opacity = +opacity; -} - -function hcl2lab(o) { - if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity); - var h = o.h * _math_js__WEBPACK_IMPORTED_MODULE_2__["deg2rad"]; - return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity); -} - -Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Hcl, hcl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"], { - brighter: function(k) { - return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity); - }, - darker: function(k) { - return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity); - }, - rgb: function() { - return hcl2lab(this).rgb(); - } -})); - - -/***/ }), - -/***/ "./node_modules/d3-color/src/math.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-color/src/math.js ***! - \*******************************************/ -/*! exports provided: deg2rad, rad2deg */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deg2rad", function() { return deg2rad; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rad2deg", function() { return rad2deg; }); -var deg2rad = Math.PI / 180; -var rad2deg = 180 / Math.PI; - - -/***/ }), - -/***/ "./node_modules/d3-ease/src/back.js": -/*!******************************************!*\ - !*** ./node_modules/d3-ease/src/back.js ***! - \******************************************/ -/*! exports provided: backIn, backOut, backInOut */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "backIn", function() { return backIn; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "backOut", function() { return backOut; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "backInOut", function() { return backInOut; }); -var overshoot = 1.70158; - -var backIn = (function custom(s) { - s = +s; - - function backIn(t) { - return t * t * ((s + 1) * t - s); - } - - backIn.overshoot = custom; - - return backIn; -})(overshoot); - -var backOut = (function custom(s) { - s = +s; - - function backOut(t) { - return --t * t * ((s + 1) * t + s) + 1; - } - - backOut.overshoot = custom; - - return backOut; -})(overshoot); - -var backInOut = (function custom(s) { - s = +s; - - function backInOut(t) { - return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2; - } - - backInOut.overshoot = custom; - - return backInOut; -})(overshoot); - - -/***/ }), - -/***/ "./node_modules/d3-ease/src/bounce.js": -/*!********************************************!*\ - !*** ./node_modules/d3-ease/src/bounce.js ***! - \********************************************/ -/*! exports provided: bounceIn, bounceOut, bounceInOut */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounceIn", function() { return bounceIn; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounceOut", function() { return bounceOut; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounceInOut", function() { return bounceInOut; }); -var b1 = 4 / 11, - b2 = 6 / 11, - b3 = 8 / 11, - b4 = 3 / 4, - b5 = 9 / 11, - b6 = 10 / 11, - b7 = 15 / 16, - b8 = 21 / 22, - b9 = 63 / 64, - b0 = 1 / b1 / b1; - -function bounceIn(t) { - return 1 - bounceOut(1 - t); -} - -function bounceOut(t) { - return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9; -} - -function bounceInOut(t) { - return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2; -} - - -/***/ }), - -/***/ "./node_modules/d3-ease/src/circle.js": -/*!********************************************!*\ - !*** ./node_modules/d3-ease/src/circle.js ***! - \********************************************/ -/*! exports provided: circleIn, circleOut, circleInOut */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleIn", function() { return circleIn; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleOut", function() { return circleOut; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleInOut", function() { return circleInOut; }); -function circleIn(t) { - return 1 - Math.sqrt(1 - t * t); -} - -function circleOut(t) { - return Math.sqrt(1 - --t * t); -} - -function circleInOut(t) { - return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2; -} - - -/***/ }), - -/***/ "./node_modules/d3-ease/src/cubic.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-ease/src/cubic.js ***! - \*******************************************/ -/*! exports provided: cubicIn, cubicOut, cubicInOut */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubicIn", function() { return cubicIn; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubicOut", function() { return cubicOut; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubicInOut", function() { return cubicInOut; }); -function cubicIn(t) { - return t * t * t; -} - -function cubicOut(t) { - return --t * t * t + 1; -} - -function cubicInOut(t) { - return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2; -} - - -/***/ }), - -/***/ "./node_modules/d3-ease/src/elastic.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-ease/src/elastic.js ***! - \*********************************************/ -/*! exports provided: elasticIn, elasticOut, elasticInOut */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elasticIn", function() { return elasticIn; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elasticOut", function() { return elasticOut; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elasticInOut", function() { return elasticInOut; }); -var tau = 2 * Math.PI, - amplitude = 1, - period = 0.3; - -var elasticIn = (function custom(a, p) { - var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); - - function elasticIn(t) { - return a * Math.pow(2, 10 * --t) * Math.sin((s - t) / p); - } - - elasticIn.amplitude = function(a) { return custom(a, p * tau); }; - elasticIn.period = function(p) { return custom(a, p); }; - - return elasticIn; -})(amplitude, period); - -var elasticOut = (function custom(a, p) { - var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); - - function elasticOut(t) { - return 1 - a * Math.pow(2, -10 * (t = +t)) * Math.sin((t + s) / p); - } - - elasticOut.amplitude = function(a) { return custom(a, p * tau); }; - elasticOut.period = function(p) { return custom(a, p); }; - - return elasticOut; -})(amplitude, period); - -var elasticInOut = (function custom(a, p) { - var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); - - function elasticInOut(t) { - return ((t = t * 2 - 1) < 0 - ? a * Math.pow(2, 10 * t) * Math.sin((s - t) / p) - : 2 - a * Math.pow(2, -10 * t) * Math.sin((s + t) / p)) / 2; - } - - elasticInOut.amplitude = function(a) { return custom(a, p * tau); }; - elasticInOut.period = function(p) { return custom(a, p); }; - - return elasticInOut; -})(amplitude, period); - - -/***/ }), - -/***/ "./node_modules/d3-ease/src/exp.js": -/*!*****************************************!*\ - !*** ./node_modules/d3-ease/src/exp.js ***! - \*****************************************/ -/*! exports provided: expIn, expOut, expInOut */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expIn", function() { return expIn; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expOut", function() { return expOut; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expInOut", function() { return expInOut; }); -function expIn(t) { - return Math.pow(2, 10 * t - 10); -} - -function expOut(t) { - return 1 - Math.pow(2, -10 * t); -} - -function expInOut(t) { - return ((t *= 2) <= 1 ? Math.pow(2, 10 * t - 10) : 2 - Math.pow(2, 10 - 10 * t)) / 2; -} - - -/***/ }), - -/***/ "./node_modules/d3-ease/src/index.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-ease/src/index.js ***! - \*******************************************/ -/*! exports provided: easeLinear, easeQuad, easeQuadIn, easeQuadOut, easeQuadInOut, easeCubic, easeCubicIn, easeCubicOut, easeCubicInOut, easePoly, easePolyIn, easePolyOut, easePolyInOut, easeSin, easeSinIn, easeSinOut, easeSinInOut, easeExp, easeExpIn, easeExpOut, easeExpInOut, easeCircle, easeCircleIn, easeCircleOut, easeCircleInOut, easeBounce, easeBounceIn, easeBounceOut, easeBounceInOut, easeBack, easeBackIn, easeBackOut, easeBackInOut, easeElastic, easeElasticIn, easeElasticOut, easeElasticInOut */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ "./node_modules/d3-ease/src/linear.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeLinear", function() { return _linear_js__WEBPACK_IMPORTED_MODULE_0__["linear"]; }); - -/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./quad.js */ "./node_modules/d3-ease/src/quad.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuad", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadInOut"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadIn", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadIn"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadOut", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadOut"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadInOut", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadInOut"]; }); - -/* harmony import */ var _cubic_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubic.js */ "./node_modules/d3-ease/src/cubic.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubic", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicInOut"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicIn", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicIn"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicOut", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicOut"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicInOut", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicInOut"]; }); - -/* harmony import */ var _poly_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./poly.js */ "./node_modules/d3-ease/src/poly.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePoly", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyInOut"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyIn", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyIn"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyOut", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyOut"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyInOut", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyInOut"]; }); - -/* harmony import */ var _sin_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sin.js */ "./node_modules/d3-ease/src/sin.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSin", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinInOut"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinIn", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinIn"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinOut", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinOut"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinInOut", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinInOut"]; }); - -/* harmony import */ var _exp_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./exp.js */ "./node_modules/d3-ease/src/exp.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExp", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expInOut"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpIn", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expIn"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpOut", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expOut"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpInOut", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expInOut"]; }); - -/* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./circle.js */ "./node_modules/d3-ease/src/circle.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircle", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleInOut"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleIn", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleIn"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleOut", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleOut"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleInOut", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleInOut"]; }); - -/* harmony import */ var _bounce_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./bounce.js */ "./node_modules/d3-ease/src/bounce.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounce", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceOut"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceIn", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceIn"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceOut", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceOut"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceInOut", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceInOut"]; }); - -/* harmony import */ var _back_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./back.js */ "./node_modules/d3-ease/src/back.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBack", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backInOut"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackIn", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backIn"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackOut", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backOut"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackInOut", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backInOut"]; }); - -/* harmony import */ var _elastic_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./elastic.js */ "./node_modules/d3-ease/src/elastic.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElastic", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticOut"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticIn", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticIn"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticOut", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticOut"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticInOut", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticInOut"]; }); - - - - - - - - - - - - - - - - - - - - - - -/***/ }), - -/***/ "./node_modules/d3-ease/src/linear.js": -/*!********************************************!*\ - !*** ./node_modules/d3-ease/src/linear.js ***! - \********************************************/ -/*! exports provided: linear */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linear", function() { return linear; }); -function linear(t) { - return +t; -} - - -/***/ }), - -/***/ "./node_modules/d3-ease/src/poly.js": -/*!******************************************!*\ - !*** ./node_modules/d3-ease/src/poly.js ***! - \******************************************/ -/*! exports provided: polyIn, polyOut, polyInOut */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyIn", function() { return polyIn; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyOut", function() { return polyOut; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyInOut", function() { return polyInOut; }); -var exponent = 3; - -var polyIn = (function custom(e) { - e = +e; - - function polyIn(t) { - return Math.pow(t, e); - } - - polyIn.exponent = custom; - - return polyIn; -})(exponent); - -var polyOut = (function custom(e) { - e = +e; - - function polyOut(t) { - return 1 - Math.pow(1 - t, e); - } - - polyOut.exponent = custom; - - return polyOut; -})(exponent); - -var polyInOut = (function custom(e) { - e = +e; - - function polyInOut(t) { - return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2; - } - - polyInOut.exponent = custom; - - return polyInOut; -})(exponent); - - -/***/ }), - -/***/ "./node_modules/d3-ease/src/quad.js": -/*!******************************************!*\ - !*** ./node_modules/d3-ease/src/quad.js ***! - \******************************************/ -/*! exports provided: quadIn, quadOut, quadInOut */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quadIn", function() { return quadIn; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quadOut", function() { return quadOut; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quadInOut", function() { return quadInOut; }); -function quadIn(t) { - return t * t; -} - -function quadOut(t) { - return t * (2 - t); -} - -function quadInOut(t) { - return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2; -} - - -/***/ }), - -/***/ "./node_modules/d3-ease/src/sin.js": -/*!*****************************************!*\ - !*** ./node_modules/d3-ease/src/sin.js ***! - \*****************************************/ -/*! exports provided: sinIn, sinOut, sinInOut */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sinIn", function() { return sinIn; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sinOut", function() { return sinOut; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sinInOut", function() { return sinInOut; }); -var pi = Math.PI, - halfPi = pi / 2; - -function sinIn(t) { - return 1 - Math.cos(t * halfPi); -} - -function sinOut(t) { - return Math.sin(t * halfPi); -} - -function sinInOut(t) { - return (1 - Math.cos(pi * t)) / 2; -} - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/array.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-interpolate/src/array.js ***! - \**************************************************/ -/*! exports provided: default, genericArray */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "genericArray", function() { return genericArray; }); -/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ "./node_modules/d3-interpolate/src/value.js"); -/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./numberArray.js */ "./node_modules/d3-interpolate/src/numberArray.js"); - - - -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - return (Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_1__["isNumberArray"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_1__["default"] : genericArray)(a, b); -}); - -function genericArray(a, b) { - var nb = b ? b.length : 0, - na = a ? Math.min(nb, a.length) : 0, - x = new Array(na), - c = new Array(nb), - i; - - for (i = 0; i < na; ++i) x[i] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a[i], b[i]); - for (; i < nb; ++i) c[i] = b[i]; - - return function(t) { - for (i = 0; i < na; ++i) c[i] = x[i](t); - return c; - }; -} - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/basis.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-interpolate/src/basis.js ***! - \**************************************************/ -/*! exports provided: basis, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "basis", function() { return basis; }); -function basis(t1, v0, v1, v2, v3) { - var t2 = t1 * t1, t3 = t2 * t1; - return ((1 - 3 * t1 + 3 * t2 - t3) * v0 - + (4 - 6 * t2 + 3 * t3) * v1 - + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 - + t3 * v3) / 6; -} - -/* harmony default export */ __webpack_exports__["default"] = (function(values) { - var n = values.length - 1; - return function(t) { - var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), - v1 = values[i], - v2 = values[i + 1], - v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, - v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1; - return basis((t - i / n) * n, v0, v1, v2, v3); - }; -}); - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/basisClosed.js": -/*!********************************************************!*\ - !*** ./node_modules/d3-interpolate/src/basisClosed.js ***! - \********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ "./node_modules/d3-interpolate/src/basis.js"); - - -/* harmony default export */ __webpack_exports__["default"] = (function(values) { - var n = values.length; - return function(t) { - var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n), - v0 = values[(i + n - 1) % n], - v1 = values[i % n], - v2 = values[(i + 1) % n], - v3 = values[(i + 2) % n]; - return Object(_basis_js__WEBPACK_IMPORTED_MODULE_0__["basis"])((t - i / n) * n, v0, v1, v2, v3); - }; -}); - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/color.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-interpolate/src/color.js ***! - \**************************************************/ -/*! exports provided: hue, gamma, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hue", function() { return hue; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gamma", function() { return gamma; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nogamma; }); -/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-interpolate/src/constant.js"); - - -function linear(a, d) { - return function(t) { - return a + t * d; - }; -} - -function exponential(a, b, y) { - return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { - return Math.pow(a + t * b, y); - }; -} - -function hue(a, b) { - var d = b - a; - return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(isNaN(a) ? b : a); -} - -function gamma(y) { - return (y = +y) === 1 ? nogamma : function(a, b) { - return b - a ? exponential(a, b, y) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(isNaN(a) ? b : a); - }; -} - -function nogamma(a, b) { - var d = b - a; - return d ? linear(a, d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(isNaN(a) ? b : a); -} - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/constant.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-interpolate/src/constant.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(x) { - return function() { - return x; - }; -}); - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/cubehelix.js": -/*!******************************************************!*\ - !*** ./node_modules/d3-interpolate/src/cubehelix.js ***! - \******************************************************/ -/*! exports provided: default, cubehelixLong */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubehelixLong", function() { return cubehelixLong; }); -/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); -/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js"); - - - -function cubehelix(hue) { - return (function cubehelixGamma(y) { - y = +y; - - function cubehelix(start, end) { - var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(end)).h), - s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.s, end.s), - l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.l, end.l), - opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); - return function(t) { - start.h = h(t); - start.s = s(t); - start.l = l(Math.pow(t, y)); - start.opacity = opacity(t); - return start + ""; - }; - } - - cubehelix.gamma = cubehelixGamma; - - return cubehelix; - })(1); -} - -/* harmony default export */ __webpack_exports__["default"] = (cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__["hue"])); -var cubehelixLong = cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"]); - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/date.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-interpolate/src/date.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - var d = new Date; - return a = +a, b = +b, function(t) { - return d.setTime(a * (1 - t) + b * t), d; - }; -}); - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/discrete.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-interpolate/src/discrete.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(range) { - var n = range.length; - return function(t) { - return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))]; - }; -}); - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/hcl.js": -/*!************************************************!*\ - !*** ./node_modules/d3-interpolate/src/hcl.js ***! - \************************************************/ -/*! exports provided: default, hclLong */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hclLong", function() { return hclLong; }); -/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); -/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js"); - - - -function hcl(hue) { - return function(start, end) { - var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hcl"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hcl"])(end)).h), - c = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.c, end.c), - l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.l, end.l), - opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); - return function(t) { - start.h = h(t); - start.c = c(t); - start.l = l(t); - start.opacity = opacity(t); - return start + ""; - }; - } -} - -/* harmony default export */ __webpack_exports__["default"] = (hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__["hue"])); -var hclLong = hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"]); - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/hsl.js": -/*!************************************************!*\ - !*** ./node_modules/d3-interpolate/src/hsl.js ***! - \************************************************/ -/*! exports provided: default, hslLong */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hslLong", function() { return hslLong; }); -/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); -/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js"); - - - -function hsl(hue) { - return function(start, end) { - var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hsl"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hsl"])(end)).h), - s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.s, end.s), - l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.l, end.l), - opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); - return function(t) { - start.h = h(t); - start.s = s(t); - start.l = l(t); - start.opacity = opacity(t); - return start + ""; - }; - } -} - -/* harmony default export */ __webpack_exports__["default"] = (hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__["hue"])); -var hslLong = hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"]); - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/hue.js": -/*!************************************************!*\ - !*** ./node_modules/d3-interpolate/src/hue.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js"); - - -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - var i = Object(_color_js__WEBPACK_IMPORTED_MODULE_0__["hue"])(+a, +b); - return function(t) { - var x = i(t); - return x - 360 * Math.floor(x / 360); - }; -}); - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/index.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-interpolate/src/index.js ***! - \**************************************************/ -/*! exports provided: interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateDiscrete, interpolateHue, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, piecewise, quantize */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ "./node_modules/d3-interpolate/src/value.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolate", function() { return _value_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ "./node_modules/d3-interpolate/src/array.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateArray", function() { return _array_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - -/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basis.js */ "./node_modules/d3-interpolate/src/basis.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasis", function() { return _basis_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - -/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./basisClosed.js */ "./node_modules/d3-interpolate/src/basisClosed.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasisClosed", function() { return _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); - -/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./date.js */ "./node_modules/d3-interpolate/src/date.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDate", function() { return _date_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); - -/* harmony import */ var _discrete_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./discrete.js */ "./node_modules/d3-interpolate/src/discrete.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDiscrete", function() { return _discrete_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); - -/* harmony import */ var _hue_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./hue.js */ "./node_modules/d3-interpolate/src/hue.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHue", function() { return _hue_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); - -/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./number.js */ "./node_modules/d3-interpolate/src/number.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumber", function() { return _number_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); - -/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ "./node_modules/d3-interpolate/src/numberArray.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumberArray", function() { return _numberArray_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); - -/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./object.js */ "./node_modules/d3-interpolate/src/object.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateObject", function() { return _object_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); - -/* harmony import */ var _round_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./round.js */ "./node_modules/d3-interpolate/src/round.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRound", function() { return _round_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); - -/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./string.js */ "./node_modules/d3-interpolate/src/string.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateString", function() { return _string_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); - -/* harmony import */ var _transform_index_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./transform/index.js */ "./node_modules/d3-interpolate/src/transform/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformCss", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__["interpolateTransformCss"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformSvg", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__["interpolateTransformSvg"]; }); - -/* harmony import */ var _zoom_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./zoom.js */ "./node_modules/d3-interpolate/src/zoom.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateZoom", function() { return _zoom_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); - -/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./rgb.js */ "./node_modules/d3-interpolate/src/rgb.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgb", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasis", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__["rgbBasis"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasisClosed", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__["rgbBasisClosed"]; }); - -/* harmony import */ var _hsl_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./hsl.js */ "./node_modules/d3-interpolate/src/hsl.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHsl", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHslLong", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__["hslLong"]; }); - -/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./lab.js */ "./node_modules/d3-interpolate/src/lab.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateLab", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); - -/* harmony import */ var _hcl_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./hcl.js */ "./node_modules/d3-interpolate/src/hcl.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHcl", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHclLong", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__["hclLong"]; }); - -/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./cubehelix.js */ "./node_modules/d3-interpolate/src/cubehelix.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelix", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixLong", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__["cubehelixLong"]; }); - -/* harmony import */ var _piecewise_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./piecewise.js */ "./node_modules/d3-interpolate/src/piecewise.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "piecewise", function() { return _piecewise_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }); - -/* harmony import */ var _quantize_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./quantize.js */ "./node_modules/d3-interpolate/src/quantize.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantize", function() { return _quantize_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); - - - - - - - - - - - - - - - - - - - - - - - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/lab.js": -/*!************************************************!*\ - !*** ./node_modules/d3-interpolate/src/lab.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lab; }); -/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); -/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js"); - - - -function lab(start, end) { - var l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["lab"])(start)).l, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["lab"])(end)).l), - a = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.a, end.a), - b = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.b, end.b), - opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); - return function(t) { - start.l = l(t); - start.a = a(t); - start.b = b(t); - start.opacity = opacity(t); - return start + ""; - }; -} - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/number.js": -/*!***************************************************!*\ - !*** ./node_modules/d3-interpolate/src/number.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - return a = +a, b = +b, function(t) { - return a * (1 - t) + b * t; - }; -}); - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/numberArray.js": -/*!********************************************************!*\ - !*** ./node_modules/d3-interpolate/src/numberArray.js ***! - \********************************************************/ -/*! exports provided: default, isNumberArray */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumberArray", function() { return isNumberArray; }); -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - if (!b) b = []; - var n = a ? Math.min(b.length, a.length) : 0, - c = b.slice(), - i; - return function(t) { - for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t; - return c; - }; -}); - -function isNumberArray(x) { - return ArrayBuffer.isView(x) && !(x instanceof DataView); -} - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/object.js": -/*!***************************************************!*\ - !*** ./node_modules/d3-interpolate/src/object.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ "./node_modules/d3-interpolate/src/value.js"); - - -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - var i = {}, - c = {}, - k; - - if (a === null || typeof a !== "object") a = {}; - if (b === null || typeof b !== "object") b = {}; - - for (k in b) { - if (k in a) { - i[k] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a[k], b[k]); - } else { - c[k] = b[k]; - } - } - - return function(t) { - for (k in i) c[k] = i[k](t); - return c; - }; -}); - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/piecewise.js": -/*!******************************************************!*\ - !*** ./node_modules/d3-interpolate/src/piecewise.js ***! - \******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return piecewise; }); -function piecewise(interpolate, values) { - var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n); - while (i < n) I[i] = interpolate(v, v = values[++i]); - return function(t) { - var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n))); - return I[i](t - i); - }; -} - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/quantize.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-interpolate/src/quantize.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(interpolator, n) { - var samples = new Array(n); - for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1)); - return samples; -}); - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/rgb.js": -/*!************************************************!*\ - !*** ./node_modules/d3-interpolate/src/rgb.js ***! - \************************************************/ -/*! exports provided: default, rgbBasis, rgbBasisClosed */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbBasis", function() { return rgbBasis; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbBasisClosed", function() { return rgbBasisClosed; }); -/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); -/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ "./node_modules/d3-interpolate/src/basis.js"); -/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basisClosed.js */ "./node_modules/d3-interpolate/src/basisClosed.js"); -/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js"); - - - - - -/* harmony default export */ __webpack_exports__["default"] = ((function rgbGamma(y) { - var color = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__["gamma"])(y); - - function rgb(start, end) { - var r = color((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(start)).r, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(end)).r), - g = color(start.g, end.g), - b = color(start.b, end.b), - opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__["default"])(start.opacity, end.opacity); - return function(t) { - start.r = r(t); - start.g = g(t); - start.b = b(t); - start.opacity = opacity(t); - return start + ""; - }; - } - - rgb.gamma = rgbGamma; - - return rgb; -})(1)); - -function rgbSpline(spline) { - return function(colors) { - var n = colors.length, - r = new Array(n), - g = new Array(n), - b = new Array(n), - i, color; - for (i = 0; i < n; ++i) { - color = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(colors[i]); - r[i] = color.r || 0; - g[i] = color.g || 0; - b[i] = color.b || 0; - } - r = spline(r); - g = spline(g); - b = spline(b); - color.opacity = 1; - return function(t) { - color.r = r(t); - color.g = g(t); - color.b = b(t); - return color + ""; - }; - }; -} - -var rgbBasis = rgbSpline(_basis_js__WEBPACK_IMPORTED_MODULE_1__["default"]); -var rgbBasisClosed = rgbSpline(_basisClosed_js__WEBPACK_IMPORTED_MODULE_2__["default"]); - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/round.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-interpolate/src/round.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - return a = +a, b = +b, function(t) { - return Math.round(a * (1 - t) + b * t); - }; -}); - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/string.js": -/*!***************************************************!*\ - !*** ./node_modules/d3-interpolate/src/string.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number.js */ "./node_modules/d3-interpolate/src/number.js"); - - -var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, - reB = new RegExp(reA.source, "g"); - -function zero(b) { - return function() { - return b; - }; -} - -function one(b) { - return function(t) { - return b(t) + ""; - }; -} - -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b - am, // current match in a - bm, // current match in b - bs, // string preceding current number in b, if any - i = -1, // index in s - s = [], // string constants and placeholders - q = []; // number interpolators - - // Coerce inputs to strings. - a = a + "", b = b + ""; - - // Interpolate pairs of numbers in a & b. - while ((am = reA.exec(a)) - && (bm = reB.exec(b))) { - if ((bs = bm.index) > bi) { // a string precedes the next number in b - bs = b.slice(bi, bs); - if (s[i]) s[i] += bs; // coalesce with previous string - else s[++i] = bs; - } - if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match - if (s[i]) s[i] += bm; // coalesce with previous string - else s[++i] = bm; - } else { // interpolate non-matching numbers - s[++i] = null; - q.push({i: i, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(am, bm)}); - } - bi = reB.lastIndex; - } - - // Add remains of b. - if (bi < b.length) { - bs = b.slice(bi); - if (s[i]) s[i] += bs; // coalesce with previous string - else s[++i] = bs; - } - - // Special optimization for only a single match. - // Otherwise, interpolate each of the numbers and rejoin the string. - return s.length < 2 ? (q[0] - ? one(q[0].x) - : zero(b)) - : (b = q.length, function(t) { - for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t); - return s.join(""); - }); -}); - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/transform/decompose.js": -/*!****************************************************************!*\ - !*** ./node_modules/d3-interpolate/src/transform/decompose.js ***! - \****************************************************************/ -/*! exports provided: identity, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; }); -var degrees = 180 / Math.PI; - -var identity = { - translateX: 0, - translateY: 0, - rotate: 0, - skewX: 0, - scaleX: 1, - scaleY: 1 -}; - -/* harmony default export */ __webpack_exports__["default"] = (function(a, b, c, d, e, f) { - var scaleX, scaleY, skewX; - if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX; - if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX; - if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY; - if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX; - return { - translateX: e, - translateY: f, - rotate: Math.atan2(b, a) * degrees, - skewX: Math.atan(skewX) * degrees, - scaleX: scaleX, - scaleY: scaleY - }; -}); - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/transform/index.js": -/*!************************************************************!*\ - !*** ./node_modules/d3-interpolate/src/transform/index.js ***! - \************************************************************/ -/*! exports provided: interpolateTransformCss, interpolateTransformSvg */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformCss", function() { return interpolateTransformCss; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformSvg", function() { return interpolateTransformSvg; }); -/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../number.js */ "./node_modules/d3-interpolate/src/number.js"); -/* harmony import */ var _parse_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parse.js */ "./node_modules/d3-interpolate/src/transform/parse.js"); - - - -function interpolateTransform(parse, pxComma, pxParen, degParen) { - - function pop(s) { - return s.length ? s.pop() + " " : ""; - } - - function translate(xa, ya, xb, yb, s, q) { - if (xa !== xb || ya !== yb) { - var i = s.push("translate(", null, pxComma, null, pxParen); - q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(ya, yb)}); - } else if (xb || yb) { - s.push("translate(" + xb + pxComma + yb + pxParen); - } - } - - function rotate(a, b, s, q) { - if (a !== b) { - if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path - q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a, b)}); - } else if (b) { - s.push(pop(s) + "rotate(" + b + degParen); - } - } - - function skewX(a, b, s, q) { - if (a !== b) { - q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a, b)}); - } else if (b) { - s.push(pop(s) + "skewX(" + b + degParen); - } - } - - function scale(xa, ya, xb, yb, s, q) { - if (xa !== xb || ya !== yb) { - var i = s.push(pop(s) + "scale(", null, ",", null, ")"); - q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(ya, yb)}); - } else if (xb !== 1 || yb !== 1) { - s.push(pop(s) + "scale(" + xb + "," + yb + ")"); - } - } - - return function(a, b) { - var s = [], // string constants and placeholders - q = []; // number interpolators - a = parse(a), b = parse(b); - translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q); - rotate(a.rotate, b.rotate, s, q); - skewX(a.skewX, b.skewX, s, q); - scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q); - a = b = null; // gc - return function(t) { - var i = -1, n = q.length, o; - while (++i < n) s[(o = q[i]).i] = o.x(t); - return s.join(""); - }; - }; -} - -var interpolateTransformCss = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__["parseCss"], "px, ", "px)", "deg)"); -var interpolateTransformSvg = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__["parseSvg"], ", ", ")", ")"); - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/transform/parse.js": -/*!************************************************************!*\ - !*** ./node_modules/d3-interpolate/src/transform/parse.js ***! - \************************************************************/ -/*! exports provided: parseCss, parseSvg */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseCss", function() { return parseCss; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseSvg", function() { return parseSvg; }); -/* harmony import */ var _decompose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./decompose.js */ "./node_modules/d3-interpolate/src/transform/decompose.js"); - - -var cssNode, - cssRoot, - cssView, - svgNode; - -function parseCss(value) { - if (value === "none") return _decompose_js__WEBPACK_IMPORTED_MODULE_0__["identity"]; - if (!cssNode) cssNode = document.createElement("DIV"), cssRoot = document.documentElement, cssView = document.defaultView; - cssNode.style.transform = value; - value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue("transform"); - cssRoot.removeChild(cssNode); - value = value.slice(7, -1).split(","); - return Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]); -} - -function parseSvg(value) { - if (value == null) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__["identity"]; - if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g"); - svgNode.setAttribute("transform", value); - if (!(value = svgNode.transform.baseVal.consolidate())) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__["identity"]; - value = value.matrix; - return Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value.a, value.b, value.c, value.d, value.e, value.f); -} - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/value.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-interpolate/src/value.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); -/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rgb.js */ "./node_modules/d3-interpolate/src/rgb.js"); -/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./array.js */ "./node_modules/d3-interpolate/src/array.js"); -/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./date.js */ "./node_modules/d3-interpolate/src/date.js"); -/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number.js */ "./node_modules/d3-interpolate/src/number.js"); -/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./object.js */ "./node_modules/d3-interpolate/src/object.js"); -/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./string.js */ "./node_modules/d3-interpolate/src/string.js"); -/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-interpolate/src/constant.js"); -/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ "./node_modules/d3-interpolate/src/numberArray.js"); - - - - - - - - - - -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - var t = typeof b, c; - return b == null || t === "boolean" ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_7__["default"])(b) - : (t === "number" ? _number_js__WEBPACK_IMPORTED_MODULE_4__["default"] - : t === "string" ? ((c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["color"])(b)) ? (b = c, _rgb_js__WEBPACK_IMPORTED_MODULE_1__["default"]) : _string_js__WEBPACK_IMPORTED_MODULE_6__["default"]) - : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__["color"] ? _rgb_js__WEBPACK_IMPORTED_MODULE_1__["default"] - : b instanceof Date ? _date_js__WEBPACK_IMPORTED_MODULE_3__["default"] - : Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_8__["isNumberArray"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_8__["default"] - : Array.isArray(b) ? _array_js__WEBPACK_IMPORTED_MODULE_2__["genericArray"] - : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? _object_js__WEBPACK_IMPORTED_MODULE_5__["default"] - : _number_js__WEBPACK_IMPORTED_MODULE_4__["default"])(a, b); -}); - - -/***/ }), - -/***/ "./node_modules/d3-interpolate/src/zoom.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-interpolate/src/zoom.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var rho = Math.SQRT2, - rho2 = 2, - rho4 = 4, - epsilon2 = 1e-12; - -function cosh(x) { - return ((x = Math.exp(x)) + 1 / x) / 2; -} - -function sinh(x) { - return ((x = Math.exp(x)) - 1 / x) / 2; -} - -function tanh(x) { - return ((x = Math.exp(2 * x)) - 1) / (x + 1); -} - -// p0 = [ux0, uy0, w0] -// p1 = [ux1, uy1, w1] -/* harmony default export */ __webpack_exports__["default"] = (function(p0, p1) { - var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], - ux1 = p1[0], uy1 = p1[1], w1 = p1[2], - dx = ux1 - ux0, - dy = uy1 - uy0, - d2 = dx * dx + dy * dy, - i, - S; - - // Special case for u0 ≅ u1. - if (d2 < epsilon2) { - S = Math.log(w1 / w0) / rho; - i = function(t) { - return [ - ux0 + t * dx, - uy0 + t * dy, - w0 * Math.exp(rho * t * S) - ]; - } - } - - // General case. - else { - var d1 = Math.sqrt(d2), - b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), - b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), - r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), - r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1); - S = (r1 - r0) / rho; - i = function(t) { - var s = t * S, - coshr0 = cosh(r0), - u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0)); - return [ - ux0 + u * dx, - uy0 + u * dy, - w0 * coshr0 / cosh(rho * s + r0) - ]; - } - } - - i.duration = S * 1000; - - return i; -}); - - -/***/ }), - -/***/ "./node_modules/d3-regression/index.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-regression/index.js ***! - \*********************************************/ -/*! exports provided: regressionExp, regressionLinear, regressionLoess, regressionLog, regressionPoly, regressionPow, regressionQuad */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _src_exponential__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src/exponential */ "./node_modules/d3-regression/src/exponential.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "regressionExp", function() { return _src_exponential__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _src_linear__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/linear */ "./node_modules/d3-regression/src/linear.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "regressionLinear", function() { return _src_linear__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - -/* harmony import */ var _src_loess__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/loess */ "./node_modules/d3-regression/src/loess.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "regressionLoess", function() { return _src_loess__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - -/* harmony import */ var _src_logarithmic__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./src/logarithmic */ "./node_modules/d3-regression/src/logarithmic.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "regressionLog", function() { return _src_logarithmic__WEBPACK_IMPORTED_MODULE_3__["default"]; }); - -/* harmony import */ var _src_polynomial__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./src/polynomial */ "./node_modules/d3-regression/src/polynomial.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "regressionPoly", function() { return _src_polynomial__WEBPACK_IMPORTED_MODULE_4__["default"]; }); - -/* harmony import */ var _src_power__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./src/power */ "./node_modules/d3-regression/src/power.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "regressionPow", function() { return _src_power__WEBPACK_IMPORTED_MODULE_5__["default"]; }); - -/* harmony import */ var _src_quadratic__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./src/quadratic */ "./node_modules/d3-regression/src/quadratic.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "regressionQuad", function() { return _src_quadratic__WEBPACK_IMPORTED_MODULE_6__["default"]; }); - - - - - - - - - -/***/ }), - -/***/ "./node_modules/d3-regression/src/exponential.js": -/*!*******************************************************!*\ - !*** ./node_modules/d3-regression/src/exponential.js ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _utils_determination__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/determination */ "./node_modules/d3-regression/src/utils/determination.js"); -/* harmony import */ var _utils_interpose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/interpose */ "./node_modules/d3-regression/src/utils/interpose.js"); -/* harmony import */ var _utils_points__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/points */ "./node_modules/d3-regression/src/utils/points.js"); - - - - -/* harmony default export */ __webpack_exports__["default"] = (function() { - let x = d => d[0], - y = d => d[1], - domain; - - function exponential(data){ - let n = 0, - Y = 0, - X2Y = 0, - YLY = 0, - XYLY = 0, - XY = 0, - minX = domain ? +domain[0] : Infinity, - maxX = domain ? +domain[1] : -Infinity; - - Object(_utils_points__WEBPACK_IMPORTED_MODULE_2__["visitPoints"])(data, x, y, (dx, dy) => { - n++; - Y += dy; - X2Y += dx * dx * dy; - YLY += dy * Math.log(dy) - XYLY += dx * dy * Math.log(dy); - XY += dx * dy; - - if (!domain){ - if (dx < minX) minX = dx; - if (dx > maxX) maxX = dx; - } - }); - - const denominator = Y * X2Y - XY * XY, - a = Math.exp((X2Y * YLY - XY * XYLY) / denominator), - b = (Y * XYLY - XY * YLY) / denominator, - fn = x => a * Math.exp(b * x), - out = Object(_utils_interpose__WEBPACK_IMPORTED_MODULE_1__["interpose"])(minX, maxX, fn); - - out.a = a; - out.b = b; - out.predict = fn; - out.rSquared = Object(_utils_determination__WEBPACK_IMPORTED_MODULE_0__["determination"])(data, x, y, Y, fn); - - return out; - } - - exponential.domain = function(arr){ - return arguments.length ? (domain = arr, exponential) : domain; - } - - exponential.x = function(fn){ - return arguments.length ? (x = fn, exponential) : x; - } - - exponential.y = function(fn){ - return arguments.length ? (y = fn, exponential) : y; - } - - return exponential; -}); - -/***/ }), - -/***/ "./node_modules/d3-regression/src/linear.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-regression/src/linear.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _utils_determination__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/determination */ "./node_modules/d3-regression/src/utils/determination.js"); -/* harmony import */ var _utils_points__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/points */ "./node_modules/d3-regression/src/utils/points.js"); - - - -/* harmony default export */ __webpack_exports__["default"] = (function(){ - let x = d => d[0], - y = d => d[1], - domain; - - function linear(data){ - let n = 0, - X = 0, // sum of x - Y = 0, // sum of y - XY = 0, // sum of x * y - X2 = 0, // sum of x * x - minX = domain ? +domain[0] : Infinity, - maxX = domain ? +domain[1] : -Infinity; - - Object(_utils_points__WEBPACK_IMPORTED_MODULE_1__["visitPoints"])(data, x, y, (dx, dy) => { - ++n; - X += dx; - Y += dy; - XY += dx * dy; - X2 += dx * dx; - if (!domain){ - if (dx < minX) minX = dx; - if (dx > maxX) maxX = dx; - } - }); - - const slope = (n * XY - X * Y) / (n * X2 - X * X), - intercept = (Y - slope * X) / n, - fn = x => slope * x + intercept, - out = [[minX, fn(minX)], [maxX, fn(maxX)]]; - - out.a = slope; - out.b = intercept; - out.predict = fn; - out.rSquared = Object(_utils_determination__WEBPACK_IMPORTED_MODULE_0__["determination"])(data, x, y, Y, fn); - - return out; - } - - linear.domain = function(arr){ - return arguments.length ? (domain = arr, linear) : domain; - } - - linear.x = function(fn){ - return arguments.length ? (x = fn, linear) : x; - } - - linear.y = function(fn){ - return arguments.length ? (y = fn, linear) : y; - } - - return linear; -}); - - -/***/ }), - -/***/ "./node_modules/d3-regression/src/loess.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-regression/src/loess.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _utils_median__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/median */ "./node_modules/d3-regression/src/utils/median.js"); -/* harmony import */ var _utils_sort__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/sort */ "./node_modules/d3-regression/src/utils/sort.js"); - - - -// Adapted from science.js by Jason Davies -// Source: https://github.com/jasondavies/science.js/blob/master/src/stats/loess.js -// License: https://github.com/jasondavies/science.js/blob/master/LICENSE -/* harmony default export */ __webpack_exports__["default"] = (function() { - let x = d => d[0], - y = d => d[1], - bandwidth = .3, - robustnessIters = 2, - accuracy = 1e-12; - - function loess(data) { - const n = data.length, - bw = Math.max(2, ~~(bandwidth * n)), // # Nearest neighbors - xval = [], - yval = [], - yhat = [], - residuals = [], - robustWeights = []; - - // Slice before sort to avoid modifying input - Object(_utils_sort__WEBPACK_IMPORTED_MODULE_1__["sort"])(data = data.slice(), x); - - for (let i = 0, j = 0; i < n; ++i) { - const d = data[i], - xi = x(d, i, data), - yi = y(d, i, data); - - // Filter out points with invalid x or y values - if (xi != null && isFinite(xi) && yi != null && isFinite(yi)) { - xval[j] = xi; - yval[j] = yi; - yhat[j] = 0; - residuals[j] = 0; - robustWeights[j] = 1; - ++j; - } - } - - const m = xval.length; // # LOESS input points - - for (let iter = -1; ++iter <= robustnessIters; ) { - const interval = [0, bw - 1]; - - for (let i = 0; i < m; ++i) { - const dx = xval[i], - i0 = interval[0], - i1 = interval[1], - edge = (dx - xval[i0]) > (xval[i1] - dx) ? i0 : i1; - - let sumWeights = 0, sumX = 0, sumXSquared = 0, sumY = 0, sumXY = 0, - denom = 1 / Math.abs(xval[edge] - dx || 1); // Avoid singularity! - - for (let k = i0; k <= i1; ++k) { - const xk = xval[k], - yk = yval[k], - w = tricube(Math.abs(dx - xk) * denom) * robustWeights[k], - xkw = xk * w; - - sumWeights += w; - sumX += xkw; - sumXSquared += xk * xkw; - sumY += yk * w; - sumXY += yk * xkw; - } - - // Linear regression fit - const meanX = sumX / sumWeights, - meanY = sumY / sumWeights, - meanXY = sumXY / sumWeights, - meanXSquared = sumXSquared / sumWeights, - beta = (Math.sqrt(Math.abs(meanXSquared - meanX * meanX)) < accuracy) ? 0 : ((meanXY - meanX * meanY) / (meanXSquared - meanX * meanX)), - alpha = meanY - beta * meanX; - - yhat[i] = beta * dx + alpha; - residuals[i] = Math.abs(yval[i] - yhat[i]); - - updateInterval(xval, i + 1, interval); - } - - if (iter === robustnessIters) { - break; - } - - const medianResidual = Object(_utils_median__WEBPACK_IMPORTED_MODULE_0__["median"])(residuals); - if (Math.abs(medianResidual) < accuracy) break; - - for (let i = 0, arg, w; i < m; ++i){ - arg = residuals[i] / (6 * medianResidual); - // Default to accuracy epsilon (rather than zero) for large deviations - // keeping weights tiny but non-zero prevents singularites - robustWeights[i] = (arg >= 1) ? accuracy : ((w = 1 - arg * arg) * w); - } - } - - return output(xval, yhat); - } - - loess.bandwidth = function(bw) { - return arguments.length ? (bandwidth = bw, loess) : bandwidth; - }; - - loess.x = function(fn) { - return arguments.length ? (x = fn, loess) : x; - }; - - loess.y = function(fn) { - return arguments.length ? (y = fn, loess) : y; - }; - - return loess; -}); - -// Weighting kernel for local regression -function tricube(x) { - return (x = 1 - x * x * x) * x * x; -} - -// Advance sliding window interval of nearest neighbors -function updateInterval(xval, i, interval) { - let val = xval[i], - left = interval[0], - right = interval[1] + 1; - - if (right >= xval.length) return; - - // Step right if distance to new right edge is <= distance to old left edge. - // Step when distance is equal to ensure movement over duplicate x values. - while (i > left && (xval[right] - val) <= (val - xval[left])) { - interval[0] = ++left; - interval[1] = right; - ++right; - } -} - -// Generate smoothed output points. -// Average points with repeated x values. -function output(xval, yhat) { - const n = xval.length, - out = []; - - for (let i=0, cnt=0, prev=[], v; i d[0], - y = d => d[1], - domain; - - function logarithmic(data){ - let n = 0, - XL = 0, - XLY = 0, - Y = 0, - XL2 = 0, - minX = domain ? +domain[0] : Infinity, - maxX = domain ? +domain[1] : -Infinity; - - Object(_utils_points__WEBPACK_IMPORTED_MODULE_2__["visitPoints"])(data, x, y, (dx, dy) => { - ++n; - XL += Math.log(dx); - XLY += dy * Math.log(dx); - Y += dy; - XL2 += Math.pow(Math.log(dx), 2); - - if (!domain){ - if (dx < minX) minX = dx; - if (dx > maxX) maxX = dx; - } - }); - - const a = (n * XLY - Y * XL) / (n * XL2 - XL * XL), - b = (Y - a * XL) / n, - fn = x => a * Math.log(x) + b, - out = Object(_utils_interpose__WEBPACK_IMPORTED_MODULE_1__["interpose"])(minX, maxX, fn); - - out.a = a; - out.b = b; - out.predict = fn; - out.rSquared = Object(_utils_determination__WEBPACK_IMPORTED_MODULE_0__["determination"])(data, x, y, Y, fn); - - return out; - } - - logarithmic.domain = function(arr){ - return arguments.length ? (domain = arr, logarithmic) : domain; - } - - logarithmic.x = function(fn){ - return arguments.length ? (x = fn, logarithmic) : x; - } - - logarithmic.y = function(fn){ - return arguments.length ? (y = fn, logarithmic) : y; - } - - return logarithmic; -}); - -/***/ }), - -/***/ "./node_modules/d3-regression/src/polynomial.js": -/*!******************************************************!*\ - !*** ./node_modules/d3-regression/src/polynomial.js ***! - \******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _utils_determination__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/determination */ "./node_modules/d3-regression/src/utils/determination.js"); -/* harmony import */ var _utils_interpose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/interpose */ "./node_modules/d3-regression/src/utils/interpose.js"); -/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-regression/src/linear.js"); -/* harmony import */ var _quadratic__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./quadratic */ "./node_modules/d3-regression/src/quadratic.js"); - - - - - -// Adapted from regression-js by Tom Alexander -// Source: https://github.com/Tom-Alexander/regression-js/blob/master/src/regression.js#L246 -// License: https://github.com/Tom-Alexander/regression-js/blob/master/LICENSE -/* harmony default export */ __webpack_exports__["default"] = (function(){ - let x = d => d[0], - y = d => d[1], - order = 3, - domain; - - function polynomial(data) { - // Use more efficient methods for lower orders - if (order === 1) { - const o = Object(_linear__WEBPACK_IMPORTED_MODULE_2__["default"])().x(x).y(y).domain(domain)(data); - o.coefficients = [o.b, o.a]; - delete o.a; delete o.b; - return o; - } - if (order === 2) { - const o = Object(_quadratic__WEBPACK_IMPORTED_MODULE_3__["default"])().x(x).y(y).domain(domain)(data); - o.coefficients = [o.c, o.b, o.a]; - delete o.a; delete o.b; delete o.c; - return o; - } - - // First pass through the data - let arr = [], - ySum = 0, - minX = domain ? +domain[0] : Infinity, - maxX = domain ? +domain[1] : -Infinity, - n = data.length; - - for (let i = 0; i < n; i++){ - const d = data[i], - dx = x(d, i, data), - dy = y(d, i, data); - - // Filter out points with invalid x or y values - if (dx != null && isFinite(dx) && dy != null && isFinite(dy)) { - arr[i] = [dx, dy]; - ySum += dy; - - if (!domain){ - if (dx < minX) minX = dx; - if (dx > maxX) maxX = dx; - } - } - } - - // Update n in case there were invalid x or y values - n = arr.length; - - // Calculate the coefficients - const lhs = [], - rhs = [], - k = order + 1; - - let a = 0, - b = 0; - - for (let i = 0; i < k; i++) { - for (let l = 0; l < n; l++) { - a += Math.pow(arr[l][0], i) * arr[l][1]; - } - - lhs.push(a); - a = 0; - - const c = []; - for (let j = 0; j < k; j++) { - for (let l = 0; l < n; l++) { - b += Math.pow(arr[l][0], i + j); - } - c[j] = b; - b = 0; - } - rhs.push(c); - } - rhs.push(lhs); - - const coefficients = gaussianElimination(rhs, k), - fn = x => coefficients.reduce((sum, coeff, power) => sum + (coeff * Math.pow(x, power)), 0), - out = Object(_utils_interpose__WEBPACK_IMPORTED_MODULE_1__["interpose"])(minX, maxX, fn); - - out.coefficients = coefficients; - out.predict = fn; - out.rSquared = Object(_utils_determination__WEBPACK_IMPORTED_MODULE_0__["determination"])(data, x, y, ySum, fn); - return out; - } - - polynomial.domain = function(arr){ - return arguments.length ? (domain = arr, polynomial) : domain; - } - - polynomial.x = function(fn){ - return arguments.length ? (x = fn, polynomial) : x; - } - - polynomial.y = function(fn){ - return arguments.length ? (y = fn, polynomial) : y; - } - - polynomial.order = function(n){ - return arguments.length ? (order = n, polynomial) : order; - } - - return polynomial; -}); - -// Given an array representing a two-dimensional matrix, -// and an order parameter representing how many degrees to solve for, -// determine the solution of a system of linear equations A * x = b using -// Gaussian elimination. -function gaussianElimination(matrix, order) { - const n = matrix.length - 1, - coefficients = [order]; - - for (let i = 0; i < n; i++) { - let maxrow = i; - for (let j = i + 1; j < n; j++) { - if (Math.abs(matrix[i][j]) > Math.abs(matrix[i][maxrow])) { - maxrow = j; - } - } - - for (let k = i; k < n + 1; k++) { - const tmp = matrix[k][i]; - matrix[k][i] = matrix[k][maxrow]; - matrix[k][maxrow] = tmp; - } - - for (let j = i + 1; j < n; j++) { - for (let k = n; k >= i; k--) { - matrix[k][j] -= (matrix[k][i] * matrix[i][j]) / matrix[i][i]; - } - } - } - - for (let j = n - 1; j >= 0; j--) { - let total = 0; - for (let k = j + 1; k < n; k++) { - total += matrix[k][j] * coefficients[k]; - } - - coefficients[j] = (matrix[n][j] - total) / matrix[j][j]; - } - - return coefficients; -} - -/***/ }), - -/***/ "./node_modules/d3-regression/src/power.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-regression/src/power.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _utils_determination__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/determination */ "./node_modules/d3-regression/src/utils/determination.js"); -/* harmony import */ var _utils_interpose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/interpose */ "./node_modules/d3-regression/src/utils/interpose.js"); -/* harmony import */ var _utils_points__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/points */ "./node_modules/d3-regression/src/utils/points.js"); - - - - -/* harmony default export */ __webpack_exports__["default"] = (function() { - let x = d => d[0], - y = d => d[1], - domain; - - function power(data){ - let n = 0, - XL = 0, - XLYL = 0, - YL = 0, - XL2 = 0, - Y = 0, - minX = domain ? +domain[0] : Infinity, - maxX = domain ? +domain[1] : -Infinity; - - Object(_utils_points__WEBPACK_IMPORTED_MODULE_2__["visitPoints"])(data, x, y, (dx, dy) => { - n++; - XL += Math.log(dx); - XLYL += Math.log(dy) * Math.log(dx); - YL += Math.log(dy); - XL2 += Math.pow(Math.log(dx), 2); - Y += dy; - - if (!domain){ - if (dx < minX) minX = dx; - if (dx > maxX) maxX = dx; - } - }); - - const b = (n * XLYL - XL * YL) / (n * XL2 - Math.pow(XL, 2)), - a = Math.exp((YL - b * XL) / n), - fn = x => a * Math.pow(x, b), - out = Object(_utils_interpose__WEBPACK_IMPORTED_MODULE_1__["interpose"])(minX, maxX, fn); - - out.a = a; - out.b = b; - out.predict = fn; - out.rSquared = Object(_utils_determination__WEBPACK_IMPORTED_MODULE_0__["determination"])(data, x, y, Y, fn); - - return out; - } - - power.domain = function(arr){ - return arguments.length ? (domain = arr, power) : domain; - } - - power.x = function(fn){ - return arguments.length ? (x = fn, power) : x; - } - - power.y = function(fn){ - return arguments.length ? (y = fn, power) : y; - } - - return power; -}); - -/***/ }), - -/***/ "./node_modules/d3-regression/src/quadratic.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-regression/src/quadratic.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _utils_determination__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/determination */ "./node_modules/d3-regression/src/utils/determination.js"); -/* harmony import */ var _utils_interpose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/interpose */ "./node_modules/d3-regression/src/utils/interpose.js"); - - - -/* harmony default export */ __webpack_exports__["default"] = (function(){ - let x = d => d[0], - y = d => d[1], - domain; - - function quadratic(data){ - let n = data.length, - valid = 0, - xSum = 0, - ySum = 0, - x2Sum = 0, - x3Sum = 0, - x4Sum = 0, - xySum = 0, - x2ySum = 0, - minX = domain ? +domain[0] : Infinity, - maxX = domain ? +domain[1] : -Infinity; - - for (let i = 0; i < n; i++){ - const d = data[i], - dx = x(d, i, data), - dy = y(d, i, data), - x2Val = Math.pow(dx, 2); - - // Filter out points with invalid x or y values - if (dx != null && isFinite(dx) && dy != null && isFinite(dy)) { - valid++; - xSum += dx; - ySum += dy; - x2Sum += x2Val; - x3Sum += Math.pow(dx, 3); - x4Sum += Math.pow(dx, 4); - xySum += dx * dy; - x2ySum += x2Val * dy; - - if (!domain){ - if (dx < minX) minX = dx; - if (dx > maxX) maxX = dx; - } - } - } - - // Update n in case there were invalid x or y values - n = valid; - - const sumXX = x2Sum - (Math.pow(xSum, 2) / n), - sumXY = xySum - (xSum * ySum / n), - sumXX2 = x3Sum - (x2Sum * xSum / n), - sumX2Y = x2ySum - (x2Sum * ySum / n), - sumX2X2 = x4Sum - (Math.pow(x2Sum, 2) / n), - a = (sumX2Y * sumXX - sumXY * sumXX2) / (sumXX * sumX2X2 - Math.pow(sumXX2, 2)), - b = (sumXY * sumX2X2 - sumX2Y * sumXX2) / (sumXX * sumX2X2 - Math.pow(sumXX2, 2)), - c = (ySum / n) - (b * (xSum / n)) - (a * (x2Sum / n)), - fn = x => a * Math.pow(x, 2) + b * x + c, - out = Object(_utils_interpose__WEBPACK_IMPORTED_MODULE_1__["interpose"])(minX, maxX, fn); - - out.a = a; - out.b = b; - out.c = c; - out.predict = fn; - out.rSquared = Object(_utils_determination__WEBPACK_IMPORTED_MODULE_0__["determination"])(data, x, y, ySum, fn); - - return out; - } - - quadratic.domain = function(arr){ - return arguments.length ? (domain = arr, quadratic) : domain; - } - - quadratic.x = function(fn){ - return arguments.length ? (x = fn, quadratic) : x; - } - - quadratic.y = function(fn){ - return arguments.length ? (y = fn, quadratic) : y; - } - - return quadratic; -}); - -/***/ }), - -/***/ "./node_modules/d3-regression/src/utils/determination.js": -/*!***************************************************************!*\ - !*** ./node_modules/d3-regression/src/utils/determination.js ***! - \***************************************************************/ -/*! exports provided: determination */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "determination", function() { return determination; }); -// Given a dataset, x- and y-accessors, the sum of the y values, and a predict function, -// return the coefficient of determination, or R squared. -function determination(data, x, y, Y, predict){ - const n = data.length; - - let SSE = 0, - SST = 0; - - for (let i = 0; i < n; i++){ - const d = data[i], - dx = x(d), - dy = y(d), - yComp = predict(dx); - - SSE += Math.pow(dy - yComp, 2); - SST += Math.pow(dy - Y / n, 2); - } - - return 1 - SSE / SST; -} - -/***/ }), - -/***/ "./node_modules/d3-regression/src/utils/geometry.js": -/*!**********************************************************!*\ - !*** ./node_modules/d3-regression/src/utils/geometry.js ***! - \**********************************************************/ -/*! exports provided: angle, midpoint */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "angle", function() { return angle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "midpoint", function() { return midpoint; }); -// Returns the angle of a line in degrees. -function angle(line){ - return Math.atan2(line[1][1] - line[0][1], line[1][0] - line[0][0]) * 180 / Math.PI; -} - -// Returns the midpoint of a line. -function midpoint(line){ - return [(line[0][0] + line[1][0]) / 2, (line[0][1] + line[1][1]) / 2]; -} - -/***/ }), - -/***/ "./node_modules/d3-regression/src/utils/interpose.js": -/*!***********************************************************!*\ - !*** ./node_modules/d3-regression/src/utils/interpose.js ***! - \***********************************************************/ -/*! exports provided: interpose */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpose", function() { return interpose; }); -/* harmony import */ var _geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./geometry */ "./node_modules/d3-regression/src/utils/geometry.js"); - - -// Given a start point, an end point, and a prediciton function, -// returns a smooth line. -function interpose(minX, maxX, predict){ - const precision = .01, maxIter = 1e4; - let points = [px(minX), px(maxX)], iter = 0; - - while (find(points) && iter < maxIter); - - return points; - - function px(x){ - return [x, predict(x)]; - } - - function find(points){ - iter++; - const n = points.length; - let found = false; - - for (let i = 0; i < n - 1; i++){ - const p0 = points[i], - p1 = points[i + 1], - m = Object(_geometry__WEBPACK_IMPORTED_MODULE_0__["midpoint"])([p0, p1]), - mp = px(m[0]), - a0 = Object(_geometry__WEBPACK_IMPORTED_MODULE_0__["angle"])([p0, m]), - a1 = Object(_geometry__WEBPACK_IMPORTED_MODULE_0__["angle"])([p0, mp]), - a = Math.abs(a0 - a1); - - if (a > precision){ - points.splice(i + 1, 0, mp); - found = true; - } - } - - return found; - } -} - -/***/ }), - -/***/ "./node_modules/d3-regression/src/utils/median.js": -/*!********************************************************!*\ - !*** ./node_modules/d3-regression/src/utils/median.js ***! - \********************************************************/ -/*! exports provided: median */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "median", function() { return median; }); -// Returns the medium value of an array of numbers. -function median(arr){ - arr.sort((a, b) => a - b); - var i = arr.length / 2; - return i % 1 === 0 ? (arr[i - 1] + arr[i]) / 2 : arr[Math.floor(i)]; -} - -/***/ }), - -/***/ "./node_modules/d3-regression/src/utils/points.js": -/*!********************************************************!*\ - !*** ./node_modules/d3-regression/src/utils/points.js ***! - \********************************************************/ -/*! exports provided: visitPoints */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "visitPoints", function() { return visitPoints; }); -// Adapted from vega-statistics by Jeffrey Heer -// License: https://github.com/vega/vega/blob/f058b099decad9db78301405dd0d2e9d8ba3d51a/LICENSE -// Source: https://github.com/vega/vega/blob/f058b099decad9db78301405dd0d2e9d8ba3d51a/packages/vega-statistics/src/regression/points.js -function visitPoints(data, x, y, cb){ - let iterations = 0; - - for (let i = 0, n = data.length; i < n; i++) { - const d = data[i], - dx = x(d), - dy = y(d); - - if (dx != null && isFinite(dx) && dy != null && isFinite(dy)) { - cb(dx, dy, iterations++); - } - } -} - -/***/ }), - -/***/ "./node_modules/d3-regression/src/utils/sort.js": -/*!******************************************************!*\ - !*** ./node_modules/d3-regression/src/utils/sort.js ***! - \******************************************************/ -/*! exports provided: sort */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sort", function() { return sort; }); -// Sort an array using an accessor. -function sort(arr, fn){ - return arr.sort((a, b) => fn(a) - fn(b)); -} - -/***/ }), - -/***/ "./node_modules/d3-timer/src/index.js": -/*!********************************************!*\ - !*** ./node_modules/d3-timer/src/index.js ***! - \********************************************/ -/*! exports provided: now, timer, timerFlush, timeout, interval */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ "./node_modules/d3-timer/src/timer.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "now", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__["now"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__["timer"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timerFlush", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__["timerFlush"]; }); - -/* harmony import */ var _timeout_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./timeout.js */ "./node_modules/d3-timer/src/timeout.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _timeout_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - -/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-timer/src/interval.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return _interval_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - - - - - - - - -/***/ }), - -/***/ "./node_modules/d3-timer/src/interval.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-timer/src/interval.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ "./node_modules/d3-timer/src/timer.js"); - - -/* harmony default export */ __webpack_exports__["default"] = (function(callback, delay, time) { - var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__["Timer"], total = delay; - if (delay == null) return t.restart(callback, delay, time), t; - delay = +delay, time = time == null ? Object(_timer_js__WEBPACK_IMPORTED_MODULE_0__["now"])() : +time; - t.restart(function tick(elapsed) { - elapsed += total; - t.restart(tick, total += delay, time); - callback(elapsed); - }, delay, time); - return t; -}); - - -/***/ }), - -/***/ "./node_modules/d3-timer/src/timeout.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-timer/src/timeout.js ***! - \**********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ "./node_modules/d3-timer/src/timer.js"); - - -/* harmony default export */ __webpack_exports__["default"] = (function(callback, delay, time) { - var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__["Timer"]; - delay = delay == null ? 0 : +delay; - t.restart(function(elapsed) { - t.stop(); - callback(elapsed + delay); - }, delay, time); - return t; -}); - - -/***/ }), - -/***/ "./node_modules/d3-timer/src/timer.js": -/*!********************************************!*\ - !*** ./node_modules/d3-timer/src/timer.js ***! - \********************************************/ -/*! exports provided: now, Timer, timer, timerFlush */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "now", function() { return now; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timer", function() { return Timer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return timer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timerFlush", function() { return timerFlush; }); -var frame = 0, // is an animation frame pending? - timeout = 0, // is a timeout pending? - interval = 0, // are any timers active? - pokeDelay = 1000, // how frequently we check for clock skew - taskHead, - taskTail, - clockLast = 0, - clockNow = 0, - clockSkew = 0, - clock = typeof performance === "object" && performance.now ? performance : Date, - setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); }; - -function now() { - return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew); -} - -function clearNow() { - clockNow = 0; -} - -function Timer() { - this._call = - this._time = - this._next = null; -} - -Timer.prototype = timer.prototype = { - constructor: Timer, - restart: function(callback, delay, time) { - if (typeof callback !== "function") throw new TypeError("callback is not a function"); - time = (time == null ? now() : +time) + (delay == null ? 0 : +delay); - if (!this._next && taskTail !== this) { - if (taskTail) taskTail._next = this; - else taskHead = this; - taskTail = this; - } - this._call = callback; - this._time = time; - sleep(); - }, - stop: function() { - if (this._call) { - this._call = null; - this._time = Infinity; - sleep(); - } - } -}; - -function timer(callback, delay, time) { - var t = new Timer; - t.restart(callback, delay, time); - return t; -} - -function timerFlush() { - now(); // Get the current time, if not already set. - ++frame; // Pretend we’ve set an alarm, if we haven’t already. - var t = taskHead, e; - while (t) { - if ((e = clockNow - t._time) >= 0) t._call.call(null, e); - t = t._next; - } - --frame; -} - -function wake() { - clockNow = (clockLast = clock.now()) + clockSkew; - frame = timeout = 0; - try { - timerFlush(); - } finally { - frame = 0; - nap(); - clockNow = 0; - } -} - -function poke() { - var now = clock.now(), delay = now - clockLast; - if (delay > pokeDelay) clockSkew -= delay, clockLast = now; -} - -function nap() { - var t0, t1 = taskHead, t2, time = Infinity; - while (t1) { - if (t1._call) { - if (time > t1._time) time = t1._time; - t0 = t1, t1 = t1._next; - } else { - t2 = t1._next, t1._next = null; - t1 = t0 ? t0._next = t2 : taskHead = t2; - } - } - taskTail = t0; - sleep(time); -} - -function sleep(time) { - if (frame) return; // Soonest alarm already set, or will be. - if (timeout) timeout = clearTimeout(timeout); - var delay = time - clockNow; // Strictly less than if we recomputed clockNow. - if (delay > 24) { - if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew); - if (interval) interval = clearInterval(interval); - } else { - if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay); - frame = 1, setFrame(wake); - } -} - - -/***/ }), - -/***/ "./node_modules/fecha/src/fecha.js": -/*!*****************************************!*\ - !*** ./node_modules/fecha/src/fecha.js ***! - \*****************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/** - * Parse or format dates - * @class fecha - */ -var fecha = {}; -var token = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g; -var twoDigits = '\\d\\d?'; -var threeDigits = '\\d{3}'; -var fourDigits = '\\d{4}'; -var word = '[^\\s]+'; -var literal = /\[([^]*?)\]/gm; -var noop = function () { -}; - -function regexEscape(str) { - return str.replace( /[|\\{()[^$+*?.-]/g, '\\$&'); -} - -function shorten(arr, sLen) { - var newArr = []; - for (var i = 0, len = arr.length; i < len; i++) { - newArr.push(arr[i].substr(0, sLen)); - } - return newArr; -} - -function monthUpdate(arrName) { - return function (d, v, i18n) { - var index = i18n[arrName].indexOf(v.charAt(0).toUpperCase() + v.substr(1).toLowerCase()); - if (~index) { - d.month = index; - } - }; -} - -function pad(val, len) { - val = String(val); - len = len || 2; - while (val.length < len) { - val = '0' + val; - } - return val; -} - -var dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; -var monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; -var monthNamesShort = shorten(monthNames, 3); -var dayNamesShort = shorten(dayNames, 3); -fecha.i18n = { - dayNamesShort: dayNamesShort, - dayNames: dayNames, - monthNamesShort: monthNamesShort, - monthNames: monthNames, - amPm: ['am', 'pm'], - DoFn: function DoFn(D) { - return D + ['th', 'st', 'nd', 'rd'][D % 10 > 3 ? 0 : (D - D % 10 !== 10) * D % 10]; - } -}; - -var formatFlags = { - D: function(dateObj) { - return dateObj.getDate(); - }, - DD: function(dateObj) { - return pad(dateObj.getDate()); - }, - Do: function(dateObj, i18n) { - return i18n.DoFn(dateObj.getDate()); - }, - d: function(dateObj) { - return dateObj.getDay(); - }, - dd: function(dateObj) { - return pad(dateObj.getDay()); - }, - ddd: function(dateObj, i18n) { - return i18n.dayNamesShort[dateObj.getDay()]; - }, - dddd: function(dateObj, i18n) { - return i18n.dayNames[dateObj.getDay()]; - }, - M: function(dateObj) { - return dateObj.getMonth() + 1; - }, - MM: function(dateObj) { - return pad(dateObj.getMonth() + 1); - }, - MMM: function(dateObj, i18n) { - return i18n.monthNamesShort[dateObj.getMonth()]; - }, - MMMM: function(dateObj, i18n) { - return i18n.monthNames[dateObj.getMonth()]; - }, - YY: function(dateObj) { - return pad(String(dateObj.getFullYear()), 4).substr(2); - }, - YYYY: function(dateObj) { - return pad(dateObj.getFullYear(), 4); - }, - h: function(dateObj) { - return dateObj.getHours() % 12 || 12; - }, - hh: function(dateObj) { - return pad(dateObj.getHours() % 12 || 12); - }, - H: function(dateObj) { - return dateObj.getHours(); - }, - HH: function(dateObj) { - return pad(dateObj.getHours()); - }, - m: function(dateObj) { - return dateObj.getMinutes(); - }, - mm: function(dateObj) { - return pad(dateObj.getMinutes()); - }, - s: function(dateObj) { - return dateObj.getSeconds(); - }, - ss: function(dateObj) { - return pad(dateObj.getSeconds()); - }, - S: function(dateObj) { - return Math.round(dateObj.getMilliseconds() / 100); - }, - SS: function(dateObj) { - return pad(Math.round(dateObj.getMilliseconds() / 10), 2); - }, - SSS: function(dateObj) { - return pad(dateObj.getMilliseconds(), 3); - }, - a: function(dateObj, i18n) { - return dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1]; - }, - A: function(dateObj, i18n) { - return dateObj.getHours() < 12 ? i18n.amPm[0].toUpperCase() : i18n.amPm[1].toUpperCase(); - }, - ZZ: function(dateObj) { - var o = dateObj.getTimezoneOffset(); - return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4); - } -}; - -var parseFlags = { - D: [twoDigits, function (d, v) { - d.day = v; - }], - Do: [twoDigits + word, function (d, v) { - d.day = parseInt(v, 10); - }], - M: [twoDigits, function (d, v) { - d.month = v - 1; - }], - YY: [twoDigits, function (d, v) { - var da = new Date(), cent = +('' + da.getFullYear()).substr(0, 2); - d.year = '' + (v > 68 ? cent - 1 : cent) + v; - }], - h: [twoDigits, function (d, v) { - d.hour = v; - }], - m: [twoDigits, function (d, v) { - d.minute = v; - }], - s: [twoDigits, function (d, v) { - d.second = v; - }], - YYYY: [fourDigits, function (d, v) { - d.year = v; - }], - S: ['\\d', function (d, v) { - d.millisecond = v * 100; - }], - SS: ['\\d{2}', function (d, v) { - d.millisecond = v * 10; - }], - SSS: [threeDigits, function (d, v) { - d.millisecond = v; - }], - d: [twoDigits, noop], - ddd: [word, noop], - MMM: [word, monthUpdate('monthNamesShort')], - MMMM: [word, monthUpdate('monthNames')], - a: [word, function (d, v, i18n) { - var val = v.toLowerCase(); - if (val === i18n.amPm[0]) { - d.isPm = false; - } else if (val === i18n.amPm[1]) { - d.isPm = true; - } - }], - ZZ: ['[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z', function (d, v) { - var parts = (v + '').match(/([+-]|\d\d)/gi), minutes; - - if (parts) { - minutes = +(parts[1] * 60) + parseInt(parts[2], 10); - d.timezoneOffset = parts[0] === '+' ? minutes : -minutes; - } - }] -}; -parseFlags.dd = parseFlags.d; -parseFlags.dddd = parseFlags.ddd; -parseFlags.DD = parseFlags.D; -parseFlags.mm = parseFlags.m; -parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h; -parseFlags.MM = parseFlags.M; -parseFlags.ss = parseFlags.s; -parseFlags.A = parseFlags.a; - - -// Some common format strings -fecha.masks = { - default: 'ddd MMM DD YYYY HH:mm:ss', - shortDate: 'M/D/YY', - mediumDate: 'MMM D, YYYY', - longDate: 'MMMM D, YYYY', - fullDate: 'dddd, MMMM D, YYYY', - shortTime: 'HH:mm', - mediumTime: 'HH:mm:ss', - longTime: 'HH:mm:ss.SSS' -}; - -/*** - * Format a date - * @method format - * @param {Date|number} dateObj - * @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate' - */ -fecha.format = function (dateObj, mask, i18nSettings) { - var i18n = i18nSettings || fecha.i18n; - - if (typeof dateObj === 'number') { - dateObj = new Date(dateObj); - } - - if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) { - throw new Error('Invalid Date in fecha.format'); - } - - mask = fecha.masks[mask] || mask || fecha.masks['default']; - - var literals = []; - - // Make literals inactive by replacing them with ?? - mask = mask.replace(literal, function($0, $1) { - literals.push($1); - return '@@@'; - }); - // Apply formatting rules - mask = mask.replace(token, function ($0) { - return $0 in formatFlags ? formatFlags[$0](dateObj, i18n) : $0.slice(1, $0.length - 1); - }); - // Inline literal values back into the formatted value - return mask.replace(/@@@/g, function() { - return literals.shift(); - }); -}; - -/** - * Parse a date string into an object, changes - into / - * @method parse - * @param {string} dateStr Date string - * @param {string} format Date parse format - * @returns {Date|boolean} - */ -fecha.parse = function (dateStr, format, i18nSettings) { - var i18n = i18nSettings || fecha.i18n; - - if (typeof format !== 'string') { - throw new Error('Invalid format in fecha.parse'); - } - - format = fecha.masks[format] || format; - - // Avoid regular expression denial of service, fail early for really long strings - // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS - if (dateStr.length > 1000) { - return null; - } - - var dateInfo = {}; - var parseInfo = []; - var literals = []; - format = format.replace(literal, function($0, $1) { - literals.push($1); - return '@@@'; - }); - var newFormat = regexEscape(format).replace(token, function ($0) { - if (parseFlags[$0]) { - var info = parseFlags[$0]; - parseInfo.push(info[1]); - return '(' + info[0] + ')'; - } - - return $0; - }); - newFormat = newFormat.replace(/@@@/g, function() { - return literals.shift(); - }); - var matches = dateStr.match(new RegExp(newFormat, 'i')); - if (!matches) { - return null; - } - - for (var i = 1; i < matches.length; i++) { - parseInfo[i - 1](dateInfo, matches[i], i18n); - } - - var today = new Date(); - if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) { - dateInfo.hour = +dateInfo.hour + 12; - } else if (dateInfo.isPm === false && +dateInfo.hour === 12) { - dateInfo.hour = 0; - } - - var date; - if (dateInfo.timezoneOffset != null) { - dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset; - date = new Date(Date.UTC(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, - dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0)); - } else { - date = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, - dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0); - } - return date; -}; - -/* harmony default export */ __webpack_exports__["default"] = (fecha); - - -/***/ }), - -/***/ "./node_modules/tslib/tslib.es6.js": -/*!*****************************************!*\ - !*** ./node_modules/tslib/tslib.es6.js ***! - \*****************************************/ -/*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__extends", function() { return __extends; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__rest", function() { return __rest; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__decorate", function() { return __decorate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__param", function() { return __param; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__metadata", function() { return __metadata; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__awaiter", function() { return __awaiter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__generator", function() { return __generator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__exportStar", function() { return __exportStar; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__values", function() { return __values; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArrays", function() { return __spreadArrays; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function() { return __asyncGenerator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function() { return __asyncDelegator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncValues", function() { return __asyncValues; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__makeTemplateObject", function() { return __makeTemplateObject; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importStar", function() { return __importStar; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importDefault", function() { return __importDefault; }); -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ -/* global Reflect, Promise */ - -var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); -}; - -function __extends(d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} - -var __assign = function() { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - } - return __assign.apply(this, arguments); -} - -function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -function __decorate(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} - -function __param(paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -} - -function __metadata(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} - -function __awaiter(thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} - -function __generator(thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -} - -function __exportStar(m, exports) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} - -function __values(o) { - var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; - if (m) return m.call(o); - return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; -} - -function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -} - -function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; -} - -function __spreadArrays() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -}; - -function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); -} - -function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } -} - -function __asyncDelegator(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } -} - -function __asyncValues(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } -} - -function __makeTemplateObject(cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; -}; - -function __importStar(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result.default = mod; - return result; -} - -function __importDefault(mod) { - return (mod && mod.__esModule) ? mod : { default: mod }; -} - - -/***/ }), - -/***/ "./node_modules/warning/warning.js": -/*!*****************************************!*\ - !*** ./node_modules/warning/warning.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright (c) 2014-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - - -/** - * Similar to invariant but only logs a warning if the condition is not met. - * This can be used to log issues in development environments in critical - * paths. Removing the logging code for production environments will keep the - * same logic and follow the same code paths. - */ - -var __DEV__ = "development" !== 'production'; - -var warning = function() {}; - -if (__DEV__) { - var printWarning = function printWarning(format, args) { - var len = arguments.length; - args = new Array(len > 1 ? len - 1 : 0); - for (var key = 1; key < len; key++) { - args[key - 1] = arguments[key]; - } - var argIndex = 0; - var message = 'Warning: ' + - format.replace(/%s/g, function() { - return args[argIndex++]; - }); - if (typeof console !== 'undefined') { - console.error(message); - } - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) {} - } - - warning = function(condition, format, args) { - var len = arguments.length; - args = new Array(len > 2 ? len - 2 : 0); - for (var key = 2; key < len; key++) { - args[key - 2] = arguments[key]; - } - if (format === undefined) { - throw new Error( - '`warning(condition, format, ...args)` requires a warning ' + - 'message argument' - ); - } - if (!condition) { - printWarning.apply(null, [format].concat(args)); - } - }; -} - -module.exports = warning; - - -/***/ }) - -}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{"+fYs":function(t,e,n){window,t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=93)}([function(t,e,n){"use strict";n.r(e),n.d(e,"contains",(function(){return r})),n.d(e,"includes",(function(){return r})),n.d(e,"difference",(function(){return h})),n.d(e,"find",(function(){return m})),n.d(e,"findIndex",(function(){return x})),n.d(e,"firstValue",(function(){return b})),n.d(e,"flatten",(function(){return M})),n.d(e,"flattenDeep",(function(){return w})),n.d(e,"getRange",(function(){return O})),n.d(e,"pull",(function(){return P})),n.d(e,"pullAt",(function(){return k})),n.d(e,"reduce",(function(){return T})),n.d(e,"remove",(function(){return E})),n.d(e,"sortBy",(function(){return L})),n.d(e,"union",(function(){return D})),n.d(e,"uniq",(function(){return B})),n.d(e,"valuesOfKey",(function(){return F})),n.d(e,"head",(function(){return R})),n.d(e,"last",(function(){return N})),n.d(e,"startsWith",(function(){return Y})),n.d(e,"endsWith",(function(){return X})),n.d(e,"filter",(function(){return l})),n.d(e,"every",(function(){return G})),n.d(e,"some",(function(){return z})),n.d(e,"group",(function(){return W})),n.d(e,"groupBy",(function(){return H})),n.d(e,"groupToMap",(function(){return V})),n.d(e,"getWrapBehavior",(function(){return U})),n.d(e,"wrapBehavior",(function(){return Q})),n.d(e,"number2color",(function(){return $})),n.d(e,"parseRadius",(function(){return K})),n.d(e,"clamp",(function(){return J})),n.d(e,"fixedBase",(function(){return tt})),n.d(e,"isDecimal",(function(){return nt})),n.d(e,"isEven",(function(){return it})),n.d(e,"isInteger",(function(){return rt})),n.d(e,"isNegative",(function(){return ot})),n.d(e,"isNumberEqual",(function(){return at})),n.d(e,"isOdd",(function(){return st})),n.d(e,"isPositive",(function(){return ut})),n.d(e,"maxBy",(function(){return ct})),n.d(e,"minBy",(function(){return lt})),n.d(e,"mod",(function(){return ht})),n.d(e,"toDegree",(function(){return ft})),n.d(e,"toInteger",(function(){return dt})),n.d(e,"toRadian",(function(){return yt})),n.d(e,"forIn",(function(){return vt})),n.d(e,"has",(function(){return mt})),n.d(e,"hasKey",(function(){return xt})),n.d(e,"hasValue",(function(){return Mt})),n.d(e,"keys",(function(){return d})),n.d(e,"isMatch",(function(){return g})),n.d(e,"values",(function(){return bt})),n.d(e,"lowerCase",(function(){return wt})),n.d(e,"lowerFirst",(function(){return Ot})),n.d(e,"substitute",(function(){return Ct})),n.d(e,"upperCase",(function(){return St})),n.d(e,"upperFirst",(function(){return At})),n.d(e,"getType",(function(){return jt})),n.d(e,"isArguments",(function(){return kt})),n.d(e,"isArray",(function(){return s})),n.d(e,"isArrayLike",(function(){return i})),n.d(e,"isBoolean",(function(){return Tt})),n.d(e,"isDate",(function(){return Et})),n.d(e,"isError",(function(){return It})),n.d(e,"isFunction",(function(){return p})),n.d(e,"isFinite",(function(){return Lt})),n.d(e,"isNil",(function(){return f})),n.d(e,"isNull",(function(){return Bt})),n.d(e,"isNumber",(function(){return et})),n.d(e,"isObject",(function(){return u})),n.d(e,"isObjectLike",(function(){return y})),n.d(e,"isPlainObject",(function(){return v})),n.d(e,"isPrototype",(function(){return Ft})),n.d(e,"isRegExp",(function(){return Rt})),n.d(e,"isString",(function(){return I})),n.d(e,"isType",(function(){return a})),n.d(e,"isUndefined",(function(){return Nt})),n.d(e,"isElement",(function(){return Yt})),n.d(e,"requestAnimationFrame",(function(){return Xt})),n.d(e,"clearAnimationFrame",(function(){return Gt})),n.d(e,"augment",(function(){return Ht})),n.d(e,"clone",(function(){return Wt})),n.d(e,"debounce",(function(){return Ut})),n.d(e,"memoize",(function(){return Qt})),n.d(e,"deepMix",(function(){return $t})),n.d(e,"each",(function(){return c})),n.d(e,"extend",(function(){return Kt})),n.d(e,"indexOf",(function(){return Jt})),n.d(e,"isEmpty",(function(){return ee})),n.d(e,"isEqual",(function(){return ie})),n.d(e,"isEqualWith",(function(){return re})),n.d(e,"map",(function(){return oe})),n.d(e,"mapValues",(function(){return se})),n.d(e,"mix",(function(){return qt})),n.d(e,"assign",(function(){return qt})),n.d(e,"get",(function(){return ue})),n.d(e,"set",(function(){return ce})),n.d(e,"pick",(function(){return he})),n.d(e,"throttle",(function(){return pe})),n.d(e,"toArray",(function(){return fe})),n.d(e,"toString",(function(){return _t})),n.d(e,"uniqueId",(function(){return ge})),n.d(e,"noop",(function(){return ye})),n.d(e,"identity",(function(){return ve})),n.d(e,"size",(function(){return me})),n.d(e,"Cache",(function(){return xe}));var i=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},r=function(t,e){return!!i(t)&&t.indexOf(e)>-1},o={}.toString,a=function(t,e){return o.call(t)==="[object "+e+"]"},s=function(t){return Array.isArray?Array.isArray(t):a(t,"Array")},u=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},c=function(t,e){if(t)if(s(t))for(var n=0,i=t.length;n-1;)S.call(t,o,1);return t},j=Array.prototype.splice,k=function(t,e){if(!i(t))return[];for(var n=t?e.length:0,r=n-1;n--;){var o=void 0,a=e[n];n!==r&&a===o||(o=a,j.call(t,a,1))}return t},T=function(t,e,n){if(!s(t)&&!v(t))return t;var i=n;return c(t,(function(t,n){i=e(i,t,n)})),i},E=function(t,e){var n=[];if(!i(t))return n;for(var r=-1,o=[],a=t.length;++re[r])return 1;if(t[r]n?n:t},tt=function(t,e){var n=e.toString(),i=n.indexOf(".");if(-1===i)return Math.round(t);var r=n.substr(i+1).length;return r>20&&(r=20),parseFloat(t.toFixed(r))},et=function(t){return a(t,"Number")},nt=function(t){return et(t)&&t%1!=0},it=function(t){return et(t)&&t%2==0},rt=Number.isInteger?Number.isInteger:function(t){return et(t)&&t%1==0},ot=function(t){return et(t)&&t<0};function at(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)0},ct=function(t,e){if(s(t)){var n,i,r=t[0];return n=p(e)?e(t[0]):t[0][e],c(t,(function(t){(i=p(e)?e(t):t[e])>n&&(r=t,n=i)})),r}},lt=function(t,e){if(s(t)){var n,i,r=t[0];return n=p(e)?e(t[0]):t[0][e],c(t,(function(t){(i=p(e)?e(t):t[e])e?(i&&(clearTimeout(i),i=null),s=c,a=t.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(u,l)),a};return c.cancel=function(){clearTimeout(i),s=0,i=r=o=null},c},fe=function(t){return i(t)?Array.prototype.slice.call(t):[]},de={},ge=function(t){return de[t=t||"g"]?de[t]+=1:de[t]=1,t+de[t]},ye=function(){},ve=function(t){return t};function me(t){return f(t)?0:i(t)?t.length:Object.keys(t).length}var xe=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}()},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",(function(){return r})),n.d(e,"__assign",(function(){return o})),n.d(e,"__rest",(function(){return a})),n.d(e,"__decorate",(function(){return s})),n.d(e,"__param",(function(){return u})),n.d(e,"__metadata",(function(){return c})),n.d(e,"__awaiter",(function(){return l})),n.d(e,"__generator",(function(){return h})),n.d(e,"__exportStar",(function(){return p})),n.d(e,"__values",(function(){return f})),n.d(e,"__read",(function(){return d})),n.d(e,"__spread",(function(){return g})),n.d(e,"__spreadArrays",(function(){return y})),n.d(e,"__await",(function(){return v})),n.d(e,"__asyncGenerator",(function(){return m})),n.d(e,"__asyncDelegator",(function(){return x})),n.d(e,"__asyncValues",(function(){return b})),n.d(e,"__makeTemplateObject",(function(){return M})),n.d(e,"__importStar",(function(){return _})),n.d(e,"__importDefault",(function(){return w})),n.d(e,"__classPrivateFieldGet",(function(){return O})),n.d(e,"__classPrivateFieldSet",(function(){return C}));var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,i){e(n,i,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{u(i.next(t))}catch(t){o(t)}}function s(t){try{u(i.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((i=i.apply(t,e||[])).next())}))}function h(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function g(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{(n=r[t](e)).value instanceof v?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function x(t){var e,n;return e={},i("next"),i("throw",(function(t){throw t})),i("return"),e[Symbol.iterator]=function(){return this},e;function i(i,r){e[i]=t[i]?function(e){return(n=!n)?{value:v(t[i](e)),done:"return"===i}:r?r(e):e}:r}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=f(t),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(e){return new Promise((function(i,r){!function(t,e,n,i){Promise.resolve(i).then((function(e){t({value:e,done:n})}),e)}(i,r,(e=t[n](e)).done,e.value)}))}}}function M(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function _(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function w(t){return t&&t.__esModule?t:{default:t}}function O(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function C(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}},function(t,e,n){"use strict";n.r(e),n.d(e,"mat3",(function(){return r})),n.d(e,"vec2",(function(){return s})),n.d(e,"vec3",(function(){return u})),n.d(e,"transform",(function(){return c}));var i=n(9);i.translate=function(t,e,n){var r=new Array(9);return i.fromTranslation(r,n),i.multiply(t,r,e)},i.rotate=function(t,e,n){var r=new Array(9);return i.fromRotation(r,n),i.multiply(t,r,e)},i.scale=function(t,e,n){var r=new Array(9);return i.fromScaling(r,n),i.multiply(t,r,e)},i.transform=function(t,e){for(var n=[].concat(t),r=0,o=e.length;r=0;return n?r?2*Math.PI-i:i:r?i:2*Math.PI-i},o.vertical=function(t,e,n){return n?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t};var s=o,u=n(90),c=function(t,e){var n=t?Object(a.clone)(t):[1,0,0,0,1,0,0,0,1];return Object(a.each)(e,(function(t){switch(t[0]){case"t":r.translate(n,n,[t[1],t[2]]);break;case"s":r.scale(n,n,[t[1],t[2]]);break;case"r":r.rotate(n,n,t[1]);break;case"m":r.multiply(n,n,t[1]);break;default:return!1}})),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.FORE="fore",t.MID="mid",t.BG="bg"}(e.LAYER||(e.LAYER={})),function(t){t.TOP="top",t.TOP_LEFT="top-left",t.TOP_RIGHT="top-right",t.RIGHT="right",t.RIGHT_TOP="right-top",t.RIGHT_BOTTOM="right-bottom",t.LEFT="left",t.LEFT_TOP="left-top",t.LEFT_BOTTOM="left-bottom",t.BOTTOM="bottom",t.BOTTOM_LEFT="bottom-left",t.BOTTOM_RIGHT="bottom-right",t.NONE="none"}(e.DIRECTION||(e.DIRECTION={})),function(t){t.AXIS="axis",t.GRID="grid",t.LEGEND="legend",t.TOOLTIP="tooltip",t.ANNOTATION="annotation",t.OTHER="other"}(e.COMPONENT_TYPE||(e.COMPONENT_TYPE={})),e.GROUP_Z_INDEX={FORE:3,MID:2,BG:1},function(t){t.BEFORE_RENDER="beforerender",t.AFTER_RENDER="afterrender",t.BEFORE_PAINT="beforepaint",t.AFTER_PAINT="afterpaint",t.BEFORE_CHANGE_DATA="beforechangedata",t.AFTER_CHANGE_DATA="afterchangedata",t.BEFORE_CLEAR="beforeclear",t.AFTER_CLEAR="afterclear",t.BEFORE_DESTROY="beforedestroy"}(e.VIEW_LIFE_CIRCLE||(e.VIEW_LIFE_CIRCLE={})),function(t){t.MOUSE_ENTER="plot:mouseenter",t.MOUSE_DOWN="plot:mousedown",t.MOUSE_MOVE="plot:mousemove",t.MOUSE_UP="plot:mouseup",t.MOUSE_LEAVE="plot:mouseleave",t.TOUCH_START="plot:touchstart",t.TOUCH_MOVE="plot:touchmove",t.TOUCH_END="plot:touchend",t.TOUCH_CANCEL="plot:touchcancel",t.CLICK="plot:click",t.DBLCLICK="plot:dblclick",t.CONTEXTMENU="plot:contextmenu"}(e.PLOT_EVENTS||(e.PLOT_EVENTS={})),e.GROUP_ATTRS=["color","shape","size"],e.FIELD_ORIGIN="_origin",e.MIN_CHART_WIDTH=100,e.MIN_CHART_HEIGHT=100,e.COMPONENT_MAX_VIEW_PERCENTAGE=.25},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(64),o=n(0),a=n(25),s={coordinate:null,defaultShapeType:null,theme:null,getShapePoints:function(t,e){var n=this.getShape(t);return n.getPoints?n.getPoints(e):this.getDefaultPoints(e)},getShape:function(t){var e=this[t]||this[this.defaultShapeType];return e.coordinate=this.coordinate,e},getDefaultPoints:function(){return[]},getMarker:function(t,e){var n=this.getShape(t);if(!n.getMarker){var i=this.defaultShapeType;n=this.getShape(i)}var r=this.theme,a=o.get(r,[t,"default"],{}),s=n.getMarker(e);return o.deepMix({},a,s)},drawShape:function(t,e,n){return this.getShape(t).draw(e,n)}},u={coordinate:null,parsePath:function(t){var e=this.coordinate,n=r.parsePathString(t);return e.isPolar?a.convertPolarPath(e,n):a.convertNormalPath(e,n)},parsePoint:function(t){return this.coordinate.convert(t)},parsePoints:function(t){var e=this.coordinate;return t.map((function(t){return e.convert(t)}))},draw:function(t,e){}},c={};e.registerShapeFactory=function(t,e){var n=o.upperFirst(t),r=i.__assign(i.__assign(i.__assign({},s),e),{geometryType:t});return c[n]=r,r},e.registerShape=function(t,e,n){var r=o.upperFirst(t),a=c[r],s=i.__assign(i.__assign({},u),n);return a[e]=s,s},e.getShapeFactory=function(t){var e=o.upperFirst(t);return c[e]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(25),a=n(26),s=i.__importDefault(n(114));function u(t,e){var n=t.event.target.getCanvasBBox();return n.width>=e||n.height>=e?n:null}function c(t){var e=t.geometries,n=[];return r.each(e,(function(t){var e=t.elements;n=n.concat(e)})),t.views&&t.views.length&&r.each(t.views,(function(t){n=n.concat(c(t))})),n}function l(t,e){var n=t.getModel().data;return r.isArray(n)?n[0][e]:n[e]}function h(t,e){return!(e.minX>t.maxX||e.maxXt.maxY||e.maxY=e||i.height>=e?n.attr("path"):null}(t,e);if(!n)return;return d(t.view,n)}var i=u(t,e);return i?p(t.view,i):null},e.getSiblingMaskElements=function(t,e,n){var i=u(t,n);if(!i)return null;var r=t.view,o=g(r,e,{x:i.x,y:i.y}),a=g(r,e,{x:i.maxX,y:i.maxY});return p(e,{minX:o.x,minY:o.y,maxX:a.x,maxY:a.y})},e.getElements=c,e.getElementsByField=function(t,e,n){return c(t).filter((function(t){return l(t,e)===n}))},e.getElementsByState=function(t,e){var n=t.geometries,i=[];return r.each(n,(function(t){var n=t.getElementsBy((function(t){return t.hasState(e)}));i=i.concat(n)})),i},e.getElementValue=l,e.intersectRect=h,e.getIntersectElements=p,e.getElementsByPath=d,e.getComponents=function(t){return r.map(t.getComponents(),(function(t){return t.component}))},e.distance=function(t,e){var n=e.x-t.x,i=e.y-t.y;return Math.sqrt(n*n+i*i)},e.getSpline=function(t,e){if(t.length<=2)return o.getLinePath(t,!1);var n=t[0],i=[];r.each(t,(function(t){i.push(t.x),i.push(t.y)}));var a=o.catmullRom2bezier(i,e,null);return a.unshift(["M",n.x,n.y]),a},e.isInBox=function(t,e){return t.x<=e.x&&t.maxX>=e.x&&t.y<=e.y&&t.maxY>e.y},e.getSilbings=function(t){var e=t.parent,n=null;return e&&(n=e.views.filter((function(e){return e!==t}))),n},e.getSiblingPoint=g,e.isInRecords=function(t,e,n,i){var o=!1;return r.each(t,(function(t){if(t[n]===e[n]&&t[i]===e[i])return o=!0,!1})),o},e.getScaleByField=function t(e,n){var i=e.getScaleByField(n);return!i&&e.views&&r.each(e.views,(function(e){if(i=t(e,n))return!1})),i}},function(t,e,n){"use strict";function i(t,e,n){if(t){if("function"==typeof t.addEventListener)return t.addEventListener(e,n,!1),{remove:function(){t.removeEventListener(e,n,!1)}};if("function"==typeof t.attachEvent)return t.attachEvent("on"+e,n),{remove:function(){t.detachEvent("on"+e,n)}}}}var r,o,a,s;function u(t){r||(r=document.createElement("table"),o=document.createElement("tr"),a=/^\s*<(\w+|!)[^>]*>/,s={tr:document.createElement("tbody"),tbody:r,thead:r,tfoot:r,td:o,th:o,"*":document.createElement("div")});var e=a.test(t)&&RegExp.$1;e&&e in s||(e="*");var n=s[e];t=t.replace(/(^\s*)|(\s*$)/g,""),n.innerHTML=""+t;var i=n.childNodes[0];return n.removeChild(i),i}function c(t,e,n){var i;try{i=window.getComputedStyle?window.getComputedStyle(t,null)[e]:t.style[e]}catch(t){}finally{i=void 0===i?n:i}return i}function l(t,e){var n=c(t,"height",e);return"auto"===n&&(n=t.offsetHeight),parseFloat(n)}function h(t,e){var n=l(t,e),i=parseFloat(c(t,"borderTopWidth"))||0,r=parseFloat(c(t,"paddingTop"))||0,o=parseFloat(c(t,"paddingBottom"))||0;return n+i+(parseFloat(c(t,"borderBottomWidth"))||0)+r+o+(parseFloat(c(t,"marginTop"))||0)+(parseFloat(c(t,"marginBottom"))||0)}function p(t,e){var n=c(t,"width",e);return"auto"===n&&(n=t.offsetWidth),parseFloat(n)}function f(t,e){var n=p(t,e),i=parseFloat(c(t,"borderLeftWidth"))||0,r=parseFloat(c(t,"paddingLeft"))||0,o=parseFloat(c(t,"paddingRight"))||0,a=parseFloat(c(t,"borderRightWidth"))||0,s=parseFloat(c(t,"marginRight"))||0;return n+i+a+r+o+(parseFloat(c(t,"marginLeft"))||0)+s}function d(){return window.devicePixelRatio?window.devicePixelRatio:2}function g(t,e){if(t)for(var n in e)e.hasOwnProperty(n)&&(t.style[n]=e[n]);return t}n.r(e),n.d(e,"addEventListener",(function(){return i})),n.d(e,"createDom",(function(){return u})),n.d(e,"getHeight",(function(){return l})),n.d(e,"getOuterHeight",(function(){return h})),n.d(e,"getOuterWidth",(function(){return f})),n.d(e,"getRatio",(function(){return d})),n.d(e,"getStyle",(function(){return c})),n.d(e,"getWidth",(function(){return p})),n.d(e,"modifyCSS",(function(){return g}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0);e.getStyle=function(t,e,n,o){void 0===o&&(o="");var a=t.style,s=t.defaultStyle,u=t.color,c=t.size,l=i.__assign(i.__assign({},s),a);return u&&(e&&(r.get(a,"stroke")||(l.stroke=u)),n&&(r.get(a,"fill")||(l.fill=u))),o&&r.isNil(r.get(a,o))&&!r.isNil(c)&&(l[o]=c),l}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=function(){function t(t,e){this.context=t,this.cfg=e,t.addAction(this)}return t.prototype.applyCfg=function(t){i.assign(this,t)},t.prototype.init=function(){this.applyCfg(this.cfg)},t.prototype.destroy=function(){this.context.removeAction(this),this.context=null},t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sub=e.mul=void 0,e.create=function(){var t=new i.ARRAY_TYPE(9);return i.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},e.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},e.clone=function(t){var e=new i.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromValues=function(t,e,n,r,o,a,s,u,c){var l=new i.ARRAY_TYPE(9);return l[0]=t,l[1]=e,l[2]=n,l[3]=r,l[4]=o,l[5]=a,l[6]=s,l[7]=u,l[8]=c,l},e.set=function(t,e,n,i,r,o,a,s,u,c){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=c,t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.transpose=function(t,e){if(t===e){var n=e[1],i=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=i,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},e.invert=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=l*a-s*c,p=-l*o+s*u,f=c*o-a*u,d=n*h+i*p+r*f;return d?(d=1/d,t[0]=h*d,t[1]=(-l*i+r*c)*d,t[2]=(s*i-r*a)*d,t[3]=p*d,t[4]=(l*n-r*u)*d,t[5]=(-s*n+r*o)*d,t[6]=f*d,t[7]=(-c*n+i*u)*d,t[8]=(a*n-i*o)*d,t):null},e.adjoint=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8];return t[0]=a*l-s*c,t[1]=r*c-i*l,t[2]=i*s-r*a,t[3]=s*u-o*l,t[4]=n*l-r*u,t[5]=r*o-n*s,t[6]=o*c-a*u,t[7]=i*u-n*c,t[8]=n*a-i*o,t},e.determinant=function(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8];return e*(c*o-a*u)+n*(-c*r+a*s)+i*(u*r-o*s)},e.multiply=r,e.translate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=n[0],f=n[1];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=p*i+f*a+c,t[7]=p*r+f*s+l,t[8]=p*o+f*u+h,t},e.rotate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=Math.sin(n),f=Math.cos(n);return t[0]=f*i+p*a,t[1]=f*r+p*s,t[2]=f*o+p*u,t[3]=f*a-p*i,t[4]=f*s-p*r,t[5]=f*u-p*o,t[6]=c,t[7]=l,t[8]=h,t},e.scale=function(t,e,n){var i=n[0],r=n[1];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},e.fromRotation=function(t,e){var n=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=n,t[2]=0,t[3]=-n,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat2d=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},e.fromQuat=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n+n,s=i+i,u=r+r,c=n*a,l=i*a,h=i*s,p=r*a,f=r*s,d=r*u,g=o*a,y=o*s,v=o*u;return t[0]=1-h-d,t[3]=l-v,t[6]=p+y,t[1]=l+v,t[4]=1-c-d,t[7]=f-g,t[2]=p-y,t[5]=f+g,t[8]=1-c-h,t},e.normalFromMat4=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],p=e[10],f=e[11],d=e[12],g=e[13],y=e[14],v=e[15],m=n*s-i*a,x=n*u-r*a,b=n*c-o*a,M=i*u-r*s,_=i*c-o*s,w=r*c-o*u,O=l*g-h*d,C=l*y-p*d,S=l*v-f*d,A=h*y-p*g,P=h*v-f*g,j=p*v-f*y,k=m*j-x*P+b*A+M*S-_*C+w*O;return k?(k=1/k,t[0]=(s*j-u*P+c*A)*k,t[1]=(u*S-a*j-c*C)*k,t[2]=(a*P-s*S+c*O)*k,t[3]=(r*P-i*j-o*A)*k,t[4]=(n*j-r*S+o*C)*k,t[5]=(i*S-n*P-o*O)*k,t[6]=(g*w-y*_+v*M)*k,t[7]=(y*b-d*w-v*x)*k,t[8]=(d*_-g*b+v*m)*k,t):null},e.projection=function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},e.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},e.subtract=o,e.multiplyScalar=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},e.multiplyScalarAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t[3]=e[3]+n[3]*i,t[4]=e[4]+n[4]*i,t[5]=e[5]+n[5]*i,t[6]=e[6]+n[6]*i,t[7]=e[7]+n[7]*i,t[8]=e[8]+n[8]*i,t},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},e.equals=function(t,e){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],p=e[0],f=e[1],d=e[2],g=e[3],y=e[4],v=e[5],m=e[6],x=e[7],b=e[8];return Math.abs(n-p)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(r-f)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(o-d)<=i.EPSILON*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(a-g)<=i.EPSILON*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(s-y)<=i.EPSILON*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(u-v)<=i.EPSILON*Math.max(1,Math.abs(u),Math.abs(v))&&Math.abs(c-m)<=i.EPSILON*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(l-x)<=i.EPSILON*Math.max(1,Math.abs(l),Math.abs(x))&&Math.abs(h-b)<=i.EPSILON*Math.max(1,Math.abs(h),Math.abs(b))};var i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(42));function r(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=n[0],f=n[1],d=n[2],g=n[3],y=n[4],v=n[5],m=n[6],x=n[7],b=n[8];return t[0]=p*i+f*a+d*c,t[1]=p*r+f*s+d*l,t[2]=p*o+f*u+d*h,t[3]=g*i+y*a+v*c,t[4]=g*r+y*s+v*l,t[5]=g*o+y*u+v*h,t[6]=m*i+x*a+b*c,t[7]=m*r+x*s+b*l,t[8]=m*o+x*u+b*h,t}function o(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}e.mul=r,e.sub=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0);function r(t,e,n,i){return{x:t+n*Math.cos(i),y:e+n*Math.sin(i)}}e.polarToCartesian=r,e.getSectorPath=function(t,e,n,i,o,a){void 0===a&&(a=0);var s=r(t,e,n,i),u=r(t,e,n,o),c=r(t,e,a,i),l=r(t,e,a,o);if(o-i==2*Math.PI){var h=r(t,e,n,i+Math.PI),p=r(t,e,a,i+Math.PI),f=[["M",s.x,s.y],["A",n,n,0,1,1,h.x,h.y],["A",n,n,0,1,1,u.x,u.y],["M",c.x,c.y]];return a&&(f.push(["A",a,a,0,1,0,p.x,p.y]),f.push(["A",a,a,0,1,0,l.x,l.y])),f.push(["M",s.x,s.y]),f.push(["Z"]),f}var d=o-i<=Math.PI?0:1,g=[["M",s.x,s.y],["A",n,n,0,d,1,u.x,u.y],["L",l.x,l.y]];return a&&g.push(["A",a,a,0,d,0,c.x,c.y]),g.push(["L",s.x,s.y]),g.push(["Z"]),g},e.getArcPath=function(t,e,n,o,a){var s=r(t,e,n,o),u=r(t,e,n,a);if(i.isNumberEqual(a-o,2*Math.PI)){var c=r(t,e,n,o+Math.PI);return[["M",s.x,s.y],["A",n,n,0,1,1,c.x,c.y],["A",n,n,0,1,1,s.x,s.y],["A",n,n,0,1,0,c.x,c.y],["A",n,n,0,1,0,s.x,s.y],["Z"]]}var l=a-o<=Math.PI?0:1;return[["M",s.x,s.y],["A",n,n,0,l,1,u.x,u.y]]},e.getAngle=function(t,e){var n,r,o=function(t){if(i.isEmpty(t))return null;var e=t[0].x,n=t[0].x,r=t[0].y,o=t[0].y;return i.each(t,(function(t){e=e>t.x?t.x:e,n=nt.y?t.y:r,o=o0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,n){var i=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=i,t},e.lerp=function(t,e,n,i){var r=e[0],o=e[1];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t},e.random=function(t,e){e=e||1;var n=2*r.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.transformMat2=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t},e.transformMat2d=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t},e.transformMat3=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[3]*r+n[6],t[1]=n[1]*i+n[4]*r+n[7],t},e.transformMat4=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[4]*r+n[12],t[1]=n[1]*i+n[5]*r+n[13],t},e.rotate=function(t,e,n,i){var r=e[0]-n[0],o=e[1]-n[1],a=Math.sin(i),s=Math.cos(i);return t[0]=r*s-o*a+n[0],t[1]=r*a+o*s+n[1],t},e.angle=function(t,e){var n=t[0],i=t[1],r=e[0],o=e[1],a=n*n+i*i;a>0&&(a=1/Math.sqrt(a));var s=r*r+o*o;s>0&&(s=1/Math.sqrt(s));var u=(n*r+i*o)*a*s;return u>1?0:u<-1?Math.PI:Math.acos(u)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],i=t[1],o=e[0],a=e[1];return Math.abs(n-o)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-a)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(a))};var i,r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(42));function o(){var t=new r.ARRAY_TYPE(2);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function s(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function u(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function c(t,e){var n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)}function l(t,e){var n=e[0]-t[0],i=e[1]-t[1];return n*n+i*i}function h(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function p(t){var e=t[0],n=t[1];return e*e+n*n}e.len=h,e.sub=a,e.mul=s,e.div=u,e.dist=c,e.sqrDist=l,e.sqrLen=p,e.forEach=(i=o(),function(t,e,n,r,o,a){var s,u=void 0;for(e||(e=2),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,u=n;u=0?e:n<=0?n:0},e.prototype.createAttrOption=function(t,e,n){if(a.isNil(e)||a.isObject(e))a.isObject(e)&&a.isEqual(Object.keys(e),["values"])?a.set(this.attributeOption,t,{fields:e.values}):a.set(this.attributeOption,t,e);else{var i={};a.isNumber(e)?i.values=[e]:i.fields=g.parseFields(e),n&&(a.isFunction(n)?i.callback=n:i.values=n),a.set(this.attributeOption,t,i)}},e.prototype.initAttributes=function(){var t=this,e=this.attributes,n=this.attributeOption,r=this.theme,s=this.shapeType;a.each(n,(function(n,u){if(n){var c=i.__assign({},n),l=c.callback,h=c.values,p=c.fields,f=void 0===p?[]:p,d=a.map(f,(function(e){return t.scales[e]}));c.scales=d,"position"!==u&&1===d.length&&"identity"===d[0].type?c.values=d[0].values:l||h||("size"===u?c.values=r.sizes:"shape"===u?c.values=r.shapes[s]||[]:"color"===u&&(d.length?c.values=d[0].values.length<=10?r.colors10:r.colors20:c.values=r.colors10));var g=o.getAttribute(u);e[u]=new g(c)}}))},e.prototype.processData=function(t){var e=this,n=this.groupData(t);n=a.map(n,(function(t){var n=e.saveOrigin(t);return e.numeric(n),n}));var i=this.adjustData(n);return this.beforeMappingData=i,i},e.prototype.adjustData=function(t){var e=this,n=this.adjustOption,o=t;if(n){var s=this.getXScale(),u=this.getYScale(),c=s.field,l=u?u.field:null;n.forEach((function(t){var n=i.__assign({xField:c,yField:l},t),h=t.type;if("dodge"===h){var p=[];if(s.isCategory||"identity"===s.type)p.push("x");else{if(u)throw new Error("dodge is not support linear attribute, please use category attribute!");p.push("y")}n.adjustNames=p,n.dodgeRatio=e.theme.columnWidthRatio}else if("stack"===h){var f=e.coordinate;if(!u){n.height=f.getHeight();var d=e.getDefaultValue("size")||3;n.size=d}!f.isTransposed&&a.isNil(n.reverseOrder)&&(n.reverseOrder=!0)}var g=new(r.getAdjust(h))(n);o=g.process(o),e.adjusts[h]=g}))}return o},e.prototype.groupData=function(t){for(var e=this.getGroupScales(),n=this.scaleDefs,i={},r=[],o=0,s=e;oo&&(o=h)}var p=this.scaleDefs,f={};rt.max&&!a.get(p,[i,"max"])&&(f.max=o),t.change(f)},e.prototype.beforeMapping=function(t){var e=this,n=t;if(this.sortable){var i=this.getXScale(),r=i.field;a.each(n,(function(t){t.sort((function(t,e){return i.translate(t[r])-i.translate(e[r])}))}))}return this.generatePoints&&(a.each(n,(function(t){e.generateShapePoints(t)})),n.reduce((function(t,e){return t[0].nextPoints=e[0].points,e}),n[0])),n},e.prototype.afterMapping=function(t){this.sortable||this.sort(t),this.dataArray=t},e.prototype.generateShapePoints=function(t){for(var e=this.getShapeFactory(),n=this.getAttribute("shape"),i=0,r=t;i1)for(var f=0;fthis.max?NaN:this.values[i]},e.prototype.getText=function(e){for(var n=[],i=1;i1?t-1:t}},e}(u),h={},p=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,f="[^\\s]+",d=/\[([^]*?)\]/gm,g=function(){};function y(t,e){for(var n=[],i=0,r=t.length;i3?0:(t-t%10!=10)*t%10]}};var w={D:function(t){return t.getDate()},DD:function(t){return m(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return t.getDay()},dd:function(t){return m(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return t.getMonth()+1},MM:function(t){return m(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return m(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return m(t.getFullYear(),4)},h:function(t){return t.getHours()%12||12},hh:function(t){return m(t.getHours()%12||12)},H:function(t){return t.getHours()},HH:function(t){return m(t.getHours())},m:function(t){return t.getMinutes()},mm:function(t){return m(t.getMinutes())},s:function(t){return t.getSeconds()},ss:function(t){return m(t.getSeconds())},S:function(t){return Math.round(t.getMilliseconds()/100)},SS:function(t){return m(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return m(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+m(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)}},O={D:["\\d\\d?",function(t,e){t.day=e}],Do:["\\d\\d?"+f,function(t,e){t.day=parseInt(e,10)}],M:["\\d\\d?",function(t,e){t.month=e-1}],YY:["\\d\\d?",function(t,e){var n=+(""+(new Date).getFullYear()).substr(0,2);t.year=""+(e>68?n-1:n)+e}],h:["\\d\\d?",function(t,e){t.hour=e}],m:["\\d\\d?",function(t,e){t.minute=e}],s:["\\d\\d?",function(t,e){t.second=e}],YYYY:["\\d{4}",function(t,e){t.year=e}],S:["\\d",function(t,e){t.millisecond=100*e}],SS:["\\d{2}",function(t,e){t.millisecond=10*e}],SSS:["\\d{3}",function(t,e){t.millisecond=e}],d:["\\d\\d?",g],ddd:[f,g],MMM:[f,v("monthNamesShort")],MMMM:[f,v("monthNames")],a:[f,function(t,e,n){var i=e.toLowerCase();i===n.amPm[0]?t.isPm=!1:i===n.amPm[1]&&(t.isPm=!0)}],ZZ:["[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z",function(t,e){var n,i=(e+"").match(/([+-]|\d\d)/gi);i&&(n=60*i[1]+parseInt(i[2],10),t.timezoneOffset="+"===i[0]?n:-n)}]};O.dd=O.d,O.dddd=O.ddd,O.DD=O.D,O.mm=O.m,O.hh=O.H=O.HH=O.h,O.MM=O.M,O.ss=O.s,O.A=O.a,h.masks={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},h.format=function(t,e,n){var i=n||h.i18n;if("number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date in fecha.format");e=h.masks[e]||e||h.masks.default;var r=[];return(e=(e=e.replace(d,(function(t,e){return r.push(e),"@@@"}))).replace(p,(function(e){return e in w?w[e](t,i):e.slice(1,e.length-1)}))).replace(/@@@/g,(function(){return r.shift()}))},h.parse=function(t,e,n){var i=n||h.i18n;if("string"!=typeof e)throw new Error("Invalid format in fecha.parse");if(e=h.masks[e]||e,t.length>1e3)return null;var r,o={},a=[],s=[],u=(r=e=e.replace(d,(function(t,e){return s.push(e),"@@@"})),r.replace(/[|\\{()[^$+*?.-]/g,"\\$&")).replace(p,(function(t){if(O[t]){var e=O[t];return a.push(e[1]),"("+e[0]+")"}return t}));u=u.replace(/@@@/g,(function(){return s.shift()}));var c=t.match(new RegExp(u,"i"));if(!c)return null;for(var l=1;l0?new Date(t).getTime():new Date(t.replace(/-/gi,"/")).getTime()),Object(r.isDate)(t)&&(t=t.getTime()),t}var P=36e5,j=24*P,k=31*j,T=[["HH:mm:ss",1e3],["HH:mm:ss",1e4],["HH:mm:ss",3e4],["HH:mm",6e4],["HH:mm",6e5],["HH:mm",18e5],["HH",P],["HH",6*P],["HH",12*P],["YYYY-MM-DD",j],["YYYY-MM-DD",4*j],["YYYY-WW",7*j],["YYYY-MM",k],["YYYY-MM",4*k],["YYYY-MM",6*k],["YYYY",380*j]];function E(t,e,n){var i,o=(i=function(t){return t[1]},function(t,e,n,o){for(var a=Object(r.isNil)(n)?0:n,s=Object(r.isNil)(o)?t.length:o;a>>1;i(t[u])>e?s=u:a=u+1}return a})(T,(e-t)/n)-1,a=T[o];return o<0?a=T[0]:o>=T.length&&(a=Object(r.last)(T)),a}var I=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(c.__extends)(e,t),e.prototype.translate=function(t){t=A(t);var e=this.values.indexOf(t);return-1===e&&(e=Object(r.isNumber)(t)&&t-1){var i=this.values[n],r=this.formatter;return r?r(i,e):S(i,this.mask)}return t},e.prototype.initCfg=function(){this.tickMethod="time-cat",this.mask="YYYY-MM-DD",this.tickCount=7},e.prototype.setDomain=function(){var e=this.values;Object(r.each)(e,(function(t,n){e[n]=A(t)})),e.sort((function(t,e){return t-e})),t.prototype.setDomain.call(this)},e}(l),L=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isContinuous=!0,e}return Object(c.__extends)(e,t),e.prototype.scale=function(t){if(Object(r.isNil)(t))return NaN;var e=this.rangeMin(),n=this.rangeMax();return this.max===this.min?e:e+this.getScalePercent(t)*(n-e)},e.prototype.init=function(){t.prototype.init.call(this);var e=this.ticks,n=Object(r.head)(e),i=Object(r.last)(e);nthis.max&&(this.max=i),Object(r.isNil)(this.minLimit)||(this.min=n),Object(r.isNil)(this.maxLimit)||(this.max=i)},e.prototype.setDomain=function(){var t=Object(r.getRange)(this.values),e=t.min,n=t.max;Object(r.isNil)(this.min)&&(this.min=e),Object(r.isNil)(this.max)&&(this.max=n),this.min>this.max&&(this.min=e,this.max=n)},e.prototype.calculateTicks=function(){var e=this,n=t.prototype.calculateTicks.call(this);return this.nice||(n=Object(r.filter)(n,(function(t){return t>=e.min&&t<=e.max}))),n},e.prototype.getScalePercent=function(t){var e=this.max,n=this.min;return(t-n)/(e-n)},e.prototype.getInvertPercent=function(t){return(t-this.rangeMin())/(this.rangeMax()-this.rangeMin())},e}(u),B=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="linear",e.isLinear=!0,e}return Object(c.__extends)(e,t),e.prototype.invert=function(t){var e=this.getInvertPercent(t);return this.min+e*(this.max-this.min)},e.prototype.initCfg=function(){this.tickMethod="wilkinson-extended",this.nice=!1},e}(L);function D(t,e){var n=Math.E;return e>=0?Math.pow(n,Math.log(e)/t):-1*Math.pow(n,Math.log(-e)/t)}function F(t,e){return 1===t?1:Math.log(e)/Math.log(t)}function R(t,e,n){Object(r.isNil)(n)&&(n=Math.max.apply(null,t));var i=n;return Object(r.each)(t,(function(t){t>0&&t1&&(i=1),i}var N=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e}return Object(c.__extends)(e,t),e.prototype.invert=function(t){var e,n=this.base,i=F(n,this.max),r=this.rangeMin(),o=this.rangeMax()-r,a=this.positiveMin;if(a){if(0===t)return 0;var s=1/(i-(e=F(n,a/n)))*o;if(t=0?1:-1;return Math.pow(o,n)*a},e.prototype.initCfg=function(){this.tickMethod="pow",this.exponent=2,this.tickCount=5,this.nice=!0},e.prototype.getScalePercent=function(t){var e=this.max,n=this.min;if(e===n)return 0;var i=this.exponent;return(D(i,t)-D(i,n))/(D(i,e)-D(i,n))},e}(L),X=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="time",e}return Object(c.__extends)(e,t),e.prototype.getText=function(t,e){var n=this.translate(t),i=this.formatter;return i?i(n,e):S(n,this.mask)},e.prototype.scale=function(e){var n=e;return(Object(r.isString)(n)||Object(r.isDate)(n))&&(n=this.translate(n)),t.prototype.scale.call(this,n)},e.prototype.translate=function(t){return A(t)},e.prototype.initCfg=function(){this.tickMethod="time-pretty",this.mask="YYYY-MM-DD",this.tickCount=7,this.nice=!1},e.prototype.setDomain=function(){var t=this.values,e=this.getConfig("min"),n=this.getConfig("max");if(Object(r.isNil)(e)&&Object(r.isNumber)(e)||(this.min=this.translate(this.min)),Object(r.isNil)(n)&&Object(r.isNumber)(n)||(this.max=this.translate(this.max)),t&&t.length){var i=[],o=1/0,a=o,s=0;Object(r.each)(t,(function(t){var e=A(t);if(isNaN(e))throw new TypeError("Invalid Time: "+t+" in time scale!");o>e?(a=o,o=e):a>e&&(a=e),s1&&(this.minTickInterval=a-o),Object(r.isNil)(e)&&(this.min=o),Object(r.isNil)(n)&&(this.max=s)}},e}(B),G=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="quantize",e}return Object(c.__extends)(e,t),e.prototype.invert=function(t){var e=this.ticks,n=e.length,i=this.getInvertPercent(t),o=Math.floor(i*(n-1));if(o>=n-1)return Object(r.last)(e);if(o<0)return Object(r.head)(e);var a=e[o],s=o/(n-1);return a+(i-s)/((o+1)/(n-1)-s)*(e[o+1]-a)},e.prototype.initCfg=function(){this.tickMethod="r-pretty",this.tickCount=5,this.nice=!0},e.prototype.calculateTicks=function(){var e=t.prototype.calculateTicks.call(this);return this.nice||(Object(r.last)(e)!==this.max&&e.push(this.max),Object(r.head)(e)!==this.min&&e.unshift(this.min)),e},e.prototype.getScalePercent=function(t){var e=this.ticks;if(tObject(r.last)(e))return 1;var n=0;return Object(r.each)(e,(function(e,i){if(!(t>=e))return!1;n=i})),n/(e.length-1)},e}(L),z=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="quantile",e}return Object(c.__extends)(e,t),e.prototype.initCfg=function(){this.tickMethod="quantile",this.tickCount=5,this.nice=!0},e}(G),q={};function H(t){return q[t]}function V(t,e){if(H(t))throw new Error("type '"+t+"' existed.");q[t]=e}var W=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="identity",e.isIdentity=!0,e}return Object(c.__extends)(e,t),e.prototype.calculateTicks=function(){return this.values},e.prototype.scale=function(t){return this.values[0]!==t&&Object(r.isNumber)(t)?t:this.range[0]},e.prototype.invert=function(t){var e=this.range;return te[1]?NaN:this.values[0]},e}(u),U=[1,5,2,2.5,4,3],Q=100*Number.EPSILON;function Z(t,e,n,i,o,a){var s=Object(r.size)(e),u=Object(r.indexOf)(e,t),c=0,l=function(t,e){return(t%e+e)%e}(i,a);return(l=0&&(c=1),1-u/(s-1)-n+c}function $(t,e,n){var i=Object(r.size)(e);return 1-Object(r.indexOf)(e,t)/(i-1)-n+1}function K(t,e,n,i,r,o){var a=(t-1)/(o-r),s=(e-1)/(Math.max(o,i)-Math.min(n,r));return 2-Math.max(a/s,s/a)}function J(t,e){return t>=e?2-(t-1)/(e-1):1}function tt(t,e,n,i){var r=e-t;return 1-.5*(Math.pow(e-i,2)+Math.pow(t-n,2))/Math.pow(.1*r,2)}function et(t,e,n){var i=e-t;if(n>i){var r=(n-i)/2;return 1-Math.pow(r,2)/Math.pow(.1*i,2)}return 1}function nt(t,e,n,i,o,a){if(void 0===n&&(n=5),void 0===i&&(i=!0),void 0===o&&(o=U),void 0===a&&(a=[.25,.2,.5,.05]),t===e||1===n)return{min:t,max:e,ticks:[t]};for(var s={score:-2,lmin:0,lmax:0,lstep:0},u=1;u<1/0;){for(var c=0,l=o;cb)y+=1;else{for(var M=x;M<=b;M+=1){var _=M*(v/u),w=_+v*(f-1),O=v,C=Z(h,o,u,_,w,O),S=tt(t,e,_,w),A=K(f,n,t,e,_,w),P=a[0]*C+a[1]*S+a[2]*A+1*a[3];P>s.score&&(!i||_<=t&&w>=e)&&(s.lmin=_,s.lmax=w,s.lstep=O,s.score=P)}y+=1}}f+=1}}u+=1}for(var j=Number.isInteger(s.lstep)?0:Math.ceil(Math.abs(Math.log10(s.lstep))),k=[],T=s.lmin;T<=s.lmax;T+=s.lstep)k.push(T);var E=j?Object(r.map)(k,(function(t){return Number.parseFloat(t.toFixed(j))})):k;return{min:Math.min(t,Object(r.head)(E)),max:Math.max(e,Object(r.last)(E)),ticks:E}}function it(t){var e=t.values,n=t.tickInterval,i=t.tickCount,o=e;if(Object(r.isNumber)(n))return Object(r.filter)(o,(function(t,e){return e%n==0}));var a=t.min,s=t.max;if(Object(r.isNil)(a)&&(a=0),Object(r.isNil)(s)&&(s=e.length-1),Object(r.isNumber)(i)&&i=a&&t<=s})).map((function(t){return e[t]}))}return e.slice(a,s+1)}var rt=Math.sqrt(50),ot=Math.sqrt(10),at=Math.sqrt(2),st=function(){function t(){this._domain=[0,1]}return t.prototype.domain=function(t){return t?(this._domain=Array.from(t,Number),this):this._domain.slice()},t.prototype.nice=function(t){var e,n;void 0===t&&(t=5);var i,r=this._domain.slice(),o=0,a=this._domain.length-1,s=this._domain[o],u=this._domain[a];return u0?i=ut(s=Math.floor(s/i)*i,u=Math.ceil(u/i)*i,t):i<0&&(i=ut(s=Math.ceil(s*i)/i,u=Math.floor(u*i)/i,t)),i>0?(r[o]=Math.floor(s/i)*i,r[a]=Math.ceil(u/i)*i,this.domain(r)):i<0&&(r[o]=Math.ceil(s*i)/i,r[a]=Math.floor(u*i)/i,this.domain(r)),this},t.prototype.ticks=function(t){return void 0===t&&(t=5),function(t,e,n){var i,r,o,a,s=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((i=e0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(r=Math.ceil(e-t+1));++s=0?(o>=rt?10:o>=ot?5:o>=at?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=rt?10:o>=ot?5:o>=at?2:1)}function ct(t,e,n){return("ceil"===n?Math.ceil(t/e):"floor"===n?Math.floor(t/e):Math.round(t/e))*e}function lt(t,e,n){var i=ct(t,n,"floor"),o=ct(e,n,"ceil");i=Object(r.fixedBase)(i,n),o=Object(r.fixedBase)(o,n);for(var a=[],s=i;s<=o;s+=n){var u=Object(r.fixedBase)(s,n);a.push(u)}return{min:i,max:o,ticks:a}}function ht(t,e,n){var i,o=t.minLimit,a=t.maxLimit,s=t.min,u=t.max,c=t.tickCount,l=void 0===c?5:c,h=Object(r.isNil)(o)?Object(r.isNil)(e)?s:e:o,p=Object(r.isNil)(a)?Object(r.isNil)(n)?u:n:a;if(h>p&&(p=(i=[h,p])[0],h=i[1]),l<=2)return[h,p];for(var f=(p-h)/(l-1),d=[],g=0;g1&&(r*=Math.ceil(a)),i&&r31536e6)for(var u=dt(n),c=Math.ceil(r/31536e6),l=s;l<=u+c;l+=c)a.push(gt(l));else if(r>k){var h=Math.ceil(r/k),p=yt(e),f=function(t,e){var n=dt(t),i=dt(e),r=yt(t);return 12*(i-n)+(yt(e)-r)%12}(e,n);for(l=0;l<=f+h;l+=h)a.push(vt(s,l+p))}else if(r>j){var d=(x=new Date(e)).getFullYear(),g=x.getMonth(),y=x.getDate(),v=Math.ceil(r/j),m=function(t,e){return Math.ceil((e-t)/j)}(e,n);for(l=0;lP){d=(x=new Date(e)).getFullYear(),g=x.getMonth(),v=x.getDate();var x,b=x.getHours(),M=Math.ceil(r/P),_=function(t,e){return Math.ceil((e-t)/P)}(e,n);for(l=0;l<=_+M;l+=M)a.push(new Date(d,g,v,b+l).getTime())}else if(r>6e4){var w=function(t,e){return Math.ceil((e-t)/6e4)}(e,n),O=Math.ceil(r/6e4);for(l=0;l<=w+O;l+=O)a.push(e+6e4*l)}else{var C=r;C<1e3&&(C=1e3);var S=1e3*Math.floor(e/1e3),A=Math.ceil((n-e)/1e3),T=Math.ceil(C/1e3);for(l=0;l0)e=Math.floor(F(n,r));else{var u=R(a,n,o);e=Math.floor(F(n,u))}for(var c=s-e,l=Math.ceil(c/i),h=[],p=e;p=0?1:-1;return Math.pow(t,e)*n}))})),s("quantile",(function(t){var e=t.tickCount,n=t.values;if(!n||!n.length)return[];for(var i=n.slice().sort((function(t,e){return t-e})),r=[],o=0;o=i&&t<=r},e.padEnd=function(t,e,n){if(i.isString(t))return t.padEnd(e,n);if(i.isArray(t)){var r=t.length;if(r=s[l]?1:0,f=h>Math.PI?1:0,d=n.convert(u),g=o.getDistanceToCenter(n,d);if(g>=.5)if(h===2*Math.PI){var y={x:(u.x+s.x)/2,y:(u.y+s.y)/2},v=n.convert(y);c.push(["A",g,g,0,f,p,v.x,v.y]),c.push(["A",g,g,0,f,p,d.x,d.y])}else c.push(["A",g,g,0,f,p,d.x,d.y]);return c}(n,i,t)):s.push(a(r,t));break;case"z":default:s.push(r)}})),function(t){r.each(t,(function(e,n){if("a"===e[0].toLowerCase()){var i=t[n-1],r=t[n+1];r&&"a"===r[0].toLowerCase()?i&&"l"===i[0].toLowerCase()&&(i[0]="M"):i&&"a"===i[0].toLowerCase()&&r&&"l"===r[0].toLowerCase()&&(r[0]="M")}}))}(s),s}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(3),o=n(44),a=function(){function t(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.x=t,this.y=e,this.height=i,this.width=n}return t.fromRange=function(e,n,i,r){return new t(e,n,i-e,r-n)},Object.defineProperty(t.prototype,"minX",{get:function(){return this.x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxX",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minY",{get:function(){return this.y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxY",{get:function(){return this.y+this.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tl",{get:function(){return{x:this.x,y:this.y}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tr",{get:function(){return{x:this.maxX,y:this.y}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bl",{get:function(){return{x:this.x,y:this.maxY}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"br",{get:function(){return{x:this.maxX,y:this.maxY}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return{x:this.x+this.width/2,y:this.minY}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return{x:this.maxX,y:this.y+this.height/2}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return{x:this.x+this.width/2,y:this.maxY}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return{x:this.minX,y:this.y+this.height/2}},enumerable:!0,configurable:!0}),t.prototype.isEqual=function(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.add=function(){for(var t=[],e=0;e1?1:Number(e),i=t.length-1,r=Math.floor(i*n),o=i*n-r,a=t[r],s=r===i?a:t[r+1];return c([u(a,s,o,0),u(a,s,o,1),u(a,s,o,2)])}(n,t)}},toRGB:Object(i.memoize)(f),toCSSGradient:function(t){if(/^[r,R,L,l]{1}[\s]*\(/.test(t)){var e,n=void 0;if("l"===t[0]){var r=+(u=o.exec(t))[1]+90;n=u[2],e="linear-gradient("+r+"deg, "}else if("r"===t[0]){var u;e="radial-gradient(",n=(u=a.exec(t))[4]}var c=n.match(s);return Object(i.each)(c,(function(t,n){var i=t.split(":");e+=i[1]+" "+100*i[0]+"%",n!==c.length-1&&(e+=", ")})),e+=")"}return t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(17),o=/^(?:(?!0000)[0-9]{4}([-/.]+)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-/.]+)0?2\2(?:29))(\s+([01]|([01][0-9]|2[0-3])):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9]))?$/;e.createScaleByField=function(t,e,n){var a=e||[];if(i.isNumber(t)||i.isNil(i.firstValue(a,t))&&i.isEmpty(n))return new(r.getScale("identity"))({field:t.toString(),values:[t]});var s=i.get(n,"type",function(t,e){var n="linear",r=i.firstValue(e,t);return i.isArray(r)&&(r=r[0]),o.test(r)?n="time":i.isString(r)&&(n="cat"),n}(t,a)),u={field:t,values:i.valuesOfKey(a,t)};return i.mix(u,n),new(r.getScale(s))(u)},e.syncScale=function(t,e){if("identity"!==t.type&&"identity"!==e.type){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);t.change(n)}},e.getName=function(t){return t.alias||t.field}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return null==t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(3),a=n(18),s=n(10),u=i.__importDefault(n(129)),c=function(){function t(t){this.geometry=t}return t.prototype.getLabelItems=function(t){var e=this,n=[],o=this.getLabelCfgs(t);return r.each(t,(function(t,a){var s=o[a];if(s){var u=r.isArray(s.content)?s.content:[s.content];s.content=u;var c=u.length;r.each(u,(function(o,a){if(r.isNil(o)||""===o)n.push(null);else{var u=i.__assign(i.__assign({},s),e.getLabelPoint(s,t,a));u.textAlign||(u.textAlign=e.getLabelAlign(u,a,c)),u.offset<=0&&(u.labelLine=null),n.push(u)}}))}else n.push(null)})),n},t.prototype.render=function(t,e){void 0===e&&(e=!1);var n=this.getLabelItems(t),i=this.getLabelsRenderer(),r=this.getGeometryShapes();i.render(n,r,e)},t.prototype.clear=function(){var t=this.labelsRenderer;t&&t.clear()},t.prototype.destroy=function(){var t=this.labelsRenderer;t&&t.destroy(),this.labelsRenderer=null},t.prototype.getCoordinate=function(){return this.geometry.coordinate},t.prototype.getDefaultLabelCfg=function(){return r.get(this.geometry.theme,"labels",{})},t.prototype.setLabelPosition=function(t,e,n,i){},t.prototype.getDefaultOffset=function(t){var e=this.getCoordinate(),n=this.getOffsetVector(t);return e.isTransposed?n[0]:n[1]},t.prototype.getLabelOffset=function(t,e,n){var i=this.getDefaultOffset(t.offset),r=this.getCoordinate().isTransposed,o=r?1:-1,a={x:0,y:0};return a[r?"x":"y"]=e>0||1===n?i*o:i*o*-1,a},t.prototype.getLabelPoint=function(t,e,n){var i=this.getCoordinate(),o=t.content.length;function a(e,n){var i,o,a=e;return r.isArray(a)&&(1===t.content.length?a.length<=2?a=a[e.length-1]:(i=a,o=0,r.each(i,(function(t){o+=t})),a=o/i.length):a=a[n]),a}var u={content:t.content[n],x:0,y:0,start:{x:0,y:0},color:"#fff"};if(e&&"polygon"===this.geometry.type){var c=s.getPolygonCentroid(e.x,e.y);u.x=c[0],u.y=c[1]}else u.x=a(e.x,n),u.y=a(e.y,n);var l=r.isArray(e.shape)?e.shape[0]:e.shape;if("funnel"===l||"pyramid"===l){var h=r.get(e,"nextPoints"),p=r.get(e,"points");if(h){var f=i.convert(p[1]),d=i.convert(h[1]);u.x=(f.x+d.x)/2,u.y=(f.y+d.y)/2}else"pyramid"===l&&(f=i.convert(p[1]),d=i.convert(p[2]),u.x=(f.x+d.x)/2,u.y=(f.y+d.y)/2)}t.position&&this.setLabelPosition(u,e,n,t.position);var g=this.getLabelOffset(t,n,o);return u.start={x:u.x,y:u.y},u.x+=g.x,u.y+=g.y,u.color=e.color,u},t.prototype.getLabelAlign=function(t,e,n){var i="center";if(this.getCoordinate().isTransposed){var r=this.getDefaultOffset(t.offset);i=r<0?"right":0===r?"center":"left",n>1&&0===e&&("right"===i?i="left":"left"===i&&(i="right"))}return i},t.prototype.getLabelId=function(t){var e=this.geometry,n=e.type,i=e.getXScale(),r=e.getYScale(),a=t[o.FIELD_ORIGIN],s=e.getElementId(t);return"line"===n||"area"===n?s+=" "+a[i.field]:"path"===n&&(s+=" "+a[i.field]+"-"+a[r.field]),s},t.prototype.getLabelsRenderer=function(){var t=this.geometry,e=t.labelsContainer,n=t.labelOption,i=t.canvasRegion,o=t.animateOption,s=this.geometry.coordinate,c=this.labelsRenderer;return c||(c=new u.default({container:e,layout:r.get(n,["cfg","layout"],{type:this.defaultLayout})}),this.labelsRenderer=c),c.region=i,c.animate=!!o&&a.getDefaultAnimateCfg("label",s),c},t.prototype.getLabelCfgs=function(t){var e=this,n=this.geometry,a=this.getDefaultLabelCfg(),s=n.type,u=n.theme,c=n.labelOption,l=n.scales,h=n.coordinate,p=c,f=p.fields,d=p.callback,g=p.cfg,y=f.map((function(t){return l[t]})),v=[];return r.each(t,(function(t,n){var c,l=t[o.FIELD_ORIGIN],p=e.getLabelText(l,y);if(d){var m=f.map((function(t){return l[t]}));if(c=d.apply(void 0,m),r.isNil(c))return void v.push(null)}var x=i.__assign(i.__assign({id:e.getLabelId(t),data:l,mappingData:t,coordinate:h},g),c),b=x.content;r.isFunction(b)?x.content=b(l,t,n):r.isUndefined(b)&&(x.content=p[0]),r.isFunction(x.position)&&(x.position=x.position(l,t,n)),x="polygon"===s||x.offset<0&&!["line","point","path"].includes(s)?r.deepMix({},a,u.innerLabels,x):r.deepMix({},a,u.labels,x),v.push(x)})),v},t.prototype.getLabelText=function(t,e){var n=[];return r.each(e,(function(e){var i=t[e.field];i=r.isArray(i)?i.map((function(t){return e.getText(t)})):e.getText(i),r.isNil(i)||""===i?n.push(null):n.push(i)})),n},t.prototype.getOffsetVector=function(t){void 0===t&&(t=0);var e=this.getCoordinate();return e.isTransposed?e.applyMatrix(t,0):e.applyMatrix(0,t)},t.prototype.getGeometryShapes=function(){var t=this.geometry,e={};return r.each(t.elementsMap,(function(t,n){e[n]=t.shape})),r.each(t.getOffscreenGroup().getChildren(),(function(n){var i=t.getElementId(n.get("origin").mappingData);e[i]=n})),e},t}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(49),o=n(7),a=n(25);e.getShapeAttrs=function(t,e,n,s,u){var c=o.getStyle(t,e,!e,"lineWidth"),l=t.connectNulls,h=t.isInCircle,p=t.points,f=r.getPathPoints(p,l),d=[];return i.each(f,(function(t){d=d.concat(function(t,e,n,r,o){var s=[],u=[];i.each(t,(function(t){s.push(t[1]),u.push(t[0])})),u=u.reverse();var c=[];return i.each([s,u],(function(t,i){var s=[],u=r.parsePoints(t),l=u[0];e&&u.push({x:l.x,y:l.y}),s=n?a.getSplinePath(u,!1,o):a.getLinePath(u,!1),i>0&&(s[0][0]="L"),c=c.concat(s)})),c.push(["Z"]),c}(t,h,n,s,u))})),c.path=d,c},e.getConstraint=function(t){var e=t.start,n=t.end;return[[e.x,n.y],[n.x,e.y]]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=i.__importDefault(n(8)),a=n(5),s=n(5),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="",e.ignoreItemStates=[],e}return i.__extends(e,t),e.prototype.getTriggerListInfo=function(){var t=s.getDelegationObject(this.context),e=null;return s.isList(t)&&(e={item:t.item,list:t.component}),e},e.prototype.getAllowComponents=function(){var t=this,e=this.context.view,n=a.getComponents(e),i=[];return r.each(n,(function(e){e.isList()&&t.allowSetStateByElement(e)&&i.push(e)})),i},e.prototype.hasState=function(t,e){return t.hasState(e,this.stateName)},e.prototype.clearAllComponentsState=function(){var t=this,e=this.getAllowComponents();r.each(e,(function(e){e.clearItemsState(t.stateName)}))},e.prototype.allowSetStateByElement=function(t){var e=t.get("field");if(!e)return!1;if(this.cfg&&this.cfg.componentNames){var n=t.get("name");if(-1===this.cfg.componentNames.indexOf(n))return!1}var i=this.context.view,r=s.getScaleByField(i,e);return r&&r.isCategory},e.prototype.allowSetStateByItem=function(t,e){var n=this.ignoreItemStates;return!n.length||0===n.filter((function(n){return e.hasState(t,n)})).length},e.prototype.setStateByElement=function(t,e,n){var i=t.get("field"),r=this.context.view,o=s.getScaleByField(r,i),a=s.getElementValue(e,i),u=o.getText(a);this.setItemsState(t,u,n)},e.prototype.setStateEnable=function(t){var e=this,n=s.getCurrentElement(this.context);if(n){var i=this.getAllowComponents();r.each(i,(function(i){e.setStateByElement(i,n,t)}))}else{var o=s.getDelegationObject(this.context);if(s.isList(o)){var a=o.item,u=o.component;this.allowSetStateByElement(u)&&this.allowSetStateByItem(a,u)&&this.setItemState(u,a,t)}}},e.prototype.setItemsState=function(t,e,n){var i=this,o=t.getItems();r.each(o,(function(r){r.name===e&&i.setItemState(t,r,n)}))},e.prototype.setItemState=function(t,e,n){t.setItemState(e,this.stateName,n)},e.prototype.setState=function(){this.setStateEnable(!0)},e.prototype.reset=function(){this.setStateEnable(!1)},e.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var e=t.list,n=t.item,i=this.hasState(e,n);this.setItemState(e,n,!i)}},e.prototype.clear=function(){var t=this.getTriggerListInfo();t?t.list.clearItemsState(this.stateName):this.clearAllComponentsState()},e}(o.default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(94);e.Chart=i.default;var r=n(66);e.View=r.default,e.registerGeometry=r.registerGeometry;var o=n(74);e.Event=o.default;var a=n(73);e.registerComponentController=a.registerComponentController},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(t){function e(e){var n=t.call(this)||this;n.destroyed=!1;var i=e.visible,r=void 0===i||i;return n.visible=r,n}return i.__extends(e,t),e.prototype.show=function(){this.visible||(this.visible=!0,this.changeVisible(!0))},e.prototype.hide=function(){this.visible&&(this.visible=!1,this.changeVisible(!1))},e.prototype.destroy=function(){this.off(),this.destroyed=!0},e.prototype.changeVisible=function(t){this.visible!==t&&(this.visible=t)},e}(i.__importDefault(n(59)).default);e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(16);e.Facet=r.Facet;var o={};e.getFacet=function(t){return o[i.lowerCase(t)]},e.registerFacet=function(t,e){o[i.lowerCase(t)]=e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(3),o=n(30);function a(t){var e,n;switch(t){case r.DIRECTION.TOP:e={x:0,y:1},n={x:1,y:1};break;case r.DIRECTION.RIGHT:e={x:1,y:0},n={x:1,y:1};break;case r.DIRECTION.BOTTOM:e={x:0,y:0},n={x:1,y:0};break;case r.DIRECTION.LEFT:e={x:0,y:0},n={x:0,y:1};break;default:e=n={x:0,y:0}}return{start:e,end:n}}function s(t){var e,n;return t.isTransposed?(e={x:0,y:0},n={x:1,y:0}):(e={x:0,y:0},n={x:0,y:1}),{start:e,end:n}}function u(t){var e=t.start,n=t.end;return e.x===n.x}e.getLineAxisRelativeRegion=a,e.getCircleAxisRelativeRegion=s,e.getAxisRegion=function(t,e){var n={start:{x:0,y:0},end:{x:0,y:0}};t.isRect?n=a(e):t.isPolar&&(n=s(t));var i=n.start,r=n.end;return{start:t.convert(i),end:t.convert(r)}},e.getAxisFactor=function(t,e){return t.isRect?t.isTransposed?[r.DIRECTION.RIGHT,r.DIRECTION.BOTTOM].includes(e)?1:-1:[r.DIRECTION.BOTTOM,r.DIRECTION.RIGHT].includes(e)?-1:1:t.isPolar&&t.x.start<0?-1:1},e.isVertical=u,e.getAxisFactorByRegion=function(t,e){var n=t.start,i=t.end;return u(t)?(n.y-i.y)*(e.x-n.x)>0?1:-1:(i.x-n.x)*(n.y-e.y)>0?-1:1},e.getAxisThemeCfg=function(t,e){return i.get(t,["components","axis",e],{})},e.getCircleAxisCenterRadius=function(t){var e=t.startAngle,n=t.endAngle;return{center:t.circleCenter,radius:t.polarRadius,startAngle:e,endAngle:n}},e.getAxisOption=function(t,e){return i.isBoolean(t)?!1!==t&&{}:i.get(t,[e])},e.getAxisDirection=function(t,e){return i.get(t,"position",e)},e.getAxisTitleText=function(t,e){return i.get(e,["title","text"],o.getName(t))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(40);e.default=function(t){return i.default(t,"Function")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={}.toString;e.default=function(t,e){return i.call(t)==="[object "+e+"]"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=function(t){e.ARRAY_TYPE=t},e.toRadian=function(t){return t*r},e.equals=function(t,e){return Math.abs(t-e)<=i*Math.max(1,Math.abs(t),Math.abs(e))};var i=e.EPSILON=1e-6;e.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,e.RANDOM=Math.random;var r=Math.PI/180},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=i.__importDefault(n(111)),a={};function s(t){return a[r.lowerCase(t)]}e.getInteraction=s,e.registerInteraction=function(t,e){a[r.lowerCase(t)]=e},e.createInteraction=function(t,e,n){var i=s(t);if(!i)return null;if(r.isPlainObject(i)){var a=r.mix(r.clone(i),n);return new o.default(e,a)}return new i(e,n)};var u=n(70);e.Interaction=u.default;var c=n(45);e.Action=c.Action,e.registerAction=c.registerAction,e.getActionClass=c.getActionClass},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0);e.isAutoPadding=function(t){return!r.isNumber(t)&&!r.isArray(t)},e.parsePadding=function(t){void 0===t&&(t=0);var e=r.isArray(t)?t:[t];switch(e.length){case 0:e=[0,0,0,0];break;case 1:e=new Array(4).fill(e[0]);break;case 2:e=i.__spreadArrays(e,e);break;case 3:e=i.__spreadArrays(e,[e[1]]);break;default:e=e.slice(0,4)}return e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8);e.Action=i.default;var r=n(69);e.createAction=r.createAction,e.registerAction=r.registerAction,e.getActionClass=r.getActionClass},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={},r={};e.getGeometryLabel=function(t){return i[t.toLowerCase()]},e.registerGeometryLabel=function(t,e){i[t.toLowerCase()]=e},e.getGeometryLabelLayout=function(t){return r[t.toLowerCase()]},e.registerGeometryLabelLayout=function(t,e){r[t.toLowerCase()]=e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(2);e.transform=r.transform,e.translate=function(t,e,n){var r=i.transform(t.getMatrix(),[["t",e,n]]);t.setMatrix(r)},e.rotate=function(t,e){var n=t.attr(),r=n.x,o=n.y,a=i.transform(t.getMatrix(),[["t",-r,-o],["r",e],["t",r,o]]);t.setMatrix(a)},e.getIdentityMatrix=function(){return[1,0,0,0,1,0,0,0,1]},e.zoom=function(t,e){var n=t.getBBox(),r=(n.minX+n.maxX)/2,o=(n.minY+n.maxY)/2;t.applyToMatrix([r,o,1]);var a=i.transform(t.getMatrix(),[["t",-r,-o],["s",e,e],["t",r,o]]);t.setMatrix(a)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(3),a=i.__importDefault(n(14)),s=i.__importDefault(n(76));n(78);var u=n(77),c=function(t){function e(e){var n=t.call(this,e)||this;n.type="path",n.shapeType="line";var i=e.connectNulls,r=void 0!==i&&i;return n.connectNulls=r,n}return i.__extends(e,t),e.prototype.createElements=function(t,e,n){void 0===n&&(n=!1);var i=this,o=i.lastElementsMap,a=i.elementsMap,c=i.elements,l=i.theme,h=i.container,p=this.getElementId(t),f=this.getShapeInfo(t),d=o[p];if(d){var g=d.getModel();u.isModelChange(g,f)&&d.update(f),delete o[p]}else{var y=this.getShapeFactory();(d=new s.default({theme:r.get(l,["geometries",this.shapeType],{}),shapeFactory:y,container:h,offscreenGroup:this.getOffscreenGroup()})).geometry=this,d.draw(f,n)}return c.push(d),a[p]=d,c},e.prototype.getPoints=function(t){return t.map((function(t){return{x:t.x,y:t.y}}))},e.prototype.getShapeInfo=function(t){var e=this.getDrawCfg(t[0]);return i.__assign(i.__assign({},e),{mappingData:t,data:this.getData(t),isStack:!!this.getAdjust("stack"),points:this.getPoints(t),connectNulls:this.connectNulls})},e.prototype.getData=function(t){return t.map((function(t){return t[o.FIELD_ORIGIN]}))},e}(a.default);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0);function r(t){return i.isNil(t)||isNaN(t)}function o(t){if(i.isArray(t))return r(t[1].y);var e=t.y;return i.isArray(e)?r(e[0]):r(e)}e.getPathPoints=function(t,e){if(!t.length)return[];if(e)return[i.filter(t,(function(t){return!o(t)}))];var n=[],r=[];return t.forEach((function(t){o(t)?r.length&&(n.push(r),r=[]):r.push(t)})),r.length&&n.push(r),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0);e.splitPoints=function(t){var e=t.x;return(i.isArray(t.y)?t.y:[t.y]).map((function(t,n){return{x:i.isArray(e)?e[n]:e,y:t}}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(28),o=n(7);e.SHAPES=["circle","square","bowtie","diamond","hexagon","triangle","triangle-down"],e.HOLLOW_SHAPES=["cross","tick","plus","hyphen","line"],e.drawPoints=function(t,e,n,a,s){var u=o.getStyle(e,s,!s,"r"),c=t.parsePoints(e.points);if(c.length>1){for(var l=n.addGroup(),h=0,p=c;h2&&(n.push([r].concat(a.splice(0,2))),s="l",r="m"===r?"l":"L"),"o"===s&&1===a.length&&n.push([r,a[0]]),"r"===s)n.push([r].concat(a));else for(;a.length>=e[s]&&(n.push([r].concat(a.splice(0,e[s]))),e[s]););return t})),n},l=function(t,e){for(var n=[],i=0,r=t.length;r-2*!e>i;i+=2){var o=[{x:+t[i-2],y:+t[i-1]},{x:+t[i],y:+t[i+1]},{x:+t[i+2],y:+t[i+3]},{x:+t[i+4],y:+t[i+5]}];e?i?r-4===i?o[3]={x:+t[0],y:+t[1]}:r-2===i&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[r-2],y:+t[r-1]}:r-4===i?o[3]=o[2]:i||(o[0]={x:+t[i],y:+t[i+1]}),n.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return n},h=function(t,e,n,i,r){var o=[];if(null===r&&null===i&&(i=n),t=+t,e=+e,n=+n,i=+i,null!==r){var a=Math.PI/180,s=t+n*Math.cos(-i*a),u=t+n*Math.cos(-r*a);o=[["M",s,e+n*Math.sin(-i*a)],["A",n,n,0,+(r-i>180),0,u,e+n*Math.sin(-r*a)]]}else o=[["M",t,e],["m",0,-i],["a",n,i,0,1,1,0,2*i],["a",n,i,0,1,1,0,-2*i],["z"]];return o},p=function(t){if(!(t=c(t))||!t.length)return[["M",0,0]];var e,n,i=[],r=0,o=0,a=0,s=0,u=0;"M"===t[0][0]&&(a=r=+t[0][1],s=o=+t[0][2],u++,i[0]=["M",r,o]);for(var p=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),f=void 0,d=void 0,g=u,y=t.length;g1&&(n*=_=Math.sqrt(_),i*=_);var w=n*n,O=i*i,C=(o===a?-1:1)*Math.sqrt(Math.abs((w*O-w*M*M-O*b*b)/(w*M*M+O*b*b)));f=C*n*M/i+(t+s)/2,d=C*-i*b/n+(e+u)/2,h=Math.asin(((e-d)/i).toFixed(9)),p=Math.asin(((u-d)/i).toFixed(9)),h=tp&&(h-=2*Math.PI),!a&&p>h&&(p-=2*Math.PI)}var S=p-h;if(Math.abs(S)>y){var A=p,P=s,j=u;p=h+y*(a&&p>h?1:-1),s=f+n*Math.cos(p),u=d+i*Math.sin(p),m=g(s,u,n,i,r,0,a,P,j,[p,A,f,d])}S=p-h;var k=Math.cos(h),T=Math.sin(h),E=Math.cos(p),I=Math.sin(p),L=Math.tan(S/4),B=4/3*n*L,D=4/3*i*L,F=[t,e],R=[t+B*T,e-D*k],N=[s+B*I,u-D*E],Y=[s,u];if(R[0]=2*F[0]-R[0],R[1]=2*F[1]-R[1],c)return[R,N,Y].concat(m);for(var X=[],G=0,z=(m=[R,N,Y].concat(m).join().split(",")).length;G7){t[e].shift();for(var o=t[e];o.length;)s[e]="A",r&&(u[e]="A"),t.splice(e++,0,["C"].concat(o.splice(0,6)));t.splice(e,1),n=Math.max(i.length,r&&r.length||0)}},v=function(t,e,o,a,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),o.bx=0,o.by=0,o.x=t[s][1],o.y=t[s][2],n=Math.max(i.length,r&&r.length||0))};n=Math.max(i.length,r&&r.length||0);for(var m=0;m1?1:u<0?0:u)/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],p=0,f=0;f<12;f++){var d=c*l[f]+c,g=x(d,t,n,r,a),y=x(d,e,i,o,s),v=g*g+y*y;p+=h[f]*Math.sqrt(v)}return c*p},M=function(t,e,n,i,r,o,a,s){for(var u,c,l,h,p=[],f=[[],[]],d=0;d<2;++d)if(0===d?(c=6*t-12*n+6*r,u=-3*t+9*n-9*r+3*a,l=3*n-3*t):(c=6*e-12*i+6*o,u=-3*e+9*i-9*o+3*s,l=3*i-3*e),Math.abs(u)<1e-12){if(Math.abs(c)<1e-12)continue;(h=-l/c)>0&&h<1&&p.push(h)}else{var g=c*c-4*l*u,y=Math.sqrt(g);if(!(g<0)){var v=(-c+y)/(2*u);v>0&&v<1&&p.push(v);var m=(-c-y)/(2*u);m>0&&m<1&&p.push(m)}}for(var x,b=p.length,M=b;b--;)x=1-(h=p[b]),f[0][b]=x*x*x*t+3*x*x*h*n+3*x*h*h*r+h*h*h*a,f[1][b]=x*x*x*e+3*x*x*h*i+3*x*h*h*o+h*h*h*s;return f[0][M]=t,f[1][M]=e,f[0][M+1]=a,f[1][M+1]=s,f[0].length=f[1].length=M+2,{min:{x:Math.min.apply(0,f[0]),y:Math.min.apply(0,f[1])},max:{x:Math.max.apply(0,f[0]),y:Math.max.apply(0,f[1])}}},_=function(t,e,n,i,r,o,a,s){if(!(Math.max(t,n)Math.max(r,a)||Math.max(e,i)Math.max(o,s))){var u=(t-n)*(o-s)-(e-i)*(r-a);if(u){var c=((t*i-e*n)*(r-a)-(t-n)*(r*s-o*a))/u,l=((t*i-e*n)*(o-s)-(e-i)*(r*s-o*a))/u,h=+c.toFixed(2),p=+l.toFixed(2);if(!(h<+Math.min(t,n).toFixed(2)||h>+Math.max(t,n).toFixed(2)||h<+Math.min(r,a).toFixed(2)||h>+Math.max(r,a).toFixed(2)||p<+Math.min(e,i).toFixed(2)||p>+Math.max(e,i).toFixed(2)||p<+Math.min(o,s).toFixed(2)||p>+Math.max(o,s).toFixed(2)))return{x:c,y:l}}}},w=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},O=function(t,e,n,i,r){if(r)return[["M",+t+ +r,e],["l",n-2*r,0],["a",r,r,0,0,1,r,r],["l",0,i-2*r],["a",r,r,0,0,1,-r,r],["l",2*r-n,0],["a",r,r,0,0,1,-r,-r],["l",0,2*r-i],["a",r,r,0,0,1,r,-r],["z"]];var o=[["M",t,e],["l",n,0],["l",0,i],["l",-n,0],["z"]];return o.parsePathArray=m,o},C=function(t,e,n,i){return null===t&&(t=e=n=i=0),null===e&&(e=t.y,n=t.width,i=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:i,h:i,x2:t+n,y2:e+i,cx:t+n/2,cy:e+i/2,r1:Math.min(n,i)/2,r2:Math.max(n,i)/2,r0:Math.sqrt(n*n+i*i)/2,path:O(t,e,n,i),vb:[t,e,n,i].join(" ")}},S=function(t,e,n,i,r,a,s,u){Object(o.isArray)(t)||(t=[t,e,n,i,r,a,s,u]);var c=M.apply(null,t);return C(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)},A=function(t,e,n,i,r,o,a,s,u){var c=1-u,l=Math.pow(c,3),h=Math.pow(c,2),p=u*u,f=p*u,d=t+2*u*(n-t)+p*(r-2*n+t),g=e+2*u*(i-e)+p*(o-2*i+e),y=n+2*u*(r-n)+p*(a-2*r+n),v=i+2*u*(o-i)+p*(s-2*o+i);return{x:l*t+3*h*u*n+3*c*u*u*r+f*a,y:l*e+3*h*u*i+3*c*u*u*o+f*s,m:{x:d,y:g},n:{x:y,y:v},start:{x:c*t+u*n,y:c*e+u*i},end:{x:c*r+u*a,y:c*o+u*s},alpha:90-180*Math.atan2(d-y,g-v)/Math.PI}},P=function(t,e,n){if(!function(t,e){return t=C(t),e=C(e),w(e,t.x,t.y)||w(e,t.x2,t.y)||w(e,t.x,t.y2)||w(e,t.x2,t.y2)||w(t,e.x,e.y)||w(t,e.x2,e.y)||w(t,e.x,e.y2)||w(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(S(t),S(e)))return n?0:[];for(var i=~~(b.apply(0,t)/8),r=~~(b.apply(0,e)/8),o=[],a=[],s={},u=n?0:[],c=0;c=0&&x<=1&&M>=0&&M<=1&&(n?u+=1:u.push({x:m.x,y:m.y,t1:x,t2:M}))}}return u},j=function(t,e){return function(t,e,n){var i,r,o,a,s,u,c,l,h,p;t=y(t),e=y(e);for(var f=[],d=0,g=t.length;d=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e.concat(t[t.length-1])}))}(t,e,n));else{var r=[].concat(t);"M"===r[0]&&(r[0]="L");for(var o=0;o<=n-1;o++)i.push(r)}return i}(t[r],t[r+1],i))}),[]);return u.unshift(t[0]),"Z"!==e[i]&&"z"!==e[i]||u.push("Z"),u},E=function(t,e){if(t.length!==e.length)return!1;var n=!0;return Object(o.each)(t,(function(t,i){if(t!==e[i])return n=!1,!1})),n};function I(t,e,n){var i=null,r=n;return e=0;u--)a=o[u].index,"add"===o[u].type?t.splice(a,0,[].concat(t[a])):t.splice(a,1)}var h=r-(i=t.length);if(i0)){t[i]=e[i];break}n=B(n,t[i-1],1)}t[i]=["Q"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[i]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(i>0)){t[i]=e[i];break}n=B(n,t[i-1],2)}t[i]=["C"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(n.length<2){if(!(i>0)){t[i]=e[i];break}n=B(n,t[i-1],1)}t[i]=["S"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[i]=e[i]}return t},R=function(){function t(t,e){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}(),N=n(1),Y=n(59),X=n.n(Y),G=(n(31),n(39)),z=n.n(G),q=n(23),H=n.n(q),V=n(41),W=n.n(V),U=(n(15),n(67)),Q=n.n(U),Z=n(24),$=n.n(Z),K=n(68),J=n.n(K);function tt(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}var et="undefined"!=typeof window&&void 0!==window.document,nt=function(t){function e(e){var n=t.call(this)||this;n.destroyed=!1;var i=n.getDefaultCfg();return n.cfg=Q()(i,e),n}return Object(N.__extends)(e,t),e.prototype.getDefaultCfg=function(){return{}},e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){this.cfg[t]=e},e.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},e}(X.a),it=n(2);function rt(t,e){var n=[],i=t[0],r=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],p=e[0],f=e[1],d=e[2],g=e[3],y=e[4],v=e[5],m=e[6],x=e[7],b=e[8];return n[0]=p*i+f*a+d*c,n[1]=p*r+f*s+d*l,n[2]=p*o+f*u+d*h,n[3]=g*i+y*a+v*c,n[4]=g*r+y*s+v*l,n[5]=g*o+y*u+v*h,n[6]=m*i+x*a+b*c,n[7]=m*r+x*s+b*l,n[8]=m*o+x*u+b*h,n}function ot(t,e){var n=[],i=e[0],r=e[1];return n[0]=t[0]*i+t[3]*r+t[6],n[1]=t[1]*i+t[4]*r+t[7],n}var at=["zIndex","capture","visible","type"],st=["repeat"];function ut(t,e){var n={},i=e.attrs;for(var r in t)n[r]=i[r];return n}function ct(t,e){var n={},i=e.attr();return Object(o.each)(t,(function(t,e){-1!==st.indexOf(e)||Object(o.isEqual)(i[e],t)||(n[e]=t)})),n}function lt(t,e){if(e.onFrame)return t;var n=e.startTime,i=e.delay,r=e.duration,a=Object.prototype.hasOwnProperty;return Object(o.each)(t,(function(t){n+it.delay&&Object(o.each)(e.toAttrs,(function(e,n){a.call(t.toAttrs,n)&&(delete t.toAttrs[n],delete t.fromAttrs[n])}))})),t}var ht=function(t){function e(e){var n=t.call(this,e)||this;n.attrs={};var i=n.getDefaultAttrs();return Object(o.mix)(i,e.attrs),n.attrs=i,n.initAttrs(i),n.initAnimate(),n}return Object(N.__extends)(e,t),e.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},e.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},e.prototype.onCanvasChange=function(t){},e.prototype.initAttrs=function(t){},e.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},e.prototype.isGroup=function(){return!1},e.prototype.getParent=function(){return this.get("parent")},e.prototype.getCanvas=function(){return this.get("canvas")},e.prototype.attr=function(){for(var t,e=[],n=0;n0?i=lt(i,x):n.addAnimator(this),i.push(x),this.set("animations",i),this.set("_pause",{isPaused:!1})},e.prototype.stopAnimate=function(t){var e=this;void 0===t&&(t=!0);var n=this.get("animations");Object(o.each)(n,(function(n){t&&(n.onFrame?e.attr(n.onFrame(1)):e.attr(n.toAttrs)),n.callback&&n.callback()})),this.set("animating",!1),this.set("animations",[])},e.prototype.pauseAnimate=function(){var t=this.get("timeline"),e=this.get("animations");return Object(o.each)(e,(function(t){t.pauseCallback&&t.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:t.getTime()}),this},e.prototype.resumeAnimate=function(){var t=this.get("timeline").getTime(),e=this.get("animations"),n=this.get("_pause").pauseTime;return Object(o.each)(e,(function(e){e.startTime=e.startTime+(t-n),e._paused=!1,e._pauseTime=null,e.resumeCallback&&e.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",e),this},e.prototype.emitDelegation=function(t,e){for(var n=e.propagationPath,i=this.getEvents(),r=0;r0)}));return a.length>0?($()(a,(function(t){var e=t.getBBox();r.push(e.minX,e.maxX),o.push(e.minY,e.maxY)})),t=Math.min.apply(null,r),e=Math.max.apply(null,r),n=Math.min.apply(null,o),i=Math.max.apply(null,o)):(t=0,e=0,n=0,i=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:i,width:e-t,height:i-n}},e.prototype.getCanvasBBox=function(){var t=1/0,e=-1/0,n=1/0,i=-1/0,r=[],o=[],a=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));return a.length>0?($()(a,(function(t){var e=t.getCanvasBBox();r.push(e.minX,e.maxX),o.push(e.minY,e.maxY)})),t=Math.min.apply(null,r),e=Math.max.apply(null,r),n=Math.min.apply(null,o),i=Math.max.apply(null,o)):(t=0,e=0,n=0,i=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:i,width:e-t,height:i-n}},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.children=[],e},e.prototype.onAttrChange=function(e,n,i){if(t.prototype.onAttrChange.call(this,e,n,i),"matrix"===e){var r=this.getTotalMatrix();this._applyChildrenMarix(r)}},e.prototype.applyMatrix=function(e){var n=this.getTotalMatrix();t.prototype.applyMatrix.call(this,e);var i=this.getTotalMatrix();i!==n&&this._applyChildrenMarix(i)},e.prototype._applyChildrenMarix=function(t){var e=this.getChildren();$()(e,(function(e){e.applyMatrix(t)}))},e.prototype.addShape=function(){for(var t=[],e=0;e=0;o--){var a=t[o];if(ft(a)&&(a.isGroup()?r=a.getShape(e,n,i):a.isHit(e,n)&&(r=a)),r)break}return r},e.prototype.add=function(t){var e=this.getCanvas(),n=this.getChildren(),i=this.get("timeline"),r=t.getParent();r&&function(t,e,n){void 0===n&&(n=!0),n?e.destroy():(e.set("parent",null),e.set("canvas",null)),tt(t.getChildren(),e)}(r,t,!1),t.set("parent",this),e&&function t(e,n){if(e.set("canvas",n),e.isGroup()){var i=e.get("children");i.length&&i.forEach((function(e){t(e,n)}))}}(t,e),i&&function t(e,n){if(e.set("timeline",n),e.isGroup()){var i=e.get("children");i.length&&i.forEach((function(e){t(e,n)}))}}(t,i),n.push(t),function(t){t.isGroup()?(t.isEntityGroup()||t.get("children").length)&&t.onCanvasChange("add"):t.onCanvasChange("add")}(t),this._applyElementMatrix(t)},e.prototype._applyElementMatrix=function(t){var e=this.getTotalMatrix();e&&t.applyMatrix(e)},e.prototype.getChildren=function(){return this.get("children")},e.prototype.sort=function(){var t,e=this.getChildren();$()(e,(function(t,e){return t._INDEX=e,t})),e.sort((t=function(t,e){return t.get("zIndex")-e.get("zIndex")},function(e,n){var i=t(e,n);return 0===i?e._INDEX-n._INDEX:i})),this.onCanvasChange("sort")},e.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),e=t.length-1;e>=0;e--)t[e].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},e.prototype.destroy=function(){this.get("destroyed")||(this.clear(),t.prototype.destroy.call(this))},e.prototype.getFirst=function(){return this.getChildByIndex(0)},e.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},e.prototype.getChildByIndex=function(t){return this.getChildren()[t]},e.prototype.getCount=function(){return this.getChildren().length},e.prototype.contain=function(t){return this.getChildren().indexOf(t)>-1},e.prototype.removeChild=function(t,e){void 0===e&&(e=!0),this.contain(t)&&t.remove(e)},e.prototype.findAll=function(t){var e=[],n=this.getChildren();return $()(n,(function(n){t(n)&&e.push(n),n.isGroup()&&(e=e.concat(n.findAll(t)))})),e},e.prototype.find=function(t){var e=null,n=this.getChildren();return $()(n,(function(n){if(t(n)?e=n:n.isGroup()&&(e=n.find(t)),e)return!1})),e},e.prototype.findById=function(t){return this.find((function(e){return e.get("id")===t}))},e.prototype.findByClassName=function(t){return this.find((function(e){return e.get("className")===t}))},e.prototype.findAllByName=function(t){return this.findAll((function(e){return e.get("name")===t}))},e}(ht),vt=0,mt=0,xt=0,bt=0,Mt=0,_t=0,wt="object"==typeof performance&&performance.now?performance:Date,Ot="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ct(){return Mt||(Ot(St),Mt=wt.now()+_t)}function St(){Mt=0}function At(){this._call=this._time=this._next=null}function Pt(t,e,n){var i=new At;return i.restart(t,e,n),i}function jt(){Mt=(bt=wt.now())+_t,vt=mt=0;try{!function(){Ct(),++vt;for(var t,e=dt;e;)(t=Mt-e._time)>=0&&e._call.call(null,t),e=e._next;--vt}()}finally{vt=0,function(){for(var t,e,n=dt,i=1/0;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:dt=e);gt=t,Tt(i)}(),Mt=0}}function kt(){var t=wt.now(),e=t-bt;e>1e3&&(_t-=e,bt=t)}function Tt(t){vt||(mt&&(mt=clearTimeout(mt)),t-Mt>24?(t<1/0&&(mt=setTimeout(jt,t-wt.now()-_t)),xt&&(xt=clearInterval(xt))):(xt||(bt=wt.now(),xt=setInterval(kt,1e3)),vt=1,Ot(jt)))}function Et(t){return+t}function It(t){return t*t}function Lt(t){return t*(2-t)}function Bt(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function Dt(t){return t*t*t}function Ft(t){return--t*t*t+1}function Rt(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}At.prototype=Pt.prototype={constructor:At,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Ct():+n)+(null==e?0:+e),this._next||gt===this||(gt?gt._next=this:dt=this,gt=this),this._call=t,this._time=n,Tt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Tt())}};var Nt=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),Yt=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),Xt=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),Gt=Math.PI,zt=Gt/2;function qt(t){return 1-Math.cos(t*zt)}function Ht(t){return Math.sin(t*zt)}function Vt(t){return(1-Math.cos(Gt*t))/2}function Wt(t){return Math.pow(2,10*t-10)}function Ut(t){return 1-Math.pow(2,-10*t)}function Qt(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function Zt(t){return 1-Math.sqrt(1-t*t)}function $t(t){return Math.sqrt(1- --t*t)}function Kt(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Jt=7.5625;function te(t){return 1-ee(1-t)}function ee(t){return(t=+t)<4/11?Jt*t*t:t<8/11?Jt*(t-=6/11)*t+.75:t<10/11?Jt*(t-=9/11)*t+.9375:Jt*(t-=21/22)*t+63/64}function ne(t){return((t*=2)<=1?1-ee(1-t):ee(t-1)+1)/2}var ie=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),re=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),oe=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),ae=2*Math.PI,se=function t(e,n){var i=Math.asin(1/(e=Math.max(1,e)))*(n/=ae);function r(t){return e*Math.pow(2,10*--t)*Math.sin((i-t)/n)}return r.amplitude=function(e){return t(e,n*ae)},r.period=function(n){return t(e,n)},r}(1,.3),ue=function t(e,n){var i=Math.asin(1/(e=Math.max(1,e)))*(n/=ae);function r(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+i)/n)}return r.amplitude=function(e){return t(e,n*ae)},r.period=function(n){return t(e,n)},r}(1,.3),ce=function t(e,n){var i=Math.asin(1/(e=Math.max(1,e)))*(n/=ae);function r(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((i-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((i+t)/n))/2}return r.amplitude=function(e){return t(e,n*ae)},r.period=function(n){return t(e,n)},r}(1,.3),le=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function he(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function pe(){}var fe="\\s*([+-]?\\d+)\\s*",de="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ge="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ye=/^#([0-9a-f]{3,8})$/,ve=new RegExp("^rgb\\("+[fe,fe,fe]+"\\)$"),me=new RegExp("^rgb\\("+[ge,ge,ge]+"\\)$"),xe=new RegExp("^rgba\\("+[fe,fe,fe,de]+"\\)$"),be=new RegExp("^rgba\\("+[ge,ge,ge,de]+"\\)$"),Me=new RegExp("^hsl\\("+[de,ge,ge]+"\\)$"),_e=new RegExp("^hsla\\("+[de,ge,ge,de]+"\\)$"),we={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Oe(){return this.rgb().formatHex()}function Ce(){return this.rgb().formatRgb()}function Se(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ye.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Ae(e):3===n?new ke(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new ke(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new ke(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ve.exec(t))?new ke(e[1],e[2],e[3],1):(e=me.exec(t))?new ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=xe.exec(t))?Pe(e[1],e[2],e[3],e[4]):(e=be.exec(t))?Pe(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Me.exec(t))?Le(e[1],e[2]/100,e[3]/100,1):(e=_e.exec(t))?Le(e[1],e[2]/100,e[3]/100,e[4]):we.hasOwnProperty(t)?Ae(we[t]):"transparent"===t?new ke(NaN,NaN,NaN,0):null}function Ae(t){return new ke(t>>16&255,t>>8&255,255&t,1)}function Pe(t,e,n,i){return i<=0&&(t=e=n=NaN),new ke(t,e,n,i)}function je(t,e,n,i){return 1===arguments.length?function(t){return t instanceof pe||(t=Se(t)),t?new ke((t=t.rgb()).r,t.g,t.b,t.opacity):new ke}(t):new ke(t,e,n,null==i?1:i)}function ke(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function Te(){return"#"+Ie(this.r)+Ie(this.g)+Ie(this.b)}function Ee(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Ie(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Le(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new De(t,e,n,i)}function Be(t){if(t instanceof De)return new De(t.h,t.s,t.l,t.opacity);if(t instanceof pe||(t=Se(t)),!t)return new De;if(t instanceof De)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),a=NaN,s=o-r,u=(o+r)/2;return s?(a=e===o?(n-i)/s+6*(n0&&u<1?0:a,new De(a,s,u,t.opacity)}function De(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function Fe(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Re(t,e,n,i,r){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*i+a*r)/6}le(pe,Se,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Oe,formatHex:Oe,formatHsl:function(){return Be(this).formatHsl()},formatRgb:Ce,toString:Ce}),le(ke,je,he(pe,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ke(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ke(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Te,formatHex:Te,formatRgb:Ee,toString:Ee})),le(De,(function(t,e,n,i){return 1===arguments.length?Be(t):new De(t,e,n,null==i?1:i)}),he(pe,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new De(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new De(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new ke(Fe(t>=240?t-240:t+120,r,i),Fe(t,r,i),Fe(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Ne=function(t){return function(){return t}};function Ye(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Ne(isNaN(t)?e:t)}var Xe=function t(e){var n=function(t){return 1==(t=+t)?Ye:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):Ne(isNaN(e)?n:e)}}(e);function i(t,e){var i=n((t=je(t)).r,(e=je(e)).r),r=n(t.g,e.g),o=n(t.b,e.b),a=Ye(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=o(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);function Ge(t){return function(e){var n,i,r=e.length,o=new Array(r),a=new Array(r),s=new Array(r);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),r=t[i],o=t[i+1],a=i>0?t[i-1]:2*r-o,s=io&&(r=e.slice(o,r),s[a]?s[a]+=r:s[++a]=r),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:We(n,i)})),o=Ze.lastIndex;return od.length?(f=c(a[p]),d=c(r[p]),d=L(d,f),d=F(d,f),e.fromAttrs.path=d,e.toAttrs.path=f):e.pathFormatted||(f=c(a[p]),d=c(r[p]),d=F(d,f),e.fromAttrs.path=d,e.toAttrs.path=f,e.pathFormatted=!0),i[p]=[];for(var g=0;g0){for(var o=i.animators.length-1;o>=0;o--)if((t=i.animators[o]).destroyed)i.removeAnimator(o);else{if(!t.isAnimatePaused())for(var a=(e=t.get("animations")).length-1;a>=0;a--)n=e[a],tn(t,n,r)&&(e.splice(a,1),n.callback&&n.callback());0===e.length&&i.removeAnimator(o)}i.canvas.get("autoDraw")||i.canvas.draw()}}))},t.prototype.addAnimator=function(t){this.animators.push(t)},t.prototype.removeAnimator=function(t){this.animators.splice(t,1)},t.prototype.isAnimating=function(){return!!this.animators.length},t.prototype.stop=function(){this.timer&&this.timer.stop()},t.prototype.stopAllAnimations=function(t){void 0===t&&(t=!0),this.animators.forEach((function(e){e.stopAnimate(t)})),this.animators=[],this.canvas.draw()},t.prototype.getTime=function(){return this.current},t}(),nn=function(t){function e(e){var n=t.call(this,e)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}return Object(N.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.cursor="default",e},e.prototype.initContainer=function(){var t=this.get("container");H()(t)&&(t=document.getElementById(t),this.set("container",t))},e.prototype.initDom=function(){var t=this.createDom();this.set("el",t),this.get("container").appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},e.prototype.initEvents=function(){},e.prototype.initTimeline=function(){var t=new en(this);this.set("timeline",t)},e.prototype.setDOMSize=function(t,e){var n=this.get("el");et&&(n.style.width=t+"px",n.style.height=e+"px")},e.prototype.changeSize=function(t,e){this.setDOMSize(t,e),this.set("width",t),this.set("height",e),this.onCanvasChange("changeSize")},e.prototype.getRenderer=function(){return this.get("renderer")},e.prototype.getCursor=function(){return this.get("cursor")},e.prototype.setCursor=function(t){this.set("cursor",t);var e=this.get("el");et&&e&&(e.style.cursor=t)},e.prototype.getPointByClient=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t-n.left,y:e-n.top}},e.prototype.getClientByPoint=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t+n.left,y:e+n.top}},e.prototype.draw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},e.prototype.clearEvents=function(){},e.prototype.isCanvas=function(){return!0},e.prototype.getParent=function(){return null},e.prototype.destroy=function(){var e=this.get("timeline");this.get("destroyed")||(this.clear(),e&&e.stop(),this.clearEvents(),this.removeDom(),t.prototype.destroy.call(this))},e}(yt),rn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(N.__extends)(e,t),e.prototype.isGroup=function(){return!0},e.prototype.isEntityGroup=function(){return!1},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=this.getChildren(),i=0;i=t&&n.minY<=e&&n.maxY>=e},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e),this.clearCacheBBox()},e.prototype.getBBox=function(){var t=this.get("bbox");return t||(t=this.calculateBBox(),this.set("bbox",t)),t},e.prototype.getCanvasBBox=function(){var t=this.get("canvasBox");return t||(t=this.calculateCanvasBBox(),this.set("canvasBox",t)),t},e.prototype.applyMatrix=function(e){t.prototype.applyMatrix.call(this,e),this.set("canvasBox",null)},e.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),e=this.getTotalMatrix(),n=t.minX,i=t.minY,r=t.maxX,o=t.maxY;if(e){var a=ot(e,[t.minX,t.minY]),s=ot(e,[t.maxX,t.minY]),u=ot(e,[t.minX,t.maxY]),c=ot(e,[t.maxX,t.maxY]);n=Math.min(a[0],s[0],u[0],c[0]),r=Math.max(a[0],s[0],u[0],c[0]),i=Math.min(a[1],s[1],u[1],c[1]),o=Math.max(a[1],s[1],u[1],c[1])}var l=this.attrs;if(l.shadowColor){var h=l.shadowBlur,p=void 0===h?0:h,f=l.shadowOffsetX,d=void 0===f?0:f,g=l.shadowOffsetY,y=void 0===g?0:g,v=n-p+d,m=r+p+d,x=i-p+y,b=o+p+y;n=Math.min(n,v),r=Math.max(r,m),i=Math.min(i,x),o=Math.max(o,b)}return{x:n,y:i,minX:n,minY:i,maxX:r,maxY:o,width:r-n,height:o-i}},e.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBox",null)},e.prototype.isClipShape=function(){return this.get("isClipShape")},e.prototype.isInShape=function(t,e){return!1},e.prototype.isOnlyHitBox=function(){return!1},e.prototype.isHit=function(t,e){var n=this.get("startArrowShape"),i=this.get("endArrowShape"),r=[t,e,1],o=(r=this.invertFromMatrix(r))[0],a=r[1],s=this._isInBBox(o,a);if(this.isOnlyHitBox())return s;if(s&&!this.isClipped(o,a)){if(this.isInShape(o,a))return!0;if(n&&n.isHit(o,a))return!0;if(i&&i.isHit(o,a))return!0}return!1},e}(ht),an=n(98).version},function(t,e,n){"use strict";n.r(e),n.d(e,"parsePath",(function(){return h})),n.d(e,"catmullRom2Bezier",(function(){return p})),n.d(e,"fillPath",(function(){return d})),n.d(e,"fillPathByDiff",(function(){return m})),n.d(e,"formatPath",(function(){return M})),n.d(e,"pathIntersection",(function(){return q})),n.d(e,"parsePathArray",(function(){return V})),n.d(e,"parsePathString",(function(){return A})),n.d(e,"path2Curve",(function(){return L})),n.d(e,"path2Absolute",(function(){return k})),n.d(e,"reactPath",(function(){return w})),n.d(e,"getArcParams",(function(){return et})),n.d(e,"path2Segments",(function(){return it})),n.d(e,"getLineIntersect",(function(){return ot})),n.d(e,"isPolygonsIntersect",(function(){return ht})),n.d(e,"isPointInPolygon",(function(){return ut}));var i=n(24),r=n.n(i),o=n(15),a=n.n(o),s=n(23),u=n.n(s),c=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,l=/[^\s\,]+/gi,h=function(t){var e=t||[];return a()(e)?e:u()(e)?(e=e.match(c),r()(e,(function(t,n){if((t=t.match(l))[0].length>1){var i=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=i}r()(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0};function p(t,e){for(var n=[],i=0,r=t.length;r-2*!e>i;i+=2){var o=[{x:+t[i-2],y:+t[i-1]},{x:+t[i],y:+t[i+1]},{x:+t[i+2],y:+t[i+3]},{x:+t[i+4],y:+t[i+5]}];e?i?r-4===i?o[3]={x:+t[0],y:+t[1]}:r-2===i&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[r-2],y:+t[r-1]}:r-4===i?o[3]=o[2]:i||(o[0]={x:+t[i],y:+t[i+1]}),n.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return n}function f(t,e){var n=[],i=[];return t.length&&function t(e,r){if(1===e.length)n.push(e[0]),i.push(e[0]);else{for(var o=[],a=0;a=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e.concat(t[t.length-1])}))}(t,e,n));else{var r=[].concat(t);"M"===r[0]&&(r[0]="L");for(var o=0;o<=n-1;o++)i.push(r)}return i}(t[r],t[r+1],i))}),[]);return u.unshift(t[0]),"Z"!==e[i]&&"z"!==e[i]||u.push("Z"),u}var g=n(91),y=n.n(g);function v(t,e,n){var i=null,r=n;return e=0;u--)a=o[u].index,"add"===o[u].type?t.splice(a,0,[].concat(t[a])):t.splice(a,1)}if((i=t.length)0)){t[i]=e[i];break}n=b(n,t[i-1],1)}t[i]=["Q"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[i]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(i>0)){t[i]=e[i];break}n=b(n,t[i-1],2)}t[i]=["C"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(n.length<2){if(!(i>0)){t[i]=e[i];break}n=b(n,t[i-1],1)}t[i]=["S"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[i]=e[i]}return t}var _=n(0);function w(t,e,n,i,r){return r?[["M",+t+ +r,e],["l",n-2*r,0],["a",r,r,0,0,1,r,r],["l",0,i-2*r],["a",r,r,0,0,1,-r,r],["l",2*r-n,0],["a",r,r,0,0,1,-r,-r],["l",0,2*r-i],["a",r,r,0,0,1,r,-r],["z"]]:[["M",t,e],["l",n,0],["l",0,i],["l",-n,0],["z"]]}var O="\t\n\v\f\r   ᠎              \u2028\u2029",C=new RegExp("([a-z])["+O+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+O+"]*,?["+O+"]*)+)","ig"),S=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+O+"]*,?["+O+"]*","ig");function A(t){if(!t)return null;if(a()(t))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(t).replace(C,(function(t,i,r){var o=[],a=i.toLowerCase();if(r.replace(S,(function(t,e){e&&o.push(+e)})),"m"===a&&o.length>2&&(n.push([i].concat(o.splice(0,2))),a="l",i="m"===i?"l":"L"),"o"===a&&1===o.length&&n.push([i,o[0]]),"r"===a)n.push([i].concat(o));else for(;o.length>=e[a]&&(n.push([i].concat(o.splice(0,e[a]))),e[a]););return""})),n}var P=/[a-z]/;function j(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function k(t){var e=A(t);if(!e||!e.length)return[["M",0,0]];for(var n=!1,i=0;i=0){n=!0;break}}if(!n)return e;var o=[],a=0,s=0,u=0,c=0,l=0,h=e[0];"M"!==h[0]&&"m"!==h[0]||(u=a=+h[1],c=s=+h[2],l++,o[0]=["M",a,s]),i=l;for(var p=e.length;i1&&(n*=M=Math.sqrt(M),i*=M);var _=n*n,w=i*i,O=(o===a?-1:1)*Math.sqrt(Math.abs((_*w-_*b*b-w*x*x)/(_*b*b+w*x*x)));f=O*n*b/i+(t+s)/2,d=O*-i*x/n+(e+u)/2,h=Math.asin(Number(((e-d)/i).toFixed(9))),p=Math.asin(Number(((u-d)/i).toFixed(9))),h=tp&&(h-=2*Math.PI),!a&&p>h&&(p-=2*Math.PI)}var C=p-h;if(Math.abs(C)>g){var S=p,A=s,P=u;p=h+g*(a&&p>h?1:-1),s=f+n*Math.cos(p),u=d+i*Math.sin(p),v=T(s,u,n,i,r,0,a,A,P,[p,S,f,d])}C=p-h;var j=Math.cos(h),k=Math.sin(h),E=Math.cos(p),I=Math.sin(p),L=Math.tan(C/4),B=4/3*n*L,D=4/3*i*L,F=[t,e],R=[t+B*k,e-D*j],N=[s+B*I,u-D*E],Y=[s,u];if(R[0]=2*F[0]-R[0],R[1]=2*F[1]-R[1],c)return[R,N,Y].concat(v);for(var X=[],G=0,z=(v=[R,N,Y].concat(v).join().split(",")).length;G7){t[e].shift();for(var o=t[e];o.length;)s[e]="A",r&&(u[e]="A"),t.splice(e++,0,["C"].concat(o.splice(0,6)));t.splice(e,1),n=Math.max(i.length,r&&r.length||0)}},f=function(t,e,o,a,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),o.bx=0,o.by=0,o.x=t[s][1],o.y=t[s][2],n=Math.max(i.length,r&&r.length||0))};n=Math.max(i.length,r&&r.length||0);for(var d=0;d1?1:u<0?0:u)/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],p=0,f=0;f<12;f++){var d=c*l[f]+c,g=B(d,t,n,r,a),y=B(d,e,i,o,s),v=g*g+y*y;p+=h[f]*Math.sqrt(v)}return c*p},F=function(t,e,n,i,r,o,a,s){for(var u,c,l,h,p=[],f=[[],[]],d=0;d<2;++d)if(0===d?(c=6*t-12*n+6*r,u=-3*t+9*n-9*r+3*a,l=3*n-3*t):(c=6*e-12*i+6*o,u=-3*e+9*i-9*o+3*s,l=3*i-3*e),Math.abs(u)<1e-12){if(Math.abs(c)<1e-12)continue;(h=-l/c)>0&&h<1&&p.push(h)}else{var g=c*c-4*l*u,y=Math.sqrt(g);if(!(g<0)){var v=(-c+y)/(2*u);v>0&&v<1&&p.push(v);var m=(-c-y)/(2*u);m>0&&m<1&&p.push(m)}}for(var x,b=p.length,M=b;b--;)x=1-(h=p[b]),f[0][b]=x*x*x*t+3*x*x*h*n+3*x*h*h*r+h*h*h*a,f[1][b]=x*x*x*e+3*x*x*h*i+3*x*h*h*o+h*h*h*s;return f[0][M]=t,f[1][M]=e,f[0][M+1]=a,f[1][M+1]=s,f[0].length=f[1].length=M+2,{min:{x:Math.min.apply(0,f[0]),y:Math.min.apply(0,f[1])},max:{x:Math.max.apply(0,f[0]),y:Math.max.apply(0,f[1])}}},R=function(t,e,n,i,r,o,a,s){if(!(Math.max(t,n)Math.max(r,a)||Math.max(e,i)Math.max(o,s))){var u=(t-n)*(o-s)-(e-i)*(r-a);if(u){var c=((t*i-e*n)*(r-a)-(t-n)*(r*s-o*a))/u,l=((t*i-e*n)*(o-s)-(e-i)*(r*s-o*a))/u,h=+c.toFixed(2),p=+l.toFixed(2);if(!(h<+Math.min(t,n).toFixed(2)||h>+Math.max(t,n).toFixed(2)||h<+Math.min(r,a).toFixed(2)||h>+Math.max(r,a).toFixed(2)||p<+Math.min(e,i).toFixed(2)||p>+Math.max(e,i).toFixed(2)||p<+Math.min(o,s).toFixed(2)||p>+Math.max(o,s).toFixed(2)))return{x:c,y:l}}}},N=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},Y=function(t,e,n,i){return null===t&&(t=e=n=i=0),null===e&&(e=t.y,n=t.width,i=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:i,h:i,x2:t+n,y2:e+i,cx:t+n/2,cy:e+i/2,r1:Math.min(n,i)/2,r2:Math.max(n,i)/2,r0:Math.sqrt(n*n+i*i)/2,path:w(t,e,n,i),vb:[t,e,n,i].join(" ")}},X=function(t,e,n,i,r,o,a,s){Object(_.isArray)(t)||(t=[t,e,n,i,r,o,a,s]);var u=F.apply(null,t);return Y(u.min.x,u.min.y,u.max.x-u.min.x,u.max.y-u.min.y)},G=function(t,e,n,i,r,o,a,s,u){var c=1-u,l=Math.pow(c,3),h=Math.pow(c,2),p=u*u,f=p*u,d=t+2*u*(n-t)+p*(r-2*n+t),g=e+2*u*(i-e)+p*(o-2*i+e),y=n+2*u*(r-n)+p*(a-2*r+n),v=i+2*u*(o-i)+p*(s-2*o+i);return{x:l*t+3*h*u*n+3*c*u*u*r+f*a,y:l*e+3*h*u*i+3*c*u*u*o+f*s,m:{x:d,y:g},n:{x:y,y:v},start:{x:c*t+u*n,y:c*e+u*i},end:{x:c*r+u*a,y:c*o+u*s},alpha:90-180*Math.atan2(d-y,g-v)/Math.PI}},z=function(t,e,n){if(!function(t,e){return t=Y(t),e=Y(e),N(e,t.x,t.y)||N(e,t.x2,t.y)||N(e,t.x,t.y2)||N(e,t.x2,t.y2)||N(t,e.x,e.y)||N(t,e.x2,e.y)||N(t,e.x,e.y2)||N(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(X(t),X(e)))return n?0:[];for(var i=~~(D.apply(0,t)/8),r=~~(D.apply(0,e)/8),o=[],a=[],s={},u=n?0:[],c=0;c=0&&x<=1&&b>=0&&b<=1&&(n?u++:u.push({x:m.x,y:m.y,t1:x,t2:b}))}}return u};function q(t,e){return function(t,e,n){var i,r,o,a,s,u,c,l,h,p;t=L(t),e=L(e);for(var f=[],d=0,g=t.length;d1&&(n*=Math.sqrt(f),i*=Math.sqrt(f));var d=n*n*(p*p)+i*i*(h*h),g=d?Math.sqrt((n*n*(i*i)-d)/d):1;o===a&&(g*=-1),isNaN(g)&&(g=0);var y=i?g*n*p/i:0,v=n?g*-i*h/n:0,m=(s+c)/2+Math.cos(r)*y-Math.sin(r)*v,x=(u+l)/2+Math.sin(r)*y+Math.cos(r)*v,b=[(h-y)/n,(p-v)/i],M=[(-1*h-y)/n,(-1*p-v)/i],_=J([1,0],b),w=J(b,M);return K(b,M)<=-1&&(w=Math.PI),K(b,M)>=1&&(w=0),0===a&&w>0&&(w-=2*Math.PI),1===a&&w<0&&(w+=2*Math.PI),{cx:m,cy:x,rx:tt(t,[c,l])?0:n,ry:tt(t,[c,l])?0:i,startAngle:_,endAngle:_+w,xRotation:r,arcFlag:o,sweepFlag:a}}function nt(t,e){return{x:e.x+(e.x-t.x),y:e.y+(e.y-t.y)}}function it(t){for(var e=[],n=null,i=null,r=null,o=0,a=(t=h(t)).length,s=0;s=e&&t<=n};function ot(t,e,n,i){var r=n.x-t.x,o=n.y-t.y,a=e.x-t.x,s=e.y-t.y,u=i.x-n.x,c=i.y-n.y,l=a*c-s*u,h=null;if(l*l>.001*(a*a+s*s)*(u*u+c*c)){var p=(r*c-o*u)/l,f=(r*s-o*a)/l;rt(p,0,1)&&rt(f,0,1)&&(h={x:t.x+p*a,y:t.y+p*s})}return h}function at(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function st(t,e,n){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])&&Math.min(t[0],e[0])<=n[0]&&n[0]<=Math.max(t[0],e[0])&&Math.min(t[1],e[1])<=n[1]&&n[1]<=Math.max(t[1],e[1])}function ut(t,e,n){var i=!1,r=t.length;if(r<=2)return!1;for(var o=0;o0!=at(s[1]-n)>0&&at(e-(n-a[1])*(a[0]-s[0])/(a[1]-s[1])-a[0])<0&&(i=!i)}return i}function ct(t){for(var e=[],n=t.length,i=0;i1){var a=t[0],s=t[n-1];e.push({from:{x:s[0],y:s[1]},to:{x:a[0],y:a[1]}})}return e}function lt(t){var e=t.map((function(t){return t[0]})),n=t.map((function(t){return t[1]}));return{minX:Math.min.apply(null,e),maxX:Math.max.apply(null,e),minY:Math.min.apply(null,n),maxY:Math.max.apply(null,n)}}function ht(t,e){if(t.length<2||e.length<2)return!1;var n,i;if(n=lt(t),(i=lt(e)).minX>n.maxX||i.maxXn.maxY||i.maxY=c}))||t[t.length-1]}var c=r.memoize((function(t){if(t.isCategory)return 1;var e=t.values,n=t.translate(e[0]),i=n;r.each(e,(function(e){var r=t.translate(e);ri&&(i=r)}));var o=e.length;return(i-n)/(o-1)}));function l(t){var e,n=function(t){var e=r.values(t.attributes);return r.filter(e,(function(t){return r.contains(o.GROUP_ATTRS,t.type)}))}(t);r.each(n,(function(t){var n=t.getScale(t.type);if(n&&n.isLinear)return e=n,!1}));var i=t.getXScale(),a=t.getYScale();return e||a||i}e.findDataByPoint=function(t,e,n){if(0===e.length)return null;var i=n.type,a=n.getXScale(),l=n.getYScale(),h=a.field,p=l.field,f=null;if("heatmap"===i||"point"===i){var d=n.coordinate.invert(t),g=a.invert(d.x),y=l.invert(d.y),v=1/0;return r.each(e,(function(t){var e=t[o.FIELD_ORIGIN],n=Math.pow(e[h]-g,2)+Math.pow(e[p]-y,2);n(1+o)/2&&(s=a),i.translate(i.invert(s))}(t,n),M=m[o.FIELD_ORIGIN][h],_=m[o.FIELD_ORIGIN][p],w=x[o.FIELD_ORIGIN][h],O=l.isLinear&&r.isArray(_);if(r.isArray(M))r.each(e,(function(t){var e=t[o.FIELD_ORIGIN];if(a.translate(e[h][0])<=b&&a.translate(e[h][1])>=b){if(!O)return f=t,!1;r.isArray(f)||(f=[]),f.push(t)}})),r.isArray(f)&&(f=u(f,t,n));else{var C;if(a.isLinear||"timeCat"===a.type){if(b>a.translate(w)||bMath.abs(a.translate(C[o.FIELD_ORIGIN][h])-b)&&(x=C)}var k=c(n.getXScale());return!f&&Math.abs(a.translate(x[o.FIELD_ORIGIN][h])-b)<=k/2&&(f=x),f},e.getTooltipItems=function(t,e,n){void 0===n&&(n="");var s,u,c=t[o.FIELD_ORIGIN],h=function(t,e,n){var i=n;n||(i=e.getAttribute("position").getFields()[0]);var o=e.scales;return o[i]?o[i].getText(t[i]):r.hasKey(t,i)?t[i]:i}(c,e,n),p=e.tooltipOption,f=e.theme.defaultColor,d=[];function g(e,n){if(!r.isNil(n)&&""!==n){var i={title:h,data:c,mappingData:t,name:e||h,value:n,color:t.color||f,marker:!0};d.push(i)}}if(r.isObject(p)){var y=p.fields,v=p.callback;if(v){var m=y.map((function(e){return t[o.FIELD_ORIGIN][e]})),x=v.apply(void 0,m),b=i.__assign({data:t[o.FIELD_ORIGIN],mappingData:t,title:h,color:t.color||f,marker:!0},x);d.push(b)}else{var M=e.scales;r.each(y,(function(t){if(!r.isNil(c[t])){var e=M[t];s=a.getName(e),u=e.getText(c[t]),g(s,u)}}))}}else{var _=l(e);r.isNil(c[_.field])||(u=function(t,e){var n=t[e.field];return r.isArray(n)?n.map((function(t){return e.getText(t)})).join("-"):e.getText(n)}(c,_),g(s=function(t,e){var n,i=e.getGroupScales();if(i.length&&r.each(i,(function(t){return n=t,!1})),n){var o=n.field;return n.getText(t[o])}var s=l(e);return a.getName(s)}(c,e),u))}return d}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={};e.registerComponentController=function(t,e){i[t]=e},e.unregisterComponentController=function(t){delete i[t]},e.getComponentControllerNames=function(){return Object.keys(i)},e.getComponentController=function(t){return i[t]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e,n){this.view=t,this.gEvent=e,this.data=n,this.type=e.type}return Object.defineProperty(t.prototype,"target",{get:function(){return this.gEvent.target},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"event",{get:function(){return this.gEvent.originalEvent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.gEvent.x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.gEvent.y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clientX",{get:function(){return this.gEvent.clientX},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clientY",{get:function(){return this.gEvent.clientY},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.clone=function(){return new t(this.view,this.gEvent,this.data)},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={};e.getAnimation=function(t){return i[t.toLowerCase()]},e.registerAnimation=function(t,e){i[t.toLowerCase()]=e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(18),a=i.__importDefault(n(36)),s=n(10),u=n(126),c=function(t){function e(e){var n=t.call(this,e)||this;n.states=[];var i=e.shapeFactory,r=e.theme,o=e.container,a=e.offscreenGroup,s=e.visible,u=void 0===s||s;return n.shapeFactory=i,n.theme=r,n.container=o,n.offscreenGroup=a,n.visible=u,n}return i.__extends(e,t),e.prototype.draw=function(t,e){void 0===e&&(e=!1),this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.drawShape(t,e),!1===this.visible&&this.changeVisible(!1)},e.prototype.update=function(t){var e=this.shapeFactory,n=this.shape;if(n){this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t);var i=this.getShapeDrawCfg(t);this.setShapeInfo(n,i);var r=this.getOffscreenGroup(),o=e.drawShape(this.shapeType,i,r);o.set("data",this.data),o.set("origin",i),this.syncShapeStyle(n,o,"",this.getAnimateCfg("update"))}},e.prototype.destroy=function(){var e=this.shapeFactory,n=this.shape;if(n){var r=this.getAnimateCfg("leave");r?o.doAnimate(n,r,{coordinate:e.coordinate,toAttrs:i.__assign({},n.attr())}):n.remove(!0)}this.states=[],t.prototype.destroy.call(this)},e.prototype.changeVisible=function(e){t.prototype.changeVisible.call(this,e),e?(this.shape&&this.shape.show(),this.labelShape&&this.labelShape.forEach((function(t){t.show()}))):(this.shape&&this.shape.hide(),this.labelShape&&this.labelShape.forEach((function(t){t.hide()})))},e.prototype.setState=function(t,e){var n=this,i=this,r=i.states,o=i.shapeFactory,a=i.model,s=i.shape,c=i.shapeType,l=r.indexOf(t);if(e){if(l>-1)return;r.push(t),"active"!==t&&"selected"!==t||s.toFront()}else{if(-1===l)return;r.splice(l,1),"active"!==t&&"selected"!==t||s.toBack()}var h=this.getShapeDrawCfg(a),p=o.drawShape(c,h,this.getOffscreenGroup());r.length?r.forEach((function(t){n.syncShapeStyle(s,p,t,null)})):this.syncShapeStyle(s,p,"",null),p.remove(!0);var f={state:t,stateStatus:e,element:this,target:this.container};this.container.emit("statechange",f),u.propagationDelegate(this.container,"statechange",f)},e.prototype.clearStates=function(){var t=this,e=this.states;r.each(e,(function(e){t.setState(e,!1)})),this.states=[]},e.prototype.hasState=function(t){return this.states.includes(t)},e.prototype.getStates=function(){return this.states},e.prototype.getData=function(){return this.data},e.prototype.getModel=function(){return this.model},e.prototype.getBBox=function(){var t=this.shape,e=this.labelShape,n={x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0};return t&&(n=t.getCanvasBBox()),e&&e.forEach((function(t){var e=t.getCanvasBBox();n.x=Math.min(e.x,n.x),n.y=Math.min(e.y,n.y),n.minX=Math.min(e.minX,n.minX),n.minY=Math.min(e.minY,n.minY),n.maxX=Math.max(e.maxX,n.maxX),n.maxY=Math.max(e.maxY,n.maxY)})),n.width=n.maxX-n.minX,n.height=n.maxY-n.minY,n},e.prototype.getStateStyle=function(t,e){var n=this.theme,i=this.shapeFactory,o=this.shapeType;n[o]||(o=i.defaultShapeType);var a=r.get(this.geometry.stateOption,t,{}),s=r.deepMix({},r.get(n,[o,t],{}),a),u=r.get(s.style,[e])?r.get(s.style,[e]):s.style;return r.isFunction(u)&&(u=u(this)),{animate:s.animate,style:u}},e.prototype.getAnimateCfg=function(t){var e=this.geometry.animateOption,n=this.shapeFactory,a=n.geometryType,s=n.coordinate,u=o.getDefaultAnimateCfg(a,s,t);return!e||!0===e&&r.isEmpty(u)||!1===e[t]||null===e[t]?null:i.__assign(i.__assign({},u),e[t])},e.prototype.drawShape=function(t,e){void 0===e&&(e=!1);var n=this.shapeFactory,r=this.container,a=this.shapeType,s=this.getShapeDrawCfg(t);if(this.shape=n.drawShape(a,s,r),this.shape){this.setShapeInfo(this.shape,s),this.shape.get("name")||this.shape.set("name",this.shapeFactory.geometryType),this.shape.set("inheritNames",["element"]);var u=e?"enter":"appear",c=this.getAnimateCfg(u);c&&o.doAnimate(this.shape,c,{coordinate:n.coordinate,toAttrs:i.__assign({},this.shape.attr())})}},e.prototype.getOffscreenGroup=function(){if(!this.offscreenGroup){var t=this.container.getGroupBase();this.offscreenGroup=new t({})}return this.offscreenGroup},e.prototype.setShapeInfo=function(t,e){var n=this;t.set("origin",e),t.set("element",this),t.isGroup()&&t.get("children").forEach((function(t){n.setShapeInfo(t,e)}))},e.prototype.getShapeDrawCfg=function(t){return i.__assign(i.__assign({},t),{defaultStyle:this.getStateStyle("default").style})},e.prototype.syncShapeStyle=function(t,e,n,i,r){if(void 0===n&&(n=""),void 0===r&&(r=0),t.isGroup())for(var a=t.get("children"),u=e.get("children"),c=0;c1){a.sort();var c=function(t,e){var n=t.length,r=t;i.isString(r[0])&&(r=t.map((function(t){return e.translate(t)})));for(var o=r[1]-r[0],a=2;as&&(o=s)}return o}(a,o);u=(o.max-o.min)/c,a.length>u&&(u=a.length)}var l=o.range,h=1/u,p=1;n.isPolar?p=n.isTransposed&&u>1?e.multiplePieWidthRatio:e.roseWidthRatio:(o.isLinear&&(h*=l[1]-l[0]),p=e.columnWidthRatio),h*=p,t.getAdjust("dodge")&&(h/=function(t,e){if(e){var n=i.flatten(t);return i.valuesOfKey(n,e).length}return t.length}(s,t.getAdjust("dodge").dodgeBy));var f=e.maxColumnWidth,d=e.minColumnWidth,g=r.getXDimensionLength(t.coordinate);if(f){var y=f/g;h>y&&(h=y)}if(d){var v=d/g;h=-Math.PI/2?"left":"right";else if(n.isTransposed){var i=n.getCenter(),r=this.getDefaultOffset(t.offset);e=Math.abs(t.x-i.x)<1?"center":t.angle>Math.PI||t.angle<=0?r>0?"left":"right":r>0?"right":"left"}else e="center";return e},e.prototype.getLabelPoint=function(t,e,n){var i,r=1,o=t.content[n];this.isToMiddle(e)?i=this.getMiddlePoint(e.points):(1===t.content.length&&0===n?n=1:0===n&&(r=-1),i=this.getArcPoint(e,n));var a=this.getDefaultOffset(t.offset)*r,s=this.getPointAngle(i),u=t.labelEmit,c=this.getCirclePoint(s,a,i,u);return 0===c.r?c.content="":(c.content=o,c.angle=s,c.color=e.color),c.rotate=t.autoRotate?this.getLabelRotate(s,a,u):t.rotate,c.start={x:i.x,y:i.y},c},e.prototype.getArcPoint=function(t,e){return void 0===e&&(e=0),r.isArray(t.x)||r.isArray(t.y)?{x:r.isArray(t.x)?t.x[e]:t.x,y:r.isArray(t.y)?t.y[e]:t.y}:{x:t.x,y:t.y}},e.prototype.getPointAngle=function(t){return a.getAngleByPoint(this.getCoordinate(),t)},e.prototype.getCirclePoint=function(t,e,n,r){var a=this.getCoordinate(),s=a.getCenter(),u=o.getDistanceToCenter(a,n);if(0===u)return i.__assign(i.__assign({},s),{r:u});var c=t;return a.isTransposed&&u>e&&!r?c=t+2*Math.asin(e/(2*u)):u+=e,{x:s.x+u*Math.cos(c),y:s.y+u*Math.sin(c),r:u}},e.prototype.getLabelRotate=function(t,e,n){var i=t+u;return n&&(i-=u),i&&(i>u?i-=Math.PI:i<-u&&(i+=Math.PI)),i},e.prototype.getMiddlePoint=function(t){var e=this.getCoordinate(),n=t.length,i={x:0,y:0};return r.each(t,(function(t){i.x+=t.x,i.y+=t.y})),i.x/=n,i.y/=n,i=e.convert(i)},e.prototype.isToMiddle=function(t){return t.x.length>2},e}(s.default);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(3);function r(t){return t===i.DIRECTION.LEFT?i.DIRECTION.RIGHT:t===i.DIRECTION.RIGHT?i.DIRECTION.LEFT:t}function o(t){return t===i.DIRECTION.TOP?i.DIRECTION.BOTTOM:t===i.DIRECTION.BOTTOM?i.DIRECTION.TOP:t}e.directionToPosition=function(t,e,n){return n===i.DIRECTION.TOP?[t.minX+t.width/2-e.width/2,t.minY]:n===i.DIRECTION.BOTTOM?[t.minX+t.width/2-e.width/2,t.maxY-e.height]:n===i.DIRECTION.LEFT?[t.minX,t.minY+t.height/2-e.height/2]:n===i.DIRECTION.RIGHT?[t.maxX-e.width,t.minY+t.height/2-e.height/2]:n===i.DIRECTION.TOP_LEFT||n===i.DIRECTION.LEFT_TOP?[t.tl.x,t.tl.y]:n===i.DIRECTION.TOP_RIGHT||n===i.DIRECTION.RIGHT_TOP?[t.tr.x-e.width,t.tr.y]:n===i.DIRECTION.BOTTOM_LEFT||n===i.DIRECTION.LEFT_BOTTOM?[t.bl.x,t.bl.y-e.height]:n===i.DIRECTION.BOTTOM_RIGHT||n===i.DIRECTION.RIGHT_BOTTOM?[t.br.x-e.width,t.br.y-e.height]:[0,0]},e.getTranslateDirection=function(t,e){var n=t;return function(t,e){var n=t;return e.isReflect("x")&&(n=r(n)),e.isReflect("y")&&(n=o(n)),n}(n=function(t,e){var n=e.matrix[0],i=e.matrix[4],a=t;return n<0&&(a=r(a)),i<0&&(a=o(a)),a}(n=function(t,e){if(e.isTransposed)switch(t){case i.DIRECTION.BOTTOM:return i.DIRECTION.LEFT;case i.DIRECTION.LEFT:return i.DIRECTION.BOTTOM;case i.DIRECTION.RIGHT:return i.DIRECTION.TOP;case i.DIRECTION.TOP:return i.DIRECTION.RIGHT}return t}(n,e),e),e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0);function o(t,e){return!!t&&!!t.className&&(r.isNil(t.className.baseVal)?t.className:t.className.baseVal).includes(e)}var a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.timeStamp=0,e}return i.__extends(e,t),e.prototype.show=function(){var t=this.context,e=t.event,n=t.view;if(!n.isTooltipLocked()){var i=this.timeStamp,o=+new Date;if(o-i>16){var a=this.location,s={x:e.x,y:e.y};a&&r.isEqual(a,s)||this.showTooltip(n,s),this.timeStamp=o,this.location=s}}},e.prototype.hide=function(){var t=this.context.view;if(!t.isTooltipLocked()){var e=this.context.event,n=r.get(e,["gEvent","originalEvent","toElement"]);n&&(o(n,"g2-tooltip")||function(t,e){for(var n=t.parentNode,i=!1;n&&n!==document.body;){if(o(n,"g2-tooltip")){i=!0;break}n=n.parentNode}return i}(n))||(this.hideTooltip(t),this.location=null)}},e.prototype.showTooltip=function(t,e){t.showTooltip(e)},e.prototype.hideTooltip=function(t){t.hideTooltip()},e}(i.__importDefault(n(8)).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shapeType="rect",e}return i.__extends(e,t),e.prototype.getRegion=function(){var t=this.points;return{start:r.head(t),end:r.last(t)}},e.prototype.getMaskAttrs=function(){var t=this.getRegion(),e=t.start,n=t.end;return{x:Math.min(e.x,n.x),y:Math.min(e.y,n.y),width:Math.abs(n.x-e.x),height:Math.abs(n.y-e.y)}},e}(i.__importDefault(n(58)).default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.getMaskPath=function(){var t=this.points,e=[];return t.length&&(r.each(t,(function(t,n){0===n?e.push(["M",t.x,t.y]):e.push(["L",t.x,t.y])})),e.push(["L",t[0].x,t[0].y])),e},e.prototype.getMaskAttrs=function(){return{path:this.getMaskPath()}},e.prototype.addPoint=function(){this.resize()},e}(i.__importDefault(n(58)).default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=i.__importDefault(n(8)),o=n(5);function a(t,e,n,i){var r=Math.min(n[e],i[e]),o=Math.max(n[e],i[e]),a=t.range,s=a[0],u=a[1];if(ru&&(o=u),r===u&&o===u)return null;var c=t.invert(r),l=t.invert(o);if(t.isCategory){var h=t.values.indexOf(c),p=t.values.indexOf(l),f=t.values.slice(h,p+1);return function(t){return f.includes(t)}}return function(t){return t>=c&&t<=l}}var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dims=["x","y"],e.startPoint=null,e.isStarted=!1,e}return i.__extends(e,t),e.prototype.hasDim=function(t){return this.dims.includes(t)},e.prototype.start=function(){var t=this.context;this.isStarted=!0,this.startPoint=t.getCurrentPoint()},e.prototype.filter=function(){var t,e;if(o.isMask(this.context)){var n=this.context.event.target.getCanvasBBox();t={x:n.x,y:n.y},e={x:n.maxX,y:n.maxY}}else{if(!this.isStarted)return;t=this.startPoint,e=this.context.getCurrentPoint()}if(!(Math.abs(t.x-e.x)<5||Math.abs(t.x-e.y)<5)){var i=this.context.view,r=i.getCoordinate(),s=r.invert(e),u=r.invert(t);if(this.hasDim("x")){var c=i.getXScale(),l=a(c,"x",s,u);this.filterView(i,c.field,l)}if(this.hasDim("y")){var h=i.getYScales()[0];l=a(h,"y",s,u),this.filterView(i,h.field,l)}this.reRender(i)}},e.prototype.end=function(){this.isStarted=!1},e.prototype.reset=function(){var t=this.context.view;if(this.isStarted=!1,this.hasDim("x")){var e=t.getXScale();this.filterView(t,e.field,null)}if(this.hasDim("y")){var n=t.getYScales()[0];this.filterView(t,n.field,null)}this.reRender(t)},e.prototype.filterView=function(t,e,n){t.filter(e,n)},e.prototype.reRender=function(t){t.render(!0)},e}(r.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dims=["x","y"],e.cfgFields=["dims"],e.cacheScaleDefs={},e}return i.__extends(e,t),e.prototype.hasDim=function(t){return this.dims.includes(t)},e.prototype.getScale=function(t){var e=this.context.view;return"x"===t?e.getXScale():e.getYScales()[0]},e.prototype.resetDim=function(t){var e=this.context.view;if(this.hasDim(t)&&this.cacheScaleDefs[t]){var n=this.getScale(t);e.scale(n.field,this.cacheScaleDefs[t]),this.cacheScaleDefs[t]=null}},e.prototype.reset=function(){this.resetDim("x"),this.resetDim("y"),this.context.view.render(!0)},e}(n(45).Action);e.default=r},function(t,e,n){"use strict";n.r(e),n.d(e,"registerAttribute",(function(){return y})),n.d(e,"getAttribute",(function(){return g})),n.d(e,"Attribute",(function(){return o})),n.d(e,"Color",(function(){return u})),n.d(e,"Opacity",(function(){return c})),n.d(e,"Position",(function(){return l})),n.d(e,"Shape",(function(){return h})),n.d(e,"Size",(function(){return p})),n.d(e,"Scale",(function(){return f.Scale}));var i=n(0),r=function(t,e){return Object(i.isString)(e)?e:t.invert(t.scale(e))},o=function(){function t(t){this.names=[],this.scales=[],this.linear=!1,this.values=[],this.callback=function(){return[]},this._parseCfg(t)}return t.prototype.mapping=function(){for(var t=this,e=[],n=0;n1?0:r<-1?Math.PI:Math.acos(r)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.equals=function(t,e){var n=t[0],i=t[1],o=t[2],a=e[0],s=e[1],u=e[2];return Math.abs(n-a)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-s)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-u)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(u))};var i,r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(42));function o(){var t=new r.ARRAY_TYPE(3);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function a(t){var e=t[0],n=t[1],i=t[2];return Math.sqrt(e*e+n*n+i*i)}function s(t,e,n){var i=new r.ARRAY_TYPE(3);return i[0]=t,i[1]=e,i[2]=n,i}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function c(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function l(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function h(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(n*n+i*i+r*r)}function p(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return n*n+i*i+r*r}function f(t){var e=t[0],n=t[1],i=t[2];return e*e+n*n+i*i}function d(t,e){var n=e[0],i=e[1],r=e[2],o=n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function g(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}e.sub=u,e.mul=c,e.div=l,e.dist=h,e.sqrDist=p,e.len=a,e.sqrLen=f,e.forEach=(i=o(),function(t,e,n,r,o,a){var s,u=void 0;for(e||(e=3),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,u=n;u0}It.registerInteraction("tooltip",{start:[{trigger:"plot:mousemove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"plot:mouseleave",action:"tooltip:hide"}]}),It.registerInteraction("element-active",{start:[{trigger:"element:mouseenter",action:"element-active:active"}],end:[{trigger:"element:mouseleave",action:"element-active:reset"}]}),It.registerInteraction("element-selected",{start:[{trigger:"element:click",action:"element-selected:toggle"}]}),It.registerInteraction("element-highlight",{start:[{trigger:"element:mouseenter",action:"element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight:reset"}]}),It.registerInteraction("element-highlight-by-x",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-x:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-x:reset"}]}),It.registerInteraction("element-highlight-by-color",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-color:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-color:reset"}]}),It.registerInteraction("legend-active",{start:[{trigger:"legend-item:mouseenter",action:["list-active:active","element-active:active"]}],end:[{trigger:"legend-item:mouseleave",action:["list-active:reset","element-active:reset"]}]}),It.registerInteraction("legend-highlight",{start:[{trigger:"legend-item:mouseenter",action:["legend-item-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"legend-item:mouseleave",action:["legend-item-highlight:reset","element-highlight:reset"]}]}),It.registerInteraction("axis-label-highlight",{start:[{trigger:"axis-label:mouseenter",action:["axis-label-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"axis-label:mouseleave",action:["axis-label-highlight:reset","element-highlight:reset"]}]}),It.registerInteraction("element-list-highlight",{start:[{trigger:"element:mouseenter",action:["list-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"element:mouseleave",action:["list-highlight:reset","element-highlight:reset"]}]}),It.registerInteraction("element-range-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"mask:mouseenter",action:"cursor:move"},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:function(t){return!t.isInShape("mask")},action:["rect-mask:start","rect-mask:show"]},{trigger:"mask:dragstart",action:["rect-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:drag",action:["rect-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end"]},{trigger:"mask:dragend",action:["rect-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(t){return!t.isInPlot()},action:["element-range-highlight:clear","rect-mask:end","rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","rect-mask:hide"]}]}),It.registerInteraction("brush",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Lt,action:["brush:start","rect-mask:start","rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:Lt,action:["rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Lt,action:["brush:filter","brush:end","rect-mask:end","rect-mask:hide","reset-button:show"]}],rollback:[{trigger:"reset-button:click",action:["brush:reset","reset-button:hide","cursor:crosshair"]}]}),It.registerInteraction("brush-visible",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"plot:mousedown",action:["rect-mask:start","rect-mask:show","element-range-highlight:start"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize","element-range-highlight:highlight"]},{trigger:"mask:end",action:["element-filter:filter"]}],end:[{trigger:"mouseup",isEnable:Lt,action:["rect-mask:end","rect-mask:hide","element-range-highlight:end","element-range-highlight:clear"]}],rollback:[{trigger:"dblclick",action:["element-filter:clear"]}]}),It.registerInteraction("brush-x",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Lt,action:["brush-x:start","x-rect-mask:start","x-rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:Lt,action:["x-rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Lt,action:["brush-x:filter","brush-x:end","x-rect-mask:end","x-rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]}),It.registerInteraction("element-path-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Lt,action:"path-mask:start"},{trigger:"mousedown",isEnable:Lt,action:"path-mask:show"}],processing:[{trigger:"mousemove",action:"path-mask:addPoint"}],end:[{trigger:"mouseup",action:"path-mask:end"}],rollback:[{trigger:"dblclick",action:"path-mask:hide"}]}),It.registerInteraction("element-single-selected",{start:[{trigger:"element:click",action:"element-single-selected:toggle"}]}),It.registerInteraction("legend-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:"list-unchecked:toggle"},{trigger:"legend-item:click",action:"data-filter:filter"}]}),It.registerInteraction("continuous-filter",{start:[{trigger:"legend:valuechanged",action:"data-filter:filter"}]}),It.registerInteraction("continuous-visible-filter",{start:[{trigger:"legend:valuechanged",action:"element-filter:filter"}]}),It.registerInteraction("legend-visible-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:"list-unchecked:toggle"},{trigger:"legend-item:click",action:"element-filter:filter"}]}),It.registerInteraction("active-region",{start:[{trigger:"plot:mousemove",action:"active-region:show"}],end:[{trigger:"plot:mouseleave",action:"active-region:hide"}]}),It.registerInteraction("view-zoom",{start:[{trigger:"plot:mousewheel",isEnable:function(t){return Bt(t.event)},action:"scale-zoom:zoomOut",throttle:{wait:100,leading:!0,trailing:!1}},{trigger:"plot:mousewheel",isEnable:function(t){return!Bt(t.event)},action:"scale-zoom:zoomIn",throttle:{wait:100,leading:!0,trailing:!1}}]}),It.registerInteraction("sibling-tooltip",{start:[{trigger:"plot:mousemove",action:"sibling-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"sibling-tooltip:hide"}]}),i.__exportStar(n(11),e);var Dt=n(10),Ft=n(47);e.Util={translate:Ft.translate,rotate:Ft.rotate,zoom:Ft.zoom,transform:Ft.transform,getAngle:Dt.getAngle,polarToCartesian:Dt.polarToCartesian}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(3),a=n(65),s=n(95),u=function(t){function e(e){var n=this,u=e.container,c=e.width,l=e.height,h=e.autoFit,p=void 0!==h&&h,f=e.padding,d=e.renderer,g=void 0===d?"canvas":d,y=e.pixelRatio,v=e.localRefresh,m=void 0===v||v,x=e.visible,b=void 0===x||x,M=e.defaultInteractions,_=void 0===M?["tooltip","legend-filter","legend-active","continuous-filter"]:M,w=e.options,O=e.limitInPlot,C=e.theme,S=r.isString(u)?document.getElementById(u):u,A=s.createDom('
        ');S.appendChild(A);var P=s.getChartSize(A,p,c,l),j=new(a.getEngine(g).Canvas)(i.__assign({container:A,pixelRatio:y,localRefresh:m},P));return(n=t.call(this,{parent:null,canvas:j,backgroundGroup:j.addGroup({zIndex:o.GROUP_Z_INDEX.BG}),middleGroup:j.addGroup({zIndex:o.GROUP_Z_INDEX.MID}),foregroundGroup:j.addGroup({zIndex:o.GROUP_Z_INDEX.FORE}),padding:f,visible:b,options:w,limitInPlot:O,theme:C})||this).onResize=r.debounce((function(){var t=s.getChartSize(n.ele,n.autoFit,n.width,n.height),e=t.width,i=t.height;n.changeSize(e,i)}),300),n.ele=A,n.canvas=j,n.width=P.width,n.height=P.height,n.autoFit=p,n.localRefresh=m,n.renderer=g,n.wrapperElement=A,n.bindAutoFit(),n.initDefaultInteractions(_),n}return i.__extends(e,t),e.prototype.initDefaultInteractions=function(t){var e=this;r.each(t,(function(t){e.interaction(t)}))},e.prototype.changeSize=function(t,e){return this.width=t,this.height=e,this.canvas.changeSize(t,e),this.render(!0),this},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.unbindAutoFit(),this.canvas.destroy(),s.removeDom(this.wrapperElement),this.wrapperElement=null},e.prototype.changeVisible=function(t){return this.wrapperElement.style.display=t?"":"none",this},e.prototype.bindAutoFit=function(){this.autoFit&&window.addEventListener("resize",this.onResize)},e.prototype.unbindAutoFit=function(){this.autoFit&&window.removeEventListener("resize",this.onResize)},e}(i.__importDefault(n(66)).default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(3);function r(t){return"number"==typeof t&&!isNaN(t)}e.getChartSize=function(t,e,n,o){var a=n,s=o;if(e){var u=function(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height}}(t);a=u.width?u.width:a,s=u.height?u.height:s}return{width:Math.max(r(a)?a:i.MIN_CHART_WIDTH,i.MIN_CHART_WIDTH),height:Math.max(r(s)?s:i.MIN_CHART_HEIGHT,i.MIN_CHART_HEIGHT)}},e.removeDom=function(t){var e=t.parentNode;e&&e.removeChild(t)};var o=n(6);e.createDom=o.createDom},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t){t.exports=JSON.parse('{"name":"@antv/g-base","version":"0.4.0","description":"A common util collection for antv projects","main":"lib/index.js","module":"esm/index.js","types":"lib/index.d.ts","files":["package.json","esm","lib","LICENSE","README.md"],"scripts":{"build":"npm run clean && run-p build:*","build:esm":"tsc -p tsconfig.json --target ES5 --module ESNext --outDir esm","build:cjs":"tsc -p tsconfig.json --target ES5 --module commonjs --outDir lib","clean":"rm -rf esm lib","watch:cjs":"tsc-watch -p tsconfig.json --target ES5 --module commonjs --outDir lib --compiler typescript/bin/tsc","coverage":"npm run coverage-generator && npm run coverage-viewer","coverage-generator":"torch --coverage --compile --source-pattern src/*.js,src/**/*.js --opts tests/mocha.opts","coverage-viewer":"torch-coverage","test":"torch --renderer --compile --opts tests/mocha.opts","test-live":"torch --compile --interactive --opts tests/mocha.opts","tsc":"tsc --noEmit","typecheck":"tsc --noEmit"},"repository":{"type":"git","url":"git+https://github.com/antvis/util.git"},"keywords":["util","antv","g"],"publishConfig":{"access":"public"},"author":"https://github.com/orgs/antvis/people","license":"ISC","bugs":{"url":"https://github.com/antvis/util/issues"},"devDependencies":{"@antv/gl-matrix":"~2.7.1","@antv/torch":"^1.0.0","less":"^3.9.0","npm-run-all":"^4.1.5","tsc-watch":"^4.0.0"},"homepage":"https://github.com/antvis/util#readme","dependencies":{"@antv/event-emitter":"^0.1.1","@antv/g-math":"^0.1.1","@antv/matrix-util":"^2.0.4","@antv/path-util":"~2.0.5","@antv/util":"~2.0.0","@types/d3-timer":"^1.0.9","d3-ease":"^1.0.5","d3-interpolate":"^1.3.2","d3-timer":"^1.0.9"},"__npminstall_done":"Mon Mar 23 2020 16:19:44 GMT+0800 (中国标准时间)","gitHead":"95487b1e5ded41f5db351a622adf12659f564d8b","_from":"@antv/g-base@0.4.0","_resolved":"https://registry.npm.alibaba-inc.com/@antv/g-base/download/@antv/g-base-0.4.0.tgz"}')},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(31);e.default=function(t){return i.default(t)?"":t.toString()}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(101);e.Adjust=i.default;var r={},o=function(t){return r[t.toLowerCase()]};e.getAdjust=o,e.registerAdjust=function(t,e){if(o(t))throw new Error("Adjust type '"+t+"' existed.");r[t.toLowerCase()]=e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(102),o=function(){function t(t){var e=t.xField,n=t.yField,i=t.adjustNames,r=void 0===i?["x","y"]:i;this.adjustNames=r,this.xField=e,this.yField=n}return t.prototype.isAdjust=function(t){return this.adjustNames.indexOf(t)>=0},t.prototype.getAdjustRange=function(t,e,n){var i,r,o=this.yField,a=n.indexOf(e),s=n.length;return!o&&this.isAdjust("y")?(i=0,r=1):s>1?(i=n[0===a?0:a-1],r=n[a===s-1?s-1:a+1],0!==a?i+=(e-i)/2:i-=(r-e)/2,a!==s-1?r-=(r-e)/2:r+=(e-n[s-2])/2):(i=0===e?0:e-.5,r=0===e?1:e+.5),{pre:i,next:r}},t.prototype.adjustData=function(t,e){var n=this,r=this.getDimValues(e);i.each(t,(function(t,e){i.each(r,(function(i,r){n.adjustDim(r,i,t,e)}))}))},t.prototype.groupData=function(t,e){return i.each(t,(function(t){void 0===t[e]&&(t[e]=r.DEFAULT_Y)})),i.groupBy(t,e)},t.prototype.adjustDim=function(t,e,n,i){},t.prototype.getDimValues=function(t){var e=this.xField,n=this.yField,o={},a=[];return e&&this.isAdjust("x")&&a.push(e),n&&this.isAdjust("y")&&a.push(n),a.forEach((function(e){o[e]=i.valuesOfKey(t,e).sort((function(t,e){return t-e}))})),!n&&this.isAdjust("y")&&(o.y=[r.DEFAULT_Y,1]),o},t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_Y=0,e.MARGIN_RATIO=.5,e.DODGE_RATIO=.5,e.GAP=.05},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(104);e.Attribute=r.default;var o={},a=function(t){return o[t.toLowerCase()]};e.getAttribute=a,e.registerAttribute=function(t,e){if(a(t))throw new Error("Attribute type '"+t+"' existed.");o[t.toLowerCase()]=e},i.__exportStar(n(105),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=function(t,e){return i.isString(e)?e:t.invert(t.scale(e))},o=function(){function t(t){this.names=[],this.scales=[],this.linear=!1,this.values=[],this.callback=function(){return[]},this._parseCfg(t)}return t.prototype.mapping=function(){for(var t=this,e=[],n=0;n=0&&e.splice(n,1)},t.prototype.getCurrentPoint=function(){var t=this.event;return t?t.target instanceof HTMLElement?this.view.getCanvas().getPointByClient(t.clientX,t.clientY):{x:t.x,y:t.y}:null},t.prototype.getCurrentShape=function(){return i.get(this.event,["gEvent","shape"])},t.prototype.isInPlot=function(){var t=this.getCurrentPoint();return!!t&&this.view.isPointInPlot(t)},t.prototype.isInShape=function(t){var e=this.getCurrentShape();return!!e&&e.get("name")===t},t.prototype.isInComponent=function(t){var e=r.getComponents(this.view),n=this.getCurrentPoint();return!!n&&!!e.find((function(e){var i=e.getBBox();return t?e.get("name")===t&&r.isInBox(i,n):r.isInBox(i,n)}))},t.prototype.destroy=function(){this.view=null,this.event=null,i.each(this.actions.slice(),(function(t){t.destroy()})),this.actions=null,this.cacheMap=null},t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(115),r=n(116),o=n(0);function a(t){for(var e=[],n=t.length,i=0;i1){var a=t[0],s=t[n-1];e.push({from:{x:s[0],y:s[1]},to:{x:a[0],y:a[1]}})}return e}function s(t){var e=t.map((function(t){return t[0]})),n=t.map((function(t){return t[1]}));return{minX:Math.min.apply(null,e),maxX:Math.max.apply(null,e),minY:Math.min.apply(null,n),maxY:Math.max.apply(null,n)}}e.default=function(t,e){if(t.length<2||e.length<2)return!1;var n,u;if(n=s(t),(u=s(e)).minX>n.maxX||u.maxXn.maxY||u.maxY0!=i(c[1]-n)>0&&i(e-(n-u[1])*(u[0]-c[0])/(u[1]-c[1])-u[0])<0&&(o=!o)}return o}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e,n){return t>=e&&t<=n};e.default=function(t,e,n,r){var o=n.x-t.x,a=n.y-t.y,s=e.x-t.x,u=e.y-t.y,c=r.x-n.x,l=r.y-n.y,h=s*l-u*c,p=null;if(h*h>.001*(s*s+u*u)*(c*c+l*l)){var f=(o*l-a*c)/h,d=(o*u-a*s)/h;i(f,0,1)&&i(d,0,1)&&(p={x:t.x+f*s,y:t.y+f*u})}return p}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(71);e.mergeTheme=function(t,e){var n=i.isObject(e)?e:r.getTheme(e);return i.deepMix(t,n)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=i.__importStar(n(119)),o=n(2),a=n(0),s=n(10);e.getThemeByStylesheet=function(t){var e,n={point:{default:{fill:t.pointFillColor,r:t.pointSize,stroke:t.pointBorderColor,lineWidth:t.pointBorder,fillOpacity:t.pointFillOpacity},active:{stroke:t.pointActiveBorderColor,lineWidth:t.pointActiveBorder},selected:{stroke:t.pointSelectedBorderColor,lineWidth:t.pointSelectedBorder},inactive:{fillOpacity:t.pointInactiveFillOpacity,strokeOpacity:t.pointInactiveBorderOpacity}},hollowPoint:{default:{fill:t.hollowPointFillColor,lineWidth:t.hollowPointBorder,stroke:t.hollowPointBorderColor,strokeOpacity:t.hollowPointBorderOpacity,r:t.hollowPointSize},active:{stroke:t.hollowPointActiveBorderColor,strokeOpacity:t.hollowPointActiveBorderOpacity},selected:{lineWidth:t.hollowPointSelectedBorder,stroke:t.hollowPointSelectedBorderColor,strokeOpacity:t.hollowPointSelectedBorderOpacity},inactive:{strokeOpacity:t.hollowPointInactiveBorderOpacity}},area:{default:{fill:t.areaFillColor,fillOpacity:t.areaFillOpacity,stroke:null},active:{fillOpacity:t.areaActiveFillOpacity},selected:{fillOpacity:t.areaSelectedFillOpacity},inactive:{fillOpacity:t.areaInactiveFillOpacity}},hollowArea:{default:{fill:null,stroke:t.hollowAreaBorderColor,lineWidth:t.hollowAreaBorder,strokeOpacity:t.hollowAreaBorderOpacity},active:{fill:null,lineWidth:t.hollowAreaActiveBorder},selected:{fill:null,lineWidth:t.hollowAreaSelectedBorder},inactive:{strokeOpacity:t.hollowAreaInactiveBorderOpacity}},interval:{default:{fill:t.intervalFillColor,fillOpacity:t.intervalFillOpacity},active:{stroke:t.intervalActiveBorderColor,lineWidth:t.intervalActiveBorder},selected:{stroke:t.intervalSelectedBorderColor,lineWidth:t.intervalSelectedBorder},inactive:{fillOpacity:t.intervalInactiveFillOpacity,strokeOpacity:t.intervalInactiveBorderOpacity}},hollowInterval:{default:{fill:t.hollowIntervalFillColor,stroke:t.hollowIntervalBorderColor,lineWidth:t.hollowIntervalBorder,strokeOpacity:t.hollowIntervalBorderOpacity},active:{stroke:t.hollowIntervalActiveBorderColor,lineWidth:t.hollowIntervalActiveBorder,strokeOpacity:t.hollowIntervalActiveBorderOpacity},selected:{stroke:t.hollowIntervalSelectedBorderColor,lineWidth:t.hollowIntervalSelectedBorder,strokeOpacity:t.hollowIntervalSelectedBorderOpacity},inactive:{stroke:t.hollowIntervalInactiveBorderColor,lineWidth:t.hollowIntervalInactiveBorder,strokeOpacity:t.hollowIntervalInactiveBorderOpacity}},line:{default:{stroke:t.lineBorderColor,lineWidth:t.lineBorder,strokeOpacity:t.lineBorderOpacity,fill:null,lineAppendWidth:10},active:{lineWidth:t.lineActiveBorder},selected:{lineWidth:t.lineSelectedBorder},inactive:{strokeOpacity:t.lineInactiveBorderOpacity}}},u={title:{autoRotate:!0,position:"center",style:{fill:t.axisTitleTextFillColor,fontSize:t.axisTitleTextFontSize,lineHeight:t.axisTitleTextLineHeight,textBaseline:"middle",fontFamily:t.fontFamily},offset:32},label:{autoRotate:!0,autoHide:!0,offset:16,style:{fill:t.axisLabelFillColor,fontSize:t.axisLabelFontSize,lineHeight:t.axisLabelLineHeight,textBaseline:"middle",fontFamily:t.fontFamily}},line:{style:{lineWidth:t.axisLineBorder,stroke:t.axisLineBorderColor}},tickLine:{style:{lineWidth:t.axisTickLineBorder,stroke:t.axisTickLineBorderColor},alignTick:!0,length:t.axisTickLineLength},subTickLine:null,animate:!0},c={line:{type:"line",style:{stroke:t.axisGridBorderColor,lineWidth:t.axisGridBorder,lineDash:t.axisGridLineDash}},alignTick:!0,animate:!0},l={title:null,marker:{symbol:"circle",style:{r:t.legendCircleMarkerSize,fill:t.legendMarkerColor}},itemName:{spacing:5,style:{fill:t.legendItemNameFillColor,fontFamily:t.fontFamily,fontSize:t.legendItemNameFontSize,lineHeight:t.legendItemNameLineHeight,fontWeight:t.legendItemNameFontWeight,textAlign:"start",textBaseline:"middle"}},flipPage:!0,animate:!1};return{defaultColor:t.brandColor,padding:"auto",fontFamily:t.fontFamily,columnWidthRatio:.5,maxColumnWidth:null,minColumnWidth:null,roseWidthRatio:.9999999,multiplePieWidthRatio:1/1.3,colors10:t.paletteQualitative10,colors20:t.paletteQualitative20,shapes:{point:["hollow-circle","hollow-square","hollow-bowtie","hollow-diamond","hollow-hexagon","hollow-triangle","hollow-triangle-down","circle","square","bowtie","diamond","hexagon","triangle","triangle-down","cross","tick","plus","hyphen","line"],line:["line","dash","dot","smooth"],area:["area","smooth","line","smooth-line"],interval:["rect","hollow-rect","line","tick"]},sizes:[1,10],geometries:{interval:{rect:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{animateCfg:{duration:300},style:function(t){var e=t.geometry.coordinate;if(e.isPolar&&e.isTransposed){var i=s.getAngle(t.getModel(),e),r=(i.startAngle+i.endAngle)/2,a=7.5*Math.cos(r),u=7.5*Math.sin(r);return{matrix:o.transform(null,[["t",a,u]])}}return n.interval.selected}}},"hollow-rect":{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},line:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},tick:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},funnel:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:n.interval.selected}},pyramid:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:n.interval.selected}}},line:{line:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},dot:{default:{style:i.__assign(i.__assign({},n.line.default),{lineDash:[1,1]})},active:{style:i.__assign(i.__assign({},n.line.active),{lineDash:[1,1]})},inactive:{style:i.__assign(i.__assign({},n.line.inactive),{lineDash:[1,1]})},selected:{style:i.__assign(i.__assign({},n.line.selected),{lineDash:[1,1]})}},dash:{default:{style:i.__assign(i.__assign({},n.line.default),{lineDash:[5.5,1]})},active:{style:i.__assign(i.__assign({},n.line.active),{lineDash:[5.5,1]})},inactive:{style:i.__assign(i.__assign({},n.line.inactive),{lineDash:[5.5,1]})},selected:{style:i.__assign(i.__assign({},n.line.selected),{lineDash:[5.5,1]})}},smooth:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},hv:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},vh:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},hvh:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},vhv:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}}},polygon:{polygon:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:n.interval.selected}}},point:{circle:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},square:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},bowtie:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},diamond:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},hexagon:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},triangle:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},"triangle-down":{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},"hollow-circle":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-square":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-bowtie":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-diamond":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-hexagon":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-triangle":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-triangle-down":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},cross:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},tick:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},plus:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},hyphen:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},line:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}}},area:{area:{default:{style:n.area.default},active:{style:n.area.active},inactive:{style:n.area.inactive},selected:{style:n.area.selected}},smooth:{default:{style:n.area.default},active:{style:n.area.active},inactive:{style:n.area.inactive},selected:{style:n.area.selected}},line:{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}},"smooth-line":{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}}},schema:{candle:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},box:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}}},edge:{line:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},vhv:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},smooth:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},arc:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}}}},components:{axis:{top:a.deepMix({},u,{position:"top",grid:null,title:null}),bottom:a.deepMix({},u,{position:"bottom",grid:null,title:null}),left:a.deepMix({},u,{position:"left",label:{offset:8},title:null,line:null,tickLine:null,grid:c}),right:a.deepMix({},u,{position:"right",label:{offset:8},title:null,line:null,tickLine:null,grid:c}),circle:a.deepMix({},u,{title:null,label:{offset:8},grid:a.deepMix({},c,{line:{type:"line"}})}),radius:a.deepMix({},u,{title:null,label:{offset:8},grid:a.deepMix({},c,{line:{type:"circle"}})})},legend:{right:a.deepMix({},l,{layout:"vertical"}),left:a.deepMix({},l,{layout:"vertical"}),top:a.deepMix({},l,{layout:"horizontal"}),bottom:a.deepMix({},l,{layout:"horizontal"}),continuous:{title:null,background:null,track:{},rail:{type:"color",size:t.sliderRailHeight,defaultLength:t.sliderRailWidth,style:{fill:t.sliderRailFillColor,stroke:t.sliderRailBorderColor,lineWidth:t.sliderRailBorder}},label:{align:"rail",spacing:4,formatter:null,style:{fill:t.sliderLabelTextFillColor,fontSize:t.sliderLabelTextFontSize,lineHeight:t.sliderLabelTextLineHeight,textBaseline:"middle",fontFamily:t.fontFamily}},handler:{size:t.sliderHandlerWidth,style:{fill:t.sliderHandlerFillColor,stroke:t.sliderHandlerBorderColor}},slidable:!0}},tooltip:{showContent:!0,follow:!0,showCrosshairs:!1,showMarkers:!0,shared:!1,enterable:!1,position:"auto",marker:{symbol:"circle",stroke:"#fff",shadowBlur:10,shadowOffsetX:0,shadowOffSetY:0,shadowColor:"rgba(0,0,0,0.09)",lineWidth:2,r:4},crosshairs:{line:{style:{stroke:t.tooltipCrosshairsBorderColor,lineWidth:t.tooltipCrosshairsBorder}},text:null,textBackground:{padding:2,style:{fill:"rgba(0, 0, 0, 0.25)",lineWidth:0,stroke:null}},follow:!1},domStyles:(e={},e[""+r.CONTAINER_CLASS]={position:"absolute",visibility:"hidden",zIndex:8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)",backgroundColor:t.tooltipContainerFillColor,opacity:t.tooltipContainerFillOpacity,boxShadow:t.tooltipContainerShadow,borderRadius:t.tooltipContainerBorderRadius+"px",color:t.tooltipTextFillColor,fontSize:t.tooltipTextFontSize+"px",fontFamily:t.fontFamily,lineHeight:t.tooltipTextLineHeight+"px",padding:"0 12px 0 12px"},e[""+r.TITLE_CLASS]={marginBottom:"12px",marginTop:"12px"},e[""+r.LIST_CLASS]={margin:0,listStyleType:"none",padding:0},e[""+r.LIST_ITEM_CLASS]={listStyleType:"none",padding:0,marginBottom:"12px",marginTop:"12px",marginLeft:0,marginRight:0},e[""+r.MARKER_CLASS]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},e[""+r.VALUE_CLASS]={display:"inline-block",float:"right",marginLeft:"30px"},e)},annotation:{arc:{style:{stroke:t.annotationArcBorderColor,lineWidth:t.annotationArcBorder},animate:!0},line:{style:{stroke:t.annotationLineBorderColor,lineDash:t.annotationLineDash,lineWidth:t.annotationLineBorder},text:{position:"start",autoRotate:!0,style:{fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,textAlign:"start",fontFamily:t.fontFamily,textBaseline:"bottom"}},animate:!0},text:{style:{fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,textBaseline:"middle",textAlign:"start",fontFamily:t.fontFamily},animate:!0},region:{top:!1,style:{lineWidth:t.annotationRegionBorder,stroke:t.annotationRegionBorderColor,fill:t.annotationRegionFillColor,fillOpacity:t.annotationRegionFillOpacity},animate:!0},image:{top:!1,animate:!0},dataMarker:{top:!0,point:{style:{r:3,stroke:t.brandColor,lineWidth:2}},line:{style:{stroke:t.annotationLineBorderColor,lineWidth:t.annotationLineBorder},length:t.annotationDataMarkerLineLength},text:{style:{textAlign:"start",fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,fontFamily:t.fontFamily}},direction:"upward",autoAdjust:!0,animate:!0},dataRegion:{style:{region:{fill:t.annotationRegionFillColor,fillOpacity:t.annotationRegionFillOpacity},text:{textAlign:"center",textBaseline:"bottom",fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,fontFamily:t.fontFamily}},animate:!0}}},labels:{offset:12,style:{fill:t.labelFillColor,fontSize:t.labelFontSize,fontFamily:t.fontFamily,stroke:t.labelBorderColor,lineWidth:t.labelBorder},autoRotate:!0},innerLabels:{style:{fill:t.innerLabelFillColor,fontSize:t.innerLabelFontSize,fontFamily:t.fontFamily,stroke:t.innerLabelBorderColor,lineWidth:t.innerLabelBorder},autoRotate:!0},pieLabels:{labelHeight:14,offset:30,labelLine:{style:{lineWidth:t.labelLineBorder}},autoRotate:!0}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTAINER_CLASS="g2-tooltip",e.TITLE_CLASS="g2-tooltip-title",e.LIST_CLASS="g2-tooltip-list",e.LIST_ITEM_CLASS="g2-tooltip-list-item",e.MARKER_CLASS="g2-tooltip-marker",e.VALUE_CLASS="g2-tooltip-value",e.NAME_CLASS="g2-tooltip-name",e.CROSSHAIR_X="g2-tooltip-crosshair-x",e.CROSSHAIR_Y="g2-tooltip-crosshair-y"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="#000",r="#595959",o="#8C8C8C",a="#BFBFBF",s="#D9D9D9",u="#FFFFFF",c=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#E86452","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];e.antvLight={brandColor:c[0],paletteQualitative10:c,paletteQualitative20:["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#E86452","#F8D0CB","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],paletteSemanticRed:"#F4664A",paletteSemanticGreen:"#30BF78",paletteSemanticYellow:"#FAAD14",fontFamily:'"-apple-system", "Segoe UI", Roboto, "Helvetica Neue", Arial,\n "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",\n "Noto Color Emoji"',axisLineBorderColor:a,axisLineBorder:.5,axisLineDash:null,axisTitleTextFillColor:r,axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTickLineBorderColor:a,axisTickLineLength:4,axisTickLineBorder:.5,axisSubTickLineBorderColor:s,axisSubTickLineLength:2,axisSubTickLineBorder:.5,axisLabelFillColor:o,axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisGridBorderColor:s,axisGridBorder:.5,axisGridLineDash:null,legendTitleTextFillColor:o,legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:c[0],legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:r,legendItemNameFontSize:12,legendItemNameLineHeight:12,legendItemNameFontWeight:"normal",sliderRailFillColor:s,sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:o,sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:"#F0F0F0",sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:a,annotationArcBorderColor:s,annotationArcBorder:.5,annotationLineBorderColor:a,annotationLineBorder:.5,annotationLineDash:null,annotationTextFillColor:r,annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:"#F2F2F2",annotationTextBorder:1.5,annotationRegionFillColor:i,annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:a,tooltipCrosshairsBorder:.5,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"rgb(255, 255, 255)",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 0px 10px #aeaeae",tooltipContainerBorderRadius:3,tooltipTextFillColor:r,tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:r,labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:u,labelBorder:2,innerLabelFillColor:u,innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,labelLineBorder:.5,labelLineBorderColor:a,pointFillColor:c[0],pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:u,pointBorderOpacity:1,pointActiveBorderColor:i,pointSelectedBorder:2,pointSelectedBorderColor:i,pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:c[0],hollowPointBorderOpacity:.95,hollowPointFillColor:u,hollowPointActiveBorder:1,hollowPointActiveBorderColor:i,hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:i,hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:c[0],lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:c[0],areaFillOpacity:.25,areaActiveFillColor:c[0],areaActiveFillOpacity:.5,areaSelectedFillColor:c[0],areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:c[0],hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:i,hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:i,hollowAreaInactiveBorderOpacity:.3,intervalFillColor:c[0],intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:i,intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:i,intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:c[0],hollowIntervalBorderOpacity:1,hollowIntervalFillColor:u,hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:i,hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:i,hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(17),a=function(){function t(t){this.option=this.wrapperOption(t)}return t.prototype.update=function(t){return this.option=this.wrapperOption(t),this},t.prototype.hasAction=function(t){var e=this.option.actions;return r.some(e,(function(e){return e[0]===t}))},t.prototype.create=function(t,e){var n=this.option,r=n.type,a=n.cfg,s=i.__assign({start:t,end:e},a),u=o.getCoordinate(this.isTheta()?"polar":r);return this.coordinate=new u(s),this.coordinate.type=r,this.isTheta()&&(this.hasAction("transpose")||this.transpose()),this.execActions(),this.coordinate},t.prototype.adjust=function(t,e){return this.coordinate.update({start:t,end:e}),this.coordinate.resetMatrix(),this.execActions(["scale","rotate","translate"]),this.coordinate},t.prototype.rotate=function(t){return this.option.actions.push(["rotate",t]),this},t.prototype.reflect=function(t){return this.option.actions.push(["reflect",t]),this},t.prototype.scale=function(t,e){return this.option.actions.push(["scale",t,e]),this},t.prototype.transpose=function(){return this.option.actions.push(["transpose"]),this},t.prototype.isTheta=function(){return"theta"===this.option.type},t.prototype.getOption=function(){return this.option},t.prototype.getCoordinate=function(){return this.coordinate},t.prototype.wrapperOption=function(t){return i.__assign({type:"rect",actions:[],cfg:{}},t)},t.prototype.execActions=function(t){var e=this,n=this.option.actions;r.each(n,(function(n){var i,o=n[0],a=n.slice(1);(r.isNil(t)||t.includes(o))&&(i=e.coordinate)[o].apply(i,a)}))},t}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(123);e.default=function(t){var e=t.getController("axis"),n=t.getController("legend"),r=t.getController("annotation"),o=t.getController("slider"),a=i.calculatePadding(t);t.coordinateBBox=t.viewBBox.shrink(a),t.adjustCoordinate(),[e,o,n,r].forEach((function(t){t&&t.layout()}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(3),o=n(26),a=n(44),s=n(124);e.calculatePadding=function(t){var e=t.padding;if(!a.isAutoPadding(e))return a.parsePadding(e);var n=t.viewBBox,u=new s.PaddingCal;return i.each(t.getComponents(),(function(t){var e=t.component,i=t.type;if(i!==r.COMPONENT_TYPE.GRID&&i!==r.COMPONENT_TYPE.TOOLTIP){var a=e.getLayoutBBox(),s=new o.BBox(a.x,a.y,a.width,a.height);if(i===r.COMPONENT_TYPE.AXIS){var c=s.exceed(n);u.shrink(c)}else{var l=t.direction;u.inc(s,l)}}})),u.getPadding()}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(3),r=function(){function t(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.top=t,this.right=e,this.bottom=n,this.left=i}return t.prototype.shrink=function(t){var e=t[0],n=t[1],i=t[2],r=t[3];return this.top+=e,this.right+=n,this.bottom+=i,this.left+=r,this},t.prototype.inc=function(t,e){var n=t.width,r=t.height;switch(e){case i.DIRECTION.TOP:case i.DIRECTION.TOP_LEFT:case i.DIRECTION.TOP_RIGHT:this.top+=r;break;case i.DIRECTION.RIGHT:case i.DIRECTION.RIGHT_TOP:case i.DIRECTION.RIGHT_BOTTOM:this.right+=n;break;case i.DIRECTION.BOTTOM:case i.DIRECTION.BOTTOM_LEFT:case i.DIRECTION.BOTTOM_RIGHT:this.bottom+=r;break;case i.DIRECTION.LEFT:case i.DIRECTION.LEFT_TOP:case i.DIRECTION.LEFT_BOTTOM:this.left+=n}return this},t.prototype.getPadding=function(){return[this.top,this.right,this.bottom,this.left]},t}();e.PaddingCal=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(30),o=function(){function t(){this.scales={},this.syncScales={}}return t.prototype.createScale=function(t,e,n,o){var a=n,s=this.getScaleMeta(o);if(i.isEmpty(e)&&s){var u=s.scale,c={type:u.type};u.isCategory&&(c.values=u.values),a=i.deepMix(c,s.scaleDef,n)}var l=r.createScaleByField(t,e,a);return this.cacheScale(l,n,o),l},t.prototype.sync=function(){var t=this;i.each(this.syncScales,(function(e,n){var r=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,a=[];i.each(e,(function(e){var n=t.getScale(e);o=i.isNumber(n.max)?Math.max(o,n.max):o,r=i.isNumber(n.min)?Math.min(r,n.min):r,i.each(n.values,(function(t){a.includes(t)||a.push(t)}))})),i.each(e,(function(e){var n=t.getScale(e);n.isContinuous?n.change({min:r,max:o,values:a}):n.isCategory&&n.change({values:a})}))}))},t.prototype.cacheScale=function(t,e,n){var i=this.getScaleMeta(n);i&&i.scale.type===t.type?(r.syncScale(i.scale,t),i.scaleDef=e):(i={key:n,scale:t,scaleDef:e},this.scales[n]=i);var o=this.getSyncKey(i);this.removeFromSyncScales(n),o&&(this.syncScales[o]||(this.syncScales[o]=[]),this.syncScales[o].push(n))},t.prototype.getScale=function(t){var e=this.getScaleMeta(t);if(!e){var n=i.last(t.split("-"));this.syncScales[n]&&this.syncScales[n].length&&(e=this.getScaleMeta(this.syncScales[n][0]))}return e&&e.scale},t.prototype.clear=function(){this.scales={},this.syncScales={}},t.prototype.removeFromSyncScales=function(t){var e=this;i.each(this.syncScales,(function(n,i){var r=n.indexOf(t);if(-1!==r)return n.splice(r,1),0===n.length&&delete e.syncScales[i],!1}))},t.prototype.getSyncKey=function(t){var e=t.scale,n=t.scaleDef,r=e.field,o=i.get(n,["sync"]);return!0===o?r:!1===o?void 0:o},t.prototype.getScaleMeta=function(t){return this.scales[t]},t}();e.ScalePool=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(60);e.propagationDelegate=function(t,e,n){var r=new i.default(e,n);r.target=t,r.propagationPath.push(t),t.emitDelegation(e,r);for(var o=t.getParent();o;)o.emitDelegation(e,r),r.propagationPath.push(o),o=o.getParent()}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0);e.group=function(t,e,n){if(void 0===n&&(n={}),!e)return[t];var r=i.groupToMap(t,e),o=[];if(1===e.length&&n[e[0]])for(var a=0,s=n[e[0]];a=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,i){e(n,i,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{u(i.next(t))}catch(t){o(t)}}function s(t){try{u(i.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((i=i.apply(t,e||[])).next())}))}function h(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function g(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{(n=r[t](e)).value instanceof v?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function x(t){var e,n;return e={},i("next"),i("throw",(function(t){throw t})),i("return"),e[Symbol.iterator]=function(){return this},e;function i(i,r){e[i]=t[i]?function(e){return(n=!n)?{value:v(t[i](e)),done:"return"===i}:r?r(e):e}:r}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=f(t),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(e){return new Promise((function(i,r){!function(t,e,n,i){Promise.resolve(i).then((function(e){t({value:e,done:n})}),e)}(i,r,(e=t[n](e)).done,e.value)}))}}}function M(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function _(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function w(t){return t&&t.__esModule?t:{default:t}}function O(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function C(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sub=e.mul=void 0,e.create=function(){var t=new i.ARRAY_TYPE(9);return i.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},e.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},e.clone=function(t){var e=new i.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromValues=function(t,e,n,r,o,a,s,u,c){var l=new i.ARRAY_TYPE(9);return l[0]=t,l[1]=e,l[2]=n,l[3]=r,l[4]=o,l[5]=a,l[6]=s,l[7]=u,l[8]=c,l},e.set=function(t,e,n,i,r,o,a,s,u,c){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=c,t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.transpose=function(t,e){if(t===e){var n=e[1],i=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=i,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},e.invert=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=l*a-s*c,p=-l*o+s*u,f=c*o-a*u,d=n*h+i*p+r*f;return d?(d=1/d,t[0]=h*d,t[1]=(-l*i+r*c)*d,t[2]=(s*i-r*a)*d,t[3]=p*d,t[4]=(l*n-r*u)*d,t[5]=(-s*n+r*o)*d,t[6]=f*d,t[7]=(-c*n+i*u)*d,t[8]=(a*n-i*o)*d,t):null},e.adjoint=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8];return t[0]=a*l-s*c,t[1]=r*c-i*l,t[2]=i*s-r*a,t[3]=s*u-o*l,t[4]=n*l-r*u,t[5]=r*o-n*s,t[6]=o*c-a*u,t[7]=i*u-n*c,t[8]=n*a-i*o,t},e.determinant=function(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8];return e*(c*o-a*u)+n*(-c*r+a*s)+i*(u*r-o*s)},e.multiply=r,e.translate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=n[0],f=n[1];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=p*i+f*a+c,t[7]=p*r+f*s+l,t[8]=p*o+f*u+h,t},e.rotate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=Math.sin(n),f=Math.cos(n);return t[0]=f*i+p*a,t[1]=f*r+p*s,t[2]=f*o+p*u,t[3]=f*a-p*i,t[4]=f*s-p*r,t[5]=f*u-p*o,t[6]=c,t[7]=l,t[8]=h,t},e.scale=function(t,e,n){var i=n[0],r=n[1];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},e.fromRotation=function(t,e){var n=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=n,t[2]=0,t[3]=-n,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat2d=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},e.fromQuat=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n+n,s=i+i,u=r+r,c=n*a,l=i*a,h=i*s,p=r*a,f=r*s,d=r*u,g=o*a,y=o*s,v=o*u;return t[0]=1-h-d,t[3]=l-v,t[6]=p+y,t[1]=l+v,t[4]=1-c-d,t[7]=f-g,t[2]=p-y,t[5]=f+g,t[8]=1-c-h,t},e.normalFromMat4=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],p=e[10],f=e[11],d=e[12],g=e[13],y=e[14],v=e[15],m=n*s-i*a,x=n*u-r*a,b=n*c-o*a,M=i*u-r*s,_=i*c-o*s,w=r*c-o*u,O=l*g-h*d,C=l*y-p*d,S=l*v-f*d,A=h*y-p*g,P=h*v-f*g,j=p*v-f*y,k=m*j-x*P+b*A+M*S-_*C+w*O;return k?(k=1/k,t[0]=(s*j-u*P+c*A)*k,t[1]=(u*S-a*j-c*C)*k,t[2]=(a*P-s*S+c*O)*k,t[3]=(r*P-i*j-o*A)*k,t[4]=(n*j-r*S+o*C)*k,t[5]=(i*S-n*P-o*O)*k,t[6]=(g*w-y*_+v*M)*k,t[7]=(y*b-d*w-v*x)*k,t[8]=(d*_-g*b+v*m)*k,t):null},e.projection=function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},e.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},e.subtract=o,e.multiplyScalar=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},e.multiplyScalarAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t[3]=e[3]+n[3]*i,t[4]=e[4]+n[4]*i,t[5]=e[5]+n[5]*i,t[6]=e[6]+n[6]*i,t[7]=e[7]+n[7]*i,t[8]=e[8]+n[8]*i,t},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},e.equals=function(t,e){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],p=e[0],f=e[1],d=e[2],g=e[3],y=e[4],v=e[5],m=e[6],x=e[7],b=e[8];return Math.abs(n-p)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(r-f)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(o-d)<=i.EPSILON*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(a-g)<=i.EPSILON*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(s-y)<=i.EPSILON*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(u-v)<=i.EPSILON*Math.max(1,Math.abs(u),Math.abs(v))&&Math.abs(c-m)<=i.EPSILON*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(l-x)<=i.EPSILON*Math.max(1,Math.abs(l),Math.abs(x))&&Math.abs(h-b)<=i.EPSILON*Math.max(1,Math.abs(h),Math.abs(b))};var i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(23));function r(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=n[0],f=n[1],d=n[2],g=n[3],y=n[4],v=n[5],m=n[6],x=n[7],b=n[8];return t[0]=p*i+f*a+d*c,t[1]=p*r+f*s+d*l,t[2]=p*o+f*u+d*h,t[3]=g*i+y*a+v*c,t[4]=g*r+y*s+v*l,t[5]=g*o+y*u+v*h,t[6]=m*i+x*a+b*c,t[7]=m*r+x*s+b*l,t[8]=m*o+x*u+b*h,t}function o(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}e.mul=r,e.sub=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getPixelRatio=function(){return window?window.devicePixelRatio:1},e.distance=function(t,e,n,i){var r=t-n,o=e-i;return Math.sqrt(r*r+o*o)},e.inBox=function(t,e,n,i,r,o){return r>=t&&r<=t+n&&o>=e&&o<=e+i};var i=null;e.getOffScreenContext=function(){if(!i){var t=document.createElement("canvas");t.width=1,t.height=1,i=t.getContext("2d")}return i},e.intersectRect=function(t,e){return!(e.minX>t.maxX||e.maxXt.maxY||e.maxY0&&(o.isNil(r)||1===r||(t.globalAlpha=r),this.stroke(t)),this.afterDrawPath(t)},e.prototype.createPath=function(t){},e.prototype.afterDrawPath=function(t){},e.prototype.isInShape=function(t,e){var n=this.isStroke(),i=this.isFill(),r=this.getHitLineWidth();return this.isInStrokeOrPath(t,e,n,i,r)},e.prototype.isInStrokeOrPath=function(t,e,n,i,r){return!1},e.prototype.getHitLineWidth=function(){if(!this.isStroke())return 0;var t=this.attrs;return t.lineWidth+t.lineAppendWidth},e}(r.AbstractShape);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.sqrDist=e.dist=e.div=e.mul=e.sub=e.len=void 0,e.create=o,e.clone=function(t){var e=new r.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},e.fromValues=function(t,e){var n=new r.ARRAY_TYPE(2);return n[0]=t,n[1]=e,n},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.set=function(t,e,n){return t[0]=e,t[1]=n,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},e.subtract=a,e.multiply=s,e.divide=u,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},e.scaleAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},e.distance=c,e.squaredDistance=l,e.length=h,e.squaredLength=p,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},e.normalize=function(t,e){var n=e[0],i=e[1],r=n*n+i*i;return r>0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,n){var i=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=i,t},e.lerp=function(t,e,n,i){var r=e[0],o=e[1];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t},e.random=function(t,e){e=e||1;var n=2*r.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.transformMat2=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t},e.transformMat2d=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t},e.transformMat3=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[3]*r+n[6],t[1]=n[1]*i+n[4]*r+n[7],t},e.transformMat4=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[4]*r+n[12],t[1]=n[1]*i+n[5]*r+n[13],t},e.rotate=function(t,e,n,i){var r=e[0]-n[0],o=e[1]-n[1],a=Math.sin(i),s=Math.cos(i);return t[0]=r*s-o*a+n[0],t[1]=r*a+o*s+n[1],t},e.angle=function(t,e){var n=t[0],i=t[1],r=e[0],o=e[1],a=n*n+i*i;a>0&&(a=1/Math.sqrt(a));var s=r*r+o*o;s>0&&(s=1/Math.sqrt(s));var u=(n*r+i*o)*a*s;return u>1?0:u<-1?Math.PI:Math.acos(u)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],i=t[1],o=e[0],a=e[1];return Math.abs(n-o)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-a)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(a))};var i,r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(23));function o(){var t=new r.ARRAY_TYPE(2);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function s(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function u(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function c(t,e){var n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)}function l(t,e){var n=e[0]-t[0],i=e[1]-t[1];return n*n+i*i}function h(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function p(t){var e=t[0],n=t[1];return e*e+n*n}e.len=h,e.sub=a,e.mul=s,e.div=u,e.dist=c,e.sqrDist=l,e.sqrLen=p,e.forEach=(i=o(),function(t,e,n,r,o,a){var s,u=void 0;for(e||(e=2),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,u=n;u(n-t)*(n-t)+(r-e)*(r-e)?i.distance(n,r,o,a):this.pointToLine(t,e,n,r,o,a)},pointToLine:function(t,e,n,i,o,a){var s=[n-t,i-e];if(r.exactEquals(s,[0,0]))return Math.sqrt((o-t)*(o-t)+(a-e)*(a-e));var u=[-s[1],s[0]];r.normalize(u,u);var c=[o-t,a-e];return Math.abs(r.dot(c,u))},tangentAngle:function(t,e,n,i){return Math.atan2(i-e,n-t)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(3);e.Base=i.default;var r=n(78);e.Circle=r.default;var o=n(79);e.Ellipse=o.default;var a=n(80);e.Image=a.default;var s=n(81);e.Line=s.default;var u=n(82);e.Marker=u.default;var c=n(84);e.Path=c.default;var l=n(90);e.Polygon=l.default;var h=n(91);e.Polyline=h.default;var p=n(94);e.Rect=p.default;var f=n(97);e.Text=f.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(20);e.default=function(t){return Array.isArray?Array.isArray(t):i.default(t,"Array")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(18),r=n(32),o=n(57),a=n(2),s=n(16),u={fill:"fillStyle",stroke:"strokeStyle",opacity:"globalAlpha"};function c(t){var e;if(t.destroyed)e=t._cacheCanvasBBox;else{var n=t.get("cacheCanvasBBox"),i=t.getCanvasBBox();e=a.mergeRegion(n,i)}return e}e.applyAttrsToContext=function(t,e){var n=e.attr();for(var o in n){var a=n[o],s=u[o]?u[o]:o;"matrix"===s&&a?t.transform(a[0],a[1],a[3],a[4],a[6],a[7]):"lineDash"===s&&t.setLineDash?i.isArray(a)&&t.setLineDash(a):("strokeStyle"===s||"fillStyle"===s?a=r.parseStyle(t,e,a):"globalAlpha"===s&&(a*=t.globalAlpha),t[s]=a)}},e.drawChildren=function(t,e,n){for(var i=0;i_?M:_,P=M>_?1:M/_,j=M>_?_/M:1;e.translate(x,b),e.rotate(C),e.scale(P,j),e.arc(0,0,A,w,O,1-S),e.scale(1/P,1/j),e.rotate(-C),e.translate(-x,-b)}break;case"Z":e.closePath()}if("Z"===d)c=l;else{var k=f.length;c=[f[k-2],f[k-1]]}}},e.refreshElement=function(t,e){var n=t.get("canvas");n&&("remove"===e&&(t._cacheCanvasBBox=t.get("cacheCanvasBBox")),t.get("hasChanged")||(n.refreshElement(t,e,n),n.get("autoDraw")&&n.draw(),t.set("hasChanged",!0)))},e.getRefreshRegion=c,e.getMergedRegion=function(t){if(!t.length)return null;var e=[],n=[],r=[],o=[];return i.each(t,(function(t){var i=c(t);i&&(e.push(i.minX),n.push(i.minY),r.push(i.maxX),o.push(i.maxY))})),{minX:Math.min.apply(null,e),minY:Math.min.apply(null,n),maxX:Math.max.apply(null,r),maxY:Math.max.apply(null,o)}}},function(t,e,n){"use strict";n.r(e),n.d(e,"version",(function(){return Pn})),n.d(e,"Event",(function(){return nt})),n.d(e,"Base",(function(){return Mt})),n.d(e,"AbstractCanvas",(function(){return Cn})),n.d(e,"AbstractGroup",(function(){return Sn})),n.d(e,"AbstractShape",(function(){return An})),n.d(e,"PathUtil",(function(){return i}));var i={};n.r(i),n.d(i,"catmullRomToBezier",(function(){return P})),n.d(i,"fillPath",(function(){return Q})),n.d(i,"fillPathByDiff",(function(){return K})),n.d(i,"formatPath",(function(){return et})),n.d(i,"intersection",(function(){return W})),n.d(i,"parsePathArray",(function(){return D})),n.d(i,"parsePathString",(function(){return A})),n.d(i,"pathToAbsolute",(function(){return k})),n.d(i,"pathToCurve",(function(){return L})),n.d(i,"rectPath",(function(){return G}));var r={};n.r(r),n.d(r,"easeLinear",(function(){return te})),n.d(r,"easeQuad",(function(){return ie})),n.d(r,"easeQuadIn",(function(){return ee})),n.d(r,"easeQuadOut",(function(){return ne})),n.d(r,"easeQuadInOut",(function(){return ie})),n.d(r,"easeCubic",(function(){return ae})),n.d(r,"easeCubicIn",(function(){return re})),n.d(r,"easeCubicOut",(function(){return oe})),n.d(r,"easeCubicInOut",(function(){return ae})),n.d(r,"easePoly",(function(){return ce})),n.d(r,"easePolyIn",(function(){return se})),n.d(r,"easePolyOut",(function(){return ue})),n.d(r,"easePolyInOut",(function(){return ce})),n.d(r,"easeSin",(function(){return de})),n.d(r,"easeSinIn",(function(){return pe})),n.d(r,"easeSinOut",(function(){return fe})),n.d(r,"easeSinInOut",(function(){return de})),n.d(r,"easeExp",(function(){return ve})),n.d(r,"easeExpIn",(function(){return ge})),n.d(r,"easeExpOut",(function(){return ye})),n.d(r,"easeExpInOut",(function(){return ve})),n.d(r,"easeCircle",(function(){return be})),n.d(r,"easeCircleIn",(function(){return me})),n.d(r,"easeCircleOut",(function(){return xe})),n.d(r,"easeCircleInOut",(function(){return be})),n.d(r,"easeBounce",(function(){return we})),n.d(r,"easeBounceIn",(function(){return _e})),n.d(r,"easeBounceOut",(function(){return we})),n.d(r,"easeBounceInOut",(function(){return Oe})),n.d(r,"easeBack",(function(){return Ae})),n.d(r,"easeBackIn",(function(){return Ce})),n.d(r,"easeBackOut",(function(){return Se})),n.d(r,"easeBackInOut",(function(){return Ae})),n.d(r,"easeElastic",(function(){return ke})),n.d(r,"easeElasticIn",(function(){return je})),n.d(r,"easeElasticOut",(function(){return ke})),n.d(r,"easeElasticInOut",(function(){return Te}));var o=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},a={}.toString,s=function(t,e){return a.call(t)==="[object "+e+"]"},u=function(t){return Array.isArray?Array.isArray(t):s(t,"Array")},c=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},l=function(t,e){if(t)if(u(t))for(var n=0,i=t.length;n2&&(n.push([r].concat(a.splice(0,2))),s="l",r="m"===r?"l":"L"),"o"===s&&1===a.length&&n.push([r,a[0]]),"r"===s)n.push([r].concat(a));else for(;a.length>=e[s]&&(n.push([r].concat(a.splice(0,e[s]))),e[s]););return t})),n},P=function(t,e){for(var n=[],i=0,r=t.length;r-2*!e>i;i+=2){var o=[{x:+t[i-2],y:+t[i-1]},{x:+t[i],y:+t[i+1]},{x:+t[i+2],y:+t[i+3]},{x:+t[i+4],y:+t[i+5]}];e?i?r-4===i?o[3]={x:+t[0],y:+t[1]}:r-2===i&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[r-2],y:+t[r-1]}:r-4===i?o[3]=o[2]:i||(o[0]={x:+t[i],y:+t[i+1]}),n.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return n},j=function(t,e,n,i,r){var o=[];if(null===r&&null===i&&(i=n),t=+t,e=+e,n=+n,i=+i,null!==r){var a=Math.PI/180,s=t+n*Math.cos(-i*a),u=t+n*Math.cos(-r*a);o=[["M",s,e+n*Math.sin(-i*a)],["A",n,n,0,+(r-i>180),0,u,e+n*Math.sin(-r*a)]]}else o=[["M",t,e],["m",0,-i],["a",n,i,0,1,1,0,2*i],["a",n,i,0,1,1,0,-2*i],["z"]];return o},k=function(t){if(!(t=A(t))||!t.length)return[["M",0,0]];var e,n,i=[],r=0,o=0,a=0,s=0,u=0;"M"===t[0][0]&&(a=r=+t[0][1],s=o=+t[0][2],u++,i[0]=["M",r,o]);for(var c=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),l=void 0,h=void 0,p=u,f=t.length;p1&&(n*=M=Math.sqrt(M),i*=M);var _=n*n,w=i*i,O=(o===a?-1:1)*Math.sqrt(Math.abs((_*w-_*b*b-w*x*x)/(_*b*b+w*x*x)));f=O*n*b/i+(t+s)/2,d=O*-i*x/n+(e+u)/2,h=Math.asin(((e-d)/i).toFixed(9)),p=Math.asin(((u-d)/i).toFixed(9)),h=tp&&(h-=2*Math.PI),!a&&p>h&&(p-=2*Math.PI)}var C=p-h;if(Math.abs(C)>g){var S=p,A=s,P=u;p=h+g*(a&&p>h?1:-1),s=f+n*Math.cos(p),u=d+i*Math.sin(p),v=I(s,u,n,i,r,0,a,A,P,[p,S,f,d])}C=p-h;var j=Math.cos(h),k=Math.sin(h),T=Math.cos(p),E=Math.sin(p),L=Math.tan(C/4),B=4/3*n*L,D=4/3*i*L,F=[t,e],R=[t+B*k,e-D*j],N=[s+B*E,u-D*T],Y=[s,u];if(R[0]=2*F[0]-R[0],R[1]=2*F[1]-R[1],c)return[R,N,Y].concat(v);for(var X=[],G=0,z=(v=[R,N,Y].concat(v).join().split(",")).length;G7){t[e].shift();for(var o=t[e];o.length;)s[e]="A",r&&(u[e]="A"),t.splice(e++,0,["C"].concat(o.splice(0,6)));t.splice(e,1),n=Math.max(i.length,r&&r.length||0)}},f=function(t,e,o,a,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),o.bx=0,o.by=0,o.x=t[s][1],o.y=t[s][2],n=Math.max(i.length,r&&r.length||0))};n=Math.max(i.length,r&&r.length||0);for(var d=0;d1?1:u<0?0:u)/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],p=0,f=0;f<12;f++){var d=c*l[f]+c,g=F(d,t,n,r,a),y=F(d,e,i,o,s),v=g*g+y*y;p+=h[f]*Math.sqrt(v)}return c*p},N=function(t,e,n,i,r,o,a,s){for(var u,c,l,h,p=[],f=[[],[]],d=0;d<2;++d)if(0===d?(c=6*t-12*n+6*r,u=-3*t+9*n-9*r+3*a,l=3*n-3*t):(c=6*e-12*i+6*o,u=-3*e+9*i-9*o+3*s,l=3*i-3*e),Math.abs(u)<1e-12){if(Math.abs(c)<1e-12)continue;(h=-l/c)>0&&h<1&&p.push(h)}else{var g=c*c-4*l*u,y=Math.sqrt(g);if(!(g<0)){var v=(-c+y)/(2*u);v>0&&v<1&&p.push(v);var m=(-c-y)/(2*u);m>0&&m<1&&p.push(m)}}for(var x,b=p.length,M=b;b--;)x=1-(h=p[b]),f[0][b]=x*x*x*t+3*x*x*h*n+3*x*h*h*r+h*h*h*a,f[1][b]=x*x*x*e+3*x*x*h*i+3*x*h*h*o+h*h*h*s;return f[0][M]=t,f[1][M]=e,f[0][M+1]=a,f[1][M+1]=s,f[0].length=f[1].length=M+2,{min:{x:Math.min.apply(0,f[0]),y:Math.min.apply(0,f[1])},max:{x:Math.max.apply(0,f[0]),y:Math.max.apply(0,f[1])}}},Y=function(t,e,n,i,r,o,a,s){if(!(Math.max(t,n)Math.max(r,a)||Math.max(e,i)Math.max(o,s))){var u=(t-n)*(o-s)-(e-i)*(r-a);if(u){var c=((t*i-e*n)*(r-a)-(t-n)*(r*s-o*a))/u,l=((t*i-e*n)*(o-s)-(e-i)*(r*s-o*a))/u,h=+c.toFixed(2),p=+l.toFixed(2);if(!(h<+Math.min(t,n).toFixed(2)||h>+Math.max(t,n).toFixed(2)||h<+Math.min(r,a).toFixed(2)||h>+Math.max(r,a).toFixed(2)||p<+Math.min(e,i).toFixed(2)||p>+Math.max(e,i).toFixed(2)||p<+Math.min(o,s).toFixed(2)||p>+Math.max(o,s).toFixed(2)))return{x:c,y:l}}}},X=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},G=function(t,e,n,i,r){if(r)return[["M",+t+ +r,e],["l",n-2*r,0],["a",r,r,0,0,1,r,r],["l",0,i-2*r],["a",r,r,0,0,1,-r,r],["l",2*r-n,0],["a",r,r,0,0,1,-r,-r],["l",0,2*r-i],["a",r,r,0,0,1,r,-r],["z"]];var o=[["M",t,e],["l",n,0],["l",0,i],["l",-n,0],["z"]];return o.parsePathArray=D,o},z=function(t,e,n,i){return null===t&&(t=e=n=i=0),null===e&&(e=t.y,n=t.width,i=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:i,h:i,x2:t+n,y2:e+i,cx:t+n/2,cy:e+i/2,r1:Math.min(n,i)/2,r2:Math.max(n,i)/2,r0:Math.sqrt(n*n+i*i)/2,path:G(t,e,n,i),vb:[t,e,n,i].join(" ")}},q=function(t,e,n,i,r,o,a,s){u(t)||(t=[t,e,n,i,r,o,a,s]);var c=N.apply(null,t);return z(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)},H=function(t,e,n,i,r,o,a,s,u){var c=1-u,l=Math.pow(c,3),h=Math.pow(c,2),p=u*u,f=p*u,d=t+2*u*(n-t)+p*(r-2*n+t),g=e+2*u*(i-e)+p*(o-2*i+e),y=n+2*u*(r-n)+p*(a-2*r+n),v=i+2*u*(o-i)+p*(s-2*o+i);return{x:l*t+3*h*u*n+3*c*u*u*r+f*a,y:l*e+3*h*u*i+3*c*u*u*o+f*s,m:{x:d,y:g},n:{x:y,y:v},start:{x:c*t+u*n,y:c*e+u*i},end:{x:c*r+u*a,y:c*o+u*s},alpha:90-180*Math.atan2(d-y,g-v)/Math.PI}},V=function(t,e,n){if(!function(t,e){return t=z(t),e=z(e),X(e,t.x,t.y)||X(e,t.x2,t.y)||X(e,t.x,t.y2)||X(e,t.x2,t.y2)||X(t,e.x,e.y)||X(t,e.x2,e.y)||X(t,e.x,e.y2)||X(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(q(t),q(e)))return n?0:[];for(var i=~~(R.apply(0,t)/8),r=~~(R.apply(0,e)/8),o=[],a=[],s={},u=n?0:[],c=0;c=0&&x<=1&&b>=0&&b<=1&&(n?u+=1:u.push({x:m.x,y:m.y,t1:x,t2:b}))}}return u},W=function(t,e){return function(t,e,n){var i,r,o,a,s,u,c,l,h,p;t=L(t),e=L(e);for(var f=[],d=0,g=t.length;d=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e.concat(t[t.length-1])}))}(t,e,n));else{var r=[].concat(t);"M"===r[0]&&(r[0]="L");for(var o=0;o<=n-1;o++)i.push(r)}return i}(t[r],t[r+1],i))}),[]);return u.unshift(t[0]),"Z"!==e[i]&&"z"!==e[i]||u.push("Z"),u},Z=function(t,e){if(t.length!==e.length)return!1;var n=!0;return l(t,(function(t,i){if(t!==e[i])return n=!1,!1})),n};function $(t,e,n){var i=null,r=n;return e=0;u--)a=o[u].index,"add"===o[u].type?t.splice(a,0,[].concat(t[a])):t.splice(a,1)}var h=r-(i=t.length);if(i0)){t[i]=e[i];break}n=J(n,t[i-1],1)}t[i]=["Q"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[i]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(i>0)){t[i]=e[i];break}n=J(n,t[i-1],2)}t[i]=["C"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(n.length<2){if(!(i>0)){t[i]=e[i];break}n=J(n,t[i-1],1)}t[i]=["S"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[i]=e[i]}return t},nt=function(){function t(t,e){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}(),it=function(t,e){return(it=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function rt(t,e){function n(){this.constructor=t}it(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ot=n(45),at=n.n(ot),st=(n(11),n(19)),ut=n.n(st),ct=n(12),lt=n.n(ct),ht=n(13),pt=n.n(ht),ft=(n(8),n(21)),dt=n.n(ft),gt=n(14),yt=n.n(gt),vt=n(22),mt=n.n(vt);function xt(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}var bt="undefined"!=typeof window&&void 0!==window.document,Mt=function(t){function e(e){var n=t.call(this)||this;n.destroyed=!1;var i=n.getDefaultCfg();return n.cfg=dt()(i,e),n}return rt(e,t),e.prototype.getDefaultCfg=function(){return{}},e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){this.cfg[t]=e},e.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},e}(at.a),_t=n(1);_t.translate=function(t,e,n){var i=new Array(9);return _t.fromTranslation(i,n),_t.multiply(t,i,e)},_t.rotate=function(t,e,n){var i=new Array(9);return _t.fromRotation(i,n),_t.multiply(t,i,e)},_t.scale=function(t,e,n){var i=new Array(9);return _t.fromScaling(i,n),_t.multiply(t,i,e)},_t.transform=function(t,e){for(var n=[].concat(t),i=0,r=e.length;i1?1:t}(n))},Ot.direction=function(t,e){return t[0]*e[1]-e[0]*t[1]},Ot.angleTo=function(t,e,n){var i=Ot.angle(t,e),r=Ot.direction(t,e)>=0;return n?r?2*Math.PI-i:i:r?i:2*Math.PI-i},Ot.vertical=function(t,e,n){return n?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t},n(46);var Ct=function(t,e){var n=t?m(t):[1,0,0,0,1,0,0,0,1];return l(e,(function(t){switch(t[0]){case"t":wt.translate(n,n,[t[1],t[2]]);break;case"s":wt.scale(n,n,[t[1],t[2]]);break;case"r":wt.rotate(n,n,t[1]);break;case"m":wt.multiply(n,n,t[1]);break;default:return!1}})),n};function St(t,e){var n=[],i=t[0],r=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],p=e[0],f=e[1],d=e[2],g=e[3],y=e[4],v=e[5],m=e[6],x=e[7],b=e[8];return n[0]=p*i+f*a+d*c,n[1]=p*r+f*s+d*l,n[2]=p*o+f*u+d*h,n[3]=g*i+y*a+v*c,n[4]=g*r+y*s+v*l,n[5]=g*o+y*u+v*h,n[6]=m*i+x*a+b*c,n[7]=m*r+x*s+b*l,n[8]=m*o+x*u+b*h,n}function At(t,e){var n=[],i=e[0],r=e[1];return n[0]=t[0]*i+t[3]*r+t[6],n[1]=t[1]*i+t[4]*r+t[7],n}var Pt=["zIndex","capture","visible","type"],jt=["repeat"];function kt(t,e){var n={},i=e.attrs;for(var r in t)n[r]=i[r];return n}function Tt(t,e){var n={},i=e.attr();return l(t,(function(t,e){-1!==jt.indexOf(e)||b(i[e],t)||(n[e]=t)})),n}function Et(t,e){if(e.onFrame)return t;var n=e.startTime,i=e.delay,r=e.duration,o=Object.prototype.hasOwnProperty;return l(t,(function(t){n+it.delay&&l(e.toAttrs,(function(e,n){o.call(t.toAttrs,n)&&(delete t.toAttrs[n],delete t.fromAttrs[n])}))})),t}var It=function(t){function e(e){var n=t.call(this,e)||this;n.attrs={};var i=n.getDefaultAttrs();return function(t,e,n,i){e&&y(t,e)}(i,e.attrs),n.attrs=i,n.initAttrs(i),n.initAnimate(),n}return rt(e,t),e.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},e.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},e.prototype.onCanvasChange=function(t){},e.prototype.initAttrs=function(t){},e.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},e.prototype.isGroup=function(){return!1},e.prototype.getParent=function(){return this.get("parent")},e.prototype.getCanvas=function(){return this.get("canvas")},e.prototype.attr=function(){for(var t,e=[],n=0;n0?i=Et(i,M):n.addAnimator(this),i.push(M),this.set("animations",i),this.set("_pause",{isPaused:!1})},e.prototype.stopAnimate=function(t){var e=this;void 0===t&&(t=!0);var n=this.get("animations");l(n,(function(n){t&&(n.onFrame?e.attr(n.onFrame(1)):e.attr(n.toAttrs)),n.callback&&n.callback()})),this.set("animating",!1),this.set("animations",[])},e.prototype.pauseAnimate=function(){var t=this.get("timeline"),e=this.get("animations");return l(e,(function(t){t.pauseCallback&&t.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:t.getTime()}),this},e.prototype.resumeAnimate=function(){var t=this.get("timeline").getTime(),e=this.get("animations"),n=this.get("_pause").pauseTime;return l(e,(function(e){e.startTime=e.startTime+(t-n),e._paused=!1,e._pauseTime=null,e.resumeCallback&&e.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",e),this},e.prototype.emitDelegation=function(t,e){for(var n=e.propagationPath,i=this.getEvents(),r=0;r0)}));return a.length>0?(yt()(a,(function(t){var e=t.getBBox();r.push(e.minX,e.maxX),o.push(e.minY,e.maxY)})),t=Math.min.apply(null,r),e=Math.max.apply(null,r),n=Math.min.apply(null,o),i=Math.max.apply(null,o)):(t=0,e=0,n=0,i=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:i,width:e-t,height:i-n}},e.prototype.getCanvasBBox=function(){var t=1/0,e=-1/0,n=1/0,i=-1/0,r=[],o=[],a=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));return a.length>0?(yt()(a,(function(t){var e=t.getCanvasBBox();r.push(e.minX,e.maxX),o.push(e.minY,e.maxY)})),t=Math.min.apply(null,r),e=Math.max.apply(null,r),n=Math.min.apply(null,o),i=Math.max.apply(null,o)):(t=0,e=0,n=0,i=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:i,width:e-t,height:i-n}},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.children=[],e},e.prototype.onAttrChange=function(e,n,i){if(t.prototype.onAttrChange.call(this,e,n,i),"matrix"===e){var r=this.getTotalMatrix();this._applyChildrenMarix(r)}},e.prototype.applyMatrix=function(e){var n=this.getTotalMatrix();t.prototype.applyMatrix.call(this,e);var i=this.getTotalMatrix();i!==n&&this._applyChildrenMarix(i)},e.prototype._applyChildrenMarix=function(t){var e=this.getChildren();yt()(e,(function(e){e.applyMatrix(t)}))},e.prototype.addShape=function(){for(var t=[],e=0;e=0;o--){var a=t[o];if(Bt(a)&&(a.isGroup()?r=a.getShape(e,n,i):a.isHit(e,n)&&(r=a)),r)break}return r},e.prototype.add=function(t){var e=this.getCanvas(),n=this.getChildren(),i=this.get("timeline"),r=t.getParent();r&&function(t,e,n){void 0===n&&(n=!0),n?e.destroy():(e.set("parent",null),e.set("canvas",null)),xt(t.getChildren(),e)}(r,t,!1),t.set("parent",this),e&&function t(e,n){if(e.set("canvas",n),e.isGroup()){var i=e.get("children");i.length&&i.forEach((function(e){t(e,n)}))}}(t,e),i&&function t(e,n){if(e.set("timeline",n),e.isGroup()){var i=e.get("children");i.length&&i.forEach((function(e){t(e,n)}))}}(t,i),n.push(t),function(t){t.isGroup()?(t.isEntityGroup()||t.get("children").length)&&t.onCanvasChange("add"):t.onCanvasChange("add")}(t),this._applyElementMatrix(t)},e.prototype._applyElementMatrix=function(t){var e=this.getTotalMatrix();e&&t.applyMatrix(e)},e.prototype.getChildren=function(){return this.get("children")},e.prototype.sort=function(){var t,e=this.getChildren();yt()(e,(function(t,e){return t._INDEX=e,t})),e.sort((t=function(t,e){return t.get("zIndex")-e.get("zIndex")},function(e,n){var i=t(e,n);return 0===i?e._INDEX-n._INDEX:i})),this.onCanvasChange("sort")},e.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),e=t.length-1;e>=0;e--)t[e].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},e.prototype.destroy=function(){this.get("destroyed")||(this.clear(),t.prototype.destroy.call(this))},e.prototype.getFirst=function(){return this.getChildByIndex(0)},e.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},e.prototype.getChildByIndex=function(t){return this.getChildren()[t]},e.prototype.getCount=function(){return this.getChildren().length},e.prototype.contain=function(t){return this.getChildren().indexOf(t)>-1},e.prototype.removeChild=function(t,e){void 0===e&&(e=!0),this.contain(t)&&t.remove(e)},e.prototype.findAll=function(t){var e=[],n=this.getChildren();return yt()(n,(function(n){t(n)&&e.push(n),n.isGroup()&&(e=e.concat(n.findAll(t)))})),e},e.prototype.find=function(t){var e=null,n=this.getChildren();return yt()(n,(function(n){if(t(n)?e=n:n.isGroup()&&(e=n.find(t)),e)return!1})),e},e.prototype.findById=function(t){return this.find((function(e){return e.get("id")===t}))},e.prototype.findByClassName=function(t){return this.find((function(e){return e.get("className")===t}))},e.prototype.findAllByName=function(t){return this.findAll((function(e){return e.get("name")===t}))},e}(It),Nt=0,Yt=0,Xt=0,Gt=0,zt=0,qt=0,Ht="object"==typeof performance&&performance.now?performance:Date,Vt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Wt(){return zt||(Vt(Ut),zt=Ht.now()+qt)}function Ut(){zt=0}function Qt(){this._call=this._time=this._next=null}function Zt(t,e,n){var i=new Qt;return i.restart(t,e,n),i}function $t(){zt=(Gt=Ht.now())+qt,Nt=Yt=0;try{!function(){Wt(),++Nt;for(var t,e=Dt;e;)(t=zt-e._time)>=0&&e._call.call(null,t),e=e._next;--Nt}()}finally{Nt=0,function(){for(var t,e,n=Dt,i=1/0;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Dt=e);Ft=t,Jt(i)}(),zt=0}}function Kt(){var t=Ht.now(),e=t-Gt;e>1e3&&(qt-=e,Gt=t)}function Jt(t){Nt||(Yt&&(Yt=clearTimeout(Yt)),t-zt>24?(t<1/0&&(Yt=setTimeout($t,t-Ht.now()-qt)),Xt&&(Xt=clearInterval(Xt))):(Xt||(Gt=Ht.now(),Xt=setInterval(Kt,1e3)),Nt=1,Vt($t)))}function te(t){return+t}function ee(t){return t*t}function ne(t){return t*(2-t)}function ie(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function re(t){return t*t*t}function oe(t){return--t*t*t+1}function ae(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Qt.prototype=Zt.prototype={constructor:Qt,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Wt():+n)+(null==e?0:+e),this._next||Ft===this||(Ft?Ft._next=this:Dt=this,Ft=this),this._call=t,this._time=n,Jt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jt())}};var se=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),ue=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),ce=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),le=Math.PI,he=le/2;function pe(t){return 1-Math.cos(t*he)}function fe(t){return Math.sin(t*he)}function de(t){return(1-Math.cos(le*t))/2}function ge(t){return Math.pow(2,10*t-10)}function ye(t){return 1-Math.pow(2,-10*t)}function ve(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function me(t){return 1-Math.sqrt(1-t*t)}function xe(t){return Math.sqrt(1- --t*t)}function be(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Me=7.5625;function _e(t){return 1-we(1-t)}function we(t){return(t=+t)<4/11?Me*t*t:t<8/11?Me*(t-=6/11)*t+.75:t<10/11?Me*(t-=9/11)*t+.9375:Me*(t-=21/22)*t+63/64}function Oe(t){return((t*=2)<=1?1-we(1-t):we(t-1)+1)/2}var Ce=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),Se=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),Ae=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),Pe=2*Math.PI,je=function t(e,n){var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Pe);function r(t){return e*Math.pow(2,10*--t)*Math.sin((i-t)/n)}return r.amplitude=function(e){return t(e,n*Pe)},r.period=function(n){return t(e,n)},r}(1,.3),ke=function t(e,n){var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Pe);function r(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+i)/n)}return r.amplitude=function(e){return t(e,n*Pe)},r.period=function(n){return t(e,n)},r}(1,.3),Te=function t(e,n){var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Pe);function r(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((i-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((i+t)/n))/2}return r.amplitude=function(e){return t(e,n*Pe)},r.period=function(n){return t(e,n)},r}(1,.3),Ee=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function Ie(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Le(){}var Be="\\s*([+-]?\\d+)\\s*",De="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Re=/^#([0-9a-f]{3,8})$/,Ne=new RegExp("^rgb\\("+[Be,Be,Be]+"\\)$"),Ye=new RegExp("^rgb\\("+[Fe,Fe,Fe]+"\\)$"),Xe=new RegExp("^rgba\\("+[Be,Be,Be,De]+"\\)$"),Ge=new RegExp("^rgba\\("+[Fe,Fe,Fe,De]+"\\)$"),ze=new RegExp("^hsl\\("+[De,Fe,Fe]+"\\)$"),qe=new RegExp("^hsla\\("+[De,Fe,Fe,De]+"\\)$"),He={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ve(){return this.rgb().formatHex()}function We(){return this.rgb().formatRgb()}function Ue(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Re.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Qe(e):3===n?new Ke(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Ke(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Ke(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Ne.exec(t))?new Ke(e[1],e[2],e[3],1):(e=Ye.exec(t))?new Ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Xe.exec(t))?Ze(e[1],e[2],e[3],e[4]):(e=Ge.exec(t))?Ze(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ze.exec(t))?nn(e[1],e[2]/100,e[3]/100,1):(e=qe.exec(t))?nn(e[1],e[2]/100,e[3]/100,e[4]):He.hasOwnProperty(t)?Qe(He[t]):"transparent"===t?new Ke(NaN,NaN,NaN,0):null}function Qe(t){return new Ke(t>>16&255,t>>8&255,255&t,1)}function Ze(t,e,n,i){return i<=0&&(t=e=n=NaN),new Ke(t,e,n,i)}function $e(t,e,n,i){return 1===arguments.length?function(t){return t instanceof Le||(t=Ue(t)),t?new Ke((t=t.rgb()).r,t.g,t.b,t.opacity):new Ke}(t):new Ke(t,e,n,null==i?1:i)}function Ke(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function Je(){return"#"+en(this.r)+en(this.g)+en(this.b)}function tn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function en(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function nn(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new on(t,e,n,i)}function rn(t){if(t instanceof on)return new on(t.h,t.s,t.l,t.opacity);if(t instanceof Le||(t=Ue(t)),!t)return new on;if(t instanceof on)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),a=NaN,s=o-r,u=(o+r)/2;return s?(a=e===o?(n-i)/s+6*(n0&&u<1?0:a,new on(a,s,u,t.opacity)}function on(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function an(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function sn(t,e,n,i,r){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*i+a*r)/6}Ee(Le,Ue,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Ve,formatHex:Ve,formatHsl:function(){return rn(this).formatHsl()},formatRgb:We,toString:We}),Ee(Ke,$e,Ie(Le,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Je,formatHex:Je,formatRgb:tn,toString:tn})),Ee(on,(function(t,e,n,i){return 1===arguments.length?rn(t):new on(t,e,n,null==i?1:i)}),Ie(Le,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new on(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new on(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Ke(an(t>=240?t-240:t+120,r,i),an(t,r,i),an(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var un=function(t){return function(){return t}};function cn(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):un(isNaN(t)?e:t)}var ln=function t(e){var n=function(t){return 1==(t=+t)?cn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):un(isNaN(e)?n:e)}}(e);function i(t,e){var i=n((t=$e(t)).r,(e=$e(e)).r),r=n(t.g,e.g),o=n(t.b,e.b),a=cn(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=o(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);function hn(t){return function(e){var n,i,r=e.length,o=new Array(r),a=new Array(r),s=new Array(r);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),r=t[i],o=t[i+1],a=i>0?t[i-1]:2*r-o,s=io&&(r=e.slice(o,r),s[a]?s[a]+=r:s[++a]=r),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:yn(n,i)})),o=xn.lastIndex;return of.length?(p=A(o[l]),f=A(r[l]),f=K(f,p),f=et(f,p),e.fromAttrs.path=f,e.toAttrs.path=p):e.pathFormatted||(p=A(o[l]),f=A(r[l]),f=et(f,p),e.fromAttrs.path=f,e.toAttrs.path=p,e.pathFormatted=!0),i[l]=[];for(var d=0;d0){for(var o=i.animators.length-1;o>=0;o--)if((t=i.animators[o]).destroyed)i.removeAnimator(o);else{if(!t.isAnimatePaused())for(var a=(e=t.get("animations")).length-1;a>=0;a--)n=e[a],wn(t,n,r)&&(e.splice(a,1),n.callback&&n.callback());0===e.length&&i.removeAnimator(o)}i.canvas.get("autoDraw")||i.canvas.draw()}}))},t.prototype.addAnimator=function(t){this.animators.push(t)},t.prototype.removeAnimator=function(t){this.animators.splice(t,1)},t.prototype.isAnimating=function(){return!!this.animators.length},t.prototype.stop=function(){this.timer&&this.timer.stop()},t.prototype.stopAllAnimations=function(t){void 0===t&&(t=!0),this.animators.forEach((function(e){e.stopAnimate(t)})),this.animators=[],this.canvas.draw()},t.prototype.getTime=function(){return this.current},t}(),Cn=function(t){function e(e){var n=t.call(this,e)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}return rt(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.cursor="default",e},e.prototype.initContainer=function(){var t=this.get("container");lt()(t)&&(t=document.getElementById(t),this.set("container",t))},e.prototype.initDom=function(){var t=this.createDom();this.set("el",t),this.get("container").appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},e.prototype.initEvents=function(){},e.prototype.initTimeline=function(){var t=new On(this);this.set("timeline",t)},e.prototype.setDOMSize=function(t,e){var n=this.get("el");bt&&(n.style.width=t+"px",n.style.height=e+"px")},e.prototype.changeSize=function(t,e){this.setDOMSize(t,e),this.set("width",t),this.set("height",e),this.onCanvasChange("changeSize")},e.prototype.getRenderer=function(){return this.get("renderer")},e.prototype.getCursor=function(){return this.get("cursor")},e.prototype.setCursor=function(t){this.set("cursor",t);var e=this.get("el");bt&&e&&(e.style.cursor=t)},e.prototype.getPointByClient=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t-n.left,y:e-n.top}},e.prototype.getClientByPoint=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t+n.left,y:e+n.top}},e.prototype.draw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},e.prototype.clearEvents=function(){},e.prototype.isCanvas=function(){return!0},e.prototype.getParent=function(){return null},e.prototype.destroy=function(){var e=this.get("timeline");this.get("destroyed")||(this.clear(),e&&e.stop(),this.clearEvents(),this.removeDom(),t.prototype.destroy.call(this))},e}(Rt),Sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return rt(e,t),e.prototype.isGroup=function(){return!0},e.prototype.isEntityGroup=function(){return!1},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=this.getChildren(),i=0;i=t&&n.minY<=e&&n.maxY>=e},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e),this.clearCacheBBox()},e.prototype.getBBox=function(){var t=this.get("bbox");return t||(t=this.calculateBBox(),this.set("bbox",t)),t},e.prototype.getCanvasBBox=function(){var t=this.get("canvasBox");return t||(t=this.calculateCanvasBBox(),this.set("canvasBox",t)),t},e.prototype.applyMatrix=function(e){t.prototype.applyMatrix.call(this,e),this.set("canvasBox",null)},e.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),e=this.getTotalMatrix(),n=t.minX,i=t.minY,r=t.maxX,o=t.maxY;if(e){var a=At(e,[t.minX,t.minY]),s=At(e,[t.maxX,t.minY]),u=At(e,[t.minX,t.maxY]),c=At(e,[t.maxX,t.maxY]);n=Math.min(a[0],s[0],u[0],c[0]),r=Math.max(a[0],s[0],u[0],c[0]),i=Math.min(a[1],s[1],u[1],c[1]),o=Math.max(a[1],s[1],u[1],c[1])}var l=this.attrs;if(l.shadowColor){var h=l.shadowBlur,p=void 0===h?0:h,f=l.shadowOffsetX,d=void 0===f?0:f,g=l.shadowOffsetY,y=void 0===g?0:g,v=n-p+d,m=r+p+d,x=i-p+y,b=o+p+y;n=Math.min(n,v),r=Math.max(r,m),i=Math.min(i,x),o=Math.max(o,b)}return{x:n,y:i,minX:n,minY:i,maxX:r,maxY:o,width:r-n,height:o-i}},e.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBox",null)},e.prototype.isClipShape=function(){return this.get("isClipShape")},e.prototype.isInShape=function(t,e){return!1},e.prototype.isOnlyHitBox=function(){return!1},e.prototype.isHit=function(t,e){var n=this.get("startArrowShape"),i=this.get("endArrowShape"),r=[t,e,1],o=(r=this.invertFromMatrix(r))[0],a=r[1],s=this._isInBBox(o,a);if(this.isOnlyHitBox())return s;if(s&&!this.isClipped(o,a)){if(this.isInShape(o,a))return!0;if(n&&n.isHit(o,a))return!0;if(i&&i.isHit(o,a))return!0}return!1},e}(It),Pn=n(49).version},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return null==t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(20);e.default=function(t){return i.default(t,"String")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8),r=n(13);e.default=function(t,e){if(t)if(i.default(t))for(var n=0,o=t.length;n=u-p&&a<=c+p&&s>=l-p&&s<=h+p&&i.default.pointToLine(t,e,n,r,a,s)<=o/2}},function(t,e,n){"use strict";n.r(e),n.d(e,"contains",(function(){return r})),n.d(e,"includes",(function(){return r})),n.d(e,"difference",(function(){return h})),n.d(e,"find",(function(){return m})),n.d(e,"findIndex",(function(){return x})),n.d(e,"firstValue",(function(){return b})),n.d(e,"flatten",(function(){return M})),n.d(e,"flattenDeep",(function(){return w})),n.d(e,"getRange",(function(){return O})),n.d(e,"pull",(function(){return P})),n.d(e,"pullAt",(function(){return k})),n.d(e,"reduce",(function(){return T})),n.d(e,"remove",(function(){return E})),n.d(e,"sortBy",(function(){return L})),n.d(e,"union",(function(){return D})),n.d(e,"uniq",(function(){return B})),n.d(e,"valuesOfKey",(function(){return F})),n.d(e,"head",(function(){return R})),n.d(e,"last",(function(){return N})),n.d(e,"startsWith",(function(){return Y})),n.d(e,"endsWith",(function(){return X})),n.d(e,"filter",(function(){return l})),n.d(e,"every",(function(){return G})),n.d(e,"some",(function(){return z})),n.d(e,"group",(function(){return W})),n.d(e,"groupBy",(function(){return H})),n.d(e,"groupToMap",(function(){return V})),n.d(e,"getWrapBehavior",(function(){return U})),n.d(e,"wrapBehavior",(function(){return Q})),n.d(e,"number2color",(function(){return $})),n.d(e,"parseRadius",(function(){return K})),n.d(e,"clamp",(function(){return J})),n.d(e,"fixedBase",(function(){return tt})),n.d(e,"isDecimal",(function(){return nt})),n.d(e,"isEven",(function(){return it})),n.d(e,"isInteger",(function(){return rt})),n.d(e,"isNegative",(function(){return ot})),n.d(e,"isNumberEqual",(function(){return at})),n.d(e,"isOdd",(function(){return st})),n.d(e,"isPositive",(function(){return ut})),n.d(e,"maxBy",(function(){return ct})),n.d(e,"minBy",(function(){return lt})),n.d(e,"mod",(function(){return ht})),n.d(e,"toDegree",(function(){return ft})),n.d(e,"toInteger",(function(){return dt})),n.d(e,"toRadian",(function(){return yt})),n.d(e,"forIn",(function(){return vt})),n.d(e,"has",(function(){return mt})),n.d(e,"hasKey",(function(){return xt})),n.d(e,"hasValue",(function(){return Mt})),n.d(e,"keys",(function(){return d})),n.d(e,"isMatch",(function(){return g})),n.d(e,"values",(function(){return bt})),n.d(e,"lowerCase",(function(){return wt})),n.d(e,"lowerFirst",(function(){return Ot})),n.d(e,"substitute",(function(){return Ct})),n.d(e,"upperCase",(function(){return St})),n.d(e,"upperFirst",(function(){return At})),n.d(e,"getType",(function(){return jt})),n.d(e,"isArguments",(function(){return kt})),n.d(e,"isArray",(function(){return s})),n.d(e,"isArrayLike",(function(){return i})),n.d(e,"isBoolean",(function(){return Tt})),n.d(e,"isDate",(function(){return Et})),n.d(e,"isError",(function(){return It})),n.d(e,"isFunction",(function(){return p})),n.d(e,"isFinite",(function(){return Lt})),n.d(e,"isNil",(function(){return f})),n.d(e,"isNull",(function(){return Bt})),n.d(e,"isNumber",(function(){return et})),n.d(e,"isObject",(function(){return u})),n.d(e,"isObjectLike",(function(){return y})),n.d(e,"isPlainObject",(function(){return v})),n.d(e,"isPrototype",(function(){return Ft})),n.d(e,"isRegExp",(function(){return Rt})),n.d(e,"isString",(function(){return I})),n.d(e,"isType",(function(){return a})),n.d(e,"isUndefined",(function(){return Nt})),n.d(e,"isElement",(function(){return Yt})),n.d(e,"requestAnimationFrame",(function(){return Xt})),n.d(e,"clearAnimationFrame",(function(){return Gt})),n.d(e,"augment",(function(){return Ht})),n.d(e,"clone",(function(){return Wt})),n.d(e,"debounce",(function(){return Ut})),n.d(e,"memoize",(function(){return Qt})),n.d(e,"deepMix",(function(){return $t})),n.d(e,"each",(function(){return c})),n.d(e,"extend",(function(){return Kt})),n.d(e,"indexOf",(function(){return Jt})),n.d(e,"isEmpty",(function(){return ee})),n.d(e,"isEqual",(function(){return ie})),n.d(e,"isEqualWith",(function(){return re})),n.d(e,"map",(function(){return oe})),n.d(e,"mapValues",(function(){return se})),n.d(e,"mix",(function(){return qt})),n.d(e,"assign",(function(){return qt})),n.d(e,"get",(function(){return ue})),n.d(e,"set",(function(){return ce})),n.d(e,"pick",(function(){return he})),n.d(e,"throttle",(function(){return pe})),n.d(e,"toArray",(function(){return fe})),n.d(e,"toString",(function(){return _t})),n.d(e,"uniqueId",(function(){return ge})),n.d(e,"noop",(function(){return ye})),n.d(e,"identity",(function(){return ve})),n.d(e,"size",(function(){return me})),n.d(e,"Cache",(function(){return xe}));var i=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},r=function(t,e){return!!i(t)&&t.indexOf(e)>-1},o={}.toString,a=function(t,e){return o.call(t)==="[object "+e+"]"},s=function(t){return Array.isArray?Array.isArray(t):a(t,"Array")},u=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},c=function(t,e){if(t)if(s(t))for(var n=0,i=t.length;n-1;)S.call(t,o,1);return t},j=Array.prototype.splice,k=function(t,e){if(!i(t))return[];for(var n=t?e.length:0,r=n-1;n--;){var o=void 0,a=e[n];n!==r&&a===o||(o=a,j.call(t,a,1))}return t},T=function(t,e,n){if(!s(t)&&!v(t))return t;var i=n;return c(t,(function(t,n){i=e(i,t,n)})),i},E=function(t,e){var n=[];if(!i(t))return n;for(var r=-1,o=[],a=t.length;++re[r])return 1;if(t[r]n?n:t},tt=function(t,e){var n=e.toString(),i=n.indexOf(".");if(-1===i)return Math.round(t);var r=n.substr(i+1).length;return r>20&&(r=20),parseFloat(t.toFixed(r))},et=function(t){return a(t,"Number")},nt=function(t){return et(t)&&t%1!=0},it=function(t){return et(t)&&t%2==0},rt=Number.isInteger?Number.isInteger:function(t){return et(t)&&t%1==0},ot=function(t){return et(t)&&t<0};function at(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)0},ct=function(t,e){if(s(t)){var n,i,r=t[0];return n=p(e)?e(t[0]):t[0][e],c(t,(function(t){(i=p(e)?e(t):t[e])>n&&(r=t,n=i)})),r}},lt=function(t,e){if(s(t)){var n,i,r=t[0];return n=p(e)?e(t[0]):t[0][e],c(t,(function(t){(i=p(e)?e(t):t[e])e?(i&&(clearTimeout(i),i=null),s=c,a=t.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(u,l)),a};return c.cancel=function(){clearTimeout(i),s=0,i=r=o=null},c},fe=function(t){return i(t)?Array.prototype.slice.call(t):[]},de={},ge=function(t){return de[t=t||"g"]?de[t]+=1:de[t]=1,t+de[t]},ye=function(){},ve=function(t){return t};function me(t){return f(t)?0:i(t)?t.length:Object.keys(t).length}var xe=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(20);e.default=function(t){return i.default(t,"Function")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={}.toString;e.default=function(t,e){return i.call(t)==="[object "+e+"]"}},function(t,e,n){"use strict";function i(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n,r){return e&&i(t,e),n&&i(t,n),r&&i(t,r),t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(50);e.default=function(t){var e=i.default(t);return e.charAt(0).toUpperCase()+e.substring(1)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=function(t){e.ARRAY_TYPE=t},e.toRadian=function(t){return t*r},e.equals=function(t,e){return Math.abs(t-e)<=i*Math.max(1,Math.abs(t),Math.abs(e))};var i=e.EPSILON=1e-6;e.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,e.RANDOM=Math.random;var r=Math.PI/180},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={}.toString;e.default=function(t,e){return i.call(t)==="[object "+e+"]"}},function(t,e,n){"use strict";function i(t,e){return t&&e?{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}:t||e}Object.defineProperty(e,"__esModule",{value:!0}),e.mergeBBox=i,e.mergeArrowBBox=function(t,e){var n=t.get("startArrowShape"),r=t.get("endArrowShape");return n&&(e=i(e,n.getCanvasBBox())),r&&(e=i(e,r.getCanvasBBox())),e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),r=n(6),o=n(36);function a(t,e,n,i,r){var o=1-r;return o*o*o*t+3*e*r*o*o+3*n*r*r*o+i*r*r*r}function s(t,e,n,i,r){var o=1-r;return 3*(o*o*(e-t)+2*o*r*(n-e)+r*r*(i-n))}function u(t,e,n,r){var o,a,s,u=-3*t+9*e-9*n+3*r,c=6*t-12*e+6*n,l=3*e-3*t,h=[];if(i.isNumberEqual(u,0))i.isNumberEqual(c,0)||(o=-l/c)>=0&&o<=1&&h.push(o);else{var p=c*c-4*u*l;i.isNumberEqual(p,0)?h.push(-c/(2*u)):p>0&&(a=(-c-(s=Math.sqrt(p)))/(2*u),(o=(-c+s)/(2*u))>=0&&o<=1&&h.push(o),a>=0&&a<=1&&h.push(a))}return h}function c(t,e,n,i,o,s,u,c,l){var h=a(t,n,o,u,l),p=a(e,i,s,c,l),f=r.default.pointAt(t,e,n,i,l),d=r.default.pointAt(n,i,o,s,l),g=r.default.pointAt(o,s,u,c,l),y=r.default.pointAt(f.x,f.y,d.x,d.y,l),v=r.default.pointAt(d.x,d.y,g.x,g.y,l);return[[t,e,f.x,f.y,y.x,y.y,h,p],[h,p,v.x,v.y,g.x,g.y,u,c]]}e.default={extrema:u,box:function(t,e,n,r,o,s,c,l){for(var h=[t,c],p=[e,l],f=u(t,n,o,c),d=u(e,r,s,l),g=0;g=0&&s<.5*Math.PI?(i={x:l.minX,y:l.minY},o={x:l.maxX,y:l.maxY}):.5*Math.PI<=s&&s1?e*r+o(e,n)*(r-1):e},e.getLineSpaceing=o,e.getTextWidth=function(t,e){var n=r.getOffScreenContext(),o=0;if(i.isNil(t)||""===t)return o;if(n.save(),n.font=e,i.isString(t)&&t.includes("\n")){var a=t.split("\n");i.each(a,(function(t){var e=n.measureText(t).width;o=0?[o]:[]}function u(t,e,n,i){return 2*(1-i)*(e-t)+2*i*(n-e)}function c(t,e,n,r,o,s,u){var c=a(t,n,o,u),l=a(e,r,s,u),h=i.default.pointAt(t,e,n,r,u),p=i.default.pointAt(n,r,o,s,u);return[[t,e,h.x,h.y,c,l],[c,l,p.x,p.y,o,s]]}e.default={box:function(t,e,n,i,o,u){var c=s(t,n,o)[0],l=s(e,i,u)[0],h=[t,o],p=[e,u];return void 0!==c&&h.push(a(t,n,o,c)),void 0!==l&&p.push(a(e,i,u,l)),r.getBBoxByArray(h,p)},length:function(t,e,n,i,o,a){return function t(e,n,i,o,a,s,u){if(0===u)return(r.distance(e,n,i,o)+r.distance(i,o,a,s)+r.distance(e,n,a,s))/2;var l=c(e,n,i,o,a,s,.5),h=l[0],p=l[1];return h.push(u-1),p.push(u-1),t.apply(null,h)+t.apply(null,p)}(t,e,n,i,o,a,3)},nearestPoint:function(t,e,n,i,r,s,u,c){return o.nearestPoint([t,n,r],[e,i,s],u,c,a)},pointDistance:function(t,e,n,i,o,a,s,u){var c=this.nearestPoint(t,e,n,i,o,a,s,u);return r.distance(c.x,c.y,s,u)},interpolationAt:a,pointAt:function(t,e,n,i,r,o,s){return{x:a(t,n,r,s),y:a(e,i,o,s)}},divide:function(t,e,n,i,r,o,a){return c(t,e,n,i,r,o,a)},tangentAngle:function(t,e,n,i,o,a,s){var c=u(t,n,o,s),l=u(e,i,a,s),h=Math.atan2(l,c);return r.piMod(h)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(5);e.nearestPoint=function(t,e,n,r,o){for(var a,s=.005,u=1/0,c=[n,r],l=0;l<=20;l++){var h=.05*l,p=[o.apply(null,t.concat([h])),o.apply(null,e.concat([h]))];(y=i.distance(c[0],c[1],p[0],p[1]))=0&&y1&&(n*=Math.sqrt(m),o*=Math.sqrt(m));var x=n*n*(v*v)+o*o*(y*y),b=x?Math.sqrt((n*n*(o*o)-x)/x):1;l===h&&(b*=-1),isNaN(b)&&(b=0);var M=o?b*n*v/o:0,_=n?b*-o*y/n:0,w=(p+d)/2+Math.cos(c)*M-Math.sin(c)*_,O=(f+g)/2+Math.sin(c)*M+Math.cos(c)*_,C=[(y-M)/n,(v-_)/o],S=[(-1*y-M)/n,(-1*v-_)/o],A=s([1,0],C),P=s(C,S);return a(C,S)<=-1&&(P=Math.PI),a(C,S)>=1&&(P=0),0===h&&P>0&&(P-=2*Math.PI),1===h&&P<0&&(P+=2*Math.PI),{cx:w,cy:O,rx:u(t,[d,g])?0:n,ry:u(t,[d,g])?0:o,startAngle:A,endAngle:A+P,xRotation:c,arcFlag:l,sweepFlag:h}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(83),r=/[a-z]/;function o(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}e.default=function(t){var e=i.default(t);if(!e||!e.length)return[["M",0,0]];for(var n=!1,a=0;a=0){n=!0;break}}if(!n)return e;var u=[],c=0,l=0,h=0,p=0,f=0,d=e[0];"M"!==d[0]&&"m"!==d[0]||(h=c=+d[1],p=l=+d[2],f++,u[0]=["M",c,l]),a=f;for(var g=e.length;a1&&(n*=Math.sqrt(m),o*=Math.sqrt(m));var x=n*n*(v*v)+o*o*(y*y),b=x?Math.sqrt((n*n*(o*o)-x)/x):1;l===h&&(b*=-1),isNaN(b)&&(b=0);var M=o?b*n*v/o:0,_=n?b*-o*y/n:0,w=(p+d)/2+Math.cos(c)*M-Math.sin(c)*_,O=(f+g)/2+Math.sin(c)*M+Math.cos(c)*_,C=[(y-M)/n,(v-_)/o],S=[(-1*y-M)/n,(-1*v-_)/o],A=s([1,0],C),P=s(C,S);return a(C,S)<=-1&&(P=Math.PI),a(C,S)>=1&&(P=0),0===h&&P>0&&(P-=2*Math.PI),1===h&&P<0&&(P+=2*Math.PI),{cx:w,cy:O,rx:u(t,[d,g])?0:n,ry:u(t,[d,g])?0:o,startAngle:A,endAngle:A+P,xRotation:c,arcFlag:l,sweepFlag:h}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2);e.default=function(t,e,n){var r=i.getOffScreenContext();return t.createPath(r),r.isPointInPath(e,n)}},function(t,e,n){"use strict";function i(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function r(t,e,n){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])&&Math.min(t[0],e[0])<=n[0]&&n[0]<=Math.max(t[0],e[0])&&Math.min(t[1],e[1])<=n[1]&&n[1]<=Math.max(t[1],e[1])}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){var o=!1,a=t.length;if(a<=2)return!1;for(var s=0;s0!=i(c[1]-n)>0&&i(e-(n-u[1])*(u[0]-c[0])/(u[1]-c[1])-u[0])<0&&(o=!o)}return o}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2);e.default=function(t,e,n,r,o,a,s,u){var c=(Math.atan2(u-e,s-t)+2*Math.PI)%(2*Math.PI);if(co)return!1;var l={x:t+n*Math.cos(c),y:e+n*Math.sin(c)};return i.distance(l.x,l.y,s,u)<=a/2}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=function(t){e.ARRAY_TYPE=t},e.toRadian=function(t){return t*r},e.equals=function(t,e){return Math.abs(t-e)<=i*Math.max(1,Math.abs(t),Math.abs(e))};var i=e.EPSILON=1e-6;e.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,e.RANDOM=Math.random;var r=Math.PI/180},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(17);e.default=function(t,e,n,r,o){var a=t.length;if(a<2)return!1;for(var s=0;s1?0:r<-1?Math.PI:Math.acos(r)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.equals=function(t,e){var n=t[0],i=t[1],o=t[2],a=e[0],s=e[1],u=e[2];return Math.abs(n-a)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-s)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-u)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(u))};var i,r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(23));function o(){var t=new r.ARRAY_TYPE(3);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function a(t){var e=t[0],n=t[1],i=t[2];return Math.sqrt(e*e+n*n+i*i)}function s(t,e,n){var i=new r.ARRAY_TYPE(3);return i[0]=t,i[1]=e,i[2]=n,i}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function c(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function l(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function h(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(n*n+i*i+r*r)}function p(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return n*n+i*i+r*r}function f(t){var e=t[0],n=t[1],i=t[2];return e*e+n*n+i*i}function d(t,e){var n=e[0],i=e[1],r=e[2],o=n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function g(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}e.sub=u,e.mul=c,e.div=l,e.dist=h,e.sqrDist=p,e.len=a,e.sqrLen=f,e.forEach=(i=o(),function(t,e,n,r,o,a){var s,u=void 0;for(e||(e=3),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,u=n;u1&&(n*=Math.sqrt(y),r*=Math.sqrt(y));var v=n*n*(g*g)+r*r*(d*d),m=v?Math.sqrt((n*n*(r*r)-v)/v):1;u===c&&(m*=-1),isNaN(m)&&(m=0);var x=r?m*n*g/r:0,b=n?m*-r*d/n:0,M=(l+p)/2+Math.cos(s)*x-Math.sin(s)*b,_=(h+f)/2+Math.sin(s)*x+Math.cos(s)*b,w=[(d-x)/n,(g-b)/r],O=[(-1*d-x)/n,(-1*g-b)/r],C=a([1,0],w),S=a(w,O);return o(w,O)<=-1&&(S=Math.PI),o(w,O)>=1&&(S=0),0===c&&S>0&&(S-=2*Math.PI),1===c&&S<0&&(S+=2*Math.PI),{cx:M,cy:_,rx:i.isSamePoint(t,[p,f])?0:n,ry:i.isSamePoint(t,[p,f])?0:r,startAngle:C,endAngle:C+S,xRotation:s,arcFlag:u,sweepFlag:c}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(59);e.getBBoxMethod=i.getMethod;var r=n(60),o=n(61),a=n(62),s=n(63),u=n(64),c=n(66),l=n(76),h=n(77);i.register("rect",r.default),i.register("image",r.default),i.register("circle",o.default),i.register("marker",o.default),i.register("polyline",a.default),i.register("polygon",s.default),i.register("text",u.default),i.register("path",c.default),i.register("line",l.default),i.register("ellipse",h.default)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=new Map;e.register=function(t,e){i.set(t,e)},e.getMethod=function(t){return i.get(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.attr();return{x:e.x,y:e.y,width:e.width,height:e.height}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.attr(),n=e.x,i=e.y,r=e.r;return{x:n-r,y:i-r,width:2*r,height:2*r}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),r=n(25);e.default=function(t){for(var e=t.attr().points,n=[],o=[],a=0;aMath.PI/2?Math.PI-l:l,h=h>Math.PI/2?Math.PI-h:h,{xExtra:Math.cos(c/2-l)*(e/2*(1/Math.sin(c/2)))-e/2||0,yExtra:Math.cos(h-c/2)*(e/2*(1/Math.sin(c/2)))-e/2||0}}e.default=function(t){var e=t.attr(),n=e.path,s=e.stroke?e.lineWidth:0,l=function(t,e){for(var n=[],a=[],s=[],u=0;u0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,n){var i=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=i,t},e.lerp=function(t,e,n,i){var r=e[0],o=e[1];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t},e.random=function(t,e){e=e||1;var n=2*r.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.transformMat2=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t},e.transformMat2d=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t},e.transformMat3=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[3]*r+n[6],t[1]=n[1]*i+n[4]*r+n[7],t},e.transformMat4=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[4]*r+n[12],t[1]=n[1]*i+n[5]*r+n[13],t},e.rotate=function(t,e,n,i){var r=e[0]-n[0],o=e[1]-n[1],a=Math.sin(i),s=Math.cos(i);return t[0]=r*s-o*a+n[0],t[1]=r*a+o*s+n[1],t},e.angle=function(t,e){var n=t[0],i=t[1],r=e[0],o=e[1],a=n*n+i*i;a>0&&(a=1/Math.sqrt(a));var s=r*r+o*o;s>0&&(s=1/Math.sqrt(s));var u=(n*r+i*o)*a*s;return u>1?0:u<-1?Math.PI:Math.acos(u)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],i=t[1],o=e[0],a=e[1];return Math.abs(n-o)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-a)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(a))};var i,r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(68));function o(){var t=new r.ARRAY_TYPE(2);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function s(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function u(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function c(t,e){var n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)}function l(t,e){var n=e[0]-t[0],i=e[1]-t[1];return n*n+i*i}function h(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function p(t){var e=t[0],n=t[1];return e*e+n*n}e.len=h,e.sub=a,e.mul=s,e.div=u,e.dist=c,e.sqrDist=l,e.sqrLen=p,e.forEach=(i=o(),function(t,e,n,r,o,a){var s,u=void 0;for(e||(e=2),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,u=n;uh&&(h=g)}var y=function(t,e,n){return Math.atan(e/(t*Math.tan(n)))}(n,i,r),v=1/0,m=-1/0,x=[s,u];for(f=2*-Math.PI;f<=2*Math.PI;f+=Math.PI){var b=y+f;sm&&(m=M)}return{x:l,y:v,width:h-l,height:m-v}},length:function(t,e,n,i,r,o,a){},nearestPoint:function(t,e,n,i,o,a,c,l,h){var p=u(l-t,h-e,-o),f=p[0],d=p[1],g=r.default.nearestPoint(0,0,n,i,f,d),y=function(t,e,n,i){return(Math.atan2(i*t,n*e)+2*Math.PI)%(2*Math.PI)}(n,i,g.x,g.y);yc&&(g=s(n,i,c));var v=u(g.x,g.y,o);return{x:v[0]+t,y:v[1]+e}},pointDistance:function(t,e,n,r,o,a,s,u,c){var l=this.nearestPoint(t,e,n,r,u,c);return i.distance(l.x,l.y,u,c)},pointAt:function(t,e,n,i,r,s,u,c){var l=(u-s)*c+s;return{x:o(t,0,n,i,r,l),y:a(0,e,n,i,r,l)}},tangentAngle:function(t,e,n,r,o,a,s,u){var c=(s-a)*u+a,l=function(t,e,n,i,r,o,a,s){return-1*n*Math.cos(r)*Math.sin(s)-i*Math.sin(r)*Math.cos(s)}(0,0,n,r,o,0,0,c),h=function(t,e,n,i,r,o,a,s){return-1*n*Math.sin(r)*Math.sin(s)+i*Math.cos(r)*Math.cos(s)}(0,0,n,r,o,0,0,c);return i.piMod(Math.atan2(h,l))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(5);function r(t,e){var n=Math.abs(t);return e>0?n:-1*n}e.default={box:function(t,e,n,i){return{x:t-n,y:e-i,width:2*n,height:2*i}},length:function(t,e,n,i){return Math.PI*(3*(n+i)-Math.sqrt((3*n+i)*(n+3*i)))},nearestPoint:function(t,e,n,i,o,a){var s=n,u=i;if(0===s||0===u)return{x:t,y:e};for(var c,l,h=o-t,p=a-e,f=Math.abs(h),d=Math.abs(p),g=s*s,y=u*u,v=Math.PI/4,m=0;m<4;m++){c=s*Math.cos(v),l=u*Math.sin(v);var x=(g-y)*Math.pow(Math.cos(v),3)/s,b=(y-g)*Math.pow(Math.sin(v),3)/u,M=c-x,_=l-b,w=f-x,O=d-b,C=Math.hypot(_,M),S=Math.hypot(O,w);v+=C*Math.asin((M*O-_*w)/(C*S))/Math.sqrt(g+y-c*c-l*l),v=Math.min(Math.PI/2,Math.max(0,v))}return{x:t+r(c,h),y:e+r(l,p)}},pointDistance:function(t,e,n,r,o,a){var s=this.nearestPoint(t,e,n,r,o,a);return i.distance(s.x,s.y,o,a)},pointAt:function(t,e,n,i,r){var o=2*Math.PI*r;return{x:t+n*Math.cos(o),y:e+i*Math.sin(o)}},tangentAngle:function(t,e,n,r,o){var a=2*Math.PI*o,s=Math.atan2(r*Math.cos(a),-n*Math.sin(a));return i.piMod(s)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(37),r=n(37),o=n(74);function a(t,e){return{x:e.x+(e.x-t.x),y:e.y+(e.y-t.y)}}e.default=function(t){for(var e=[],n=null,s=null,u=null,c=0,l=(t=o.default(t)).length,h=0;h1){var r=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=r}i.default(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)=c-l&&h<=c+l},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,i=e.y,r=e.r;t.beginPath(),t.arc(n,i,r,0,2*Math.PI,!1),t.closePath()},e}(r.default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0);function r(t,e,n,i){return t/(n*n)+e/(i*i)}var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return i.__assign(i.__assign({},e),{x:0,y:0,rx:0,ry:0})},e.prototype.isInStrokeOrPath=function(t,e,n,i,o){var a=this.attr(),s=o/2,u=a.x,c=a.y,l=a.rx,h=a.ry,p=(t-u)*(t-u),f=(e-c)*(e-c);return i&&n?r(p,f,l+s,h+s)<=1:i?r(p,f,l,h)<=1:!!n&&r(p,f,l-s,h-s)>=1&&r(p,f,l+s,h+s)<=1},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,i=e.y,r=e.rx,o=e.ry;if(t.beginPath(),t.ellipse)t.ellipse(n,i,r,o,0,0,2*Math.PI,!1);else{var a=r>o?r:o,s=r>o?1:r/o,u=r>o?o/r:1;t.save(),t.translate(n,i),t.scale(s,u),t.arc(0,0,a,0,2*Math.PI),t.restore(),t.closePath()}},e}(n(3).default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(3),o=n(2);function a(t){return t instanceof HTMLElement&&o.isString(t.nodeName)&&"CANVAS"===t.nodeName.toUpperCase()}var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return i.__assign(i.__assign({},e),{x:0,y:0,width:0,height:0})},e.prototype.initAttrs=function(t){this._setImage(t.img)},e.prototype.isStroke=function(){return!1},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._afterLoading=function(){if(!0===this.get("toDraw")){var t=this.get("canvas");t?t.draw():this.createPath(this.get("context"))}},e.prototype._setImage=function(t){var e=this,n=this.attrs;if(o.isString(t)){var i=new Image;i.onload=function(){if(e.destroyed)return!1;e.attr("img",i),e.set("loading",!1),e._afterLoading();var t=e.get("callback");t&&t.call(e)},i.src=t,i.crossOrigin="Anonymous",this.set("loading",!0)}else t instanceof Image?(n.width||(n.width=t.width),n.height||(n.height=t.height)):a(t)&&(n.width||(n.width=Number(t.getAttribute("width"))),n.height||(n.height,Number(t.getAttribute("height"))))},e.prototype.onAttrChange=function(e,n,i){t.prototype.onAttrChange.call(this,e,n,i),"img"===e&&this._setImage(n)},e.prototype.createPath=function(t){if(this.get("loading"))return this.set("toDraw",!0),void this.set("context",t);var e=this.attr(),n=e.x,i=e.y,r=e.width,s=e.height,u=e.sx,c=e.sy,l=e.swidth,h=e.sheight,p=e.img;(p instanceof Image||a(p))&&(o.isNil(u)||o.isNil(c)||o.isNil(l)||o.isNil(h)?t.drawImage(p,n,i,r,s):t.drawImage(p,u,c,l,h,n,i,r,s))},e}(r.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(6),o=n(3),a=n(17),s=n(16),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return i.__assign(i.__assign({},e),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},e.prototype.initAttrs=function(t){this.setArrow()},e.prototype.onAttrChange=function(e,n,i){t.prototype.onAttrChange.call(this,e,n,i),this.setArrow()},e.prototype.setArrow=function(){var t=this.attr(),e=t.x1,n=t.y1,i=t.x2,r=t.y2,o=t.startArrow,a=t.endArrow;o&&s.addStartArrow(this,t,i,r,e,n),a&&s.addEndArrow(this,t,e,n,i,r)},e.prototype.isInStrokeOrPath=function(t,e,n,i,r){if(!n||!r)return!1;var o=this.attr(),s=o.x1,u=o.y1,c=o.x2,l=o.y2;return a.default(s,u,c,l,r,t,e)},e.prototype.createPath=function(t){var e=this.attr(),n=e.x1,i=e.y1,r=e.x2,o=e.y2,a=e.startArrow,u=e.endArrow,c={dx:0,dy:0},l={dx:0,dy:0};a&&a.d&&(c=s.getShortenOffset(n,i,r,o,e.startArrow.d)),u&&u.d&&(l=s.getShortenOffset(n,i,r,o,e.endArrow.d)),t.beginPath(),t.moveTo(n+c.dx,i+c.dy),t.lineTo(r-l.dx,o-l.dy)},e.prototype.afterDrawPath=function(t){var e=this.get("startArrowShape"),n=this.get("endArrowShape");e&&e.draw(t),n&&n.draw(t)},e.prototype.getTotalLength=function(){var t=this.attr(),e=t.x1,n=t.y1,i=t.x2,o=t.y2;return r.default.length(e,n,i,o)},e.prototype.getPoint=function(t){var e=this.attr(),n=e.x1,i=e.y1,o=e.x2,a=e.y2;return r.default.pointAt(n,i,o,a,t)},e}(o.default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(18),o=n(38),a=n(3),s=n(2),u=n(9),c={circle:function(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e]]},square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var i=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+i],["L",t,e-i],["L",t+n,e+i],["Z"]]},"triangle-down":function(t,e,n){var i=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-i],["L",t+n,e-i],["L",t,e+i],["Z"]]}},l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.initAttrs=function(t){this._resetParamsCache()},e.prototype._resetParamsCache=function(){this.set("paramsCache",{})},e.prototype.onAttrChange=function(e,n,i){t.prototype.onAttrChange.call(this,e,n,i),-1!==["symbol","x","y","r","radius"].indexOf(e)&&this._resetParamsCache()},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._getR=function(t){return r.isNil(t.r)?t.radius:t.r},e.prototype._getPath=function(){var t,n,i=this.attr(),r=i.x,a=i.y,u=i.symbol||"circle",c=this._getR(i);return s.isFunction(u)?(n=(t=u)(r,a,c),n=o.default(n)):n=(t=e.Symbols[u])(r,a,c),t?n:(console.warn(u+" marker is not supported."),null)},e.prototype.createPath=function(t){var e=this._getPath(),n=this.get("paramsCache");u.drawPath(this,t,{path:e},n)},e.Symbols=c,e}(a.default);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(15),r="\t\n\v\f\r   ᠎              \u2028\u2029",o=new RegExp("([a-z])["+r+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+r+"]*,?["+r+"]*)+)","ig"),a=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+r+"]*,?["+r+"]*","ig");e.default=function(t){if(!t)return null;if(i.default(t))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(t).replace(o,(function(t,i,r){var o=[],s=i.toLowerCase();if(r.replace(a,(function(t,e){e&&o.push(+e)})),"m"===s&&o.length>2&&(n.push([i].concat(o.splice(0,2))),s="l",i="m"===i?"l":"L"),"o"===s&&1===o.length&&n.push([i,o[0]]),"r"===s)n.push([i].concat(o));else for(;o.length>=e[s]&&(n.push([i].concat(o.splice(0,e[s]))),e[s]););return""})),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(26),o=n(18),a=n(3),s=n(38),u=n(85),c=n(9),l=n(40),h=n(41),p=n(87),f=n(16);function d(t,e,n){for(var i=!1,r=0;r=i[0]&&t<=i[1]&&(e=(t-i[0])/(i[1]-i[0]),n=r)}));var s=a[n];if(o.isNil(s)||o.isNil(n))return null;var u=s.length,c=a[n+1];return r.default.pointAt(s[u-2],s[u-1],c[1],c[2],c[3],c[4],c[5],c[6],e)},e.prototype._calculateCurve=function(){var t=this.attr().path;this.set("curve",p.default.pathToCurve(t))},e.prototype._setTcache=function(){var t,e,n,i,a=0,s=0,u=[],c=this.get("curve");c&&(o.each(c,(function(t,e){n=c[e+1],i=t.length,n&&(a+=r.default.length(t[i-2],t[i-1],n[1],n[2],n[3],n[4],n[5],n[6])||0)})),this.set("totalLength",a),0!==a?(o.each(c,(function(o,l){n=c[l+1],i=o.length,n&&((t=[])[0]=s/a,e=r.default.length(o[i-2],o[i-1],n[1],n[2],n[3],n[4],n[5],n[6]),s+=e||0,t[1]=s/a,u.push(t))})),this.set("tCache",u)):this.set("tCache",[]))},e.prototype.getStartTangent=function(){var t,e=this.getSegments();if(e.length>1){var n=e[0].currentPoint,i=e[1].currentPoint,r=e[1].startTangent;t=[],r?(t.push([n[0]-r[0],n[1]-r[1]]),t.push([n[0],n[1]])):(t.push([i[0],i[1]]),t.push([n[0],n[1]]))}return t},e.prototype.getEndTangent=function(){var t,e=this.getSegments(),n=e.length;if(n>1){var i=e[n-2].currentPoint,r=e[n-1].currentPoint,o=e[n-1].endTangent;t=[],o?(t.push([r[0]-o[0],r[1]-o[1]]),t.push([r[0],r[1]])):(t.push([i[0],i[1]]),t.push([r[0],r[1]]))}return t},e}(a.default);e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(39),r=n(39),o=n(86);function a(t,e){return{x:e.x+(e.x-t.x),y:e.y+(e.y-t.y)}}e.default=function(t){for(var e=[],n=null,s=null,u=null,c=0,l=(t=o.default(t)).length,h=0;h1){var r=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=r}i.default(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(10),o=n(35),a=n(26),s=n(2),u=n(17),c=n(42),l=n(88),h=n(89);e.default=i.__assign({hasArc:function(t){for(var e=!1,n=t.length,i=0;i0&&i.push(r),{polygons:n,polylines:i}},isPointInStroke:function(t,e,n,i){for(var r=!1,p=e/2,f=0;fw?_:w,k=_>w?1:_/w,T=_>w?w/_:1;l.translate(P,P,[-b,-M]),l.rotate(P,P,-S),l.scale(P,P,[1/k,1/T]),h.transformMat3(A,A,P),r=c.default(0,0,j,O,C,e,A[0],A[1])}if(r)break}}return r}},r.PathUtil)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sub=e.mul=void 0,e.create=function(){var t=new i.ARRAY_TYPE(9);return i.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},e.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},e.clone=function(t){var e=new i.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromValues=function(t,e,n,r,o,a,s,u,c){var l=new i.ARRAY_TYPE(9);return l[0]=t,l[1]=e,l[2]=n,l[3]=r,l[4]=o,l[5]=a,l[6]=s,l[7]=u,l[8]=c,l},e.set=function(t,e,n,i,r,o,a,s,u,c){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=c,t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.transpose=function(t,e){if(t===e){var n=e[1],i=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=i,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},e.invert=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=l*a-s*c,p=-l*o+s*u,f=c*o-a*u,d=n*h+i*p+r*f;return d?(d=1/d,t[0]=h*d,t[1]=(-l*i+r*c)*d,t[2]=(s*i-r*a)*d,t[3]=p*d,t[4]=(l*n-r*u)*d,t[5]=(-s*n+r*o)*d,t[6]=f*d,t[7]=(-c*n+i*u)*d,t[8]=(a*n-i*o)*d,t):null},e.adjoint=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8];return t[0]=a*l-s*c,t[1]=r*c-i*l,t[2]=i*s-r*a,t[3]=s*u-o*l,t[4]=n*l-r*u,t[5]=r*o-n*s,t[6]=o*c-a*u,t[7]=i*u-n*c,t[8]=n*a-i*o,t},e.determinant=function(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8];return e*(c*o-a*u)+n*(-c*r+a*s)+i*(u*r-o*s)},e.multiply=r,e.translate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=n[0],f=n[1];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=p*i+f*a+c,t[7]=p*r+f*s+l,t[8]=p*o+f*u+h,t},e.rotate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=Math.sin(n),f=Math.cos(n);return t[0]=f*i+p*a,t[1]=f*r+p*s,t[2]=f*o+p*u,t[3]=f*a-p*i,t[4]=f*s-p*r,t[5]=f*u-p*o,t[6]=c,t[7]=l,t[8]=h,t},e.scale=function(t,e,n){var i=n[0],r=n[1];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},e.fromRotation=function(t,e){var n=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=n,t[2]=0,t[3]=-n,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat2d=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},e.fromQuat=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n+n,s=i+i,u=r+r,c=n*a,l=i*a,h=i*s,p=r*a,f=r*s,d=r*u,g=o*a,y=o*s,v=o*u;return t[0]=1-h-d,t[3]=l-v,t[6]=p+y,t[1]=l+v,t[4]=1-c-d,t[7]=f-g,t[2]=p-y,t[5]=f+g,t[8]=1-c-h,t},e.normalFromMat4=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],p=e[10],f=e[11],d=e[12],g=e[13],y=e[14],v=e[15],m=n*s-i*a,x=n*u-r*a,b=n*c-o*a,M=i*u-r*s,_=i*c-o*s,w=r*c-o*u,O=l*g-h*d,C=l*y-p*d,S=l*v-f*d,A=h*y-p*g,P=h*v-f*g,j=p*v-f*y,k=m*j-x*P+b*A+M*S-_*C+w*O;return k?(k=1/k,t[0]=(s*j-u*P+c*A)*k,t[1]=(u*S-a*j-c*C)*k,t[2]=(a*P-s*S+c*O)*k,t[3]=(r*P-i*j-o*A)*k,t[4]=(n*j-r*S+o*C)*k,t[5]=(i*S-n*P-o*O)*k,t[6]=(g*w-y*_+v*M)*k,t[7]=(y*b-d*w-v*x)*k,t[8]=(d*_-g*b+v*m)*k,t):null},e.projection=function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},e.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},e.subtract=o,e.multiplyScalar=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},e.multiplyScalarAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t[3]=e[3]+n[3]*i,t[4]=e[4]+n[4]*i,t[5]=e[5]+n[5]*i,t[6]=e[6]+n[6]*i,t[7]=e[7]+n[7]*i,t[8]=e[8]+n[8]*i,t},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},e.equals=function(t,e){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],p=e[0],f=e[1],d=e[2],g=e[3],y=e[4],v=e[5],m=e[6],x=e[7],b=e[8];return Math.abs(n-p)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(r-f)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(o-d)<=i.EPSILON*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(a-g)<=i.EPSILON*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(s-y)<=i.EPSILON*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(u-v)<=i.EPSILON*Math.max(1,Math.abs(u),Math.abs(v))&&Math.abs(c-m)<=i.EPSILON*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(l-x)<=i.EPSILON*Math.max(1,Math.abs(l),Math.abs(x))&&Math.abs(h-b)<=i.EPSILON*Math.max(1,Math.abs(h),Math.abs(b))};var i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(43));function r(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=n[0],f=n[1],d=n[2],g=n[3],y=n[4],v=n[5],m=n[6],x=n[7],b=n[8];return t[0]=p*i+f*a+d*c,t[1]=p*r+f*s+d*l,t[2]=p*o+f*u+d*h,t[3]=g*i+y*a+v*c,t[4]=g*r+y*s+v*l,t[5]=g*o+y*u+v*h,t[6]=m*i+x*a+b*c,t[7]=m*r+x*s+b*l,t[8]=m*o+x*u+b*h,t}function o(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}e.mul=r,e.sub=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.len=e.sqrDist=e.dist=e.div=e.mul=e.sub=void 0,e.create=o,e.clone=function(t){var e=new r.ARRAY_TYPE(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},e.length=a,e.fromValues=s,e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},e.set=function(t,e,n,i){return t[0]=e,t[1]=n,t[2]=i,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t},e.subtract=u,e.multiply=c,e.divide=l,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t},e.scaleAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t},e.distance=h,e.squaredDistance=p,e.squaredLength=f,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},e.normalize=d,e.dot=g,e.cross=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=r*u-o*s,t[1]=o*a-i*u,t[2]=i*s-r*a,t},e.lerp=function(t,e,n,i){var r=e[0],o=e[1],a=e[2];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t},e.hermite=function(t,e,n,i,r,o){var a=o*o,s=a*(2*o-3)+1,u=a*(o-2)+o,c=a*(o-1),l=a*(3-2*o);return t[0]=e[0]*s+n[0]*u+i[0]*c+r[0]*l,t[1]=e[1]*s+n[1]*u+i[1]*c+r[1]*l,t[2]=e[2]*s+n[2]*u+i[2]*c+r[2]*l,t},e.bezier=function(t,e,n,i,r,o){var a=1-o,s=a*a,u=o*o,c=s*a,l=3*o*s,h=3*u*a,p=u*o;return t[0]=e[0]*c+n[0]*l+i[0]*h+r[0]*p,t[1]=e[1]*c+n[1]*l+i[1]*h+r[1]*p,t[2]=e[2]*c+n[2]*l+i[2]*h+r[2]*p,t},e.random=function(t,e){e=e||1;var n=2*r.RANDOM()*Math.PI,i=2*r.RANDOM()-1,o=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(n)*o,t[1]=Math.sin(n)*o,t[2]=i*e,t},e.transformMat4=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[3]*i+n[7]*r+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*i+n[4]*r+n[8]*o+n[12])/a,t[1]=(n[1]*i+n[5]*r+n[9]*o+n[13])/a,t[2]=(n[2]*i+n[6]*r+n[10]*o+n[14])/a,t},e.transformMat3=function(t,e,n){var i=e[0],r=e[1],o=e[2];return t[0]=i*n[0]+r*n[3]+o*n[6],t[1]=i*n[1]+r*n[4]+o*n[7],t[2]=i*n[2]+r*n[5]+o*n[8],t},e.transformQuat=function(t,e,n){var i=n[0],r=n[1],o=n[2],a=n[3],s=e[0],u=e[1],c=e[2],l=r*c-o*u,h=o*s-i*c,p=i*u-r*s,f=r*p-o*h,d=o*l-i*p,g=i*h-r*l,y=2*a;return l*=y,h*=y,p*=y,f*=2,d*=2,g*=2,t[0]=s+l+f,t[1]=u+h+d,t[2]=c+p+g,t},e.rotateX=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0],o[1]=r[1]*Math.cos(i)-r[2]*Math.sin(i),o[2]=r[1]*Math.sin(i)+r[2]*Math.cos(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},e.rotateY=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[2]*Math.sin(i)+r[0]*Math.cos(i),o[1]=r[1],o[2]=r[2]*Math.cos(i)-r[0]*Math.sin(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},e.rotateZ=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0]*Math.cos(i)-r[1]*Math.sin(i),o[1]=r[0]*Math.sin(i)+r[1]*Math.cos(i),o[2]=r[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},e.angle=function(t,e){var n=s(t[0],t[1],t[2]),i=s(e[0],e[1],e[2]);d(n,n),d(i,i);var r=g(n,i);return r>1?0:r<-1?Math.PI:Math.acos(r)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.equals=function(t,e){var n=t[0],i=t[1],o=t[2],a=e[0],s=e[1],u=e[2];return Math.abs(n-a)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-s)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-u)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(u))};var i,r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(43));function o(){var t=new r.ARRAY_TYPE(3);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function a(t){var e=t[0],n=t[1],i=t[2];return Math.sqrt(e*e+n*n+i*i)}function s(t,e,n){var i=new r.ARRAY_TYPE(3);return i[0]=t,i[1]=e,i[2]=n,i}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function c(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function l(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function h(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(n*n+i*i+r*r)}function p(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return n*n+i*i+r*r}function f(t){var e=t[0],n=t[1],i=t[2];return e*e+n*n+i*i}function d(t,e){var n=e[0],i=e[1],r=e[2],o=n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function g(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}e.sub=u,e.mul=c,e.div=l,e.dist=h,e.sqrDist=p,e.len=a,e.sqrLen=f,e.forEach=(i=o(),function(t,e,n,r,o,a){var s,u=void 0;for(e||(e=3),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,u=n;u=i[0]&&t<=i[1]&&(e=(t-i[0])/(i[1]-i[0]),n=r)})),r.default.pointAt(i[n][0],i[n][1],i[n+1][0],i[n+1][1],e)},e.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var e=this.getTotalLength();if(!(e<=0)){var n,i,o=0,s=[];a.each(t,(function(a,u){t[u+1]&&((n=[])[0]=o/e,i=r.default.length(a[0],a[1],t[u+1][0],t[u+1][1]),o+=i,n[1]=o/e,s.push(n))})),this.set("tCache",s)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.attr().points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(s.default);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(93),r=n(5);e.default={box:function(t){for(var e=[],n=[],i=0;i1||e<0||t.length<2)return null;var n=o(t),r=n.segments,a=n.totalLength;if(0===a)return{x:t[0][0],y:t[0][1]};for(var s=0,u=null,c=0;c=s&&e<=s+f){var d=(e-s)/f;u=i.default.pointAt(h[0],h[1],p[0],p[1],d);break}s+=f}return u},e.angleAtSegments=function(t,e){if(e>1||e<0||t.length<2)return 0;for(var n=o(t),i=n.segments,r=n.totalLength,a=0,s=0,u=0;u=a&&e<=a+p){s=Math.atan2(h[1]-l[1],h[0]-l[0]);break}a+=p}return s},e.distanceAtSegment=function(t,e,n){for(var r=1/0,o=0;o0&&(o.isNil(r)||1===r||(t.globalAlpha=i),this.stroke(t)),this.isFill()&&(o.isNil(a)||1===a?this.fill(t):(t.globalAlpha=a,this.fill(t),t.globalAlpha=i)),this.afterDrawPath(t)},e.prototype.fill=function(t){this._drawText(t,!0)},e.prototype.stroke=function(t){this._drawText(t,!1)},e}(r.default);e.default=s},function(t){t.exports=JSON.parse('{"name":"@antv/g-canvas","version":"0.4.2","description":"A canvas library which providing 2d","main":"lib/index.js","module":"esm/index.js","browser":"dist/g.min.js","types":"lib/index.d.ts","files":["package.json","esm","lib","dist","LICENSE","README.md"],"scripts":{"build":"npm run clean && run-p build:*","build:esm":"tsc -p tsconfig.json --target ES5 --module ESNext --outDir esm","build:cjs":"tsc -p tsconfig.json --target ES5 --module commonjs --outDir lib","build:umd":"webpack --config webpack.config.js --mode production","clean":"rm -rf esm lib dist","coverage":"npm run coverage-generator && npm run coverage-viewer","coverage-generator":"torch --coverage --compile --source-pattern src/*.js,src/**/*.js --opts tests/mocha.opts","coverage-viewer":"torch-coverage","test":"torch --renderer --compile --opts tests/mocha.opts","test-live":"torch --compile --interactive --opts tests/mocha.opts","tsc":"tsc --noEmit","typecheck":"tsc --noEmit","dist":"webpack --config webpack.config.js --mode production"},"repository":{"type":"git","url":"git+https://github.com/antvis/g.git"},"keywords":["util","antv","g"],"publishConfig":{"access":"public"},"author":"https://github.com/orgs/antvis/people","license":"ISC","bugs":{"url":"https://github.com/antvis/g/issues"},"devDependencies":{"@antv/torch":"^1.0.0","less":"^3.9.0","npm-run-all":"^4.1.5","webpack":"^4.26.1","webpack-cli":"^3.1.2"},"homepage":"https://github.com/antvis/g#readme","dependencies":{"@antv/g-base":"^0.4.0","@antv/g-math":"^0.1.1","@antv/gl-matrix":"~2.7.1","@antv/path-util":"~2.0.5","@antv/util":"~2.0.0"},"__npminstall_done":false}')},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n(0).__exportStar(n(100),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n(0).__exportStar(n(102),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(10),o=n(104),a=n(7),s=n(27),u=n(9),c=n(2),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.renderer="canvas",e.autoDraw=!0,e.localRefresh=!0,e.refreshElements=[],e},e.prototype.onCanvasChange=function(t){"attr"!==t&&"sort"!==t&&"changeSize"!==t||(this.set("refreshElements",[this]),this.draw())},e.prototype.getShapeBase=function(){return a},e.prototype.getGroupBase=function(){return s.default},e.prototype.getPixelRatio=function(){return this.get("pixelRatio")||c.getPixelRatio()},e.prototype.getViewRange=function(){var t=this.get("el");return{minX:0,minY:0,maxX:t.width,maxY:t.height}},e.prototype.initEvents=function(){var t=new o.default({canvas:this});t.init(),this.set("eventController",t)},e.prototype.createDom=function(){var t=document.createElement("canvas"),e=t.getContext("2d");return this.set("context",e),t},e.prototype.setDOMSize=function(e,n){t.prototype.setDOMSize.call(this,e,n);var i=this.get("context"),r=this.get("el"),o=this.getPixelRatio();r.width=o*e,r.height=o*n,o>1&&i.scale(o,o)},e.prototype.clear=function(){t.prototype.clear.call(this),this._clearFrame();var e=this.get("context"),n=this.get("el");e.clearRect(0,0,n.width,n.height)},e.prototype._getRefreshRegion=function(){var t,e=this.get("refreshElements");return e.length&&e[0]===this?t=this.getViewRange():(t=u.getMergedRegion(e))&&(t.minX=Math.floor(t.minX-.5),t.minY=Math.floor(t.minY-.5),t.maxX=Math.ceil(t.maxX+.5),t.maxY=Math.ceil(t.maxY+.5)),t},e.prototype.refreshElement=function(t){this.get("refreshElements").push(t)},e.prototype._clearFrame=function(){var t=this.get("drawFrame");t&&(c.clearAnimationFrame(t),this.set("drawFrame",null),this.set("refreshElements",[]))},e.prototype.draw=function(){var t=this.get("drawFrame");this.get("autoDraw")&&t||this._startDraw()},e.prototype._drawAll=function(){var t=this.get("context"),e=this.get("el"),n=this.getChildren();t.clearRect(0,0,e.width,e.height),u.applyAttrsToContext(t,this),u.drawChildren(t,n),this.set("refreshElements",[])},e.prototype._drawRegion=function(){var t=this.get("context"),e=this.getChildren(),n=this._getRefreshRegion();n&&(t.clearRect(n.minX,n.minY,n.maxX-n.minX,n.maxY-n.minY),t.save(),t.beginPath(),t.rect(n.minX,n.minY,n.maxX-n.minX,n.maxY-n.minY),t.clip(),u.applyAttrsToContext(t,this),u.drawChildren(t,e,n),t.restore()),this.set("refreshElements",[])},e.prototype._startDraw=function(){var t=this,e=this.get("drawFrame");e||(e=c.requestAnimationFrame((function(){t.get("localRefresh")?t._drawRegion():t._drawAll(),t.set("drawFrame",null)})),this.set("drawFrame",e))},e.prototype.skipDraw=function(){},e.prototype.destroy=function(){this.get("eventController").destroy(),t.prototype.destroy.call(this)},e}(r.AbstractCanvas);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(105),r=n(34),o=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function a(t,e,n){n.name=e,n.target=t,n.currentTarget=t,n.delegateTarget=t,t.emit(e,n)}function s(t,e,n){if(n.bubbles){var i=void 0,r=!1;if("mouseenter"===e||"dragenter"===e?(i=n.fromShape,r=!0):"mouseleave"!==e&&"dragleave"!==e||(r=!0,i=n.toShape),t.isCanvas()&&r)return;if(i&&function(t,e){if(t.isCanvas())return!0;for(var n=e.getParent(),i=!1;n;){if(n===t){i=!0;break}n=n.getParent()}return i}(t,i))return void(n.bubbles=!1);n.name=e,n.currentTarget=t,n.delegateTarget=t,t.emit(e,n)}}var u=function(){function t(t){var e=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(t){var n=t.type;e._triggerEvent(n,t)},this._onDocumentMove=function(t){if(e.canvas.get("el")!==t.target&&(e.dragging||e.currentShape)){var n=e._getPointInfo(t);e.dragging&&e._emitEvent("drag",t,n,e.draggingShape)}},this._onDocumentMouseUp=function(t){if(e.canvas.get("el")!==t.target&&e.dragging){var n=e._getPointInfo(t);e.draggingShape&&e._emitEvent("drop",t,n,null),e._emitEvent("dragend",t,n,e.draggingShape),e._afterDrag(e.draggingShape,n,t)}},this.canvas=t.canvas}return t.prototype.init=function(){this._bindEvents()},t.prototype._bindEvents=function(){var t=this,e=this.canvas.get("el");r.each(o,(function(n){e.addEventListener(n,t._eventCallback)})),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._clearEvents=function(){var t=this,e=this.canvas.get("el");r.each(o,(function(n){e.removeEventListener(n,t._eventCallback)})),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._getEventObj=function(t,e,n,r,o,a){var s=new i.default(t,e);return s.fromShape=o,s.toShape=a,s.x=n.x,s.y=n.y,s.clientX=n.clientX,s.clientY=n.clientY,s.propagationPath.push(r),s},t.prototype._getShape=function(t,e){return this.canvas.getShape(t.x,t.y,e)},t.prototype._getPointInfo=function(t){var e,n,i=this.canvas,r=(n=e=t,e.touches&&(n="touchend"===e.type?e.changedTouches[0]:e.touches[0]),{clientX:n.clientX,clientY:n.clientY}),o=i.getPointByClient(r.clientX,r.clientY);return{x:o.x,y:o.y,clientX:r.clientX,clientY:r.clientY}},t.prototype._triggerEvent=function(t,e){var n=this._getPointInfo(e),i=this._getShape(n,e),r=this["_on"+t],o=!1;if(r)r.call(this,n,i,e);else{var a=this.currentShape;"mouseenter"===t||"dragenter"===t||"mouseover"===t?(this._emitEvent(t,e,n,null,null,i),i&&this._emitEvent(t,e,n,i,null,i),"mouseenter"===t&&this.draggingShape&&this._emitEvent("dragenter",e,n,null)):"mouseleave"===t||"dragleave"===t||"mouseout"===t?(o=!0,a&&this._emitEvent(t,e,n,a,a,null),this._emitEvent(t,e,n,null,a,null),"mouseleave"===t&&this.draggingShape&&this._emitEvent("dragleave",e,n,null)):this._emitEvent(t,e,n,i,null,null)}if(o||(this.currentShape=i),i&&!i.get("destroyed")){var s=this.canvas;s.get("el").style.cursor=i.attr("cursor")||s.get("cursor")}},t.prototype._onmousedown=function(t,e,n){0===n.button&&(this.mousedownShape=e,this.mousedownPoint=t,this.mousedownTimeStamp=n.timeStamp),this._emitEvent("mousedown",n,t,e,null,null)},t.prototype._emitMouseoverEvents=function(t,e,n,i){var r=this.canvas.get("el");n!==i&&(n&&(this._emitEvent("mouseout",t,e,n,n,i),this._emitEvent("mouseleave",t,e,n,n,i),i&&!i.get("destroyed")||(r.style.cursor=this.canvas.get("cursor"))),i&&(this._emitEvent("mouseover",t,e,i,n,i),this._emitEvent("mouseenter",t,e,i,n,i)))},t.prototype._emitDragoverEvents=function(t,e,n,i,r){i?(i!==n&&(n&&this._emitEvent("dragleave",t,e,n,n,i),this._emitEvent("dragenter",t,e,i,n,i)),r||this._emitEvent("dragover",t,e,i)):n&&this._emitEvent("dragleave",t,e,n,n,i),r&&this._emitEvent("dragover",t,e,i)},t.prototype._afterDrag=function(t,e,n){t&&(t.set("capture",!0),this.draggingShape=null),this.dragging=!1;var i=this._getShape(e,n);i!==t&&this._emitMouseoverEvents(n,e,t,i),this.currentShape=i},t.prototype._onmouseup=function(t,e,n){if(0===n.button){var i=this.draggingShape;this.dragging?(i&&this._emitEvent("drop",n,t,e),this._emitEvent("dragend",n,t,i),this._afterDrag(i,t,n)):(this._emitEvent("mouseup",n,t,e),e===this.mousedownShape&&this._emitEvent("click",n,t,e),this.mousedownShape=null,this.mousedownPoint=null)}},t.prototype._ondragover=function(t,e,n){n.preventDefault();var i=this.currentShape;this._emitDragoverEvents(n,t,i,e,!0)},t.prototype._onmousemove=function(t,e,n){var i=this.canvas,r=this.currentShape,o=this.draggingShape;if(this.dragging)o&&this._emitDragoverEvents(n,t,r,e,!1),this._emitEvent("drag",n,t,o);else{var a=this.mousedownPoint;if(a){var s=this.mousedownShape,u=n.timeStamp-this.mousedownTimeStamp,c=a.clientX-t.clientX,l=a.clientY-t.clientY;u>120||c*c+l*l>40?s&&s.get("draggable")?((o=this.mousedownShape).set("capture",!1),this.draggingShape=o,this.dragging=!0,this._emitEvent("dragstart",n,t,o),this.mousedownShape=null,this.mousedownPoint=null):!s&&i.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",n,t,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(n,t,r,e),this._emitEvent("mousemove",n,t,e)):(this._emitMouseoverEvents(n,t,r,e),this._emitEvent("mousemove",n,t,e))}else this._emitMouseoverEvents(n,t,r,e),this._emitEvent("mousemove",n,t,e)}},t.prototype._emitEvent=function(t,e,n,i,r,o){var u=this._getEventObj(t,e,n,i,r,o);if(i){u.shape=i,a(i,t,u);for(var c=i.getParent();c;)c.emitDelegation(t,u),u.propagationStopped||s(c,t,u),u.propagationPath.push(c),c=c.getParent()}else a(this.canvas,t,u)},t.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}();e.default=i}])},function(t,e,n){window,t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=31)}([function(t,e,n){"use strict";n.r(e);var i=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},r=function(t,e){return!!i(t)&&t.indexOf(e)>-1},o={}.toString,a=function(t,e){return o.call(t)==="[object "+e+"]"},s=function(t){return Array.isArray?Array.isArray(t):a(t,"Array")},u=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},c=function(t,e){if(t)if(s(t))for(var n=0,i=t.length;n-1;)S.call(t,o,1);return t},j=Array.prototype.splice,k=function(t,e){if(!i(t))return[];for(var n=t?e.length:0,r=n-1;n--;){var o=void 0,a=e[n];n!==r&&a===o||(o=a,j.call(t,a,1))}return t},T=function(t,e,n){if(!s(t)&&!v(t))return t;var i=n;return c(t,(function(t,n){i=e(i,t,n)})),i},E=function(t,e){var n=[];if(!i(t))return n;for(var r=-1,o=[],a=t.length;++re[r])return 1;if(t[r]n?n:t},tt=function(t,e){var n=e.toString(),i=n.indexOf(".");if(-1===i)return Math.round(t);var r=n.substr(i+1).length;return r>20&&(r=20),parseFloat(t.toFixed(r))},et=function(t){return a(t,"Number")},nt=function(t){return et(t)&&t%1!=0},it=function(t){return et(t)&&t%2==0},rt=Number.isInteger?Number.isInteger:function(t){return et(t)&&t%1==0},ot=function(t){return et(t)&&t<0};function at(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)0},ct=function(t,e){if(s(t)){var n,i,r=t[0];return n=p(e)?e(t[0]):t[0][e],c(t,(function(t){(i=p(e)?e(t):t[e])>n&&(r=t,n=i)})),r}},lt=function(t,e){if(s(t)){var n,i,r=t[0];return n=p(e)?e(t[0]):t[0][e],c(t,(function(t){(i=p(e)?e(t):t[e])e?(i&&(clearTimeout(i),i=null),s=c,a=t.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(u,l)),a};return c.cancel=function(){clearTimeout(i),s=0,i=r=o=null},c},fe=function(t){return i(t)?Array.prototype.slice.call(t):[]},de={},ge=function(t){return de[t=t||"g"]?de[t]+=1:de[t]=1,t+de[t]},ye=function(){},ve=function(t){return t};function me(t){return f(t)?0:i(t)?t.length:Object.keys(t).length}var xe=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}();n.d(e,"contains",(function(){return r})),n.d(e,"includes",(function(){return r})),n.d(e,"difference",(function(){return h})),n.d(e,"find",(function(){return m})),n.d(e,"findIndex",(function(){return x})),n.d(e,"firstValue",(function(){return b})),n.d(e,"flatten",(function(){return M})),n.d(e,"flattenDeep",(function(){return w})),n.d(e,"getRange",(function(){return O})),n.d(e,"pull",(function(){return P})),n.d(e,"pullAt",(function(){return k})),n.d(e,"reduce",(function(){return T})),n.d(e,"remove",(function(){return E})),n.d(e,"sortBy",(function(){return L})),n.d(e,"union",(function(){return D})),n.d(e,"uniq",(function(){return B})),n.d(e,"valuesOfKey",(function(){return F})),n.d(e,"head",(function(){return R})),n.d(e,"last",(function(){return N})),n.d(e,"startsWith",(function(){return Y})),n.d(e,"endsWith",(function(){return X})),n.d(e,"filter",(function(){return l})),n.d(e,"every",(function(){return G})),n.d(e,"some",(function(){return z})),n.d(e,"group",(function(){return W})),n.d(e,"groupBy",(function(){return H})),n.d(e,"groupToMap",(function(){return V})),n.d(e,"getWrapBehavior",(function(){return U})),n.d(e,"wrapBehavior",(function(){return Q})),n.d(e,"number2color",(function(){return $})),n.d(e,"parseRadius",(function(){return K})),n.d(e,"clamp",(function(){return J})),n.d(e,"fixedBase",(function(){return tt})),n.d(e,"isDecimal",(function(){return nt})),n.d(e,"isEven",(function(){return it})),n.d(e,"isInteger",(function(){return rt})),n.d(e,"isNegative",(function(){return ot})),n.d(e,"isNumberEqual",(function(){return at})),n.d(e,"isOdd",(function(){return st})),n.d(e,"isPositive",(function(){return ut})),n.d(e,"maxBy",(function(){return ct})),n.d(e,"minBy",(function(){return lt})),n.d(e,"mod",(function(){return ht})),n.d(e,"toDegree",(function(){return ft})),n.d(e,"toInteger",(function(){return dt})),n.d(e,"toRadian",(function(){return yt})),n.d(e,"forIn",(function(){return vt})),n.d(e,"has",(function(){return mt})),n.d(e,"hasKey",(function(){return xt})),n.d(e,"hasValue",(function(){return Mt})),n.d(e,"keys",(function(){return d})),n.d(e,"isMatch",(function(){return g})),n.d(e,"values",(function(){return bt})),n.d(e,"lowerCase",(function(){return wt})),n.d(e,"lowerFirst",(function(){return Ot})),n.d(e,"substitute",(function(){return Ct})),n.d(e,"upperCase",(function(){return St})),n.d(e,"upperFirst",(function(){return At})),n.d(e,"getType",(function(){return jt})),n.d(e,"isArguments",(function(){return kt})),n.d(e,"isArray",(function(){return s})),n.d(e,"isArrayLike",(function(){return i})),n.d(e,"isBoolean",(function(){return Tt})),n.d(e,"isDate",(function(){return Et})),n.d(e,"isError",(function(){return It})),n.d(e,"isFunction",(function(){return p})),n.d(e,"isFinite",(function(){return Lt})),n.d(e,"isNil",(function(){return f})),n.d(e,"isNull",(function(){return Bt})),n.d(e,"isNumber",(function(){return et})),n.d(e,"isObject",(function(){return u})),n.d(e,"isObjectLike",(function(){return y})),n.d(e,"isPlainObject",(function(){return v})),n.d(e,"isPrototype",(function(){return Ft})),n.d(e,"isRegExp",(function(){return Rt})),n.d(e,"isString",(function(){return I})),n.d(e,"isType",(function(){return a})),n.d(e,"isUndefined",(function(){return Nt})),n.d(e,"isElement",(function(){return Yt})),n.d(e,"requestAnimationFrame",(function(){return Xt})),n.d(e,"clearAnimationFrame",(function(){return Gt})),n.d(e,"augment",(function(){return Ht})),n.d(e,"clone",(function(){return Wt})),n.d(e,"debounce",(function(){return Ut})),n.d(e,"memoize",(function(){return Qt})),n.d(e,"deepMix",(function(){return $t})),n.d(e,"each",(function(){return c})),n.d(e,"extend",(function(){return Kt})),n.d(e,"indexOf",(function(){return Jt})),n.d(e,"isEmpty",(function(){return ee})),n.d(e,"isEqual",(function(){return ie})),n.d(e,"isEqualWith",(function(){return re})),n.d(e,"map",(function(){return oe})),n.d(e,"mapValues",(function(){return se})),n.d(e,"mix",(function(){return qt})),n.d(e,"assign",(function(){return qt})),n.d(e,"get",(function(){return ue})),n.d(e,"set",(function(){return ce})),n.d(e,"pick",(function(){return he})),n.d(e,"throttle",(function(){return pe})),n.d(e,"toArray",(function(){return fe})),n.d(e,"toString",(function(){return _t})),n.d(e,"uniqueId",(function(){return ge})),n.d(e,"noop",(function(){return ye})),n.d(e,"identity",(function(){return ve})),n.d(e,"size",(function(){return me})),n.d(e,"Cache",(function(){return xe}))},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",(function(){return r})),n.d(e,"__assign",(function(){return o})),n.d(e,"__rest",(function(){return a})),n.d(e,"__decorate",(function(){return s})),n.d(e,"__param",(function(){return u})),n.d(e,"__metadata",(function(){return c})),n.d(e,"__awaiter",(function(){return l})),n.d(e,"__generator",(function(){return h})),n.d(e,"__exportStar",(function(){return p})),n.d(e,"__values",(function(){return f})),n.d(e,"__read",(function(){return d})),n.d(e,"__spread",(function(){return g})),n.d(e,"__spreadArrays",(function(){return y})),n.d(e,"__await",(function(){return v})),n.d(e,"__asyncGenerator",(function(){return m})),n.d(e,"__asyncDelegator",(function(){return x})),n.d(e,"__asyncValues",(function(){return b})),n.d(e,"__makeTemplateObject",(function(){return M})),n.d(e,"__importStar",(function(){return _})),n.d(e,"__importDefault",(function(){return w})),n.d(e,"__classPrivateFieldGet",(function(){return O})),n.d(e,"__classPrivateFieldSet",(function(){return C}));var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,i){e(n,i,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{u(i.next(t))}catch(t){o(t)}}function s(t){try{u(i.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((i=i.apply(t,e||[])).next())}))}function h(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function g(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{(n=r[t](e)).value instanceof v?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function x(t){var e,n;return e={},i("next"),i("throw",(function(t){throw t})),i("return"),e[Symbol.iterator]=function(){return this},e;function i(i,r){e[i]=t[i]?function(e){return(n=!n)?{value:v(t[i](e)),done:"return"===i}:r?r(e):e}:r}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=f(t),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(e){return new Promise((function(i,r){!function(t,e,n,i){Promise.resolve(i).then((function(e){t({value:e,done:n})}),e)}(i,r,(e=t[n](e)).done,e.value)}))}}}function M(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function _(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function w(t){return t&&t.__esModule?t:{default:t}}function O(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function C(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sub=e.mul=void 0,e.create=function(){var t=new i.ARRAY_TYPE(9);return i.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},e.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},e.clone=function(t){var e=new i.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromValues=function(t,e,n,r,o,a,s,u,c){var l=new i.ARRAY_TYPE(9);return l[0]=t,l[1]=e,l[2]=n,l[3]=r,l[4]=o,l[5]=a,l[6]=s,l[7]=u,l[8]=c,l},e.set=function(t,e,n,i,r,o,a,s,u,c){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=c,t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.transpose=function(t,e){if(t===e){var n=e[1],i=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=i,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},e.invert=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=l*a-s*c,p=-l*o+s*u,f=c*o-a*u,d=n*h+i*p+r*f;return d?(d=1/d,t[0]=h*d,t[1]=(-l*i+r*c)*d,t[2]=(s*i-r*a)*d,t[3]=p*d,t[4]=(l*n-r*u)*d,t[5]=(-s*n+r*o)*d,t[6]=f*d,t[7]=(-c*n+i*u)*d,t[8]=(a*n-i*o)*d,t):null},e.adjoint=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8];return t[0]=a*l-s*c,t[1]=r*c-i*l,t[2]=i*s-r*a,t[3]=s*u-o*l,t[4]=n*l-r*u,t[5]=r*o-n*s,t[6]=o*c-a*u,t[7]=i*u-n*c,t[8]=n*a-i*o,t},e.determinant=function(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8];return e*(c*o-a*u)+n*(-c*r+a*s)+i*(u*r-o*s)},e.multiply=r,e.translate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=n[0],f=n[1];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=p*i+f*a+c,t[7]=p*r+f*s+l,t[8]=p*o+f*u+h,t},e.rotate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=Math.sin(n),f=Math.cos(n);return t[0]=f*i+p*a,t[1]=f*r+p*s,t[2]=f*o+p*u,t[3]=f*a-p*i,t[4]=f*s-p*r,t[5]=f*u-p*o,t[6]=c,t[7]=l,t[8]=h,t},e.scale=function(t,e,n){var i=n[0],r=n[1];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},e.fromRotation=function(t,e){var n=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=n,t[2]=0,t[3]=-n,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat2d=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},e.fromQuat=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n+n,s=i+i,u=r+r,c=n*a,l=i*a,h=i*s,p=r*a,f=r*s,d=r*u,g=o*a,y=o*s,v=o*u;return t[0]=1-h-d,t[3]=l-v,t[6]=p+y,t[1]=l+v,t[4]=1-c-d,t[7]=f-g,t[2]=p-y,t[5]=f+g,t[8]=1-c-h,t},e.normalFromMat4=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],p=e[10],f=e[11],d=e[12],g=e[13],y=e[14],v=e[15],m=n*s-i*a,x=n*u-r*a,b=n*c-o*a,M=i*u-r*s,_=i*c-o*s,w=r*c-o*u,O=l*g-h*d,C=l*y-p*d,S=l*v-f*d,A=h*y-p*g,P=h*v-f*g,j=p*v-f*y,k=m*j-x*P+b*A+M*S-_*C+w*O;return k?(k=1/k,t[0]=(s*j-u*P+c*A)*k,t[1]=(u*S-a*j-c*C)*k,t[2]=(a*P-s*S+c*O)*k,t[3]=(r*P-i*j-o*A)*k,t[4]=(n*j-r*S+o*C)*k,t[5]=(i*S-n*P-o*O)*k,t[6]=(g*w-y*_+v*M)*k,t[7]=(y*b-d*w-v*x)*k,t[8]=(d*_-g*b+v*m)*k,t):null},e.projection=function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},e.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},e.subtract=o,e.multiplyScalar=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},e.multiplyScalarAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t[3]=e[3]+n[3]*i,t[4]=e[4]+n[4]*i,t[5]=e[5]+n[5]*i,t[6]=e[6]+n[6]*i,t[7]=e[7]+n[7]*i,t[8]=e[8]+n[8]*i,t},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},e.equals=function(t,e){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],p=e[0],f=e[1],d=e[2],g=e[3],y=e[4],v=e[5],m=e[6],x=e[7],b=e[8];return Math.abs(n-p)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(r-f)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(o-d)<=i.EPSILON*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(a-g)<=i.EPSILON*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(s-y)<=i.EPSILON*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(u-v)<=i.EPSILON*Math.max(1,Math.abs(u),Math.abs(v))&&Math.abs(c-m)<=i.EPSILON*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(l-x)<=i.EPSILON*Math.max(1,Math.abs(l),Math.abs(x))&&Math.abs(h-b)<=i.EPSILON*Math.max(1,Math.abs(h),Math.abs(b))};var i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(21));function r(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=n[0],f=n[1],d=n[2],g=n[3],y=n[4],v=n[5],m=n[6],x=n[7],b=n[8];return t[0]=p*i+f*a+d*c,t[1]=p*r+f*s+d*l,t[2]=p*o+f*u+d*h,t[3]=g*i+y*a+v*c,t[4]=g*r+y*s+v*l,t[5]=g*o+y*u+v*h,t[6]=m*i+x*a+b*c,t[7]=m*r+x*s+b*l,t[8]=m*o+x*u+b*h,t}function o(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}e.mul=r,e.sub=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHAPE_TO_TAGS={rect:"path",circle:"circle",line:"line",path:"path",marker:"path",text:"text",polyline:"polyline",polygon:"polygon",image:"image",ellipse:"ellipse",dom:"foreignObject"},e.SVG_ATTR_MAP={opacity:"opacity",fillStyle:"fill",fill:"fill",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",x:"x",y:"y",r:"r",rx:"rx",ry:"ry",width:"width",height:"height",x1:"x1",x2:"x2",y1:"y1",y2:"y2",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",startArrow:"marker-start",endArrow:"marker-end",path:"d",class:"class",id:"id",style:"style",preserveAspectRatio:"preserveAspectRatio"},e.EVENTS=["click","mousedown","mouseup","dblclick","contextmenu","mouseenter","mouseleave","mouseover","mouseout","mousemove","wheel"]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(16),o=n(8),a=n(15),s=n(22),u=n(3),c=n(10),l=n(23),h=n(34),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="svg",e.canFill=!1,e.canStroke=!1,e}return i.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return i.__assign(i.__assign({},e),{lineWidth:1,lineAppendWidth:0,strokeOpacity:1,fillOpacity:1})},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e);var n=this.get("canvas");if(n&&n.get("autoDraw")){var i=n.get("context");this.draw(i,e)}},e.prototype.getShapeBase=function(){return c},e.prototype.getGroupBase=function(){return l.default},e.prototype.onCanvasChange=function(t){s.refreshElement(this,t)},e.prototype.calculateBBox=function(){var t=this.get("el"),e=null;if(t)e=t.getBBox();else{var n=h.getBBoxMethod(this.get("type"));n&&(e=n(this))}if(e){var i=e.x,r=e.y,o=e.width,a=e.height,s=this.getHitLineWidth(),u=s/2,c=i-u,l=r-u;return{x:c,y:l,minX:c,minY:l,maxX:i+o+u,maxY:r+a+u,width:o+s,height:a+s}}return{x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0}},e.prototype.isFill=function(){var t=this.attr(),e=t.fill,n=t.fillStyle;return(e||n||this.isClipShape())&&this.canFill},e.prototype.isStroke=function(){var t=this.attr(),e=t.stroke,n=t.strokeStyle;return(e||n)&&this.canStroke},e.prototype.draw=function(t,e){var n=this.get("el");this.get("destroyed")?n&&n.parentNode.removeChild(n):(n||a.createDom(this),o.setClip(this,t),this.createPath(t,e),this.shadow(t,e),this.strokeAndFill(t,e),this.transform(e))},e.prototype.createPath=function(t,e){},e.prototype.strokeAndFill=function(t,e){var n=e||this.attr(),i=n.fill,r=n.fillStyle,o=n.stroke,a=n.strokeStyle,s=n.fillOpacity,c=n.strokeOpacity,l=n.lineWidth,h=this.get("el");this.canFill&&(e?"fill"in n?this._setColor(t,"fill",i):"fillStyle"in n&&this._setColor(t,"fill",r):this._setColor(t,"fill",i||r),s&&h.setAttribute(u.SVG_ATTR_MAP.fillOpacity,s)),this.canStroke&&l>0&&(e?"stroke"in n?this._setColor(t,"stroke",o):"strokeStyle"in n&&this._setColor(t,"stroke",a):this._setColor(t,"stroke",o||a),c&&h.setAttribute(u.SVG_ATTR_MAP.strokeOpacity,c),l&&h.setAttribute(u.SVG_ATTR_MAP.lineWidth,l))},e.prototype._setColor=function(t,e,n){var i=this.get("el");if(n)if(n=n.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(n))(r=t.find("gradient",n))||(r=t.addGradient(n)),i.setAttribute(u.SVG_ATTR_MAP[e],"url(#"+r+")");else if(/^[p,P]{1}[\s]*\(/.test(n)){var r;(r=t.find("pattern",n))||(r=t.addPattern(n)),i.setAttribute(u.SVG_ATTR_MAP[e],"url(#"+r+")")}else i.setAttribute(u.SVG_ATTR_MAP[e],n);else i.setAttribute(u.SVG_ATTR_MAP[e],"none")},e.prototype.shadow=function(t,e){var n=this.attr(),i=e||n,r=i.shadowOffsetX,a=i.shadowOffsetY,s=i.shadowBlur,u=i.shadowColor;(r||a||s||u)&&o.setShadow(this,t)},e.prototype.transform=function(t){var e=this.attr();(t||e).matrix&&o.setTransform(this)},e.prototype.isInShape=function(t,e){return this.isPointInPath(t,e)},e.prototype.isPointInPath=function(t,e){var n=this.get("el"),i=this.get("canvas").get("el").getBoundingClientRect(),r=t+i.left,o=e+i.top,a=document.elementFromPoint(r,o);return!(!a||!a.isEqualNode(n))},e.prototype.getHitLineWidth=function(){var t=this.attrs,e=t.lineWidth,n=t.lineAppendWidth;return this.isStroke()?e+n:0},e}(r.AbstractShape);e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.sqrDist=e.dist=e.div=e.mul=e.sub=e.len=void 0,e.create=o,e.clone=function(t){var e=new r.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},e.fromValues=function(t,e){var n=new r.ARRAY_TYPE(2);return n[0]=t,n[1]=e,n},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.set=function(t,e,n){return t[0]=e,t[1]=n,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},e.subtract=a,e.multiply=s,e.divide=u,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},e.scaleAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},e.distance=c,e.squaredDistance=l,e.length=h,e.squaredLength=p,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},e.normalize=function(t,e){var n=e[0],i=e[1],r=n*n+i*i;return r>0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,n){var i=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=i,t},e.lerp=function(t,e,n,i){var r=e[0],o=e[1];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t},e.random=function(t,e){e=e||1;var n=2*r.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.transformMat2=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t},e.transformMat2d=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t},e.transformMat3=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[3]*r+n[6],t[1]=n[1]*i+n[4]*r+n[7],t},e.transformMat4=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[4]*r+n[12],t[1]=n[1]*i+n[5]*r+n[13],t},e.rotate=function(t,e,n,i){var r=e[0]-n[0],o=e[1]-n[1],a=Math.sin(i),s=Math.cos(i);return t[0]=r*s-o*a+n[0],t[1]=r*a+o*s+n[1],t},e.angle=function(t,e){var n=t[0],i=t[1],r=e[0],o=e[1],a=n*n+i*i;a>0&&(a=1/Math.sqrt(a));var s=r*r+o*o;s>0&&(s=1/Math.sqrt(s));var u=(n*r+i*o)*a*s;return u>1?0:u<-1?Math.PI:Math.acos(u)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],i=t[1],o=e[0],a=e[1];return Math.abs(n-o)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-a)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(a))};var i,r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(21));function o(){var t=new r.ARRAY_TYPE(2);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function s(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function u(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function c(t,e){var n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)}function l(t,e){var n=e[0]-t[0],i=e[1]-t[1];return n*n+i*i}function h(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function p(t){var e=t[0],n=t[1];return e*e+n*n}e.len=h,e.sub=a,e.mul=s,e.div=u,e.dist=c,e.sqrDist=l,e.sqrLen=p,e.forEach=(i=o(),function(t,e,n,r,o,a){var s,u=void 0;for(e||(e=2),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,u=n;u(n-t)*(n-t)+(r-e)*(r-e)?i.distance(n,r,o,a):this.pointToLine(t,e,n,r,o,a)},pointToLine:function(t,e,n,i,o,a){var s=[n-t,i-e];if(r.exactEquals(s,[0,0]))return Math.sqrt((o-t)*(o-t)+(a-e)*(a-e));var u=[-s[1],s[0]];r.normalize(u,u);var c=[o-t,a-e];return Math.abs(r.dot(c,u))},tangentAngle:function(t,e,n,i){return Math.atan2(i-e,n-t)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(4);e.Base=i.default;var r=n(57);e.Circle=r.default;var o=n(58);e.Dom=o.default;var a=n(59);e.Ellipse=a.default;var s=n(60);e.Image=s.default;var u=n(61);e.Line=u.default;var c=n(62);e.Marker=c.default;var l=n(64);e.Path=l.default;var h=n(65);e.Polygon=h.default;var p=n(66);e.Polyline=p.default;var f=n(69);e.Rect=f.default;var d=n(71);e.Text=d.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return null==t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(18);e.default=function(t){return i.default(t,"String")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(7),r=n(13);e.default=function(t,e){if(t)if(i.default(t))for(var n=0,o=t.length;n2&&(n.push([r].concat(a.splice(0,2))),s="l",r="m"===r?"l":"L"),"o"===s&&1===a.length&&n.push([r,a[0]]),"r"===s)n.push([r].concat(a));else for(;a.length>=e[s]&&(n.push([r].concat(a.splice(0,e[s]))),e[s]););return t})),n},P=function(t,e){for(var n=[],i=0,r=t.length;r-2*!e>i;i+=2){var o=[{x:+t[i-2],y:+t[i-1]},{x:+t[i],y:+t[i+1]},{x:+t[i+2],y:+t[i+3]},{x:+t[i+4],y:+t[i+5]}];e?i?r-4===i?o[3]={x:+t[0],y:+t[1]}:r-2===i&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[r-2],y:+t[r-1]}:r-4===i?o[3]=o[2]:i||(o[0]={x:+t[i],y:+t[i+1]}),n.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return n},j=function(t,e,n,i,r){var o=[];if(null===r&&null===i&&(i=n),t=+t,e=+e,n=+n,i=+i,null!==r){var a=Math.PI/180,s=t+n*Math.cos(-i*a),u=t+n*Math.cos(-r*a);o=[["M",s,e+n*Math.sin(-i*a)],["A",n,n,0,+(r-i>180),0,u,e+n*Math.sin(-r*a)]]}else o=[["M",t,e],["m",0,-i],["a",n,i,0,1,1,0,2*i],["a",n,i,0,1,1,0,-2*i],["z"]];return o},k=function(t){if(!(t=A(t))||!t.length)return[["M",0,0]];var e,n,i=[],r=0,o=0,a=0,s=0,u=0;"M"===t[0][0]&&(a=r=+t[0][1],s=o=+t[0][2],u++,i[0]=["M",r,o]);for(var c=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),l=void 0,h=void 0,p=u,f=t.length;p1&&(n*=M=Math.sqrt(M),i*=M);var _=n*n,w=i*i,O=(o===a?-1:1)*Math.sqrt(Math.abs((_*w-_*b*b-w*x*x)/(_*b*b+w*x*x)));f=O*n*b/i+(t+s)/2,d=O*-i*x/n+(e+u)/2,h=Math.asin(((e-d)/i).toFixed(9)),p=Math.asin(((u-d)/i).toFixed(9)),h=tp&&(h-=2*Math.PI),!a&&p>h&&(p-=2*Math.PI)}var C=p-h;if(Math.abs(C)>g){var S=p,A=s,P=u;p=h+g*(a&&p>h?1:-1),s=f+n*Math.cos(p),u=d+i*Math.sin(p),v=I(s,u,n,i,r,0,a,A,P,[p,S,f,d])}C=p-h;var j=Math.cos(h),k=Math.sin(h),T=Math.cos(p),E=Math.sin(p),L=Math.tan(C/4),B=4/3*n*L,D=4/3*i*L,F=[t,e],R=[t+B*k,e-D*j],N=[s+B*E,u-D*T],Y=[s,u];if(R[0]=2*F[0]-R[0],R[1]=2*F[1]-R[1],c)return[R,N,Y].concat(v);for(var X=[],G=0,z=(v=[R,N,Y].concat(v).join().split(",")).length;G7){t[e].shift();for(var o=t[e];o.length;)s[e]="A",r&&(u[e]="A"),t.splice(e++,0,["C"].concat(o.splice(0,6)));t.splice(e,1),n=Math.max(i.length,r&&r.length||0)}},f=function(t,e,o,a,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),o.bx=0,o.by=0,o.x=t[s][1],o.y=t[s][2],n=Math.max(i.length,r&&r.length||0))};n=Math.max(i.length,r&&r.length||0);for(var d=0;d1?1:u<0?0:u)/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],p=0,f=0;f<12;f++){var d=c*l[f]+c,g=F(d,t,n,r,a),y=F(d,e,i,o,s),v=g*g+y*y;p+=h[f]*Math.sqrt(v)}return c*p},N=function(t,e,n,i,r,o,a,s){for(var u,c,l,h,p=[],f=[[],[]],d=0;d<2;++d)if(0===d?(c=6*t-12*n+6*r,u=-3*t+9*n-9*r+3*a,l=3*n-3*t):(c=6*e-12*i+6*o,u=-3*e+9*i-9*o+3*s,l=3*i-3*e),Math.abs(u)<1e-12){if(Math.abs(c)<1e-12)continue;(h=-l/c)>0&&h<1&&p.push(h)}else{var g=c*c-4*l*u,y=Math.sqrt(g);if(!(g<0)){var v=(-c+y)/(2*u);v>0&&v<1&&p.push(v);var m=(-c-y)/(2*u);m>0&&m<1&&p.push(m)}}for(var x,b=p.length,M=b;b--;)x=1-(h=p[b]),f[0][b]=x*x*x*t+3*x*x*h*n+3*x*h*h*r+h*h*h*a,f[1][b]=x*x*x*e+3*x*x*h*i+3*x*h*h*o+h*h*h*s;return f[0][M]=t,f[1][M]=e,f[0][M+1]=a,f[1][M+1]=s,f[0].length=f[1].length=M+2,{min:{x:Math.min.apply(0,f[0]),y:Math.min.apply(0,f[1])},max:{x:Math.max.apply(0,f[0]),y:Math.max.apply(0,f[1])}}},Y=function(t,e,n,i,r,o,a,s){if(!(Math.max(t,n)Math.max(r,a)||Math.max(e,i)Math.max(o,s))){var u=(t-n)*(o-s)-(e-i)*(r-a);if(u){var c=((t*i-e*n)*(r-a)-(t-n)*(r*s-o*a))/u,l=((t*i-e*n)*(o-s)-(e-i)*(r*s-o*a))/u,h=+c.toFixed(2),p=+l.toFixed(2);if(!(h<+Math.min(t,n).toFixed(2)||h>+Math.max(t,n).toFixed(2)||h<+Math.min(r,a).toFixed(2)||h>+Math.max(r,a).toFixed(2)||p<+Math.min(e,i).toFixed(2)||p>+Math.max(e,i).toFixed(2)||p<+Math.min(o,s).toFixed(2)||p>+Math.max(o,s).toFixed(2)))return{x:c,y:l}}}},X=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},G=function(t,e,n,i,r){if(r)return[["M",+t+ +r,e],["l",n-2*r,0],["a",r,r,0,0,1,r,r],["l",0,i-2*r],["a",r,r,0,0,1,-r,r],["l",2*r-n,0],["a",r,r,0,0,1,-r,-r],["l",0,2*r-i],["a",r,r,0,0,1,r,-r],["z"]];var o=[["M",t,e],["l",n,0],["l",0,i],["l",-n,0],["z"]];return o.parsePathArray=D,o},z=function(t,e,n,i){return null===t&&(t=e=n=i=0),null===e&&(e=t.y,n=t.width,i=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:i,h:i,x2:t+n,y2:e+i,cx:t+n/2,cy:e+i/2,r1:Math.min(n,i)/2,r2:Math.max(n,i)/2,r0:Math.sqrt(n*n+i*i)/2,path:G(t,e,n,i),vb:[t,e,n,i].join(" ")}},q=function(t,e,n,i,r,o,a,s){u(t)||(t=[t,e,n,i,r,o,a,s]);var c=N.apply(null,t);return z(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)},H=function(t,e,n,i,r,o,a,s,u){var c=1-u,l=Math.pow(c,3),h=Math.pow(c,2),p=u*u,f=p*u,d=t+2*u*(n-t)+p*(r-2*n+t),g=e+2*u*(i-e)+p*(o-2*i+e),y=n+2*u*(r-n)+p*(a-2*r+n),v=i+2*u*(o-i)+p*(s-2*o+i);return{x:l*t+3*h*u*n+3*c*u*u*r+f*a,y:l*e+3*h*u*i+3*c*u*u*o+f*s,m:{x:d,y:g},n:{x:y,y:v},start:{x:c*t+u*n,y:c*e+u*i},end:{x:c*r+u*a,y:c*o+u*s},alpha:90-180*Math.atan2(d-y,g-v)/Math.PI}},V=function(t,e,n){if(!function(t,e){return t=z(t),e=z(e),X(e,t.x,t.y)||X(e,t.x2,t.y)||X(e,t.x,t.y2)||X(e,t.x2,t.y2)||X(t,e.x,e.y)||X(t,e.x2,e.y)||X(t,e.x,e.y2)||X(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(q(t),q(e)))return n?0:[];for(var i=~~(R.apply(0,t)/8),r=~~(R.apply(0,e)/8),o=[],a=[],s={},u=n?0:[],c=0;c=0&&x<=1&&b>=0&&b<=1&&(n?u+=1:u.push({x:m.x,y:m.y,t1:x,t2:b}))}}return u},W=function(t,e){return function(t,e,n){var i,r,o,a,s,u,c,l,h,p;t=L(t),e=L(e);for(var f=[],d=0,g=t.length;d=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e.concat(t[t.length-1])}))}(t,e,n));else{var r=[].concat(t);"M"===r[0]&&(r[0]="L");for(var o=0;o<=n-1;o++)i.push(r)}return i}(t[r],t[r+1],i))}),[]);return u.unshift(t[0]),"Z"!==e[i]&&"z"!==e[i]||u.push("Z"),u},Z=function(t,e){if(t.length!==e.length)return!1;var n=!0;return l(t,(function(t,i){if(t!==e[i])return n=!1,!1})),n};function $(t,e,n){var i=null,r=n;return e=0;u--)a=o[u].index,"add"===o[u].type?t.splice(a,0,[].concat(t[a])):t.splice(a,1)}var h=r-(i=t.length);if(i0)){t[i]=e[i];break}n=J(n,t[i-1],1)}t[i]=["Q"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[i]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(i>0)){t[i]=e[i];break}n=J(n,t[i-1],2)}t[i]=["C"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(n.length<2){if(!(i>0)){t[i]=e[i];break}n=J(n,t[i-1],1)}t[i]=["S"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[i]=e[i]}return t},nt=function(){function t(t,e){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}(),it=function(t,e){return(it=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function rt(t,e){function n(){this.constructor=t}it(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ot=n(28),at=n.n(ot),st=(n(11),n(17)),ut=n.n(st),ct=n(12),lt=n.n(ct),ht=n(13),pt=n.n(ht),ft=(n(7),n(19)),dt=n.n(ft),gt=n(14),yt=n.n(gt),vt=n(20),mt=n.n(vt);function xt(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}var bt="undefined"!=typeof window&&void 0!==window.document,Mt=function(t){function e(e){var n=t.call(this)||this;n.destroyed=!1;var i=n.getDefaultCfg();return n.cfg=dt()(i,e),n}return rt(e,t),e.prototype.getDefaultCfg=function(){return{}},e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){this.cfg[t]=e},e.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},e}(at.a),_t=n(2);_t.translate=function(t,e,n){var i=new Array(9);return _t.fromTranslation(i,n),_t.multiply(t,i,e)},_t.rotate=function(t,e,n){var i=new Array(9);return _t.fromRotation(i,n),_t.multiply(t,i,e)},_t.scale=function(t,e,n){var i=new Array(9);return _t.fromScaling(i,n),_t.multiply(t,i,e)},_t.transform=function(t,e){for(var n=[].concat(t),i=0,r=e.length;i1?1:t}(n))},Ot.direction=function(t,e){return t[0]*e[1]-e[0]*t[1]},Ot.angleTo=function(t,e,n){var i=Ot.angle(t,e),r=Ot.direction(t,e)>=0;return n?r?2*Math.PI-i:i:r?i:2*Math.PI-i},Ot.vertical=function(t,e,n){return n?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t},n(29);var Ct=function(t,e){var n=t?m(t):[1,0,0,0,1,0,0,0,1];return l(e,(function(t){switch(t[0]){case"t":wt.translate(n,n,[t[1],t[2]]);break;case"s":wt.scale(n,n,[t[1],t[2]]);break;case"r":wt.rotate(n,n,t[1]);break;case"m":wt.multiply(n,n,t[1]);break;default:return!1}})),n};function St(t,e){var n=[],i=t[0],r=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],p=e[0],f=e[1],d=e[2],g=e[3],y=e[4],v=e[5],m=e[6],x=e[7],b=e[8];return n[0]=p*i+f*a+d*c,n[1]=p*r+f*s+d*l,n[2]=p*o+f*u+d*h,n[3]=g*i+y*a+v*c,n[4]=g*r+y*s+v*l,n[5]=g*o+y*u+v*h,n[6]=m*i+x*a+b*c,n[7]=m*r+x*s+b*l,n[8]=m*o+x*u+b*h,n}function At(t,e){var n=[],i=e[0],r=e[1];return n[0]=t[0]*i+t[3]*r+t[6],n[1]=t[1]*i+t[4]*r+t[7],n}var Pt=["zIndex","capture","visible","type"],jt=["repeat"];function kt(t,e){var n={},i=e.attrs;for(var r in t)n[r]=i[r];return n}function Tt(t,e){var n={},i=e.attr();return l(t,(function(t,e){-1!==jt.indexOf(e)||b(i[e],t)||(n[e]=t)})),n}function Et(t,e){if(e.onFrame)return t;var n=e.startTime,i=e.delay,r=e.duration,o=Object.prototype.hasOwnProperty;return l(t,(function(t){n+it.delay&&l(e.toAttrs,(function(e,n){o.call(t.toAttrs,n)&&(delete t.toAttrs[n],delete t.fromAttrs[n])}))})),t}var It=function(t){function e(e){var n=t.call(this,e)||this;n.attrs={};var i=n.getDefaultAttrs();return function(t,e,n,i){e&&y(t,e)}(i,e.attrs),n.attrs=i,n.initAttrs(i),n.initAnimate(),n}return rt(e,t),e.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},e.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},e.prototype.onCanvasChange=function(t){},e.prototype.initAttrs=function(t){},e.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},e.prototype.isGroup=function(){return!1},e.prototype.getParent=function(){return this.get("parent")},e.prototype.getCanvas=function(){return this.get("canvas")},e.prototype.attr=function(){for(var t,e=[],n=0;n0?i=Et(i,M):n.addAnimator(this),i.push(M),this.set("animations",i),this.set("_pause",{isPaused:!1})},e.prototype.stopAnimate=function(t){var e=this;void 0===t&&(t=!0);var n=this.get("animations");l(n,(function(n){t&&(n.onFrame?e.attr(n.onFrame(1)):e.attr(n.toAttrs)),n.callback&&n.callback()})),this.set("animating",!1),this.set("animations",[])},e.prototype.pauseAnimate=function(){var t=this.get("timeline"),e=this.get("animations");return l(e,(function(t){t.pauseCallback&&t.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:t.getTime()}),this},e.prototype.resumeAnimate=function(){var t=this.get("timeline").getTime(),e=this.get("animations"),n=this.get("_pause").pauseTime;return l(e,(function(e){e.startTime=e.startTime+(t-n),e._paused=!1,e._pauseTime=null,e.resumeCallback&&e.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",e),this},e.prototype.emitDelegation=function(t,e){for(var n=e.propagationPath,i=this.getEvents(),r=0;r0)}));return a.length>0?(yt()(a,(function(t){var e=t.getBBox();r.push(e.minX,e.maxX),o.push(e.minY,e.maxY)})),t=Math.min.apply(null,r),e=Math.max.apply(null,r),n=Math.min.apply(null,o),i=Math.max.apply(null,o)):(t=0,e=0,n=0,i=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:i,width:e-t,height:i-n}},e.prototype.getCanvasBBox=function(){var t=1/0,e=-1/0,n=1/0,i=-1/0,r=[],o=[],a=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));return a.length>0?(yt()(a,(function(t){var e=t.getCanvasBBox();r.push(e.minX,e.maxX),o.push(e.minY,e.maxY)})),t=Math.min.apply(null,r),e=Math.max.apply(null,r),n=Math.min.apply(null,o),i=Math.max.apply(null,o)):(t=0,e=0,n=0,i=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:i,width:e-t,height:i-n}},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.children=[],e},e.prototype.onAttrChange=function(e,n,i){if(t.prototype.onAttrChange.call(this,e,n,i),"matrix"===e){var r=this.getTotalMatrix();this._applyChildrenMarix(r)}},e.prototype.applyMatrix=function(e){var n=this.getTotalMatrix();t.prototype.applyMatrix.call(this,e);var i=this.getTotalMatrix();i!==n&&this._applyChildrenMarix(i)},e.prototype._applyChildrenMarix=function(t){var e=this.getChildren();yt()(e,(function(e){e.applyMatrix(t)}))},e.prototype.addShape=function(){for(var t=[],e=0;e=0;o--){var a=t[o];if(Bt(a)&&(a.isGroup()?r=a.getShape(e,n,i):a.isHit(e,n)&&(r=a)),r)break}return r},e.prototype.add=function(t){var e=this.getCanvas(),n=this.getChildren(),i=this.get("timeline"),r=t.getParent();r&&function(t,e,n){void 0===n&&(n=!0),n?e.destroy():(e.set("parent",null),e.set("canvas",null)),xt(t.getChildren(),e)}(r,t,!1),t.set("parent",this),e&&function t(e,n){if(e.set("canvas",n),e.isGroup()){var i=e.get("children");i.length&&i.forEach((function(e){t(e,n)}))}}(t,e),i&&function t(e,n){if(e.set("timeline",n),e.isGroup()){var i=e.get("children");i.length&&i.forEach((function(e){t(e,n)}))}}(t,i),n.push(t),function(t){t.isGroup()?(t.isEntityGroup()||t.get("children").length)&&t.onCanvasChange("add"):t.onCanvasChange("add")}(t),this._applyElementMatrix(t)},e.prototype._applyElementMatrix=function(t){var e=this.getTotalMatrix();e&&t.applyMatrix(e)},e.prototype.getChildren=function(){return this.get("children")},e.prototype.sort=function(){var t,e=this.getChildren();yt()(e,(function(t,e){return t._INDEX=e,t})),e.sort((t=function(t,e){return t.get("zIndex")-e.get("zIndex")},function(e,n){var i=t(e,n);return 0===i?e._INDEX-n._INDEX:i})),this.onCanvasChange("sort")},e.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),e=t.length-1;e>=0;e--)t[e].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},e.prototype.destroy=function(){this.get("destroyed")||(this.clear(),t.prototype.destroy.call(this))},e.prototype.getFirst=function(){return this.getChildByIndex(0)},e.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},e.prototype.getChildByIndex=function(t){return this.getChildren()[t]},e.prototype.getCount=function(){return this.getChildren().length},e.prototype.contain=function(t){return this.getChildren().indexOf(t)>-1},e.prototype.removeChild=function(t,e){void 0===e&&(e=!0),this.contain(t)&&t.remove(e)},e.prototype.findAll=function(t){var e=[],n=this.getChildren();return yt()(n,(function(n){t(n)&&e.push(n),n.isGroup()&&(e=e.concat(n.findAll(t)))})),e},e.prototype.find=function(t){var e=null,n=this.getChildren();return yt()(n,(function(n){if(t(n)?e=n:n.isGroup()&&(e=n.find(t)),e)return!1})),e},e.prototype.findById=function(t){return this.find((function(e){return e.get("id")===t}))},e.prototype.findByClassName=function(t){return this.find((function(e){return e.get("className")===t}))},e.prototype.findAllByName=function(t){return this.findAll((function(e){return e.get("name")===t}))},e}(It),Nt=0,Yt=0,Xt=0,Gt=0,zt=0,qt=0,Ht="object"==typeof performance&&performance.now?performance:Date,Vt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Wt(){return zt||(Vt(Ut),zt=Ht.now()+qt)}function Ut(){zt=0}function Qt(){this._call=this._time=this._next=null}function Zt(t,e,n){var i=new Qt;return i.restart(t,e,n),i}function $t(){zt=(Gt=Ht.now())+qt,Nt=Yt=0;try{!function(){Wt(),++Nt;for(var t,e=Dt;e;)(t=zt-e._time)>=0&&e._call.call(null,t),e=e._next;--Nt}()}finally{Nt=0,function(){for(var t,e,n=Dt,i=1/0;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Dt=e);Ft=t,Jt(i)}(),zt=0}}function Kt(){var t=Ht.now(),e=t-Gt;e>1e3&&(qt-=e,Gt=t)}function Jt(t){Nt||(Yt&&(Yt=clearTimeout(Yt)),t-zt>24?(t<1/0&&(Yt=setTimeout($t,t-Ht.now()-qt)),Xt&&(Xt=clearInterval(Xt))):(Xt||(Gt=Ht.now(),Xt=setInterval(Kt,1e3)),Nt=1,Vt($t)))}function te(t){return+t}function ee(t){return t*t}function ne(t){return t*(2-t)}function ie(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function re(t){return t*t*t}function oe(t){return--t*t*t+1}function ae(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Qt.prototype=Zt.prototype={constructor:Qt,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Wt():+n)+(null==e?0:+e),this._next||Ft===this||(Ft?Ft._next=this:Dt=this,Ft=this),this._call=t,this._time=n,Jt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jt())}};var se=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),ue=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),ce=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),le=Math.PI,he=le/2;function pe(t){return 1-Math.cos(t*he)}function fe(t){return Math.sin(t*he)}function de(t){return(1-Math.cos(le*t))/2}function ge(t){return Math.pow(2,10*t-10)}function ye(t){return 1-Math.pow(2,-10*t)}function ve(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function me(t){return 1-Math.sqrt(1-t*t)}function xe(t){return Math.sqrt(1- --t*t)}function be(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Me=7.5625;function _e(t){return 1-we(1-t)}function we(t){return(t=+t)<4/11?Me*t*t:t<8/11?Me*(t-=6/11)*t+.75:t<10/11?Me*(t-=9/11)*t+.9375:Me*(t-=21/22)*t+63/64}function Oe(t){return((t*=2)<=1?1-we(1-t):we(t-1)+1)/2}var Ce=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),Se=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),Ae=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),Pe=2*Math.PI,je=function t(e,n){var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Pe);function r(t){return e*Math.pow(2,10*--t)*Math.sin((i-t)/n)}return r.amplitude=function(e){return t(e,n*Pe)},r.period=function(n){return t(e,n)},r}(1,.3),ke=function t(e,n){var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Pe);function r(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+i)/n)}return r.amplitude=function(e){return t(e,n*Pe)},r.period=function(n){return t(e,n)},r}(1,.3),Te=function t(e,n){var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Pe);function r(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((i-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((i+t)/n))/2}return r.amplitude=function(e){return t(e,n*Pe)},r.period=function(n){return t(e,n)},r}(1,.3),Ee=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function Ie(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Le(){}var Be="\\s*([+-]?\\d+)\\s*",De="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Re=/^#([0-9a-f]{3,8})$/,Ne=new RegExp("^rgb\\("+[Be,Be,Be]+"\\)$"),Ye=new RegExp("^rgb\\("+[Fe,Fe,Fe]+"\\)$"),Xe=new RegExp("^rgba\\("+[Be,Be,Be,De]+"\\)$"),Ge=new RegExp("^rgba\\("+[Fe,Fe,Fe,De]+"\\)$"),ze=new RegExp("^hsl\\("+[De,Fe,Fe]+"\\)$"),qe=new RegExp("^hsla\\("+[De,Fe,Fe,De]+"\\)$"),He={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ve(){return this.rgb().formatHex()}function We(){return this.rgb().formatRgb()}function Ue(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Re.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Qe(e):3===n?new Ke(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Ke(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Ke(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Ne.exec(t))?new Ke(e[1],e[2],e[3],1):(e=Ye.exec(t))?new Ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Xe.exec(t))?Ze(e[1],e[2],e[3],e[4]):(e=Ge.exec(t))?Ze(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ze.exec(t))?nn(e[1],e[2]/100,e[3]/100,1):(e=qe.exec(t))?nn(e[1],e[2]/100,e[3]/100,e[4]):He.hasOwnProperty(t)?Qe(He[t]):"transparent"===t?new Ke(NaN,NaN,NaN,0):null}function Qe(t){return new Ke(t>>16&255,t>>8&255,255&t,1)}function Ze(t,e,n,i){return i<=0&&(t=e=n=NaN),new Ke(t,e,n,i)}function $e(t,e,n,i){return 1===arguments.length?function(t){return t instanceof Le||(t=Ue(t)),t?new Ke((t=t.rgb()).r,t.g,t.b,t.opacity):new Ke}(t):new Ke(t,e,n,null==i?1:i)}function Ke(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function Je(){return"#"+en(this.r)+en(this.g)+en(this.b)}function tn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function en(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function nn(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new on(t,e,n,i)}function rn(t){if(t instanceof on)return new on(t.h,t.s,t.l,t.opacity);if(t instanceof Le||(t=Ue(t)),!t)return new on;if(t instanceof on)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),a=NaN,s=o-r,u=(o+r)/2;return s?(a=e===o?(n-i)/s+6*(n0&&u<1?0:a,new on(a,s,u,t.opacity)}function on(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function an(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function sn(t,e,n,i,r){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*i+a*r)/6}Ee(Le,Ue,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Ve,formatHex:Ve,formatHsl:function(){return rn(this).formatHsl()},formatRgb:We,toString:We}),Ee(Ke,$e,Ie(Le,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Je,formatHex:Je,formatRgb:tn,toString:tn})),Ee(on,(function(t,e,n,i){return 1===arguments.length?rn(t):new on(t,e,n,null==i?1:i)}),Ie(Le,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new on(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new on(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Ke(an(t>=240?t-240:t+120,r,i),an(t,r,i),an(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var un=function(t){return function(){return t}};function cn(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):un(isNaN(t)?e:t)}var ln=function t(e){var n=function(t){return 1==(t=+t)?cn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):un(isNaN(e)?n:e)}}(e);function i(t,e){var i=n((t=$e(t)).r,(e=$e(e)).r),r=n(t.g,e.g),o=n(t.b,e.b),a=cn(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=o(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);function hn(t){return function(e){var n,i,r=e.length,o=new Array(r),a=new Array(r),s=new Array(r);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),r=t[i],o=t[i+1],a=i>0?t[i-1]:2*r-o,s=io&&(r=e.slice(o,r),s[a]?s[a]+=r:s[++a]=r),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:yn(n,i)})),o=xn.lastIndex;return of.length?(p=A(o[l]),f=A(r[l]),f=K(f,p),f=et(f,p),e.fromAttrs.path=f,e.toAttrs.path=p):e.pathFormatted||(p=A(o[l]),f=A(r[l]),f=et(f,p),e.fromAttrs.path=f,e.toAttrs.path=p,e.pathFormatted=!0),i[l]=[];for(var d=0;d0){for(var o=i.animators.length-1;o>=0;o--)if((t=i.animators[o]).destroyed)i.removeAnimator(o);else{if(!t.isAnimatePaused())for(var a=(e=t.get("animations")).length-1;a>=0;a--)n=e[a],wn(t,n,r)&&(e.splice(a,1),n.callback&&n.callback());0===e.length&&i.removeAnimator(o)}i.canvas.get("autoDraw")||i.canvas.draw()}}))},t.prototype.addAnimator=function(t){this.animators.push(t)},t.prototype.removeAnimator=function(t){this.animators.splice(t,1)},t.prototype.isAnimating=function(){return!!this.animators.length},t.prototype.stop=function(){this.timer&&this.timer.stop()},t.prototype.stopAllAnimations=function(t){void 0===t&&(t=!0),this.animators.forEach((function(e){e.stopAnimate(t)})),this.animators=[],this.canvas.draw()},t.prototype.getTime=function(){return this.current},t}(),Cn=function(t){function e(e){var n=t.call(this,e)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}return rt(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.cursor="default",e},e.prototype.initContainer=function(){var t=this.get("container");lt()(t)&&(t=document.getElementById(t),this.set("container",t))},e.prototype.initDom=function(){var t=this.createDom();this.set("el",t),this.get("container").appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},e.prototype.initEvents=function(){},e.prototype.initTimeline=function(){var t=new On(this);this.set("timeline",t)},e.prototype.setDOMSize=function(t,e){var n=this.get("el");bt&&(n.style.width=t+"px",n.style.height=e+"px")},e.prototype.changeSize=function(t,e){this.setDOMSize(t,e),this.set("width",t),this.set("height",e),this.onCanvasChange("changeSize")},e.prototype.getRenderer=function(){return this.get("renderer")},e.prototype.getCursor=function(){return this.get("cursor")},e.prototype.setCursor=function(t){this.set("cursor",t);var e=this.get("el");bt&&e&&(e.style.cursor=t)},e.prototype.getPointByClient=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t-n.left,y:e-n.top}},e.prototype.getClientByPoint=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t+n.left,y:e+n.top}},e.prototype.draw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},e.prototype.clearEvents=function(){},e.prototype.isCanvas=function(){return!0},e.prototype.getParent=function(){return null},e.prototype.destroy=function(){var e=this.get("timeline");this.get("destroyed")||(this.clear(),e&&e.stop(),this.clearEvents(),this.removeDom(),t.prototype.destroy.call(this))},e}(Rt),Sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return rt(e,t),e.prototype.isGroup=function(){return!0},e.prototype.isEntityGroup=function(){return!1},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=this.getChildren(),i=0;i=t&&n.minY<=e&&n.maxY>=e},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e),this.clearCacheBBox()},e.prototype.getBBox=function(){var t=this.get("bbox");return t||(t=this.calculateBBox(),this.set("bbox",t)),t},e.prototype.getCanvasBBox=function(){var t=this.get("canvasBox");return t||(t=this.calculateCanvasBBox(),this.set("canvasBox",t)),t},e.prototype.applyMatrix=function(e){t.prototype.applyMatrix.call(this,e),this.set("canvasBox",null)},e.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),e=this.getTotalMatrix(),n=t.minX,i=t.minY,r=t.maxX,o=t.maxY;if(e){var a=At(e,[t.minX,t.minY]),s=At(e,[t.maxX,t.minY]),u=At(e,[t.minX,t.maxY]),c=At(e,[t.maxX,t.maxY]);n=Math.min(a[0],s[0],u[0],c[0]),r=Math.max(a[0],s[0],u[0],c[0]),i=Math.min(a[1],s[1],u[1],c[1]),o=Math.max(a[1],s[1],u[1],c[1])}var l=this.attrs;if(l.shadowColor){var h=l.shadowBlur,p=void 0===h?0:h,f=l.shadowOffsetX,d=void 0===f?0:f,g=l.shadowOffsetY,y=void 0===g?0:g,v=n-p+d,m=r+p+d,x=i-p+y,b=o+p+y;n=Math.min(n,v),r=Math.max(r,m),i=Math.min(i,x),o=Math.max(o,b)}return{x:n,y:i,minX:n,minY:i,maxX:r,maxY:o,width:r-n,height:o-i}},e.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBox",null)},e.prototype.isClipShape=function(){return this.get("isClipShape")},e.prototype.isInShape=function(t,e){return!1},e.prototype.isOnlyHitBox=function(){return!1},e.prototype.isHit=function(t,e){var n=this.get("startArrowShape"),i=this.get("endArrowShape"),r=[t,e,1],o=(r=this.invertFromMatrix(r))[0],a=r[1],s=this._isInBBox(o,a);if(this.isOnlyHitBox())return s;if(s&&!this.isClipped(o,a)){if(this.isInShape(o,a))return!0;if(n&&n.isHit(o,a))return!0;if(i&&i.isHit(o,a))return!0}return!1},e}(It);n.d(e,"version",(function(){return Pn})),n.d(e,"Event",(function(){return nt})),n.d(e,"Base",(function(){return Mt})),n.d(e,"AbstractCanvas",(function(){return Cn})),n.d(e,"AbstractGroup",(function(){return Sn})),n.d(e,"AbstractShape",(function(){return An})),n.d(e,"PathUtil",(function(){return i}));var Pn=n(32).version},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(18);e.default=function(t){return i.default(t,"Function")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={}.toString;e.default=function(t,e){return i.call(t)==="[object "+e+"]"}},function(t,e,n){"use strict";function i(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n,r){return e&&i(t,e),n&&i(t,n),r&&i(t,r),t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(33);e.default=function(t){var e=i.default(t);return e.charAt(0).toUpperCase()+e.substring(1)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=function(t){e.ARRAY_TYPE=t},e.toRadian=function(t){return t*r},e.equals=function(t,e){return Math.abs(t-e)<=i*Math.max(1,Math.abs(t),Math.abs(e))};var i=e.EPSILON=1e-6;e.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,e.RANDOM=Math.random;var r=Math.PI/180},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8),r=n(15);e.drawChildren=function(t,e){e.forEach((function(e){e.draw(t)}))},e.refreshElement=function(t,e){var n=t.get("canvas");if(n&&n.get("autoDraw")){var o=n.get("context"),a=t.getParent(),s=a?a.getChildren():[n],u=t.get("el");if("remove"===e)if(t.get("isClipShape")){var c=u&&u.parentNode,l=c&&c.parentNode;c&&l&&l.removeChild(c)}else u&&u.parentNode&&u.parentNode.removeChild(u);else if("show"===e)u.setAttribute("visibility","visible");else if("hide"===e)u.setAttribute("visibility","hidden");else if("zIndex"===e)r.moveTo(u,s.indexOf(t));else if("sort"===e){var h=t.get("children");h&&h.length&&r.sortDom(t,(function(t,e){return h.indexOf(t)-h.indexOf(e)?1:0}))}else"clear"===e?u&&(u.innerHTML=""):"matrix"===e?i.setTransform(t):"clip"===e?i.setClip(t,o):"attr"===e||"add"===e&&t.draw(o)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(16),o=n(0),a=n(10),s=n(22),u=n(8),c=n(3),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.isEntityGroup=function(){return!0},e.prototype.createDom=function(){var t=document.createElementNS("http://www.w3.org/2000/svg","g");this.set("el",t);var e=this.getParent();if(e){var n=e.get("el");n||(n=e.createDom(),e.set("el",n)),n.appendChild(t)}return t},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e);var n=this.get("canvas");if(n&&n.get("autoDraw")){var i=n.get("context");this.createPath(i,e)}},e.prototype.onCanvasChange=function(t){s.refreshElement(this,t)},e.prototype.getShapeBase=function(){return a},e.prototype.getGroupBase=function(){return e},e.prototype.draw=function(t){var e=this.getChildren(),n=this.get("el");this.get("destroyed")?n&&n.parentNode.removeChild(n):(n||this.createDom(),u.setClip(this,t),this.createPath(t),e.length&&s.drawChildren(t,e))},e.prototype.createPath=function(t,e){var n=this.attr(),i=this.get("el");o.each(e||n,(function(t,e){c.SVG_ATTR_MAP[e]&&i.setAttribute(c.SVG_ATTR_MAP[e],t)})),u.setTransform(this)},e}(r.AbstractGroup);e.default=l},function(t,e,n){"use strict";function i(t,e){return t&&e?{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}:t||e}Object.defineProperty(e,"__esModule",{value:!0}),e.mergeBBox=i,e.mergeArrowBBox=function(t,e){var n=t.get("startArrowShape"),r=t.get("endArrowShape");return n&&(e=i(e,n.getCanvasBBox())),r&&(e=i(e,r.getCanvasBBox())),e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeFromArray=function(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)},e.isBrowser="undefined"!=typeof window&&void 0!==window.document;var i=n(11);e.isNil=i.default;var r=n(17);e.isFunction=r.default;var o=n(12);e.isString=o.default;var a=n(13);e.isObject=a.default;var s=n(7);e.isArray=s.default;var u=n(19);e.mix=u.default;var c=n(14);e.each=c.default;var l=n(20);e.upperFirst=l.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(6);e.nearestPoint=function(t,e,n,r,o){for(var a,s=.005,u=1/0,c=[n,r],l=0;l<=20;l++){var h=.05*l,p=[o.apply(null,t.concat([h])),o.apply(null,e.concat([h]))];(y=i.distance(c[0],c[1],p[0],p[1]))=0&&y1&&(n*=Math.sqrt(m),o*=Math.sqrt(m));var x=n*n*(v*v)+o*o*(y*y),b=x?Math.sqrt((n*n*(o*o)-x)/x):1;l===h&&(b*=-1),isNaN(b)&&(b=0);var M=o?b*n*v/o:0,_=n?b*-o*y/n:0,w=(p+d)/2+Math.cos(c)*M-Math.sin(c)*_,O=(f+g)/2+Math.sin(c)*M+Math.cos(c)*_,C=[(y-M)/n,(v-_)/o],S=[(-1*y-M)/n,(-1*v-_)/o],A=s([1,0],C),P=s(C,S);return a(C,S)<=-1&&(P=Math.PI),a(C,S)>=1&&(P=0),0===h&&P>0&&(P-=2*Math.PI),1===h&&P<0&&(P+=2*Math.PI),{cx:w,cy:O,rx:u(t,[d,g])?0:n,ry:u(t,[d,g])?0:o,startAngle:A,endAngle:A+P,xRotation:c,arcFlag:l,sweepFlag:h}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this._events={}}return t.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},t.prototype.once=function(t,e){return this.on(t,e,!0),this},t.prototype.emit=function(t){for(var e=this,n=[],i=1;i1?0:r<-1?Math.PI:Math.acos(r)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.equals=function(t,e){var n=t[0],i=t[1],o=t[2],a=e[0],s=e[1],u=e[2];return Math.abs(n-a)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-s)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-u)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(u))};var i,r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(21));function o(){var t=new r.ARRAY_TYPE(3);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function a(t){var e=t[0],n=t[1],i=t[2];return Math.sqrt(e*e+n*n+i*i)}function s(t,e,n){var i=new r.ARRAY_TYPE(3);return i[0]=t,i[1]=e,i[2]=n,i}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function c(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function l(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function h(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(n*n+i*i+r*r)}function p(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return n*n+i*i+r*r}function f(t){var e=t[0],n=t[1],i=t[2];return e*e+n*n+i*i}function d(t,e){var n=e[0],i=e[1],r=e[2],o=n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function g(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}e.sub=u,e.mul=c,e.div=l,e.dist=h,e.sqrDist=p,e.len=a,e.sqrLen=f,e.forEach=(i=o(),function(t,e,n,r,o,a){var s,u=void 0;for(e||(e=3),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,u=n;u1?e*r+o(e,n)*(r-1):e},e.getLineSpaceing=o,e.getTextWidth=function(t,e){var n=r.getOffScreenContext(),o=0;if(i.isNil(t)||""===t)return o;if(n.save(),n.font=e,i.isString(t)&&t.includes("\n")){var a=t.split("\n");i.each(a,(function(t){var e=n.measureText(t).width;oMath.PI/2?Math.PI-l:l,h=h>Math.PI/2?Math.PI-h:h,{xExtra:Math.cos(c/2-l)*(e/2*(1/Math.sin(c/2)))-e/2||0,yExtra:Math.cos(h-c/2)*(e/2*(1/Math.sin(c/2)))-e/2||0}}e.default=function(t){var e=t.attr(),n=e.path,s=e.stroke?e.lineWidth:0,l=function(t,e){for(var n=[],a=[],s=[],u=0;u=0?[o]:[]}function u(t,e,n,i){return 2*(1-i)*(e-t)+2*i*(n-e)}function c(t,e,n,r,o,s,u){var c=a(t,n,o,u),l=a(e,r,s,u),h=i.default.pointAt(t,e,n,r,u),p=i.default.pointAt(n,r,o,s,u);return[[t,e,h.x,h.y,c,l],[c,l,p.x,p.y,o,s]]}e.default={box:function(t,e,n,i,o,u){var c=s(t,n,o)[0],l=s(e,i,u)[0],h=[t,o],p=[e,u];return void 0!==c&&h.push(a(t,n,o,c)),void 0!==l&&p.push(a(e,i,u,l)),r.getBBoxByArray(h,p)},length:function(t,e,n,i,o,a){return function t(e,n,i,o,a,s,u){if(0===u)return(r.distance(e,n,i,o)+r.distance(i,o,a,s)+r.distance(e,n,a,s))/2;var l=c(e,n,i,o,a,s,.5),h=l[0],p=l[1];return h.push(u-1),p.push(u-1),t.apply(null,h)+t.apply(null,p)}(t,e,n,i,o,a,3)},nearestPoint:function(t,e,n,i,r,s,u,c){return o.nearestPoint([t,n,r],[e,i,s],u,c,a)},pointDistance:function(t,e,n,i,o,a,s,u){var c=this.nearestPoint(t,e,n,i,o,a,s,u);return r.distance(c.x,c.y,s,u)},interpolationAt:a,pointAt:function(t,e,n,i,r,o,s){return{x:a(t,n,r,s),y:a(e,i,o,s)}},divide:function(t,e,n,i,r,o,a){return c(t,e,n,i,r,o,a)},tangentAngle:function(t,e,n,i,o,a,s){var c=u(t,n,o,s),l=u(e,i,a,s),h=Math.atan2(l,c);return r.piMod(h)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.sqrDist=e.dist=e.div=e.mul=e.sub=e.len=void 0,e.create=o,e.clone=function(t){var e=new r.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},e.fromValues=function(t,e){var n=new r.ARRAY_TYPE(2);return n[0]=t,n[1]=e,n},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.set=function(t,e,n){return t[0]=e,t[1]=n,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},e.subtract=a,e.multiply=s,e.divide=u,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},e.scaleAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},e.distance=c,e.squaredDistance=l,e.length=h,e.squaredLength=p,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},e.normalize=function(t,e){var n=e[0],i=e[1],r=n*n+i*i;return r>0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,n){var i=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=i,t},e.lerp=function(t,e,n,i){var r=e[0],o=e[1];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t},e.random=function(t,e){e=e||1;var n=2*r.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.transformMat2=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t},e.transformMat2d=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t},e.transformMat3=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[3]*r+n[6],t[1]=n[1]*i+n[4]*r+n[7],t},e.transformMat4=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[4]*r+n[12],t[1]=n[1]*i+n[5]*r+n[13],t},e.rotate=function(t,e,n,i){var r=e[0]-n[0],o=e[1]-n[1],a=Math.sin(i),s=Math.cos(i);return t[0]=r*s-o*a+n[0],t[1]=r*a+o*s+n[1],t},e.angle=function(t,e){var n=t[0],i=t[1],r=e[0],o=e[1],a=n*n+i*i;a>0&&(a=1/Math.sqrt(a));var s=r*r+o*o;s>0&&(s=1/Math.sqrt(s));var u=(n*r+i*o)*a*s;return u>1?0:u<-1?Math.PI:Math.acos(u)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],i=t[1],o=e[0],a=e[1];return Math.abs(n-o)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-a)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(a))};var i,r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(46));function o(){var t=new r.ARRAY_TYPE(2);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function s(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function u(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function c(t,e){var n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)}function l(t,e){var n=e[0]-t[0],i=e[1]-t[1];return n*n+i*i}function h(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function p(t){var e=t[0],n=t[1];return e*e+n*n}e.len=h,e.sub=a,e.mul=s,e.div=u,e.dist=c,e.sqrDist=l,e.sqrLen=p,e.forEach=(i=o(),function(t,e,n,r,o,a){var s,u=void 0;for(e||(e=2),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,u=n;u=0&&o<=1&&h.push(o);else{var p=c*c-4*u*l;i.isNumberEqual(p,0)?h.push(-c/(2*u)):p>0&&(a=(-c-(s=Math.sqrt(p)))/(2*u),(o=(-c+s)/(2*u))>=0&&o<=1&&h.push(o),a>=0&&a<=1&&h.push(a))}return h}function c(t,e,n,i,o,s,u,c,l){var h=a(t,n,o,u,l),p=a(e,i,s,c,l),f=r.default.pointAt(t,e,n,i,l),d=r.default.pointAt(n,i,o,s,l),g=r.default.pointAt(o,s,u,c,l),y=r.default.pointAt(f.x,f.y,d.x,d.y,l),v=r.default.pointAt(d.x,d.y,g.x,g.y,l);return[[t,e,f.x,f.y,y.x,y.y,h,p],[h,p,v.x,v.y,g.x,g.y,u,c]]}e.default={extrema:u,box:function(t,e,n,r,o,s,c,l){for(var h=[t,c],p=[e,l],f=u(t,n,o,c),d=u(e,r,s,l),g=0;gh&&(h=g)}var y=function(t,e,n){return Math.atan(e/(t*Math.tan(n)))}(n,i,r),v=1/0,m=-1/0,x=[s,u];for(f=2*-Math.PI;f<=2*Math.PI;f+=Math.PI){var b=y+f;sm&&(m=M)}return{x:l,y:v,width:h-l,height:m-v}},length:function(t,e,n,i,r,o,a){},nearestPoint:function(t,e,n,i,o,a,c,l,h){var p=u(l-t,h-e,-o),f=p[0],d=p[1],g=r.default.nearestPoint(0,0,n,i,f,d),y=function(t,e,n,i){return(Math.atan2(i*t,n*e)+2*Math.PI)%(2*Math.PI)}(n,i,g.x,g.y);yc&&(g=s(n,i,c));var v=u(g.x,g.y,o);return{x:v[0]+t,y:v[1]+e}},pointDistance:function(t,e,n,r,o,a,s,u,c){var l=this.nearestPoint(t,e,n,r,u,c);return i.distance(l.x,l.y,u,c)},pointAt:function(t,e,n,i,r,s,u,c){var l=(u-s)*c+s;return{x:o(t,0,n,i,r,l),y:a(0,e,n,i,r,l)}},tangentAngle:function(t,e,n,r,o,a,s,u){var c=(s-a)*u+a,l=function(t,e,n,i,r,o,a,s){return-1*n*Math.cos(r)*Math.sin(s)-i*Math.sin(r)*Math.cos(s)}(0,0,n,r,o,0,0,c),h=function(t,e,n,i,r,o,a,s){return-1*n*Math.sin(r)*Math.sin(s)+i*Math.cos(r)*Math.cos(s)}(0,0,n,r,o,0,0,c);return i.piMod(Math.atan2(h,l))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(6);function r(t,e){var n=Math.abs(t);return e>0?n:-1*n}e.default={box:function(t,e,n,i){return{x:t-n,y:e-i,width:2*n,height:2*i}},length:function(t,e,n,i){return Math.PI*(3*(n+i)-Math.sqrt((3*n+i)*(n+3*i)))},nearestPoint:function(t,e,n,i,o,a){var s=n,u=i;if(0===s||0===u)return{x:t,y:e};for(var c,l,h=o-t,p=a-e,f=Math.abs(h),d=Math.abs(p),g=s*s,y=u*u,v=Math.PI/4,m=0;m<4;m++){c=s*Math.cos(v),l=u*Math.sin(v);var x=(g-y)*Math.pow(Math.cos(v),3)/s,b=(y-g)*Math.pow(Math.sin(v),3)/u,M=c-x,_=l-b,w=f-x,O=d-b,C=Math.hypot(_,M),S=Math.hypot(O,w);v+=C*Math.asin((M*O-_*w)/(C*S))/Math.sqrt(g+y-c*c-l*l),v=Math.min(Math.PI/2,Math.max(0,v))}return{x:t+r(c,h),y:e+r(l,p)}},pointDistance:function(t,e,n,r,o,a){var s=this.nearestPoint(t,e,n,r,o,a);return i.distance(s.x,s.y,o,a)},pointAt:function(t,e,n,i,r){var o=2*Math.PI*r;return{x:t+n*Math.cos(o),y:e+i*Math.sin(o)}},tangentAngle:function(t,e,n,r,o){var a=2*Math.PI*o,s=Math.atan2(r*Math.cos(a),-n*Math.sin(a));return i.piMod(s)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(27),r=n(27),o=n(53);function a(t,e){return{x:e.x+(e.x-t.x),y:e.y+(e.y-t.y)}}e.default=function(t){for(var e=[],n=null,s=null,u=null,c=0,l=(t=o.default(t)).length,h=0;h1){var r=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=r}i.default(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)=2?i.setAttribute("points",t.map((function(t){return t[0]+","+t[1]})).join(" ")):o.SVG_ATTR_MAP[e]&&i.setAttribute(o.SVG_ATTR_MAP[e],t)}))},e}(n(4).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(9),o=n(67),a=n(0),s=n(3),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="polyline",e.canFill=!0,e.canStroke=!0,e}return i.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return i.__assign(i.__assign({},e),{startArrow:!1,endArrow:!1})},e.prototype.onAttrChange=function(e,n,i){t.prototype.onAttrChange.call(this,e,n,i),-1!==["points"].indexOf(e)&&this._resetCache()},e.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},e.prototype.createPath=function(t,e){var n=this.attr(),i=this.get("el");a.each(e||n,(function(t,e){"points"===e&&a.isArray(t)&&t.length>=2?i.setAttribute("points",t.map((function(t){return t[0]+","+t[1]})).join(" ")):s.SVG_ATTR_MAP[e]&&i.setAttribute(s.SVG_ATTR_MAP[e],t)}))},e.prototype.getTotalLength=function(){var t=this.attr().points,e=this.get("totalLength");return a.isNil(e)?(this.set("totalLength",o.default.length(t)),this.get("totalLength")):e},e.prototype.getPoint=function(t){var e,n,i=this.attr().points,o=this.get("tCache");return o||(this._setTcache(),o=this.get("tCache")),a.each(o,(function(i,r){t>=i[0]&&t<=i[1]&&(e=(t-i[0])/(i[1]-i[0]),n=r)})),r.default.pointAt(i[n][0],i[n][1],i[n+1][0],i[n+1][1],e)},e.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var e=this.getTotalLength();if(!(e<=0)){var n,i,o=0,s=[];a.each(t,(function(a,u){t[u+1]&&((n=[])[0]=o/e,i=r.default.length(a[0],a[1],t[u+1][0],t[u+1][1]),o+=i,n[1]=o/e,s.push(n))})),this.set("tCache",s)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.attr().points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(n(4).default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(68),r=n(6);e.default={box:function(t){for(var e=[],n=[],i=0;i1||e<0||t.length<2)return null;var n=o(t),r=n.segments,a=n.totalLength;if(0===a)return{x:t[0][0],y:t[0][1]};for(var s=0,u=null,c=0;c=s&&e<=s+f){var d=(e-s)/f;u=i.default.pointAt(h[0],h[1],p[0],p[1],d);break}s+=f}return u},e.angleAtSegments=function(t,e){if(e>1||e<0||t.length<2)return 0;for(var n=o(t),i=n.segments,r=n.totalLength,a=0,s=0,u=0;u=a&&e<=a+p){s=Math.atan2(h[1]-l[1],h[0]-l[0]);break}a+=p}return s},e.distanceAtSegment=function(t,e,n){for(var r=1/0,o=0;o1){var r=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=r}i.each(e,(function(t,n){isNaN(t)||(e[n]=+t)})),t[n]=e})),t):void 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(72),a=n(8),s=n(3),u=n(4),c={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"baseline",hanging:"hanging"},l={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",hanging:"hanging"},h={left:"left",start:"left",center:"middle",right:"end",end:"end"},p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="text",e.canFill=!0,e.canStroke=!0,e}return i.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return i.__assign(i.__assign({},e),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},e.prototype.createPath=function(t,e){var n=this,i=this.attr(),o=this.get("el");this._setFont(),r.each(e||i,(function(t,e){"text"===e?n._setText(""+t):"matrix"===e&&t?a.setTransform(n):s.SVG_ATTR_MAP[e]&&o.setAttribute(s.SVG_ATTR_MAP[e],t)})),o.setAttribute("paint-order","stroke"),o.setAttribute("style","stroke-linecap:butt; stroke-linejoin:miter;")},e.prototype._setFont=function(){var t=this.get("el"),e=this.attr(),n=e.fontSize,i=e.textBaseline,r=e.textAlign,a=o.detect();a&&"firefox"===a.name?t.setAttribute("dominant-baseline",l[i]||"alphabetic"):t.setAttribute("alignment-baseline",c[i]||"baseline"),t.setAttribute("text-anchor",h[r]||"left"),n&&+n<12&&(this.attr("matrix",[1,0,0,0,1,0,0,0,1]),this.transform())},e.prototype._setText=function(t){var e=this.get("el"),n=this.attr(),i=n.x,o=n.textBaseline,a=void 0===o?"bottom":o;if(t)if(~t.indexOf("\n")){var s=t.split("\n"),u=s.length-1,c="";r.each(s,(function(t,e){0===e?"alphabetic"===a?c+=''+t+"":"top"===a?c+=''+t+"":"middle"===a?c+=''+t+"":"bottom"===a?c+=''+t+"":"hanging"===a&&(c+=''+t+""):c+=''+t+""})),e.innerHTML=c}else e.innerHTML=t;else e.innerHTML=""},e}(u.default);e.default=p},function(t,e,n){"use strict";(function(t){var n=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e1)for(var n=1;n120||c*c+l*l>40?s&&s.get("draggable")?((o=this.mousedownShape).set("capture",!1),this.draggingShape=o,this.dragging=!0,this._emitEvent("dragstart",n,t,o),this.mousedownShape=null,this.mousedownPoint=null):!s&&i.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",n,t,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(n,t,r,e),this._emitEvent("mousemove",n,t,e)):(this._emitMouseoverEvents(n,t,r,e),this._emitEvent("mousemove",n,t,e))}else this._emitMouseoverEvents(n,t,r,e),this._emitEvent("mousemove",n,t,e)}},t.prototype._emitEvent=function(t,e,n,i,r,o){var u=this._getEventObj(t,e,n,i,r,o);if(i){u.shape=i,a(i,t,u);for(var c=i.getParent();c;)c.emitDelegation(t,u),u.propagationStopped||s(c,t,u),u.propagationPath.push(c),c=c.getParent()}else a(this.canvas,t,u)},t.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(83),o=n(84),a=n(85),s=n(86),u=n(87),c=function(){function t(t){var e=document.createElementNS("http://www.w3.org/2000/svg","defs"),n=i.uniqueId("defs_");e.id=n,t.appendChild(e),this.children=[],this.defaultArrow={},this.el=e,this.canvas=t}return t.prototype.find=function(t,e){for(var n=this.children,i=null,r=0;r'})),n}var u=function(){function t(t){this.cfg={};var e,n,a,u,c,l,h,p=null,f=i.uniqueId("gradient_");return"l"===t.toLowerCase()[0]?function(t,e){var n,o,a=r.exec(t),u=i.mod(i.toRadian(parseFloat(a[1])),2*Math.PI),c=a[2];u>=0&&u<.5*Math.PI?(n={x:0,y:0},o={x:1,y:1}):.5*Math.PI<=u&&u';e.innerHTML=n},t}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=function(){function t(t,e){this.cfg={};var n=document.createElementNS("http://www.w3.org/2000/svg","marker"),r=i.uniqueId("marker_");n.setAttribute("id",r);var o=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttribute("stroke",t.stroke||"none"),o.setAttribute("fill",t.fill||"none"),n.appendChild(o),n.setAttribute("overflow","visible"),n.setAttribute("orient","auto-start-reverse"),this.el=n,this.child=o,this.id=r;var a=t["marker-start"===e?"startArrow":"endArrow"];return this.stroke=t.stroke||"#000",!0===a?this._setDefaultPath(e,o):(this.cfg=a,this._setMarker(t.lineWidth,o)),this}return t.prototype.match=function(){return!1},t.prototype._setDefaultPath=function(t,e){var n=this.el;e.setAttribute("d","M0,0 L"+10*Math.cos(Math.PI/6)+",5 L0,10"),n.setAttribute("refX",""+10*Math.cos(Math.PI/6)),n.setAttribute("refY","5")},t.prototype._setMarker=function(t,e){var n=this.el,r=this.cfg.path,o=this.cfg.d;i.isArray(r)&&(r=r.map((function(t){return t.join(" ")})).join("")),e.setAttribute("d",r),n.appendChild(e),o&&n.setAttribute("refX",""+o/t)},t.prototype.update=function(t){var e=this.child;e.attr?e.attr("fill",t):e.setAttribute("fill",t)},t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=function(){function t(t){this.type="clip",this.cfg={};var e=document.createElementNS("http://www.w3.org/2000/svg","clipPath");this.el=e,this.id=i.uniqueId("clip_"),e.id=this.id;var n=t.cfg.el;return e.appendChild(n),this.cfg=t,this}return t.prototype.match=function(){return!1},t.prototype.remove=function(){var t=this.el;t.parentNode.removeChild(t)},t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,o=function(){function t(t){this.cfg={};var e=document.createElementNS("http://www.w3.org/2000/svg","pattern");e.setAttribute("patternUnits","userSpaceOnUse");var n=document.createElementNS("http://www.w3.org/2000/svg","image");e.appendChild(n);var o=i.uniqueId("pattern_");e.id=o,this.el=e,this.id=o,this.cfg=t;var a=r.exec(t)[2];n.setAttribute("href",a);var s=new Image;function u(){e.setAttribute("width",""+s.width),e.setAttribute("height",""+s.height)}return a.match(/^data:/i)||(s.crossOrigin="Anonymous"),s.src=a,s.complete?u():(s.onload=u,s.src=s.src),this}return t.prototype.match=function(t,e){return this.cfg===e},t}();e.default=o}])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=i.__importDefault(n(48));n(134);var o=function(t){function e(e){var n=t.call(this,e)||this;n.type="area",n.shapeType="area",n.generatePoints=!0,n.startOnZero=!0;var i=e.startOnZero,r=void 0===i||i,o=e.sortable,a=void 0===o||o;return n.startOnZero=r,n.sortable=a,n}return i.__extends(e,t),e.prototype.getPoints=function(t){return t.map((function(t){return t.points}))},e.prototype.getYMinValue=function(){return this.startOnZero?t.prototype.getYMinValue.call(this):this.getYScale().min},e}(r.default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(33),a=r.registerShapeFactory("area",{defaultShapeType:"area",getDefaultPoints:function(t){var e=t.x,n=t.y0;return(i.isArray(t.y)?t.y:[n,t.y]).map((function(t){return{x:e,y:t}}))}});r.registerShape("area","area",{draw:function(t,e){var n=o.getShapeAttrs(t,!1,!1,this);return e.addShape({type:"path",attrs:n,name:"area"})},getMarker:function(t){return{symbol:function(t,e,n){return void 0===n&&(n=5.5),[["M",t-n,e-4],["L",t+n,e-4],["L",t+n,e+4],["L",t-n,e+4],["Z"]]},style:{r:5,fill:t.color}}}}),e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=i.__importDefault(n(14));n(136);var o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="edge",e.shapeType="edge",e.generatePoints=!0,e}return i.__extends(e,t),e}(r.default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(4),o=n(7),a=n(25),s=n(50),u=r.registerShapeFactory("edge",{defaultShapeType:"line",getDefaultPoints:function(t){return s.splitPoints(t)}});r.registerShape("edge","line",{draw:function(t,e){var n=o.getStyle(t,!0,!1,"lineWidth"),r=a.getLinePath(this.parsePoints(t.points),this.coordinate.isPolar);return e.addShape("path",{attrs:i.__assign(i.__assign({},n),{path:r})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}}),e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=i.__importDefault(n(29)),o=n(0),a=n(3),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="heatmap",e.paletteCache={},e}return i.__extends(e,t),e.prototype.createElements=function(t,e,n){void 0===n&&(n=!1);var i=this.prepareRange(t),r=this.prepareSize(),a=o.get(this.styleOption,["style","shadowBlur"]);return o.isNumber(a)||(a=r/2),this.prepareGreyScaleBlurredCircle(r,a),this.drawWithRange(t,i,r,a),null},e.prototype.clear=function(){t.prototype.clear.call(this),this.clearShadowCanvasCtx(),this.paletteCache={}},e.prototype.prepareRange=function(t){var e=this.getAttribute("color").getFields()[0],n=1/0,i=-1/0;return t.forEach((function(t){var r=t[a.FIELD_ORIGIN][e];r>i&&(i=r),r=e[0]})));for(var p=this.scales[l],f=0,d=t;f0&&!r.get(n,[i,"min"])&&e.change({min:0}),a<=0&&!r.get(n,[i,"max"])&&e.change({max:0}))}},e}(a.default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(4),o=n(7),a=n(27),s=r.registerShapeFactory("interval",{defaultShapeType:"rect",getDefaultPoints:function(t){return a.getRectPoints(t)}});r.registerShape("interval","rect",{draw:function(t,e){var n=o.getStyle(t,!1,!0),r=this.parsePath(a.getRectPath(t.points));return e.addShape("path",{attrs:i.__assign(i.__assign({},n),{path:r}),name:"interval"})},getMarker:function(t){var e=t.color;return t.isInPolar?{symbol:"circle",style:{r:4.5,fill:e}}:{symbol:"square",style:{r:4,fill:e}}}}),e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=i.__importDefault(n(48));n(78);var o=function(t){function e(e){var n=t.call(this,e)||this;n.type="line";var i=e.sortable,r=void 0===i||i;return n.sortable=r,n}return i.__extends(e,t),e}(r.default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=i.__importDefault(n(14));n(142);var o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="point",e.shapeType="point",e.generatePoints=!0,e}return i.__extends(e,t),e.prototype.getDrawCfg=function(e){var n=t.prototype.getDrawCfg.call(this,e);return i.__assign(i.__assign({},n),{isStack:!!this.getAdjust("stack")})},e}(r.default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(28),o=n(4),a=n(50),s=n(51),u=o.registerShapeFactory("point",{defaultShapeType:"hollow-circle",getDefaultPoints:function(t){return a.splitPoints(t)}});i.each(s.SHAPES,(function(t){o.registerShape("point","hollow-"+t,{draw:function(e,n){return s.drawPoints(this,e,n,t,!0)},getMarker:function(e){var n=e.color;return{symbol:r.MarkerSymbols[t]||t,style:{r:4.5,stroke:n,fill:null}}}})})),e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=i.__importDefault(n(14));n(144);var a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="polygon",e.shapeType="polygon",e.generatePoints=!0,e}return i.__extends(e,t),e.prototype.createShapePointsCfg=function(e){var n,i=t.prototype.createShapePointsCfg.call(this,e),o=i.x,a=i.y;if(!r.isArray(o)||!r.isArray(a)){var s=this.getXScale(),u=this.getYScale(),c=.5/s.values.length,l=.5/u.values.length;s.isCategory&&u.isCategory?(o=[o-c,o-c,o+c,o+c],a=[a-l,a+l,a+l,a-l]):r.isArray(o)?(o=[(n=o)[0],n[0],n[1],n[1]],a=[a-l/2,a+l/2,a+l/2,a-l/2]):r.isArray(a)&&(a=[(n=a)[0],n[1],n[1],n[0]],o=[o-c/2,o-c/2,o+c/2,o+c/2]),i.x=o,i.y=a}return i},e}(o.default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(4),a=n(7),s=o.registerShapeFactory("polygon",{defaultShapeType:"polygon",getDefaultPoints:function(t){var e=[];return r.each(t.x,(function(n,i){var r=t.y[i];e.push({x:n,y:r})})),e}});o.registerShape("polygon","polygon",{draw:function(t,e){if(!r.isEmpty(t.points)){var n=a.getStyle(t,!0,!0),o=this.parsePath(function(t){for(var e=t[0],n=1,i=[["M",e.x,e.y]];n2?"weight":"normal";if(t.isInCircle){var l={x:0,y:1};return"normal"===c?n=function(t,e,n){var i=s.getQPath(e,n),r=[["M",t.x,t.y]];return r.push(i),r}(u[0],u[1],l):(o.fill=o.stroke,n=function(t,e){var n=s.getQPath(t[1],e),i=s.getQPath(t[3],e),r=[["M",t[0].x,t[0].y]];return r.push(i),r.push(["L",t[3].x,t[3].y]),r.push(["L",t[2].x,t[2].y]),r.push(n),r.push(["L",t[1].x,t[1].y]),r.push(["L",t[0].x,t[0].y]),r.push(["Z"]),r}(u,l)),n=this.parsePath(n),e.addShape("path",{attrs:i.__assign(i.__assign({},o),{path:n})})}if("normal"===c)return u=this.parsePoints(u),n=r.getArcPath((u[1].x+u[0].x)/2,u[0].y,Math.abs(u[1].x-u[0].x)/2,Math.PI,2*Math.PI),e.addShape("path",{attrs:i.__assign(i.__assign({},o),{path:n})});var h=s.getCPath(u[1],u[3]),p=s.getCPath(u[2],u[0]);return n=[["M",u[0].x,u[0].y],["L",u[1].x,u[1].y],h,["L",u[3].x,u[3].y],["L",u[2].x,u[2].y],p,["Z"]],n=this.parsePath(n),o.fill=o.stroke,e.addShape("path",{attrs:i.__assign(i.__assign({},o),{path:n})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(4),o=n(7),a=n(81);r.registerShape("edge","smooth",{draw:function(t,e){var n=o.getStyle(t,!0,!1,"lineWidth"),r=t.points,s=this.parsePath(function(t,e){var n=a.getCPath(t,e),i=[["M",t.x,t.y]];return i.push(n),i}(r[0],r[1]));return e.addShape("path",{attrs:i.__assign(i.__assign({},n),{path:s})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(4),a=n(7);o.registerShape("edge","vhv",{draw:function(t,e){var n=a.getStyle(t,!0,!1,"lineWidth"),o=t.points,s=this.parsePath(function(t,e){var n=[];n.push({x:t.x,y:t.y*(1-1/3)+e.y*(1/3)}),n.push({x:e.x,y:t.y*(1-1/3)+e.y*(1/3)}),n.push(e);var i=[["M",t.x,t.y]];return r.each(n,(function(t){i.push(["L",t.x,t.y])})),i}(o[0],o[1]));return e.addShape("path",{attrs:i.__assign(i.__assign({},n),{path:s})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(4),o=n(7),a=n(27);r.registerShape("interval","funnel",{getPoints:function(t){return t.size=2*t.size,a.getRectPoints(t)},draw:function(t,e){var n=o.getStyle(t,!1,!0),r=this.parsePath(a.getFunnelPath(t.points,t.nextPoints,!1));return e.addShape("path",{attrs:i.__assign(i.__assign({},n),{path:r}),name:"interval"})},getMarker:function(t){return{symbol:"square",style:{r:4,fill:t.color}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(4),o=n(7),a=n(27);r.registerShape("interval","hollow-rect",{draw:function(t,e){var n=o.getStyle(t,!0,!1),r=this.parsePath(a.getRectPath(t.points));return e.addShape("path",{attrs:i.__assign(i.__assign({},n),{path:r}),name:"interval"})},getMarker:function(t){var e=t.color;return t.isInPolar?{symbol:"circle",style:{r:4.5,stroke:e,fill:null}}:{symbol:"square",style:{r:4,stroke:e,fill:null}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(4),a=n(7),s=n(27);o.registerShape("interval","line",{getPoints:function(t){return n=(e=t).x,i=e.y,o=e.y0,r.isArray(i)?i.map((function(t,e){return{x:r.isArray(n)?n[e]:n,y:t}})):[{x:n,y:o},{x:n,y:i}];var e,n,i,o},draw:function(t,e){var n=a.getStyle(t,!0,!1,"lineWidth"),r=this.parsePath(s.getRectPath(t.points));return e.addShape("path",{attrs:i.__assign(i.__assign({},n),{path:r}),name:"interval"})},getMarker:function(t){return{symbol:function(t,e,n){return[["M",t,e-n],["L",t,e+n]]},style:{r:5,stroke:t.color}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(4),o=n(7),a=n(27);r.registerShape("interval","pyramid",{getPoints:function(t){return t.size=2*t.size,a.getRectPoints(t,!0)},draw:function(t,e){var n=o.getStyle(t,!1,!0),r=this.parsePath(a.getFunnelPath(t.points,t.nextPoints,!0));return e.addShape("path",{attrs:i.__assign(i.__assign({},n),{path:r}),name:"interval"})},getMarker:function(t){return{symbol:"square",style:{r:4,fill:t.color}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(4),a=n(7);o.registerShape("interval","tick",{getPoints:function(t){return function(t){var e,n,i=t.x,o=t.y,a=t.y0,s=t.size;r.isArray(o)?(e=o[0],n=o[1]):(e=a,n=o);var u=i+s/2,c=i-s/2;return[{x:i,y:e},{x:i,y:n},{x:c,y:e},{x:u,y:e},{x:c,y:n},{x:u,y:n}]}(t)},draw:function(t,e){var n,r=a.getStyle(t,!0,!1),o=this.parsePath([["M",(n=t.points)[0].x,n[0].y],["L",n[1].x,n[1].y],["M",n[2].x,n[2].y],["L",n[3].x,n[3].y],["M",n[4].x,n[4].y],["L",n[5].x,n[5].y]]);return e.addShape("path",{attrs:i.__assign(i.__assign({},r),{path:o}),name:"interval"})},getMarker:function(t){return{symbol:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},style:{r:5,stroke:t.color}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(4),a=n(49),s=n(7),u=n(79);function c(t,e){var n=a.getPathPoints(t.points,t.connectNulls),o=[];return r.each(n,(function(t){var n=function(t,e){var n=[];return r.each(t,(function(i,r){var o=t[r+1];if(n.push(i),o){var a=function(t,e,n){var i,r=t.x,o=t.y,a=e.x,s=e.y;switch(n){case"hv":i=[{x:a,y:o}];break;case"vh":i=[{x:r,y:s}];break;case"hvh":var u=(a+r)/2;i=[{x:u,y:o},{x:u,y:s}];break;case"vhv":var c=(o+s)/2;i=[{x:r,y:c},{x:a,y:c}]}return i}(i,o,e);n=n.concat(a)}})),n}(t,e);o=o.concat(function(t){return t.map((function(t,e){return 0===e?["M",t.x,t.y]:["L",t.x,t.y]}))}(n))})),i.__assign(i.__assign({},s.getStyle(t,!0,!1,"lineWidth")),{path:o})}r.each(["hv","vh","hvh","vhv"],(function(t){o.registerShape("line",t,{draw:function(e,n){var i=c(e,t);return n.addShape({type:"path",attrs:i,name:"line"})},getMarker:function(e){return u.getLineMarker(e,t)}})}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(28),o=n(4),a=n(51);i.each(a.HOLLOW_SHAPES,(function(t){o.registerShape("point",t,{draw:function(e,n){return a.drawPoints(this,e,n,t,!0)},getMarker:function(e){var n=e.color;return{symbol:r.MarkerSymbols[t],style:{r:4.5,stroke:n,fill:null}}}})}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(4),r=n(7);i.registerShape("point","image",{draw:function(t,e){var n=r.getStyle(t,!1,!1,"r").r,i=this.parsePoints(t.points);if(i.length>1){for(var o=e.addGroup(),a=0,s=i;a1?e[1]:n;return{min:n,max:i,min1:o,max1:e.length>3?e[3]:i,median:e.length>2?e[2]:o}}function u(t,e,n){var i,o=n/2;if(r.isArray(e)){var a=s(e),u=a.min,c=a.max,l=a.median,h=a.min1,p=t-o,f=t+o;i=[[p,c],[f,c],[t,c],[t,d=a.max1],[p,h],[p,d],[f,d],[f,h],[t,h],[t,u],[p,u],[f,u],[p,l],[f,l]]}else{e=r.isNil(e)?.5:e;var d,g=s(t),y=(u=g.min,c=g.max,l=g.median,e-o),v=e+o;i=[[u,y],[u,v],[u,e],[h=g.min1,e],[h,y],[h,v],[d=g.max1,v],[d,y],[d,e],[c,e],[c,y],[c,v],[l,y],[l,v]]}return i.map((function(t){return{x:t[0],y:t[1]}}))}o.registerShape("schema","box",{getPoints:function(t){return u(t.x,t.y,t.size)},draw:function(t,e){var n,r=a.getStyle(t,!0,!1),o=this.parsePath([["M",(n=t.points)[0].x,n[0].y],["L",n[1].x,n[1].y],["M",n[2].x,n[2].y],["L",n[3].x,n[3].y],["M",n[4].x,n[4].y],["L",n[5].x,n[5].y],["L",n[6].x,n[6].y],["L",n[7].x,n[7].y],["L",n[4].x,n[4].y],["Z"],["M",n[8].x,n[8].y],["L",n[9].x,n[9].y],["M",n[10].x,n[10].y],["L",n[11].x,n[11].y],["M",n[12].x,n[12].y],["L",n[13].x,n[13].y]]);return e.addShape("path",{attrs:i.__assign(i.__assign({},r),{path:o,name:"schema"})})},getMarker:function(t){return{symbol:function(t,e,n){var i=u(t,[e-6,e-3,e,e+3,e+6],n);return[["M",i[0].x+1,i[0].y],["L",i[1].x-1,i[1].y],["M",i[2].x,i[2].y],["L",i[3].x,i[3].y],["M",i[4].x,i[4].y],["L",i[5].x,i[5].y],["L",i[6].x,i[6].y],["L",i[7].x,i[7].y],["L",i[4].x,i[4].y],["Z"],["M",i[8].x,i[8].y],["L",i[9].x,i[9].y],["M",i[10].x+1,i[10].y],["L",i[11].x-1,i[11].y],["M",i[12].x,i[12].y],["L",i[13].x,i[13].y]]},style:{r:6,lineWidth:1,stroke:t.color}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(20),a=n(4),s=n(7);function u(t,e,n){var i,a,s=(i=e,a=(r.isArray(i)?i:[i]).sort((function(t,e){return e-t})),o.padEnd(a,4,a[a.length-1]));return[{x:t,y:s[0]},{x:t,y:s[1]},{x:t-n/2,y:s[2]},{x:t-n/2,y:s[1]},{x:t+n/2,y:s[1]},{x:t+n/2,y:s[2]},{x:t,y:s[2]},{x:t,y:s[3]}]}a.registerShape("schema","candle",{getPoints:function(t){return u(t.x,t.y,t.size)},draw:function(t,e){var n,r=s.getStyle(t,!0,!0),o=this.parsePath([["M",(n=t.points)[0].x,n[0].y],["L",n[1].x,n[1].y],["M",n[2].x,n[2].y],["L",n[3].x,n[3].y],["L",n[4].x,n[4].y],["L",n[5].x,n[5].y],["Z"],["M",n[6].x,n[6].y],["L",n[7].x,n[7].y]]);return e.addShape("path",{attrs:i.__assign(i.__assign({},r),{path:o,name:"schema"})})},getMarker:function(t){var e=t.color;return{symbol:function(t,e,n){var i=u(t,[e+7.5,e+3,e-3,e-7.5],n);return[["M",i[0].x,i[0].y],["L",i[1].x,i[1].y],["M",i[2].x,i[2].y],["L",i[3].x,i[3].y],["L",i[4].x,i[4].y],["L",i[5].x,i[5].y],["Z"],["M",i[6].x,i[6].y],["L",i[7].x,i[7].y]]},style:{lineWidth:1,stroke:e,fill:e,r:6}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.setLabelPosition=function(t,e,n,i){var o=this.getCoordinate(),a=o.isTransposed,s=e.points,u=o.convert(s[0]),c=o.convert(s[2]),l=a?-1:1,h=(u.x-c.x)/2*l,p=(u.y-c.y)/2*l;switch(i){case"right":a||(t.x-=h,t.y+=p),t.textAlign=r.get(t,"textAlign","left");break;case"left":a?t.x-=2*h:(t.x+=h,t.y+=p),t.textAlign=r.get(t,"textAlign","right");break;case"bottom":a?(t.x-=h,t.y-=p):t.y+=2*p,t.textAlign=r.get(t,"textAlign","center"),t.textBaseline=r.get(t,"textBaseline","top");break;case"middle":a?t.x-=h:t.y+=p,t.textAlign=r.get(t,"textAlign","center");break;case"top":a&&(t.x-=h,t.y+=p),t.textAlign=r.get(t,"textAlign","center"),t.textBaseline=r.get(t,"textBaseline","bottom")}},e}(i.__importDefault(n(32)).default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(12),a=n(10),s=function(t){function e(e){var n=t.call(this,e)||this;return n.defaultLayout="distribute",n}return i.__extends(e,t),e.prototype.getDefaultLabelCfg=function(){return r.get(this.geometry.theme,"pieLabels",{})},e.prototype.getDefaultOffset=function(t){return t||0},e.prototype.getLabelRotate=function(t,e,n){var i;return e<0&&((i=t)>Math.PI/2&&(i-=Math.PI),i<-Math.PI/2&&(i+=Math.PI)),i},e.prototype.getLabelAlign=function(t){var e,n=this.getCoordinate().getCenter();return e=t.angle<=Math.PI/2&&t.x>=n.x?"left":"right",this.getDefaultOffset(t.offset)<=0&&(e="right"===e?"left":"right"),e},e.prototype.getArcPoint=function(t){return t},e.prototype.getPointAngle=function(t){var e,n=this.getCoordinate(),i={x:r.isArray(t.x)?t.x[0]:t.x,y:t.y[0]},a={x:r.isArray(t.x)?t.x[1]:t.x,y:t.y[1]},s=o.getAngleByPoint(n,i);if(t.points&&t.points[0].y===t.points[1].y)e=s;else{var u=o.getAngleByPoint(n,a);s>=u&&(u+=2*Math.PI),e=s+(u-s)/2}return e},e.prototype.getCirclePoint=function(t,e,n){var r=this.getCoordinate(),o=r.getCenter(),s=r.getRadius()+e;return i.__assign(i.__assign({},a.polarToCartesian(o.x,o.y,s,t)),{angle:t,r:s})},e}(i.__importDefault(n(82)).default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(10);e.distribute=function(t,e,n,o){var a=t[0]?t[0].offset:0,s=e[0].get("coordinate"),u=s.getRadius(),c=s.getCenter();if(a>0){var l=2*(u+a)+28,h={start:s.start,end:s.end},p=[[],[]];t.forEach((function(t){t&&("right"===t.textAlign?p[0].push(t):p[1].push(t))})),p.forEach((function(t,n){var i=l/14;t.length>i&&(t.sort((function(t,e){return e["..percent"]-t["..percent"]})),t.splice(i,t.length-i)),t.sort((function(t,e){return t.y-e.y})),function(t,e,n,i,r,o){var a,s=!0,u=i.start,c=i.end,l=Math.min(u.y,c.y),h=Math.abs(u.y-c.y),p=0,f=Number.MIN_VALUE,d=e.map((function(t){return t.y>p&&(p=t.y),t.yh&&(h=p-l);s;)for(d.forEach((function(t){var e=(Math.min.apply(f,t.targets)+Math.max.apply(f,t.targets))/2;t.pos=Math.min(Math.max(f,e-t.size/2),h-t.size)})),s=!1,a=d.length;a--;)if(a>0){var g=d[a-1],y=d[a];g.pos+g.size>y.pos&&(g.size+=y.size,g.targets=g.targets.concat(y.targets),g.pos+g.size>h&&(g.pos=h-g.size),d.splice(a,1),s=!0)}a=0,d.forEach((function(t){var n=l+7;t.targets.forEach((function(){e[a].y=t.pos+n,n+=14,a++}))}));for(var v={},m=0,x=t;mi?y=i-d:l>i&&(y-=l-i),c>a?v=a-g:h>a&&(v-=h-a),y===p&&v===f||r.translate(t,y-p,v-f)}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0);e.limitInShape=function(t,e,n,r){i.each(e,(function(t,e){var i=t.getCanvasBBox(),r=n[e].getBBox();(i.minXr.maxX||i.maxY>r.maxY)&&t.remove(!0)}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=function(){function t(t){void 0===t&&(t={}),this.bitmap={};var e=t.xGap,n=void 0===e?1:e,i=t.yGap,r=void 0===i?8:i;this.xGap=n,this.yGap=r}return t.prototype.hasGap=function(t){for(var e=!0,n=this.bitmap,i=Math.round(t.minX),r=Math.round(t.maxX),o=Math.round(t.minY),a=Math.round(t.maxY),s=i;s<=r;s+=1)if(n[s]){if(s===i||s===r){for(var u=o;u<=a;u++)if(n[s][u]){e=!1;break}}else if(n[s][o]||n[s][a]){e=!1;break}}else n[s]={};return e},t.prototype.fillGap=function(t){for(var e=this.bitmap,n=Math.round(t.minX),i=Math.round(t.maxX),r=Math.round(t.minY),o=Math.round(t.maxY),a=n;a<=i;a+=1)e[a]||(e[a]={});for(a=n;a<=i;a+=this.xGap){for(var s=r;s<=o;s+=this.yGap)e[a][s]=!0;e[a][o]=!0}if(1!==this.yGap)for(a=r;a<=o;a+=1)e[n][a]=!0,e[i][a]=!0;if(1!==this.xGap)for(a=n;a<=i;a+=1)e[a][r]=!0,e[a][o]=!0},t.prototype.destroy=function(){this.bitmap={}},t}();function o(t,e,n,i){var r=t.getCanvasBBox(),o=r.width,a=r.height,s={x:e,y:n,textAlign:"center"};switch(i){case 0:s.y-=a+1,s.x+=1,s.textAlign="left";break;case 1:s.y-=a+1,s.x-=1,s.textAlign="right";break;case 2:s.y+=a+1,s.x-=1,s.textAlign="right";break;case 3:s.y+=a+1,s.x+=1,s.textAlign="left";break;case 5:s.y-=2*a+2;break;case 6:s.y+=2*a+2;break;case 7:s.x+=o+1,s.textAlign="left";break;case 8:s.x-=o+1,s.textAlign="right"}return t.attr(s),t.getCanvasBBox()}e.fixedOverlap=function(t,e,n,o){var a=new r;i.each(e,(function(t){(function(t,e,n){void 0===n&&(n=100);var i,r=t.attr(),o=r.x,a=r.y,s=t.getCanvasBBox(),u=Math.sqrt(s.width*s.width+s.height*s.height),c=1,l=0,h=0;if(e.hasGap(s))return e.fillGap(s),!0;for(var p,f=!1,d=0,g={};Math.min(Math.abs(l),Math.abs(h))u.x?i.x:u.x,s=u.y+h/2):"xy"===o&&(n.isPolar?(a=n.getCenter().x,s=n.getCenter().y):(a=(u.x+c.x)/2,s=(u.y+c.y)/2));var p=r(t,[a,s],o);t.animate({matrix:p},e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pathIn=function(t,e,n){var i=t.getTotalLength();t.attr("lineDash",[i]),t.animate((function(t){return{lineDashOffset:(1-t)*i}}),e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.positionUpdate=function(t,e,n){var i=n.toAttrs,r=i.x,o=i.y;delete i.x,delete i.y,t.attr(i),t.animate({x:r,y:o},e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2);e.scaleInX=function(t,e,n){var r=t.getBBox(),o=t.get("origin").mappingData.points,a=o[0].y-o[1].y>0?r.maxX:r.minX,s=(r.minY+r.maxY)/2;t.applyToMatrix([a,s,1]);var u=i.transform(t.getMatrix(),[["t",-a,-s],["s",.01,1],["t",a,s]]);t.setMatrix(u),t.animate({matrix:i.transform(t.getMatrix(),[["t",-a,-s],["s",100,1],["t",a,s]])},e)},e.scaleInY=function(t,e,n){var r=t.getBBox(),o=t.get("origin").mappingData,a=(r.minX+r.maxX)/2,s=o.points,u=s[0].y-s[1].y<=0?r.maxY:r.minY;t.applyToMatrix([a,u,1]);var c=i.transform(t.getMatrix(),[["t",-a,-u],["s",1,.01],["t",a,u]]);t.setMatrix(c),t.animate({matrix:i.transform(t.getMatrix(),[["t",-a,-u],["s",1,100],["t",a,u]])},e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=i.__importDefault(n(177)),o=n(0),a=n(10);function s(t,e){var n,i=r.default(t,e),a=i.startAngle,s=i.endAngle;return!o.isNumberEqual(a,.5*-Math.PI)&&a<.5*-Math.PI&&(a+=2*Math.PI),!o.isNumberEqual(s,.5*-Math.PI)&&s<.5*-Math.PI&&(s+=2*Math.PI),0===e[5]&&(a=(n=[s,a])[0],s=n[1]),o.isNumberEqual(a,1.5*Math.PI)&&(a=-.5*Math.PI),o.isNumberEqual(s,-.5*Math.PI)&&(s=1.5*Math.PI),{startAngle:a,endAngle:s}}function u(t){var e;return"M"===t[0]||"L"===t[0]?e=[t[1],t[2]]:"a"!==t[0]&&"A"!==t[0]||(e=[t[t.length-2],t[t.length-1]]),e}function c(t){var e,n,i,r=t.filter((function(t){return"A"===t[0]||"a"===t[0]})),a=r[0],c=r.length>1?r[1]:r[0],l=t.indexOf(a),h=t.indexOf(c),p=u(t[l-1]),f=u(t[h-1]),d=s(p,a),g=d.startAngle,y=d.endAngle,v=s(f,c),m=v.startAngle,x=v.endAngle;o.isNumberEqual(g,m)&&o.isNumberEqual(y,x)?(n=g,i=y):(n=Math.min(g,m),i=Math.max(y,x));var b=a[1],M=r[r.length-1][1];return b1&&(n*=Math.sqrt(y),r*=Math.sqrt(y));var v=n*n*(g*g)+r*r*(d*d),m=v?Math.sqrt((n*n*(r*r)-v)/v):1;u===c&&(m*=-1),isNaN(m)&&(m=0);var x=r?m*n*g/r:0,b=n?m*-r*d/n:0,M=(l+p)/2+Math.cos(s)*x-Math.sin(s)*b,_=(h+f)/2+Math.sin(s)*x+Math.cos(s)*b,w=[(d-x)/n,(g-b)/r],O=[(-1*d-x)/n,(-1*g-b)/r],C=a([1,0],w),S=a(w,O);return o(w,O)<=-1&&(S=Math.PI),o(w,O)>=1&&(S=0),0===c&&S>0&&(S-=2*Math.PI),1===c&&S<0&&(S+=2*Math.PI),{cx:M,cy:_,rx:i.isSamePoint(t,[p,f])?0:n,ry:i.isSamePoint(t,[p,f])?0:r,startAngle:C,endAngle:C+S,xRotation:s,arcFlag:u,sweepFlag:c}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getPixelRatio=function(){return window?window.devicePixelRatio:1},e.distance=function(t,e,n,i){var r=t-n,o=e-i;return Math.sqrt(r*r+o*o)},e.inBox=function(t,e,n,i,r,o){return r>=t&&r<=t+n&&o>=e&&o<=e+i};var i=null;e.getOffScreenContext=function(){if(!i){var t=document.createElement("canvas");t.width=1,t.height=1,i=t.getContext("2d")}return i},e.intersectRect=function(t,e){return!(e.minX>t.maxX||e.maxXt.maxY||e.maxY=0;r--)for(var o=0,a=this.getFacetsByLevel(t,r);o=n){var r=i.parsePosition([t[u],t[s.field]]);r&&p.push(r)}if(t[u]===h)return!1})),p},e.prototype.getNormalizedValue=function(t,e){var n,i;switch(t){case"start":n=0;break;case"end":n=1;break;case"median":i=e.isCategory?(e.values.length-1)/2:(e.min+e.max)/2,n=e.scale(i);break;case"min":case"max":i=e.isCategory?"min"===t?0:e.values.length-1:e[t],n=e.scale(i);break;default:n=e.scale(t)}return n},e.prototype.parsePercentPosition=function(t){var e=parseFloat(t[0])/100,n=parseFloat(t[1])/100,i=this.view.getCoordinate(),r=i.start,o=i.end,a=Math.min(r.x,o.x),s=Math.min(r.y,o.y);return{x:i.getWidth()*e+a,y:i.getHeight()*n+s}},e.prototype.getCoordinateBBox=function(){var t=this.view.getCoordinate(),e=t.start,n=t.end,i=t.getWidth(),r=t.getHeight(),o={x:Math.min(e.x,n.x),y:Math.min(e.y,n.y)};return{x:o.x,y:o.y,minX:o.x,minY:o.y,maxX:o.x+i,maxY:o.y+r,width:i,height:r}},e.prototype.getAnnotationCfg=function(t,e,n){var o=this.view.getCoordinate(),s={};if(r.isNil(e))return null;if("arc"===t){var c=e,l=c.start,h=c.end,p=this.parsePosition(l),f=this.parsePosition(h),d=u.getAngleByPoint(o,p),g=u.getAngleByPoint(o,f);d>g&&(g=2*Math.PI+g),s={center:o.getCenter(),radius:u.getDistanceToCenter(o,p),startAngle:d,endAngle:g}}else if("image"===t){var y=e;l=y.start,h=y.end,s={start:this.parsePosition(l),end:this.parsePosition(h),src:e.src}}else if("line"===t){var v=e;l=v.start,h=v.end,s={start:this.parsePosition(l),end:this.parsePosition(h),text:r.get(e,"text",null)}}else if("region"===t){var m=e;l=m.start,h=m.end,s={start:this.parsePosition(l),end:this.parsePosition(h)}}else if("text"===t){var x=e,b=x.position,M=x.rotate;s=i.__assign(i.__assign({},this.parsePosition(b)),{content:e.content,rotate:M})}else if("dataMarker"===t){var _=e,w=(b=_.position,_.point),O=_.line,C=_.text,S=_.autoAdjust,A=_.direction;s=i.__assign(i.__assign({},this.parsePosition(b)),{coordinateBBox:this.getCoordinateBBox(),point:w,line:O,text:C,autoAdjust:S,direction:A})}else if("dataRegion"===t){var P=e,j=(l=P.start,h=P.end,P.region),k=(C=P.text,P.lineLength);s={points:this.getRegionPoints(l,h),region:j,text:C,lineLength:k}}else if("regionFilter"===t){var T=e,E=(l=T.start,h=T.end,T.apply),I=T.color,L=this.view.geometries,B=[],D=function(t){t&&(t.isGroup()?t.getChildren().forEach((function(t){return D(t)})):B.push(t))};r.each(L,(function(t){E?r.contains(E,t.type)&&r.each(t.elements,(function(t){D(t.shape)})):r.each(t.elements,(function(t){D(t.shape)}))})),s={color:I,shapes:B,start:this.parsePosition(l),end:this.parsePosition(h)}}var F=r.deepMix({},n,i.__assign(i.__assign({},s),{top:e.top,style:e.style,offsetX:e.offsetX,offsetY:e.offsetY}));return F.container=this.getComponentContainer(F),F.animate=this.view.getOptions().animate&&F.animate&&r.get(e,"animate",F.animate),F.animateOption=r.deepMix({},a.DEFAULT_ANIMATE_CFG,F.animateOption,e.animateOption),F},e.prototype.isTop=function(t){return r.get(t,"top",!0)},e.prototype.getComponentContainer=function(t){return this.isTop(t)?this.foregroundContainer:this.backgroundContainer},e.prototype.getAnnotationTheme=function(t){return r.get(this.view.getTheme(),["components","annotation",t],{})},e}(n(21).Controller);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(3),a=n(17),s=n(18),u=n(38),c=n(38),l=n(192),h=n(20),p=n(21),f=["container"],d=function(t){function e(e){var n=t.call(this,e)||this;return n.cache=new Map,n.gridContainer=n.view.getLayer(o.LAYER.BG).addGroup(),n.axisContainer=n.view.getLayer(o.LAYER.BG).addGroup(),n}return i.__extends(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"axis"},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){this.option=this.view.getOptions().axes,this.createXAxes(),this.createYAxes()},e.prototype.layout=function(){var t=this,e=this.view.getCoordinate();r.each(this.getComponents(),(function(n){var i,r=n.component,a=n.direction,s=n.type,c=n.extra,h=c.dim,p=c.scale,f=c.alignTick;s===o.COMPONENT_TYPE.AXIS?e.isPolar?"x"===h?i=e.isTransposed?u.getAxisRegion(e,a):u.getCircleAxisCenterRadius(e):"y"===h&&(i=e.isTransposed?u.getCircleAxisCenterRadius(e):u.getAxisRegion(e,a)):i=u.getAxisRegion(e,a):s===o.COMPONENT_TYPE.GRID&&(i=e.isPolar?{items:e.isTransposed?"x"===h?l.getCircleGridItems(e,t.view.getYScales()[0],p,f,h):l.getLineGridItems(e,p,h,f):"x"===h?l.getLineGridItems(e,p,h,f):l.getCircleGridItems(e,t.view.getXScale(),p,f,h),center:t.view.getCoordinate().getCenter()}:{items:l.getLineGridItems(e,p,h,f)}),r.update(i)}))},e.prototype.update=function(){this.option=this.view.getOptions().axes;var t=new Map;this.updateXAxes(t),this.updateYAxes(t);var e=new Map;this.cache.forEach((function(n,i){t.has(i)?e.set(i,n):n.component.destroy()})),this.cache=e},e.prototype.clear=function(){t.prototype.clear.call(this),this.cache.clear(),this.gridContainer.clear(),this.axisContainer.clear()},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.gridContainer.remove(!0),this.axisContainer.remove(!0)},e.prototype.getComponents=function(){var t=[];return this.cache.forEach((function(e){t.push(e)})),t},e.prototype.updateXAxes=function(t){var e=this.view.getXScale();if(e&&!e.isIdentity){var n=e.field,i=c.getAxisOption(this.option,e.field);if(!1!==i){var a=this.view.getCoordinate(),s=this.getId("axis",n),l=this.getId("grid",n),p=u.getAxisDirection(i,o.DIRECTION.BOTTOM),d=o.LAYER.BG;if(a.isRect){if(y=this.cache.get(s)){var g=this.getLineAxisCfg(e,i,p);h.omit(g,f),y.component.update(g),t.set(s,y)}else y=this.createLineAxis(e,i,d,p,"x"),this.cache.set(s,y),t.set(s,y);(v=this.cache.get(l))?(g=this.getLineGridCfg(e,i,p,"x"),h.omit(g,f),v.component.update(g),t.set(l,v)):(v=this.createLineGrid(e,i,d,p,"x"))&&(this.cache.set(l,v),t.set(l,v))}else if(a.isPolar){var y,v;if(y=this.cache.get(s))g=a.isTransposed?this.getLineAxisCfg(e,i,"radius"):this.getCircleAxisCfg(e,i,p),h.omit(g,f),y.component.update(g),t.set(s,y);else{if(a.isTransposed){if(r.isUndefined(i))return;y=this.createLineAxis(e,i,d,"radius","x")}else y=this.createCircleAxis(e,i,d,p,"x");this.cache.set(s,y),t.set(s,y)}if(v=this.cache.get(l))g=a.isTransposed?this.getCircleGridCfg(e,i,"radius","x"):this.getLineGridCfg(e,i,"circle","x"),h.omit(g,f),v.component.update(g),t.set(l,v);else{if(a.isTransposed){if(r.isUndefined(i))return;v=this.createCircleGrid(e,i,d,"radius","x")}else v=this.createLineGrid(e,i,d,"circle","x");v&&(this.cache.set(l,v),t.set(l,v))}}}}},e.prototype.updateYAxes=function(t){var e=this,n=this.view.getYScales();r.each(n,(function(n,i){if(n&&!n.isIdentity){var a=n.field,s=c.getAxisOption(e.option,a);if(!1!==s){var l=o.LAYER.BG,p=e.getId("axis",a),d=e.getId("grid",a),g=e.view.getCoordinate();if(g.isRect){var y=u.getAxisDirection(s,0===i?o.DIRECTION.LEFT:o.DIRECTION.RIGHT);if(m=e.cache.get(p)){var v=e.getLineAxisCfg(n,s,y);h.omit(v,f),m.component.update(v),t.set(p,m)}else m=e.createLineAxis(n,s,l,y,"y"),e.cache.set(p,m),t.set(p,m);(x=e.cache.get(d))?(v=e.getLineGridCfg(n,s,y,"y"),h.omit(v,f),x.component.update(v),t.set(d,x)):(x=e.createLineGrid(n,s,l,y,"y"))&&(e.cache.set(d,x),t.set(d,x))}else if(g.isPolar){var m,x;if(m=e.cache.get(p))v=g.isTransposed?e.getCircleAxisCfg(n,s,"circle"):e.getLineAxisCfg(n,s,"radius"),h.omit(v,f),m.component.update(v),t.set(p,m);else{if(g.isTransposed){if(r.isUndefined(s))return;m=e.createCircleAxis(n,s,l,"circle","y")}else m=e.createLineAxis(n,s,l,"radius","y");e.cache.set(p,m),t.set(p,m)}if(x=e.cache.get(d))v=g.isTransposed?e.getLineGridCfg(n,s,"circle","y"):e.getCircleGridCfg(n,s,"radius","y"),h.omit(v,f),x.component.update(v),t.set(d,x);else{if(g.isTransposed){if(r.isUndefined(s))return;x=e.createLineGrid(n,s,l,"circle","y")}else x=e.createCircleGrid(n,s,l,"radius","y");x&&(e.cache.set(d,x),t.set(d,x))}}}}}))},e.prototype.createXAxes=function(){var t=this.view.getXScale();if(t&&!t.isIdentity){var e=c.getAxisOption(this.option,t.field);if(!1!==e){var n=u.getAxisDirection(e,o.DIRECTION.BOTTOM),i=o.LAYER.BG,a=this.view.getCoordinate(),s=this.getId("axis",t.field),l=this.getId("grid",t.field);if(a.isRect){var h=this.createLineAxis(t,e,i,n,"x");this.cache.set(s,h),(p=this.createLineGrid(t,e,i,n,"x"))&&this.cache.set(l,p)}else if(a.isPolar){h=void 0;var p=void 0;if(a.isTransposed){if(r.isUndefined(e))return;h=this.createLineAxis(t,e,i,"radius","x"),p=this.createCircleGrid(t,e,i,"radius","x")}else h=this.createCircleAxis(t,e,i,n,"x"),p=this.createLineGrid(t,e,i,"circle","x");this.cache.set(s,h),p&&this.cache.set(l,p)}}}},e.prototype.createYAxes=function(){var t=this,e=this.view.getYScales();r.each(e,(function(e,n){if(e&&!e.isIdentity){var i=e.field,a=c.getAxisOption(t.option,i);if(!1!==a){var s=o.LAYER.BG,l=t.getId("axis",i),h=t.getId("grid",i),p=t.view.getCoordinate();if(p.isRect){var f=u.getAxisDirection(a,0===n?o.DIRECTION.LEFT:o.DIRECTION.RIGHT),d=t.createLineAxis(e,a,s,f,"y");t.cache.set(l,d),(g=t.createLineGrid(e,a,s,f,"y"))&&t.cache.set(h,g)}else if(p.isPolar){d=void 0;var g=void 0;if(p.isTransposed){if(r.isUndefined(a))return;d=t.createCircleAxis(e,a,s,"circle","y"),g=t.createLineGrid(e,a,s,"circle","y")}else d=t.createLineAxis(e,a,s,"radius","y"),g=t.createCircleGrid(e,a,s,"radius","y");t.cache.set(t.getId("axis",e.field),d),g&&t.cache.set(h,g)}}}}))},e.prototype.createLineAxis=function(t,e,n,i,r){var s={component:new a.LineAxis(this.getLineAxisCfg(t,e,i)),layer:n,direction:"radius"===i?o.DIRECTION.NONE:i,type:o.COMPONENT_TYPE.AXIS,extra:{dim:r,scale:t}};return s.component.set("field",t.field),s.component.init(),s},e.prototype.createLineGrid=function(t,e,n,i,s){var u=this.getLineGridCfg(t,e,i,s);if(u){var c={component:new a.LineGrid(u),layer:n,direction:o.DIRECTION.NONE,type:o.COMPONENT_TYPE.GRID,extra:{dim:s,scale:t,alignTick:r.get(u,"alignTick",!0)}};return c.component.init(),c}},e.prototype.createCircleAxis=function(t,e,n,i,r){var s={component:new a.CircleAxis(this.getCircleAxisCfg(t,e,i)),layer:n,direction:i,type:o.COMPONENT_TYPE.AXIS,extra:{dim:r,scale:t}};return s.component.set("field",t.field),s.component.init(),s},e.prototype.createCircleGrid=function(t,e,n,i,s){var u=this.getCircleGridCfg(t,e,i,s);if(u){var c={component:new a.CircleGrid(u),layer:n,direction:o.DIRECTION.NONE,type:o.COMPONENT_TYPE.GRID,extra:{dim:s,scale:t,alignTick:r.get(u,"alignTick",!0)}};return c.component.init(),c}},e.prototype.getLineAxisCfg=function(t,e,n){var o=this.axisContainer,a=this.view.getCoordinate(),s=u.getAxisRegion(a,n),c=u.getAxisTitleText(t,e),l=i.__assign(i.__assign({container:o},s),{ticks:r.map(t.getTicks(),(function(t){return{id:""+t.tickValue,name:t.text,value:t.value}})),title:{text:c},verticalFactor:a.isPolar?-1*u.getAxisFactorByRegion(s,a.getCenter()):u.getAxisFactorByRegion(s,a.getCenter())}),h=u.getAxisThemeCfg(this.view.getTheme(),n),p=r.get(e,["title"])?r.deepMix({},{title:{style:{text:c}}},e):e,f=r.deepMix({},l,h,p);return r.mix(f,this.getAnimateCfg(f))},e.prototype.getLineGridCfg=function(t,e,n,i){if(l.showGrid(u.getAxisThemeCfg(this.view.getTheme(),n),e)){var o=l.getGridThemeCfg(this.view.getTheme(),n),a=r.deepMix({container:this.gridContainer},o,r.get(e,"grid",{}),this.getAnimateCfg(e));return a.items=l.getLineGridItems(this.view.getCoordinate(),t,i,r.get(a,"alignTick",!0)),a}},e.prototype.getCircleAxisCfg=function(t,e,n){var o=this.axisContainer,a=r.map(t.getTicks(),(function(t){return{id:""+t.tickValue,name:t.text,value:t.value}})),s=this.view.getCoordinate();t.isCategory||Math.abs(s.endAngle-s.startAngle)!==2*Math.PI||a.pop();var c=u.getAxisTitleText(t,e),l=i.__assign(i.__assign({container:o},u.getCircleAxisCenterRadius(this.view.getCoordinate())),{ticks:a,title:{text:c},verticalFactor:1}),h=u.getAxisThemeCfg(this.view.getTheme(),"circle"),p=r.get(e,["title"])?r.deepMix({},{title:{style:{text:c}}},e):e,f=r.deepMix({},l,h,p);return r.mix(f,this.getAnimateCfg(f))},e.prototype.getCircleGridCfg=function(t,e,n,i){if(l.showGrid(u.getAxisThemeCfg(this.view.getTheme(),n),e)){var o=l.getGridThemeCfg(this.view.getTheme(),"radius"),a=r.deepMix({container:this.gridContainer,center:this.view.getCoordinate().getCenter()},o,r.get(e,"grid",{}),this.getAnimateCfg(e)),s=r.get(a,"alignTick",!0),c="x"===i?this.view.getYScales()[0]:this.view.getXScale();return a.items=l.getCircleGridItems(this.view.getCoordinate(),c,t,s,i),a}},e.prototype.getId=function(t,e){return t+"-"+e+"-"+this.view.getCoordinate().type},e.prototype.getAnimateCfg=function(t){return{animate:this.view.getOptions().animate&&r.get(t,"animate"),animateOption:r.deepMix({},s.DEFAULT_ANIMATE_CFG,{appear:null},r.get(t,"animateOption",{}))}},e}(p.Controller);e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0);e.getGridThemeCfg=function(t,e){return i.get(t,["components","axis",e,"grid"],{})},e.getLineGridItems=function(t,e,n,i){var r=[],o=e.getTicks();return t.isPolar&&o.push({value:1,text:"",tickValue:""}),o.reduce((function(e,o,a){var s=o.value;if(i)r.push({points:[t.convert("y"===n?{x:0,y:s}:{x:s,y:0}),t.convert("y"===n?{x:1,y:s}:{x:s,y:1})]});else if(a){var u=(e.value+s)/2;r.push({points:[t.convert("y"===n?{x:0,y:u}:{x:u,y:0}),t.convert("y"===n?{x:1,y:u}:{x:u,y:1})]})}return o}),o[0]),r},e.getCircleGridItems=function(t,e,n,r,o){var a=e.values.length,s=[],u=n.getTicks();return u.reduce((function(e,n){var u=e?e.value:n.value,c=n.value,l=(u+c)/2;return"x"===o?s.push({points:[t.convert({x:r?c:l,y:0}),t.convert({x:r?c:l,y:1})]}):s.push({points:i.map(Array(a+1),(function(e,n){return t.convert({x:n/a,y:r?c:l})}))}),n}),u[0]),s},e.showGrid=function(t,e){var n=i.get(e,"grid");if(null===n)return!1;var r=i.get(t,"grid");return!(void 0===n&&null===r)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(3),a=n(17),s=n(18),u=n(26),c=n(83),l=n(20),h=n(194),p=n(30);function f(t,e){return r.isBoolean(t)?!1!==t&&{}:r.get(t,[e],t)}function d(t){return r.get(t,"position",o.DIRECTION.BOTTOM)}var g=function(t){function e(e){var n=t.call(this,e)||this;return n.container=n.view.getLayer(o.LAYER.FORE).addGroup(),n}return i.__extends(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"legend"},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){var t=this;if(this.option=this.view.getOptions().legends,r.get(this.option,"custom")){var e=this.createCustomLegend(void 0,void 0,void 0,this.option);if(e){e.init();var n=o.LAYER.FORE,i=d(this.option);this.components.push({id:"global-custom",component:e,layer:n,direction:i,type:o.COMPONENT_TYPE.LEGEND,extra:void 0})}}else this.loopLegends((function(e,n,i){var r=t.createFieldLegend(e,n,i);r&&(r.component.init(),t.components.push(r))}))},e.prototype.layout=function(){var t=this;r.each(this.components,(function(e){var n=e.component,i=e.direction,r=h.getLegendLayout(i),o=t.getCategoryLegendSizeCfg(r),a=n.get("maxWidth"),s=n.get("maxHeight");n.update({maxWidth:Math.min(o.maxWidth,a||0),maxHeight:Math.min(o.maxHeight,s||0)});var l=n.getLayoutBBox(),p=new u.BBox(l.x,l.y,l.width,l.height),f=c.directionToPosition(t.view.coordinateBBox,p,i),d=f[0],g=f[1],y=c.directionToPosition(t.view.viewBBox,p,i),v=y[0],m=y[1],x=0,b=0;i.startsWith("top")||i.startsWith("bottom")?(x=d,b=m):(x=v,b=g),n.update({x:x,y:b})}))},e.prototype.update=function(){var t=this;this.option=this.view.getOptions().legends;var e={};if(r.get(this.option,"custom")){var n="global-custom",i=this.getComponentById(n);if(i){var a=this.getCategoryCfg(void 0,void 0,void 0,this.option,!0);l.omit(a,["container"]),i.component.update(a),e[n]=!0}else{var s=this.createCustomLegend(void 0,void 0,void 0,this.option);if(s){s.init();var u=o.LAYER.FORE,c=d(this.option);this.components.push({id:n,component:s,layer:u,direction:c,type:o.COMPONENT_TYPE.LEGEND,extra:void 0}),e[n]=!0}}}else this.loopLegends((function(n,i,o){var a=t.getId(o.field),s=t.getComponentById(a);if(s){var u=void 0,c=f(t.option,o.field);!1!==c&&(r.get(c,"custom")?u=t.getCategoryCfg(n,i,o,c,!0):o.isLinear?u=t.getContinuousCfg(n,i,o,c):o.isCategory&&(u=t.getCategoryCfg(n,i,o,c))),u&&(l.omit(u,["container"]),s.direction=d(c),s.component.update(u),e[a]=!0)}else{var h=t.createFieldLegend(n,i,o);h&&(h.component.init(),t.components.push(h),e[a]=!0)}}));var h=[];r.each(this.getComponents(),(function(t){e[t.id]?h.push(t):t.component.destroy()})),this.components=h},e.prototype.clear=function(){t.prototype.clear.call(this),this.container.clear()},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.container.remove(!0)},e.prototype.getGeometries=function(t,e){var n=this;return void 0===e&&(e=[]),e.push.apply(e,t.geometries),r.each(t.views,(function(t){return n.getGeometries(t,e)})),e},e.prototype.loopLegends=function(t){if(this.view.getRootView()===this.view){var e=this.getGeometries(this.view),n={};r.each(e,(function(e){var i=e.getGroupAttributes();r.each(i,(function(i){var r=i.getScale(i.type);r&&"identity"!==r.type&&!n[r.field]&&(t(e,i,r),n[r.field]=!0)}))}))}},e.prototype.createFieldLegend=function(t,e,n){var i,a=f(this.option,n.field),s=o.LAYER.FORE,u=d(a);if(!1!==a&&(r.get(a,"custom")?i=this.createCustomLegend(t,e,n,a):n.isLinear?i=this.createContinuousLegend(t,e,n,a):n.isCategory&&(i=this.createCategoryLegend(t,e,n,a))),i)return i.set("field",n.field),{id:this.getId(n.field),component:i,layer:s,direction:u,type:o.COMPONENT_TYPE.LEGEND,extra:{scale:n}}},e.prototype.createCustomLegend=function(t,e,n,i){var r=this.getCategoryCfg(t,e,n,i,!0);return new a.CategoryLegend(r)},e.prototype.createContinuousLegend=function(t,e,n,i){var r=this.getContinuousCfg(t,e,n,i);return new a.ContinuousLegend(r)},e.prototype.createCategoryLegend=function(t,e,n,i){var r=this.getCategoryCfg(t,e,n,i);return new a.CategoryLegend(r)},e.prototype.getContinuousCfg=function(t,e,n,o){var a=n.getTicks(),s=r.find(a,(function(t){return 0===t.value})),u=r.find(a,(function(t){return 1===t.value})),c=r.map(a,(function(t){var i=t.value,r=t.tickValue,o=e.mapping(n.invert(i)).join("");return{value:r,attrValue:o,color:o,scaleValue:i}}));s||c.push({value:n.min,attrValue:e.mapping(0).join(""),color:e.mapping(0).join(""),scaleValue:0}),u||c.push({value:n.max,attrValue:e.mapping(1).join(""),color:e.mapping(1).join(""),scaleValue:1}),c.sort((function(t,e){return t.value-e.value}));var l={min:r.head(c).value,max:r.last(c).value,colors:[],rail:{type:e.type},track:{}};"size"===e.type&&(l=i.__assign(i.__assign({},l),{track:{style:{fill:"size"===e.type?this.view.getTheme().defaultColor:void 0}}})),"color"===e.type&&(l=i.__assign(i.__assign({},l),{colors:r.map(c,(function(t){return t.attrValue}))}));var f=this.container,g=d(o),y=h.getLegendLayout(g),v=r.get(o,"title");v&&(v=r.deepMix({text:p.getName(n)},v));var m=i.__assign(i.__assign({container:f,layout:y},l),{title:v});return this.mergeLegendCfg(m,o,"continuous")},e.prototype.getCategoryCfg=function(t,e,n,a,s){var u=this.container,c=r.get(a,"position",o.DIRECTION.BOTTOM),l=r.get(this.view.getTheme(),["components","legend",c,"marker"]),f=r.get(a,"marker"),d=h.getLegendLayout(c),g=s?h.getCustomLegendItems(l,f,a.items):h.getLegendItems(this.view,t,e,l,f),y=r.get(a,"title");y&&(y=r.deepMix({text:n?p.getName(n):""},y));var v=i.__assign({container:u,layout:d,items:g,title:y},this.getCategoryLegendSizeCfg(d)),m=this.mergeLegendCfg(v,a,c);return m.reversed&&m.items.reverse(),m},e.prototype.mergeLegendCfg=function(t,e,n){var i=r.get(this.view.getTheme(),["components","legend",n],{});return r.deepMix({},i,t,{animateOption:s.DEFAULT_ANIMATE_CFG},e)},e.prototype.getId=function(t){return this.name+"-"+t},e.prototype.getComponentById=function(t){return r.find(this.components,(function(e){return e.id===t}))},e.prototype.getCategoryLegendSizeCfg=function(t){var e=this.view.viewBBox,n=e.width,i=e.height,r=this.view.coordinateBBox,a=r.width,s=r.height;return"vertical"===t?{maxWidth:n*o.COMPONENT_MAX_VIEW_PERCENTAGE,maxHeight:s}:{maxWidth:a,maxHeight:i*o.COMPONENT_MAX_VIEW_PERCENTAGE}},e}(n(21).Controller);e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(3),o=n(195),a=n(28);e.getLegendLayout=function(t){return t.startsWith(r.DIRECTION.LEFT)||t.startsWith(r.DIRECTION.RIGHT)?"vertical":"horizontal"},e.getLegendItems=function(t,e,n,r,s){var u=n.getScale(n.type);if(u.isCategory){var c=u.field;return i.map(u.getTicks(),(function(n){var l,h=n.text,p=n.value,f=h,d=u.invert(p),g=!i.size(t.filterFieldData(c,[(l={},l[c]=d,l)])),y=e.getAttribute("color"),v=e.getAttribute("shape"),m=o.getMappingValue(y,d,t.getTheme().defaultColor),x=o.getMappingValue(v,d,"point"),b=e.getShapeMarker(x,{color:m,isInPolar:e.coordinate.isPolar}),M=(b=i.deepMix({},r,b,s)).symbol;return i.isString(M)&&a.MarkerSymbols[M]&&(b.symbol=a.MarkerSymbols[M]),{id:d,name:f,value:d,marker:b,unchecked:g}}))}return[]},e.getCustomLegendItems=function(t,e,n){return i.map(n,(function(n){var r=i.deepMix({},t,e,n.marker),o=r.symbol;return i.isString(o)&&a.MarkerSymbols[o]&&(r.symbol=a.MarkerSymbols[o]),n.marker=r,n}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1);e.getMappingValue=function(t,e,n){if(!t)return n;var r;if(t.callback&&t.callback.length>1){var o=Array(t.callback.length-1).fill("");r=t.mapping.apply(t,i.__spreadArrays([e],o)).join("")}else r=t.mapping(e).join("");return r||n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(3),a=n(17),s=n(26),u=n(83),c=n(20),l=function(t){function e(e){var n=t.call(this,e)||this;return n.onValueChanged=function(t){var e=t[0],i=t[1];n.updateMinMaxText(e,i),n.view.render(!0)},n.container=n.view.getLayer(o.LAYER.FORE).addGroup(),n}return i.__extends(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"slider"},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){if(this.option=this.view.getOptions().slider,this.option){this.slider?this.slider=this.updateSlider():(this.slider=this.createSlider(),this.slider.component.on("sliderchange",this.onValueChanged));var t=this.slider.component.get("start"),e=this.slider.component.get("end");this.updateMinMaxText(t,e)}else this.slider&&(this.slider.component.destroy(),this.slider=void 0)},e.prototype.layout=function(){if(this.slider){var t=this.view.coordinateBBox.width,e=this.slider.component.getLayoutBBox(),n=new s.BBox(e.x,e.y,Math.min(e.width,t),e.height),i=u.directionToPosition(this.view.viewBBox,n,o.DIRECTION.BOTTOM),r=(i[0],i[1]),a=u.directionToPosition(this.view.coordinateBBox,n,o.DIRECTION.BOTTOM),c=a[0];a[1],this.slider.component.update({x:c,y:r,width:t})}},e.prototype.update=function(){this.render()},e.prototype.createSlider=function(){var t=this.getSliderCfg(),e=new a.Slider(i.__assign({container:this.container},t));return e.init(),{component:e,layer:o.LAYER.FORE,direction:o.DIRECTION.BOTTOM,type:o.COMPONENT_TYPE.OTHER}},e.prototype.updateSlider=function(){var t=this.getSliderCfg();return c.omit(t,["x","y","width","start","end","minText","maxText"]),this.slider.component.update(t),this.slider},e.prototype.getSliderCfg=function(){if(r.isObject(this.option)){var t=i.__assign({data:this.getData()},r.get(this.option,"trendCfg",{})),e=this.view.coordinateBBox.width,n=r.deepMix({},{x:0,y:0,width:e},this.option);return i.__assign(i.__assign({},n),{trendCfg:t})}return{}},e.prototype.getData=function(){var t=this.view.getOptions().data,e=this.view.getYScales()[0];return r.map(t,(function(t){return t[e.field]||0}))},e.prototype.updateMinMaxText=function(t,e){var n=this.view.getOptions().data,i=r.size(n),o=this.view.getXScale();if(o&&i){var a=o.field,s=r.map(n,(function(t){return t[a]||""})),u=Math.floor(t*(i-1)),l=Math.floor(e*(i-1)),h=r.get(s,[u]),p=r.get(s,[l]);this.slider.component.update({minText:h,maxText:p,start:t,end:e}),this.view.filter(o.field,(function(t,e,n){return c.isBetween(n,u,l)}))}},e.prototype.getComponents=function(){return this.slider?[this.slider]:[]},e}(n(21).Controller);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(17),a=n(12),s=n(10),u=n(72),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isLocked=!1,e.isVisible=!0,e}return i.__extends(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"tooltip"},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){var t=this.view.getOptions().tooltip;this.isVisible=!1!==t},e.prototype.showTooltip=function(t){if(this.isVisible){var e=this.view,n=this.getTooltipItems(t);if(n.length){var o=this.getTitle(n),a={x:n[0].x,y:n[0].y};e.emit("tooltip:show",i.__assign({items:n,title:o},t));var s=this.getTooltipCfg(),u=s.follow,c=s.showMarkers,l=s.showCrosshairs,h=s.showContent,p=s.marker,f=this.items,d=this.title;if(r.isEqual(d,o)&&r.isEqual(f,n)){if(this.tooltip){var g=u?t:a;this.tooltip.update(g),this.tooltip.show()}this.tooltipMarkersGroup&&this.tooltipMarkersGroup.show()}else e.emit("tooltip:change",i.__assign({items:n,title:o},t)),h&&(this.tooltip||this.renderTooltip(),this.tooltip.update(r.mix({},s,{items:n,title:o},u?t:a)),this.tooltip.show()),c&&this.renderTooltipMarkers(n,p);if(this.items=n,this.title=o,l){var y=r.get(s,["crosshairs","follow"],!1);this.renderCrosshairs(y?t:a,s)}}else this.hideTooltip()}},e.prototype.hideTooltip=function(){var t=this.tooltipMarkersGroup;t&&t.hide();var e=this.xCrosshair,n=this.yCrosshair;e&&e.hide(),n&&n.hide();var i=this.tooltip;i&&i.hide(),this.view.emit("tooltip:hide",{})},e.prototype.lockTooltip=function(){this.isLocked=!0,this.tooltip&&this.tooltip.setCapture(!0)},e.prototype.unlockTooltip=function(){this.isLocked=!1;var t=this.getTooltipCfg();this.tooltip&&this.tooltip.setCapture(t.capture)},e.prototype.isTooltipLocked=function(){return this.isLocked},e.prototype.clear=function(){var t=this.tooltip,e=this.xCrosshair,n=this.yCrosshair,i=this.tooltipMarkersGroup;t&&(t.hide(),t.clear()),e&&e.clear(),n&&n.clear(),i&&i.clear()},e.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),this.xCrosshair&&this.xCrosshair.destroy(),this.yCrosshair&&this.yCrosshair.destroy(),this.guideGroup&&this.guideGroup.remove(!0),this.items=null,this.title=null,this.tooltipMarkersGroup=null,this.tooltipCrosshairsGroup=null,this.xCrosshair=null,this.yCrosshair=null,this.tooltip=null,this.guideGroup=null,this.isLocked=!1},e.prototype.changeVisible=function(t){if(this.visible!==t){var e=this.tooltip,n=this.tooltipMarkersGroup,i=this.xCrosshair,r=this.yCrosshair;t?(e&&e.show(),n&&n.show(),i&&i.show(),r&&r.show()):(e&&e.hide(),n&&n.hide(),i&&i.hide(),r&&r.hide()),this.visible=t}},e.prototype.getTooltipItems=function(t){var e=this.findItemsFromView(this.view,t);if(e.length){if(e=r.flatten(e),r.each(e,(function(t){r.each(t,(function(t){var e=t.mappingData,n=e.x,i=e.y;t.x=r.isArray(n)?n[n.length-1]:n,t.y=r.isArray(i)?i[i.length-1]:i}))})),!1===this.getTooltipCfg().shared&&e.length>1){var n=e[0],i=Math.abs(t.y-n[0].y);r.each(e,(function(e){var r=Math.abs(t.y-e[0].y);r<=i&&(n=e,i=r)})),e=[n]}return function(t){var e=[];return r.each(t,(function(t){r.find(e,(function(e){return e.color===t.color&&e.name===t.name&&e.value===t.value&&e.title===t.title}))||e.push(t)})),e}(r.flatten(e))}return[]},e.prototype.layout=function(){},e.prototype.update=function(){this.clear()},e.prototype.getTooltipCfg=function(){var t=this.view,e=t.getOptions().tooltip,n=t.getTheme(),i=r.get(n,["components","tooltip"],{}),o=r.isUndefined(r.get(e,"enterable"))?i.enterable:r.get(e,"enterable");return r.deepMix({},i,e,{capture:!(!o&&!this.isLocked)})},e.prototype.getTitle=function(t){var e=t[0].title||t[0].name;return this.title=e,e},e.prototype.renderTooltip=function(){var t=this.view.getCanvas(),e={start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}},n=this.getTooltipCfg(),r=new o.HtmlTooltip(i.__assign(i.__assign({parent:t.get("el").parentNode,region:e},n),{visible:!1,crosshairs:null}));r.init(),this.tooltip=r},e.prototype.renderTooltipMarkers=function(t,e){var n=this.getTooltipMarkersGroup();r.each(t,(function(t){var r=t.x,o=t.y,a=i.__assign(i.__assign({fill:t.color,symbol:"circle",shadowColor:t.color},e),{x:r,y:o});n.addShape("marker",{attrs:a})}))},e.prototype.renderCrosshairs=function(t,e){var n=r.get(e,["crosshairs","type"],"x");"x"===n?(this.yCrosshair&&this.yCrosshair.hide(),this.renderXCrosshairs(t,e)):"y"===n?(this.xCrosshair&&this.xCrosshair.hide(),this.renderYCrosshairs(t,e)):"xy"===n&&(this.renderXCrosshairs(t,e),this.renderYCrosshairs(t,e))},e.prototype.renderXCrosshairs=function(t,e){var n=this.getViewWithGeometry(this.view).getCoordinate();if(a.isPointInCoordinate(n,t)){var i,u;if(n.isRect)n.isTransposed?(i={x:n.start.x,y:t.y},u={x:n.end.x,y:t.y}):(i={x:t.x,y:n.end.y},u={x:t.x,y:n.start.y});else{var c=a.getAngleByPoint(n,t),l=n.getCenter(),h=n.getRadius();u=s.polarToCartesian(l.x,l.y,h,c),i=l}var p=r.deepMix({start:i,end:u,container:this.getTooltipCrosshairsGroup()},r.get(e,"crosshairs",{}),this.getCrosshairsText("x",t,e));delete p.type;var f=this.xCrosshair;f?f.update(p):(f=new o.Crosshair.Line(p)).init(),f.render(),f.show(),this.xCrosshair=f}},e.prototype.renderYCrosshairs=function(t,e){var n=this.getViewWithGeometry(this.view).getCoordinate();if(a.isPointInCoordinate(n,t)){var i,s;if(n.isRect){var u=void 0,c=void 0;n.isTransposed?(u={x:t.x,y:n.end.y},c={x:t.x,y:n.start.y}):(u={x:n.start.x,y:t.y},c={x:n.end.x,y:t.y}),i={start:u,end:c},s="Line"}else i={center:n.getCenter(),radius:a.getDistanceToCenter(n,t),startAngle:n.startAngle,endAngle:n.endAngle},s="Circle";delete(i=r.deepMix({container:this.getTooltipCrosshairsGroup()},i,r.get(e,"crosshairs",{}),this.getCrosshairsText("y",t,e))).type;var l=this.yCrosshair;l?n.isRect&&"circle"===l.get("type")||!n.isRect&&"line"===l.get("type")?(l=new o.Crosshair[s](i)).init():l.update(i):(l=new o.Crosshair[s](i)).init(),l.render(),l.show(),this.yCrosshair=l}},e.prototype.getCrosshairsText=function(t,e,n){var i=r.get(n,["crosshairs","text"]),o=r.get(n,["crosshairs","follow"]),a=this.items;if(i){var s=this.getViewWithGeometry(this.view),u=a[0],c=s.getXScale(),l=s.getYScales()[0],h=void 0,p=void 0;if(o){var f=this.view.getCoordinate().invert(e);h=c.invert(f.x),p=l.invert(f.y)}else h=u.data[c.field],p=u.data[l.field];var d="x"===t?h:p;return r.isFunction(i)?i=i(t,d,a,e):i.content=d,{text:i}}},e.prototype.getGuideGroup=function(){if(!this.guideGroup){var t=this.view.foregroundGroup;this.guideGroup=t.addGroup({name:"tooltipGuide",capture:!1})}return this.guideGroup},e.prototype.getTooltipMarkersGroup=function(){var t=this.tooltipMarkersGroup;return t&&!t.destroyed?(t.clear(),t.show()):((t=this.getGuideGroup().addGroup({name:"tooltipMarkersGroup"})).toFront(),this.tooltipMarkersGroup=t),t},e.prototype.getTooltipCrosshairsGroup=function(){var t=this.tooltipCrosshairsGroup;return t||((t=this.getGuideGroup().addGroup({name:"tooltipCrosshairsGroup",capture:!1})).toBack(),this.tooltipCrosshairsGroup=t),t},e.prototype.getTooltipItemsByHitShape=function(t,e,n){var i=[],r=t.container.getShape(e.x,e.y);if(r&&r.get("visible")&&r.get("origin")){var o=r.get("origin").mappingData,a=u.getTooltipItems(o,t,n);a.length&&i.push(a)}return i},e.prototype.getTooltipItemsByFindData=function(t,e,n){var i=[];return r.each(t.dataArray,(function(r){var o=u.findDataByPoint(e,r,t);if(o){var a=t.getElementId(o),s=t.elementsMap[a];if("heatmap"===t.type||s.visible){var c=u.getTooltipItems(o,t,n);c.length&&i.push(c)}}})),i},e.prototype.findItemsFromView=function(t,e){var n=this;if(!1===t.getOptions().tooltip)return[];var i=[],o=t.geometries,a=this.getTooltipCfg(),s=a.shared,u=a.title;return r.each(o,(function(t){if(t.visible&&!1!==t.tooltipOption){var r,o=t.type;(r=["point","edge","polygon"].includes(o)?n.getTooltipItemsByHitShape(t,e,u):["area","line","path","heatmap"].includes(o)||!1!==s?n.getTooltipItemsByFindData(t,e,u):n.getTooltipItemsByHitShape(t,e,u)).length&&i.push(r)}})),r.each(t.views,(function(t){i=i.concat(n.findItemsFromView(t,e))})),i},e.prototype.getViewWithGeometry=function(t){var e=this;return t.geometries.length?t:r.find(t.views,(function(t){return e.getViewWithGeometry(t)}))},e}(n(21).Controller);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(10),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.show=function(){var t=this.context.view,e=this.context.event,n=t.getTooltipItems({x:e.x,y:e.y});if(!r.isEqual(n,this.items)&&(this.items=n,n.length)){var i=t.getXScale().field,a=n[0].data[i],s=[],u=t.geometries;if(r.each(u,(function(t){if("interval"===t.type||"schema"===t.type){var e=t.getElementsBy((function(t){return t.getData()[i]===a}));s=s.concat(e)}})),s.length){var c=t.getCoordinate(),l=s[0].shape.getCanvasBBox(),h=s[0].shape.getCanvasBBox(),p=l;r.each(s,(function(t){var e=t.shape.getCanvasBBox();c.isTransposed?(e.minYh.maxY&&(h=e)):(e.minXh.maxX&&(h=e)),p.x=Math.min(e.minX,p.minX),p.y=Math.min(e.minY,p.minY),p.width=Math.max(e.maxX,p.maxX)-p.x,p.height=Math.max(e.maxY,p.maxY)-p.y}));var f=t.backgroundGroup,d=t.coordinateBBox,g=void 0;if(c.isRect){var y=t.getXScale().isLinear?0:.25,v=void 0,m=void 0,x=void 0,b=void 0;c.isTransposed?(v=d.minX,m=Math.min(h.minY,l.minY)-y*h.height,x=d.width,b=p.height+2*y*h.height):(v=Math.min(l.minX,h.minX)-y*l.width,m=Math.min(d.minY,l.minY),x=p.width+2*y*l.width,b=d.height),g=[["M",v,m],["L",v+x,m],["L",v+x,m+b],["L",v,m+b],["Z"]]}else{var M=r.head(s),_=r.last(s),w=o.getAngle(M.getModel(),c).startAngle,O=o.getAngle(_.getModel(),c).endAngle,C=c.getCenter(),S=c.getRadius(),A=c.innerRadius*S;g=o.getSectorPath(C.x,C.y,S,w,O,A)}this.regionPath?(this.regionPath.attr("path",g),this.regionPath.show()):this.regionPath=f.addShape({type:"path",name:"active-region",capture:!1,attrs:{path:g,fill:"#CCD6EC",opacity:.3}})}}},e.prototype.hide=function(){this.regionPath&&this.regionPath.hide(),this.items=null},e.prototype.destroy=function(){this.hide(),this.regionPath&&this.regionPath.remove(!0),t.prototype.destroy.call(this)},e}(i.__importDefault(n(8)).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(5),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.showTooltip=function(t,e){var n=o.getSilbings(t);r.each(n,(function(n){var i=o.getSiblingPoint(t,n,e);n.showTooltip(i)}))},e.prototype.hideTooltip=function(t){var e=o.getSilbings(t);r.each(e,(function(t){t.hideTooltip()}))},e}(i.__importDefault(n(84)).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e}return i.__extends(e,t),e.prototype.active=function(){this.setState()},e}(i.__importDefault(n(52)).default);e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=i.__importDefault(n(8)),o=n(5),a=n(0),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cache={},e}return i.__extends(e,t),e.prototype.getColorScale=function(t,e){var n=e.geometry.getAttribute("color");return n?t.getScaleByField(n.getFields()[0]):null},e.prototype.getLinkPath=function(t,e){var n=t.shape.getCanvasBBox(),i=e.shape.getCanvasBBox();return[["M",n.maxX,n.minY],["L",i.minX,i.minY],["L",i.minX,i.maxY],["L",n.maxX,n.maxY],["Z"]]},e.prototype.addLinkShape=function(t,e,n){t.addShape({type:"path",attrs:{opacity:.4,fill:e.shape.attr("fill"),path:this.getLinkPath(e,n)}})},e.prototype.linkByElement=function(t){var e=this,n=this.context.view,i=this.getColorScale(n,t);if(i){var r=o.getElementValue(t,i.field);if(!this.cache[r]){var s=o.getElementsByField(n,i.field,r),u=this.linkGroup.addGroup();this.cache[r]=u;var c=s.length;a.each(s,(function(t,n){if(n=0}),e)},e}(i.__importDefault(n(54)).default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(5),o=n(57),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e}return i.__extends(e,t),e.prototype.highlight=function(){this.setState()},e.prototype.setElementState=function(t,e){var n=this.context.view,i=r.getElements(n);o.setHighlightBy(i,(function(e){return t===e}),e)},e.prototype.clear=function(){var t=this.context.view;o.clearHighlight(t)},e}(i.__importDefault(n(55)).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return i.__extends(e,t),e.prototype.selected=function(){this.setState()},e}(i.__importDefault(n(54)).default);e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return i.__extends(e,t),e.prototype.selected=function(){this.setState()},e}(i.__importDefault(n(52)).default);e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return i.__extends(e,t),e.prototype.selected=function(){this.setState()},e}(i.__importDefault(n(55)).default);e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e}return i.__extends(e,t),e.prototype.active=function(){this.setState()},e}(i.__importDefault(n(34)).default);e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(213),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e.ignoreItemStates=["unchecked"],e}return i.__extends(e,t),e.prototype.setItemsState=function(t,e,n){this.setHighlightBy(t,(function(t){return t.name===e}),n)},e.prototype.setItemState=function(t,e,n){t.getItems(),this.setHighlightBy(t,(function(t){return t===e}),n)},e.prototype.setHighlightBy=function(t,e,n){var i=t.getItems();if(n)r.each(i,(function(n){e(n)?(t.hasState(n,"inactive")&&t.setItemState(n,"inactive",!1),t.setItemState(n,"active",!0)):t.hasState(n,"active")||t.setItemState(n,"inactive",!0)}));else{var o=t.getItemsByState("active"),a=!0;r.each(o,(function(t){if(!e(t))return a=!1,!1})),a?this.clear():r.each(i,(function(n){e(n)&&(t.hasState(n,"active")&&t.setItemState(n,"active",!1),t.setItemState(n,"inactive",!0))}))}},e.prototype.highlight=function(){this.setState()},e.prototype.clear=function(){var t=this.getTriggerListInfo();if(t)o.clearList(t.list);else{var e=this.getAllowComponents();r.each(e,(function(t){t.clearItemsState("active"),t.clearItemsState("inactive")}))}},e}(i.__importDefault(n(34)).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0);e.clearList=function(t){var e=t.getItems();i.each(e,(function(e){t.hasState(e,"active")&&t.setItemState(e,"active",!1),t.hasState(e,"inactive")&&t.setItemState(e,"inactive",!1)}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return i.__extends(e,t),e.prototype.selected=function(){this.setState()},e}(i.__importDefault(n(34)).default);e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="unchecked",e}return i.__extends(e,t),e.prototype.unchecked=function(){this.setState()},e}(i.__importDefault(n(34)).default);e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(5),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shapeType="circle",e}return i.__extends(e,t),e.prototype.getMaskAttrs=function(){var t=this.points,e=r.last(this.points),n=0,i=0,a=0;if(t.length){var s=t[0];n=o.distance(s,e)/2,i=(e.x+s.x)/2,a=(e.y+s.y)/2}return{x:i,y:a,r:n}},e}(i.__importDefault(n(58)).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0);function o(t){t.x=r.clamp(t.x,0,1),t.y=r.clamp(t.y,0,1)}var a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dim="x",e.inPlot=!0,e}return i.__extends(e,t),e.prototype.getRegion=function(){var t=null,e=null,n=this.points,i=this.dim,a=this.context.view.getCoordinate(),s=a.invert(r.head(n)),u=a.invert(r.last(n));return this.inPlot&&(o(s),o(u)),"x"===i?(t=a.convert({x:s.x,y:0}),e=a.convert({x:u.x,y:1})):(t=a.convert({x:0,y:s.y}),e=a.convert({x:1,y:u.y})),{start:t,end:e}},e}(i.__importDefault(n(85)).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(5),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.getMaskPath=function(){var t=this.points;return r.getSpline(t,!0)},e}(i.__importDefault(n(86)).default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.setCursor=function(t){this.context.view.getCanvas().setCursor(t)},e.prototype.default=function(){this.setCursor("default")},e.prototype.pointer=function(){this.setCursor("pointer")},e.prototype.move=function(){this.setCursor("move")},e.prototype.crosshair=function(){this.setCursor("crosshair")},e.prototype.wait=function(){this.setCursor("wait")},e.prototype.help=function(){this.setCursor("help")},e.prototype.text=function(){this.setCursor("text")},e.prototype.eResize=function(){this.setCursor("e-resize")},e.prototype.wResize=function(){this.setCursor("w-resize")},e.prototype.nResize=function(){this.setCursor("n-resize")},e.prototype.sResize=function(){this.setCursor("s-resize")},e.prototype.neResize=function(){this.setCursor("ne-resize")},e.prototype.nwResize=function(){this.setCursor("nw-resize")},e.prototype.seResize=function(){this.setCursor("se-resize")},e.prototype.swResize=function(){this.setCursor("sw-resize")},e.prototype.nsResize=function(){this.setCursor("ns-resize")},e.prototype.ewResize=function(){this.setCursor("ew-resize")},e}(i.__importDefault(n(8)).default);e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=i.__importDefault(n(8)),a=n(5),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.filterView=function(t,e,n){var i=this;t.getScaleByField(e)&&t.filter(e,n),t.views&&t.views.length&&r.each(t.views,(function(t){i.filterView(t,e,n)}))},e.prototype.filter=function(){var t=a.getDelegationObject(this.context);if(t){var e=this.context.view,n=t.component,i=n.get("field");if(a.isList(t)){if(i){var r=n.getItemsByState("unchecked"),o=a.getScaleByField(e,i),s=r.map((function(t){return t.name}));s.length?this.filterView(e,i,(function(t){var e=o.getText(t);return!s.includes(e)})):this.filterView(e,i,null),e.render(!0)}}else if(a.isSlider(t)){var u=n.getValue(),c=u[0],l=u[1];this.filterView(e,i,(function(t){return t>=c&&t<=l})),e.render(!0)}}},e}(o.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=i.__importDefault(n(87)),a=n(5),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.filterView=function(t,e,n){var i=a.getSilbings(t);r.each(i,(function(t){t.filter(e,n)}))},e.prototype.reRender=function(t){var e=a.getSilbings(t);r.each(e,(function(t){t.render(!0)}))},e}(o.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=i.__importDefault(n(8)),a=n(5),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.filter=function(){var t=a.getDelegationObject(this.context),e=this.context.view,n=a.getElements(e);if(a.isMask(this.context)){var i=a.getMaskedElements(this.context,10);i&&r.each(n,(function(t){i.includes(t)?t.show():t.hide()}))}else if(t){var o=t.component,s=o.get("field");if(a.isList(t)){if(s){var u=o.getItemsByState("unchecked"),c=a.getScaleByField(e,s),l=u.map((function(t){return t.name}));r.each(n,(function(t){var e=a.getElementValue(t,s),n=c.getText(e);l.indexOf(n)>=0?t.hide():t.show()}))}}else if(a.isSlider(t)){var h=o.getValue(),p=h[0],f=h[1];r.each(n,(function(t){var e=a.getElementValue(t,s);e>=p&&e<=f?t.show():t.hide()}))}}},e.prototype.clear=function(){var t=a.getElements(this.context.view);r.each(t,(function(t){t.show()}))},e.prototype.reset=function(){this.clear()},e}(o.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=i.__importDefault(n(8)),a=n(5),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.byRecord=!1,e}return i.__extends(e,t),e.prototype.filter=function(){a.isMask(this.context)&&(this.byRecord?this.filterByRecord():this.filterByBBox())},e.prototype.filterByRecord=function(){var t=this.context.view,e=a.getMaskedElements(this.context,10);if(e){var n=t.getXScale().field,i=t.getYScales()[0].field,o=e.map((function(t){return t.getModel().data})),s=a.getSilbings(t);r.each(s,(function(t){var e=a.getElements(t);r.each(e,(function(t){var e=t.getModel().data;a.isInRecords(o,e,n,i)?t.show():t.hide()}))}))}},e.prototype.filterByBBox=function(){var t=this,e=this.context.view,n=a.getSilbings(e);r.each(n,(function(e){var n=a.getSiblingMaskElements(t.context,e,10),i=a.getElements(e);n&&r.each(i,(function(t){n.includes(t)?t.show():t.hide()}))}))},e.prototype.reset=function(){var t=a.getSilbings(this.context.view);r.each(t,(function(t){var e=a.getElements(t);r.each(e,(function(t){t.show()}))}))},e}(o.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(2),o=n(0),a=n(44),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.buttonGroup=null,e.buttonCfg={name:"button",text:"button",textStyle:{x:0,y:0,fontSize:12,fill:"#333333",cursor:"pointer"},padding:[8,10],style:{fill:"#f7f7f7",stroke:"#cccccc",cursor:"pointer"},activeStyle:{fill:"#e6e6e6"}},e}return i.__extends(e,t),e.prototype.getButtonCfg=function(){return o.deepMix(this.buttonCfg,this.cfg)},e.prototype.drawButton=function(){var t=this.getButtonCfg(),e=this.context.view.foregroundGroup.addGroup({name:t.name}),n=e.addShape({type:"text",name:"button-text",attrs:i.__assign({text:t.text},t.textStyle)}).getBBox(),r=a.parsePadding(t.padding),o=e.addShape({type:"rect",name:"button-rect",attrs:i.__assign({x:n.x-r[3],y:n.y-r[0],width:n.width+r[1]+r[3],height:n.height+r[0]+r[2]},t.style)});o.toBack(),e.on("mouseenter",(function(){o.attr(t.activeStyle)})),e.on("mouseleave",(function(){o.attr(t.style)})),this.buttonGroup=e},e.prototype.resetPosition=function(){var t=this.context.view.getCoordinate().convert({x:1,y:1}),e=this.buttonGroup,n=e.getBBox(),i=r.transform(null,[["t",t.x-n.width-10,t.y+n.height+5]]);e.setMatrix(i)},e.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},e.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},e.prototype.destroy=function(){var e=this.buttonGroup;e&&e.remove(),t.prototype.destroy.call(this)},e}(i.__importDefault(n(8)).default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=i.__importDefault(n(8)),o=n(5),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.starting=!1,e.dragStart=!1,e}return i.__extends(e,t),e.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint()},e.prototype.drag=function(){if(this.startPoint){var t=this.context.getCurrentPoint(),e=this.context.view,n=this.context.event;this.dragStart?e.emit("drag",{target:n.target,x:n.x,y:n.y}):o.distance(t,this.startPoint)>4&&(e.emit("dragstart",{target:n.target,x:n.x,y:n.y}),this.dragStart=!0)}},e.prototype.end=function(){if(this.dragStart){var t=this.context.view,e=this.context.event;t.emit("dragend",{target:e.target,x:e.x,y:e.y})}this.starting=!1,this.dragStart=!1},e}(r.default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(2),o=n(45),a=n(5),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.starting=!1,e.isMoving=!1,e.startPoint=null,e.startMatrix=null,e}return i.__extends(e,t),e.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint(),this.startMatrix=this.context.view.middleGroup.getMatrix()},e.prototype.move=function(){if(this.starting){var t=this.startPoint,e=this.context.getCurrentPoint();if(a.distance(t,e)>5&&!this.isMoving&&(this.isMoving=!0),this.isMoving){var n=this.context.view,i=r.transform(this.startMatrix,[["t",e.x-t.x,e.y-t.y]]);n.backgroundGroup.setMatrix(i),n.foregroundGroup.setMatrix(i),n.middleGroup.setMatrix(i)}}},e.prototype.end=function(){this.isMoving&&(this.isMoving=!1),this.startMatrix=null,this.starting=!1,this.startPoint=null},e.prototype.reset=function(){this.starting=!1,this.startPoint=null,this.isMoving=!1;var t=this.context.view;t.backgroundGroup.resetMatrix(),t.foregroundGroup.resetMatrix(),t.middleGroup.resetMatrix(),this.isMoving=!1},e}(o.Action);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.startPoint=null,e.starting=!1,e.startCache={},e}return i.__extends(e,t),e.prototype.start=function(){var t=this;this.startPoint=this.context.getCurrentPoint(),this.starting=!0;var e=this.dims;r.each(e,(function(e){var n=t.getScale(e),i=n.min,r=n.max,o=n.values;t.startCache[e]={min:i,max:r,values:o}}))},e.prototype.end=function(){this.startPoint=null,this.starting=!1,this.startCache={}},e.prototype.translate=function(){var t=this;if(this.starting){var e=this.startPoint,n=this.context.view.getCoordinate(),i=this.context.getCurrentPoint(),o=n.invert(e),a=n.invert(i),s=a.x-o.x,u=a.y-o.y,c=this.context.view,l=this.dims;r.each(l,(function(e){t.translateDim(e,{x:-1*s,y:-1*u})})),c.render(!0)}},e.prototype.translateDim=function(t,e){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.translateLinear(t,n,e)}},e.prototype.translateLinear=function(t,e,n){var i=this.context.view,r=this.startCache[t],o=r.min,a=r.max,s=a-o,u=n[t]*s;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:e.nice,min:o,max:a}),i.scale(e.field,{nice:!1,min:o+u,max:a+u})},e.prototype.reset=function(){t.prototype.reset.call(this),this.startPoint=null,this.starting=!1},e}(i.__importDefault(n(88)).default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.zoomRatio=.05,e}return i.__extends(e,t),e.prototype.zoomIn=function(){this.zoom(this.zoomRatio)},e.prototype.zoom=function(t){var e=this,n=this.dims;r.each(n,(function(n){e.zoomDim(n,t)})),this.context.view.render(!0)},e.prototype.zoomOut=function(){this.zoom(-1*this.zoomRatio)},e.prototype.zoomDim=function(t,e){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.zoomLinear(t,n,e)}},e.prototype.zoomLinear=function(t,e,n){var i=this.context.view;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:e.nice,min:e.min,max:e.max});var r=this.cacheScaleDefs[t],o=r.max-r.min,a=e.min,s=e.max,u=n*o,c=a-u,l=s+u,h=(l-c)/o;l>c&&h<100&&h>.01&&i.scale(e.field,{nice:!1,min:a-u,max:s+u})},e}(i.__importDefault(n(88)).default);e.default=o},function(t,e,n){"use strict";n.r(e),n.d(e,"Component",(function(){return T})),n.d(e,"GroupComponent",(function(){return L})),n.d(e,"HtmlComponent",(function(){return Ct})),n.d(e,"Axis",(function(){return u})),n.d(e,"Annotation",(function(){return i})),n.d(e,"Grid",(function(){return l})),n.d(e,"Legend",(function(){return h})),n.d(e,"Tooltip",(function(){return f})),n.d(e,"Crosshair",(function(){return c})),n.d(e,"Slider",(function(){return $t})),n.d(e,"Scrollbar",(function(){return Jt}));var i={};n.r(i),n.d(i,"Line",(function(){return D})),n.d(i,"Text",(function(){return F})),n.d(i,"Arc",(function(){return R})),n.d(i,"Region",(function(){return N})),n.d(i,"Image",(function(){return Y})),n.d(i,"DataMarker",(function(){return X})),n.d(i,"DataRegion",(function(){return G})),n.d(i,"RegionFilter",(function(){return z}));var r={};n.r(r),n.d(r,"getDefault",(function(){return U})),n.d(r,"ellipsisHead",(function(){return Q})),n.d(r,"ellipsisTail",(function(){return Z})),n.d(r,"ellipsisMiddle",(function(){return $}));var o={};n.r(o),n.d(o,"getDefault",(function(){return nt})),n.d(o,"reserveFirst",(function(){return it})),n.d(o,"reserveLast",(function(){return rt})),n.d(o,"reserveBoth",(function(){return ot})),n.d(o,"equidistance",(function(){return at}));var a={};n.r(a),n.d(a,"getDefault",(function(){return ut})),n.d(a,"fixedAngle",(function(){return ct})),n.d(a,"unfixedAngle",(function(){return lt}));var s={};n.r(s),n.d(s,"autoHide",(function(){return o})),n.d(s,"autoRotate",(function(){return a})),n.d(s,"autoEllipsis",(function(){return r}));var u={};n.r(u),n.d(u,"Line",(function(){return pt})),n.d(u,"Circle",(function(){return ft})),n.d(u,"Base",(function(){return H}));var c={};n.r(c),n.d(c,"Line",(function(){return gt})),n.d(c,"Circle",(function(){return yt})),n.d(c,"Base",(function(){return dt}));var l={};n.r(l),n.d(l,"Base",(function(){return vt})),n.d(l,"Circle",(function(){return mt})),n.d(l,"Line",(function(){return xt}));var h={};n.r(h),n.d(h,"Category",(function(){return Mt})),n.d(h,"Continuous",(function(){return _t})),n.d(h,"Base",(function(){return bt}));var p={};n.r(p),n.d(p,"CONTAINER_CLASS",(function(){return St})),n.d(p,"TITLE_CLASS",(function(){return At})),n.d(p,"LIST_CLASS",(function(){return Pt})),n.d(p,"LIST_ITEM_CLASS",(function(){return jt})),n.d(p,"MARKER_CLASS",(function(){return kt})),n.d(p,"VALUE_CLASS",(function(){return Tt})),n.d(p,"NAME_CLASS",(function(){return Et})),n.d(p,"CROSSHAIR_X",(function(){return It})),n.d(p,"CROSSHAIR_Y",(function(){return Lt}));var f={};n.r(f),n.d(f,"Html",(function(){return Ft}));var d=n(1),g=n(0),y=n(60),v=n.n(y),m=n(2),x=[1,0,0,0,1,0,0,0,1];function b(t,e){return e?Object(m.transform)(x,[["t",-t.x,-t.y],["r",e],["t",t.x,t.y]]):null}function M(t,e){return t.x||t.y?Object(m.transform)(e||x,[["t",t.x,t.y]]):null}function _(t,e){var n=[];return m.vec2.transformMat3(n,e,t),n}function w(t){var e=0,n=0,i=0,r=0;return Object(g.isNumber)(t)?e=n=i=r=t:Object(g.isArray)(t)&&(e=t[0],i=Object(g.isNil)(t[1])?t[0]:t[1],r=Object(g.isNil)(t[2])?t[0]:t[2],n=Object(g.isNil)(t[3])?i:t[3]),[e,i,r,n]}function O(t){for(var e=t.childNodes,n=e.length-1;n>=0;n--)t.removeChild(e[n])}function C(t){var e=t.start,n=t.end,i=Math.min(e.x,n.x),r=Math.min(e.y,n.y),o=Math.max(e.x,n.x),a=Math.max(e.y,n.y);return{x:i,y:r,minX:i,minY:r,maxX:o,maxY:a,width:o-i,height:a-r}}function S(t,e,n,i){return{x:t,y:e,width:n,height:i,minX:t,minY:e,maxX:t+n,maxY:e+i}}function A(t,e,n){return(1-n)*t+e*n}function P(t,e,n){return{x:t.x+Math.cos(n)*e,y:t.y+Math.sin(n)*e}}var j=n(63),k={none:[],point:["x","y"],region:["start","end"],points:["points"],circle:["center","radius","startAngle","endAngle"]},T=function(t){function e(e){var n=t.call(this,e)||this;return n.initCfg(),n}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){return{id:"",name:"",type:"",locationType:"none",offsetX:0,offsetY:0,animate:!1,capture:!0,updateAutoRender:!1,animateOption:{appear:null,update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},events:null,defaultCfg:{},visible:!0}},e.prototype.clear=function(){},e.prototype.update=function(t){var e=this,n=this.get("defaultCfg");Object(g.each)(t,(function(t,i){var r=t;e.get(i)!==t&&(Object(g.isObject)(t)&&n[i]&&(r=Object(g.deepMix)({},n[i],t)),e.set(i,r))})),Object(g.hasKey)(t,"visible")&&(t.visible?this.show():this.hide()),Object(g.hasKey)(t,"capture")&&this.setCapture(t.capture)},e.prototype.getLayoutBBox=function(){return this.getBBox()},e.prototype.getLocationType=function(){return this.get("locationType")},e.prototype.getOffset=function(){return{offsetX:this.get("offsetX"),offsetY:this.get("offsetY")}},e.prototype.setOffset=function(t,e){this.update({offsetX:t,offsetY:e})},e.prototype.setLocation=function(t){var e=Object(d.__assign)({},t);this.update(e)},e.prototype.getLocation=function(){var t=this,e={},n=this.get("locationType"),i=k[n];return Object(g.each)(i,(function(n){e[n]=t.get(n)})),e},e.prototype.isList=function(){return!1},e.prototype.isSlider=function(){return!1},e.prototype.init=function(){},e.prototype.initCfg=function(){var t=this,e=this.get("defaultCfg");Object(g.each)(e,(function(e,n){var i=t.get(n);if(Object(g.isObject)(i)){var r=Object(g.deepMix)({},e,i);t.set(n,r)}}))},e}(j.Base),E=["visible","tip","delegateObject"],I=["container","group","shapesMap","isRegister","isUpdating","destroyed"],L=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{container:null,shapesMap:{},group:null,capture:!0,isRegister:!1,isUpdating:!1,isInit:!0})},e.prototype.remove=function(){this.clear(),this.get("group").remove()},e.prototype.clear=function(){this.get("group").clear(),this.set("shapesMap",{}),this.clearOffScreenCache(),this.set("isInit",!0)},e.prototype.getChildComponentById=function(t){var e=this.getElementById(t);return e&&e.get("component")},e.prototype.getElementById=function(t){return this.get("shapesMap")[t]},e.prototype.getElementByLocalId=function(t){var e=this.getElementId(t);return this.getElementById(e)},e.prototype.getElementsByName=function(t){var e=[];return Object(g.each)(this.get("shapesMap"),(function(n){n.get("name")===t&&e.push(n)})),e},e.prototype.getContainer=function(){return this.get("container")},e.prototype.update=function(e){t.prototype.update.call(this,e),this.offScreenRender(),this.get("updateAutoRender")&&this.render()},e.prototype.render=function(){var t=this.get("offScreenGroup");t||(t=this.offScreenRender());var e=this.get("group");this.updateElements(t,e),this.deleteElements(),this.applyOffset(),this.get("eventInitted")||(this.initEvent(),this.set("eventInitted",!0)),this.set("isInit",!1)},e.prototype.show=function(){this.get("group").show(),this.set("visible",!0)},e.prototype.hide=function(){this.get("group").hide(),this.set("visible",!1)},e.prototype.setCapture=function(t){this.get("group").set("capture",t),this.set("capture",t)},e.prototype.destroy=function(){this.removeEvent(),this.remove(),t.prototype.destroy.call(this)},e.prototype.getBBox=function(){return this.get("group").getCanvasBBox()},e.prototype.getLayoutBBox=function(){var t=this.get("group"),e=this.getInnerLayoutBBox(),n=t.getTotalMatrix();return n&&(e=function(t,e){var n=_(t,[e.minX,e.minY]),i=_(t,[e.maxX,e.minY]),r=_(t,[e.minX,e.maxY]),o=_(t,[e.maxX,e.maxY]),a=Math.min(n[0],i[0],r[0],o[0]),s=Math.max(n[0],i[0],r[0],o[0]),u=Math.min(n[1],i[1],r[1],o[1]),c=Math.max(n[1],i[1],r[1],o[1]);return{x:a,y:u,minX:a,minY:u,maxX:s,maxY:c,width:s-a,height:c-u}}(n,e)),e},e.prototype.on=function(t,e,n){return this.get("group").on(t,e,n),this},e.prototype.off=function(t,e){var n=this.get("group");return n&&n.off(t,e),this},e.prototype.emit=function(t,e){this.get("group").emit(t,e)},e.prototype.init=function(){t.prototype.init.call(this),this.get("group")||this.initGroup(),this.offScreenRender()},e.prototype.getInnerLayoutBBox=function(){return this.get("offScreenBBox")||this.get("group").getBBox()},e.prototype.delegateEmit=function(t,e){var n=this.get("group");e.target=n,n.emit(t,e),function(t,e,n){var i=new v.a(e,n);i.target=t,i.propagationPath.push(t),t.emitDelegation(e,i);for(var r=t.getParent();r;)r.emitDelegation(e,i),i.propagationPath.push(r),r=r.getParent()}(n,t,e)},e.prototype.createOffScreenGroup=function(){return new(this.get("group").getGroupBase())({delegateObject:this.getDelegateObject()})},e.prototype.applyOffset=function(){var t=this.get("offsetX"),e=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t,y:e})},e.prototype.initGroup=function(){var t=this.get("container");this.set("group",t.addGroup({id:this.get("id"),name:this.get("name"),capture:this.get("capture"),visible:this.get("visible"),isComponent:!0,component:this,delegateObject:this.getDelegateObject()}))},e.prototype.offScreenRender=function(){this.clearOffScreenCache();var t=this.createOffScreenGroup();return this.renderInner(t),this.set("offScreenGroup",t),this.set("offScreenBBox",function t(e){var n,i,r,o,a,s=e.getClip(),u=s&&s.getBBox();if(e.isGroup()){var c=1/0,l=-1/0,h=1/0,p=-1/0,f=e.getChildren();f.length>0?Object(g.each)(f,(function(e){if(e.get("visible")){if(e.isGroup()&&0===e.get("children").length)return!0;var n=t(e),i=e.applyToMatrix([n.minX,n.minY,1]),r=e.applyToMatrix([n.minX,n.maxY,1]),o=e.applyToMatrix([n.maxX,n.minY,1]),a=e.applyToMatrix([n.maxX,n.maxY,1]),s=Math.min(i[0],r[0],o[0],a[0]),u=Math.max(i[0],r[0],o[0],a[0]),f=Math.min(i[1],r[1],o[1],a[1]),d=Math.max(i[1],r[1],o[1],a[1]);sl&&(l=u),fp&&(p=d)}})):(c=0,l=0,h=0,p=0),n=S(c,h,l-c,p-h)}else n=e.getBBox();return u?(i=n,r=u,S(o=Math.max(i.minX,r.minX),a=Math.max(i.minY,r.minY),Math.min(i.maxX,r.maxX)-o,Math.min(i.maxY,r.maxY)-a)):n}(t)),t},e.prototype.addGroup=function(t,e){this.appendDelegateObject(t,e);var n=t.addGroup(e);return this.get("isRegister")&&this.registerElement(n),n},e.prototype.addShape=function(t,e){this.appendDelegateObject(t,e);var n=t.addShape(e);return this.get("isRegister")&&this.registerElement(n),n},e.prototype.addComponent=function(t,e){var n=e.id,i=e.component,r=Object(d.__rest)(e,["id","component"]),o=new i(Object(d.__assign)(Object(d.__assign)({},r),{id:n,container:t,updateAutoRender:this.get("updateAutoRender")}));return o.init(),o.render(),this.get("isRegister")&&this.registerElement(o.get("group")),o},e.prototype.initEvent=function(){},e.prototype.removeEvent=function(){this.get("group").off()},e.prototype.getElementId=function(t){return this.get("id")+"-"+this.get("name")+"-"+t},e.prototype.registerElement=function(t){var e=t.get("id");this.get("shapesMap")[e]=t},e.prototype.unregisterElement=function(t){var e=t.get("id");delete this.get("shapesMap")[e]},e.prototype.moveElementTo=function(t,e){var n=M(e);t.attr("matrix",n)},e.prototype.addAnimation=function(t,e,n){var i=e.attr("opacity");Object(g.isNil)(i)&&(i=1),e.attr("opacity",0),e.animate({opacity:i},n)},e.prototype.removeAnimation=function(t,e,n){e.animate({opacity:0},n)},e.prototype.updateAnimation=function(t,e,n,i){e.animate(n,i)},e.prototype.updateElements=function(t,e){var n,i=this,r=this.get("animate"),o=this.get("animateOption"),a=t.getChildren().slice(0);Object(g.each)(a,(function(t){var a=t.get("id"),s=i.getElementById(a),u=t.get("name");if(s)if(t.get("isComponent")){var c=t.get("component"),l=s.get("component"),h=Object(g.pick)(c.cfg,Object(g.difference)(Object(g.keys)(c.cfg),I));l.update(h),s.set("update_status","update")}else{var p=i.getReplaceAttrs(s,t);r&&o.update?i.updateAnimation(u,s,p,o.update):s.attr(p),t.isGroup()&&i.updateElements(t,s),Object(g.each)(E,(function(e){s.set(e,t.get(e))})),function(t,e){if(t.getClip()||e.getClip()){var n=e.getClip();if(n){var i={type:n.get("type"),attrs:n.attr()};t.setClip(i)}else t.setClip(null)}}(s,t),n=s,s.set("update_status","update")}else{e.add(t);var f=e.getChildren();if(f.splice(f.length-1,1),n){var d=f.indexOf(n);f.splice(d+1,0,t)}else f.unshift(t);if(i.registerElement(t),t.set("update_status","add"),t.get("isComponent")?(c=t.get("component")).set("container",e):t.isGroup()&&i.registerNewGroup(t),n=t,r){var y=i.get("isInit")?o.appear:o.enter;y&&i.addAnimation(u,t,y)}}}))},e.prototype.clearUpdateStatus=function(t){var e=t.getChildren();Object(g.each)(e,(function(t){t.set("update_status",null)}))},e.prototype.clearOffScreenCache=function(){var t=this.get("offScreenGroup");t&&t.destroy(),this.set("offScreenGroup",null),this.set("offScreenBBox",null)},e.prototype.getDelegateObject=function(){var t;return(t={})[this.get("name")]=this,t.component=this,t},e.prototype.appendDelegateObject=function(t,e){var n=t.get("delegateObject");e.delegateObject||(e.delegateObject={}),Object(g.mix)(e.delegateObject,n)},e.prototype.getReplaceAttrs=function(t,e){var n=t.attr(),i=e.attr();return Object(g.each)(n,(function(t,e){void 0===i[e]&&(i[e]=void 0)})),i},e.prototype.registerNewGroup=function(t){var e=this,n=t.getChildren();Object(g.each)(n,(function(t){e.registerElement(t),t.set("update_status","add"),t.isGroup()&&e.registerNewGroup(t)}))},e.prototype.deleteElements=function(){var t=this,e=this.get("shapesMap"),n=[];Object(g.each)(e,(function(t,e){!t.get("update_status")||t.destroyed?n.push([e,t]):t.set("update_status",null)}));var i=this.get("animate"),r=this.get("animateOption");Object(g.each)(n,(function(n){var o=n[0],a=n[1];if(!a.destroyed){var s=a.get("name");if(i&&r.leave){var u=Object(g.mix)({callback:function(){t.removeElement(a)}},r.leave);t.removeAnimation(s,a,u)}else t.removeElement(a)}delete e[o]}))},e.prototype.removeElement=function(t){if(t.get("isGroup")){var e=t.get("component");e&&e.destroy()}t.remove()},e}(T),B={fontFamily:'\n "-apple-system", BlinkMacSystemFont, "Segoe UI", Roboto,"Helvetica Neue",\n Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",\n SimSun, "sans-serif"',textColor:"#2C3542",activeTextColor:"#333333",uncheckedColor:"#D8D8D8",lineColor:"#416180",regionColor:"#CCD7EB",verticalAxisRotate:-Math.PI/4,horizontalAxisRotate:Math.PI/4},D=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"line",locationType:"region",start:null,end:null,style:{},text:null,defaultCfg:{style:{fill:B.textColor,fontSize:12,textAlign:"center",textBaseline:"bottom",fontFamily:B.fontFamily},text:{position:"center",autoRotate:!0,content:null,offsetX:0,offsetY:0,style:{stroke:B.lineColor,lineWidth:1}}}})},e.prototype.renderInner=function(t){this.renderLine(t),this.get("text")&&this.renderLabel(t)},e.prototype.renderLine=function(t){var e=this.get("start"),n=this.get("end"),i=this.get("style");this.addShape(t,{type:"line",id:this.getElementId("line"),name:"annotation-line",attrs:Object(d.__assign)({x1:e.x,y1:e.y,x2:n.x,y2:n.y},i)})},e.prototype.getLabelPoint=function(t,e,n){var i;return((i="start"===n?0:"center"===n?.5:Object(g.isString)(n)&&-1!==n.indexOf("%")?parseInt(n,10)/100:Object(g.isNumber)(n)?n:1)>1||i<0)&&(i=1),{x:A(t.x,e.x,i),y:A(t.y,e.y,i)}},e.prototype.renderLabel=function(t){var e=this.get("text"),n=this.get("start"),i=this.get("end"),r=e.position,o=e.content,a=e.style,s=e.offsetX,u=e.offsetY,c=e.autoRotate,l=this.getLabelPoint(n,i,r),h=Object(d.__assign)({x:l.x+s,y:l.y+u,text:o},a);if(c){var p=[i.x-n.x,i.y-n.y],f=b(l,Math.atan2(p[1],p[0]));h.matrix=f}this.addShape(t,{type:"text",id:this.getElementId("line-text"),name:"annotation-line-text",attrs:h})},e}(L),F=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"text",locationType:"point",x:0,y:0,content:"",rotate:null,style:{},defaultCfg:{style:{fill:B.textColor,fontSize:12,textAlign:"center",textBaseline:"middle",fontFamily:B.fontFamily}}})},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},e.prototype.renderInner=function(t){this.renderText(t)},e.prototype.renderText=function(t){var e=this.getLocation(),n=e.x,i=e.y,r=this.get("content"),o=this.get("style"),a=this.addShape(t,{type:"text",id:this.getElementId("text"),name:"annotation-text",attrs:Object(d.__assign)({x:n,y:i,text:r},o)});this.applyRotate(a,n,i)},e.prototype.applyRotate=function(t,e,n){var i=this.get("rotate"),r=null;i&&(r=b({x:e,y:n},i)),t.attr("matrix",r)},e.prototype.resetLocation=function(){var t=this.getElementByLocalId("text");if(t){var e=this.getLocation(),n=e.x,i=e.y;t.attr({x:n,y:i}),this.applyRotate(t,n,i)}},e}(L),R=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"arc",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:3*Math.PI/2,style:{stroke:"#999",lineWidth:1}})},e.prototype.renderInner=function(t){this.renderArc(t)},e.prototype.getArcPath=function(){var t=this.getLocation(),e=t.center,n=t.radius,i=t.startAngle,r=t.endAngle,o=P(e,n,i),a=P(e,n,r),s=r-i>Math.PI?1:0,u=[["M",o.x,o.y]];if(r-i==2*Math.PI){var c=P(e,n,i+Math.PI);u.push(["A",n,n,0,s,1,c.x,c.y]),u.push(["A",n,n,0,s,1,a.x,a.y])}else u.push(["A",n,n,0,s,1,a.x,a.y]);return u},e.prototype.renderArc=function(t){var e=this.getArcPath(),n=this.get("style");this.addShape(t,{type:"path",id:this.getElementId("arc"),name:"annotation-arc",attrs:Object(d.__assign)({path:e},n)})},e}(L),N=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"region",locationType:"region",start:null,end:null,style:{},defaultCfg:{style:{lineWidth:0,fill:B.regionColor,opacity:.4}}})},e.prototype.renderInner=function(t){this.renderRegion(t)},e.prototype.renderRegion=function(t){var e=this.get("start"),n=this.get("end"),i=this.get("style"),r=C({start:e,end:n});this.addShape(t,{type:"rect",id:this.getElementId("region"),name:"annotation-region",attrs:Object(d.__assign)({x:r.x,y:r.y,width:r.width,height:r.height},i)})},e}(L),Y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"image",locationType:"region",start:null,end:null,src:null,style:{}})},e.prototype.renderInner=function(t){this.renderImage(t)},e.prototype.getImageAttrs=function(){var t=this.get("start"),e=this.get("end"),n=this.get("style"),i=C({start:t,end:e}),r=this.get("src");return Object(d.__assign)({x:i.x,y:i.y,img:r,width:i.width,height:i.height},n)},e.prototype.renderImage=function(t){this.addShape(t,{type:"image",id:this.getElementId("image"),name:"annotation-image",attrs:this.getImageAttrs()})},e}(L),X=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"dataMarker",locationType:"point",x:0,y:0,point:{},line:{},text:{},direction:"upward",autoAdjust:!0,coordinateBBox:null,defaultCfg:{point:{display:!0,style:{r:3,fill:"#FFFFFF",stroke:"#1890FF",lineWidth:2}},line:{display:!0,length:20,style:{stroke:B.lineColor,lineWidth:1}},text:{content:"",display:!0,style:{fill:B.textColor,opacity:.65,fontSize:12,textAlign:"start",fontFamily:B.fontFamily}}}})},e.prototype.renderInner=function(t){Object(g.get)(this.get("line"),"display")&&this.renderLine(t),Object(g.get)(this.get("text"),"display")&&this.renderText(t),Object(g.get)(this.get("point"),"display")&&this.renderPoint(t),this.get("autoAdjust")&&this.autoAdjust(t)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x")+this.get("offsetX"),y:this.get("y")+this.get("offsetY")})},e.prototype.renderPoint=function(t){var e=this.getShapeAttrs().point;this.addShape(t,{type:"circle",id:this.getElementId("point"),name:"annotation-point",attrs:e})},e.prototype.renderLine=function(t){var e=this.getShapeAttrs().line;this.addShape(t,{type:"path",id:this.getElementId("line"),name:"annotation-line",attrs:e})},e.prototype.renderText=function(t){var e=this.getShapeAttrs().text;this.addShape(t,{type:"text",id:this.getElementId("text"),name:"annotation-text",attrs:e})},e.prototype.autoAdjust=function(t){var e=this.get("direction"),n=this.get("x"),i=this.get("y"),r=Object(g.get)(this.get("line"),"length",0),o=this.get("coordinateBBox"),a=t.getBBox(),s=a.minX,u=a.maxX,c=a.minY,l=a.maxY,h=t.findById(this.getElementId("text")),p=t.findById(this.getElementId("line"));if(o&&(h&&(n+s<=o.minX&&h.attr("textAlign","start"),n+u>=o.maxX&&h.attr("textAlign","end")),"upward"===e&&i+c<=o.minY||"upward"!==e&&i+l>=o.maxY)){var f=void 0,d=void 0;"upward"===e&&i+c<=o.minY?(f="top",d=1):(f="bottom",d=-1),h.attr("textBaseline",f),p&&p.attr("path",[["M",0,0],["L",0,r*d]]),h.attr("y",(r+2)*d)}},e.prototype.getShapeAttrs=function(){var t=Object(g.get)(this.get("line"),"display"),e=Object(g.get)(this.get("point"),"style",{}),n=Object(g.get)(this.get("line"),"style",{}),i=Object(g.get)(this.get("text"),"style",{}),r=this.get("direction"),o=t?Object(g.get)(this.get("line"),"length",0):0,a="upward"===r?-1:1;return{point:Object(d.__assign)({x:0,y:0},e),line:Object(d.__assign)({path:[["M",0,0],["L",0,o*a]]},n),text:Object(d.__assign)({x:0,y:(o+2)*a,text:Object(g.get)(this.get("text"),"content",""),textBaseline:"upward"===r?"bottom":"top"},i)}},e}(L),G=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"dataRegion",locationType:"points",points:[],lineLength:0,region:{},text:{},defaultCfg:{region:{style:{lineWidth:0,fill:B.regionColor,opacity:.4}},text:{content:"",style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:B.textColor,fontFamily:B.fontFamily}}}})},e.prototype.renderInner=function(t){var e=Object(g.get)(this.get("region"),"style",{}),n=Object(g.get)(this.get("text"),"style",{}),i=this.get("lineLength")||0,r=this.get("points");if(r.length){var o=function(t){var e=t.map((function(t){return t.x})),n=t.map((function(t){return t.y})),i=Math.min.apply(Math,e),r=Math.min.apply(Math,n),o=Math.max.apply(Math,e),a=Math.max.apply(Math,n);return{x:i,y:r,minX:i,minY:r,maxX:o,maxY:a,width:o-i,height:a-r}}(r),a=[];a.push(["M",r[0].x,o.minY-i]),r.forEach((function(t){a.push(["L",t.x,t.y])})),a.push(["L",r[r.length-1].x,r[r.length-1].y-i]),this.addShape(t,{type:"path",id:this.getElementId("region"),name:"annotation-region",attrs:Object(d.__assign)({path:a},e)}),this.addShape(t,{type:"text",id:this.getElementId("text"),name:"annotation-text",attrs:Object(d.__assign)({x:(o.minX+o.maxX)/2,y:o.minY-i,text:Object(g.get)(this.get("text"),"content","")},n)})}},e}(L),z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"regionFilter",locationType:"region",start:null,end:null,color:null,shape:[]})},e.prototype.renderInner=function(t){var e=this,n=this.get("start"),i=this.get("end"),r=this.addGroup(t,{id:this.getElementId("region-filter"),capture:!1});Object(g.each)(this.get("shapes"),(function(t,n){var i=t.get("type"),o=Object(g.clone)(t.attr());e.adjustShapeAttrs(o),e.addShape(r,{id:e.getElementId("shape-"+i+"-"+n),capture:!1,type:i,attrs:o})}));var o=C({start:n,end:i});r.setClip({type:"rect",attrs:{x:o.minX,y:o.minY,width:o.width,height:o.height}})},e.prototype.adjustShapeAttrs=function(t){var e=this.get("color");t.fill&&(t.fill=t.fillStyle=e),t.stroke=t.strokeStyle=e},e}(L);function q(t,e,n){var i=e+"Style",r=null;return Object(g.each)(n,(function(e,n){t[n]&&e[i]&&(r||(r={}),Object(g.mix)(r,e[i]))})),r}var H=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"axis",ticks:[],line:{},tickLine:{},subTickLine:null,title:null,label:{},verticalFactor:1,verticalLimitLength:null,overlapOrder:["autoRotate","autoEllipsis","autoHide"],tickStates:{},defaultCfg:{line:{style:{lineWidth:1,stroke:B.lineColor}},tickLine:{style:{lineWidth:1,stroke:B.lineColor},alignTick:!0,length:5,displayWithLabel:!0},subTickLine:{style:{lineWidth:1,stroke:B.lineColor},count:4,length:2},label:{autoRotate:!0,autoHide:!1,autoEllipsis:!1,style:{fontSize:12,fill:B.textColor,textBaseline:"middle",fontFamily:B.fontFamily,fontWeight:"normal"},offset:10},title:{autoRotate:!0,spacing:5,position:"center",style:{fontSize:12,fill:B.textColor,textBaseline:"middle",fontFamily:B.fontFamily,textAlign:"center"},offset:48},tickStates:{active:{labelStyle:{fontWeight:500},tickLineStyle:{lineWidth:2}},inactive:{labelStyle:{fill:B.uncheckedColor}}}}})},e.prototype.renderInner=function(t){this.get("line")&&this.drawLine(t),this.drawTicks(t),this.get("title")&&this.drawTitle(t)},e.prototype.isList=function(){return!0},e.prototype.getItems=function(){return this.get("ticks")},e.prototype.setItems=function(t){this.update({ticks:t})},e.prototype.updateItem=function(t,e){Object(g.mix)(t,e),this.clear(),this.render()},e.prototype.clearItems=function(){var t=this.getElementByLocalId("label-group");t&&t.clear()},e.prototype.setItemState=function(t,e,n){t[e]=n,this.updateTickStates(t)},e.prototype.hasState=function(t,e){return!!t[e]},e.prototype.getItemStates=function(t){var e=this.get("tickStates"),n=[];return Object(g.each)(e,(function(e,i){t[i]&&n.push(i)})),n},e.prototype.clearItemsState=function(t){var e=this,n=this.getItemsByState(t);Object(g.each)(n,(function(n){e.setItemState(n,t,!1)}))},e.prototype.getItemsByState=function(t){var e=this,n=this.getItems();return Object(g.filter)(n,(function(n){return e.hasState(n,t)}))},e.prototype.getSidePoint=function(t,e){var n=this.getSideVector(e,t);return{x:t.x+n[0],y:t.y+n[1]}},e.prototype.getTextAnchor=function(t){var e;return Object(g.isNumberEqual)(t[0],0)?e="center":t[0]>0?e="start":t[0]<0&&(e="end"),e},e.prototype.processOverlap=function(t){},e.prototype.drawLine=function(t){var e=this.getLinePath(),n=this.get("line");this.addShape(t,{type:"path",id:this.getElementId("line"),name:"axis-line",attrs:Object(g.mix)({path:e},n.style)})},e.prototype.getTickLineItems=function(t){var e=this,n=[],i=this.get("tickLine"),r=i.alignTick,o=i.length,a=1;return t.length>=2&&(a=t[1].value-t[0].value),Object(g.each)(t,(function(t){var i=t.point;r||(i=e.getTickPoint(t.value-a/2));var s=e.getSidePoint(i,o);n.push({startPoint:i,tickValue:t.value,endPoint:s,tickId:t.id,id:"tickline-"+t.id})})),n},e.prototype.getSubTickLineItems=function(t){var e=[],n=this.get("subTickLine"),i=n.count,r=t.length;if(r>=2)for(var o=0;o0&&t.charCodeAt(e)<128?1:2}function W(t,e,n,i){var r=e.getChildren(),o=!1;return Object(g.each)(r,(function(e){var r=function(t,e,n,i){var r=e.attr("text"),o=function(t,e){var n=e.getCanvasBBox();return t?n.width:n.height}(t,e),a=function(t){for(var e=0,n=0;n=0?function(t,e,n){var i=t.length,r="";if("tail"===n){for(var o=0,a=0;o1){c=Math.ceil(c);for(var h=0;hn:o>Math.abs(r[1].attr("x")-r[0].attr("x")))&&function(t,e){Object(g.each)(t,(function(t){var n=b({x:t.attr("x"),y:t.attr("y")},e);t.attr("matrix",n)}))}(r,i(n,o)),a}function ut(){return ct}function ct(t,e,n){return st(t,e,n,(function(){return t?B.verticalAxisRotate:B.horizontalAxisRotate}))}function lt(t,e,n){return st(t,e,n,(function(e,n){if(!e)return t?B.verticalAxisRotate:B.horizontalAxisRotate;if(t)return-Math.acos(e/n);var i=0;return(e>n||(i=Math.asin(e/n))>Math.PI/4)&&(i=Math.PI/4),i}))}var ht,pt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{type:"line",locationType:"region",start:null,end:null})},e.prototype.getLinePath=function(){var t=this.get("start"),e=this.get("end"),n=[];return n.push(["M",t.x,t.y]),n.push(["L",e.x,e.y]),n},e.prototype.getInnerLayoutBBox=function(){var e=this.get("start"),n=this.get("end"),i=t.prototype.getInnerLayoutBBox.call(this),r=Math.min(e.x,n.x,i.x),o=Math.min(e.y,n.y,i.y),a=Math.max(e.x,n.x,i.maxX),s=Math.max(e.y,n.y,i.maxY);return{x:r,y:o,minX:r,minY:o,maxX:a,maxY:s,width:a-r,height:s-o}},e.prototype.isVertical=function(){var t=this.get("start"),e=this.get("end");return Object(g.isNumberEqual)(t.x,e.x)},e.prototype.isHorizontal=function(){var t=this.get("start"),e=this.get("end");return Object(g.isNumberEqual)(t.y,e.y)},e.prototype.getTickPoint=function(t){var e=this.get("start"),n=this.get("end"),i=n.x-e.x,r=n.y-e.y;return{x:e.x+i*t,y:e.y+r*t}},e.prototype.getSideVector=function(t){var e=this.getAxisVector(),n=m.vec2.normalize([],e),i=this.get("verticalFactor"),r=[n[1],-1*n[0]];return m.vec2.scale([],r,t*i)},e.prototype.getAxisVector=function(){var t=this.get("start"),e=this.get("end");return[e.x-t.x,e.y-t.y]},e.prototype.processOverlap=function(t){var e=this,n=this.isVertical(),i=this.isHorizontal();if(n||i){var r=this.get("label"),o=this.get("title"),a=this.get("verticalLimitLength"),s=r.offset,u=a,c=0,l=0;o&&(c=o.style.fontSize,l=o.spacing),u&&(u=u-s-l-c);var h=this.get("overlapOrder");if(Object(g.each)(h,(function(n){r[n]&&e.autoProcessOverlap(n,r[n],t,u)})),o){var p=t.getBBox(),f=n?p.width:p.height;o.offset=s+f+l+c/2}}},e.prototype.autoProcessOverlap=function(t,e,n,i){var r=this,o=this.isVertical(),a=!1,u=s[t];if(!0===e?a=u.getDefault()(o,n,i):Object(g.isFunction)(e)?a=e(o,n,i):u[e]&&(a=u[e](o,n,i)),"autoRotate"===t){if(a){var c=n.getChildren(),l=this.get("verticalFactor");Object(g.each)(c,(function(t){if("center"===t.attr("textAlign")){var e=l>0?"end":"start";t.attr("textAlign",e)}}))}}else if("autoHide"===t){var h=n.getChildren().slice(0);Object(g.each)(h,(function(t){t.get("visible")||(r.get("isRegister")&&r.unregisterElement(t),t.remove())}))}},e}(H),ft=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{type:"circle",locationType:"circle",center:null,radius:null,startAngle:-Math.PI/2,endAngle:3*Math.PI/2})},e.prototype.getLinePath=function(){var t=this.get("center"),e=t.x,n=t.y,i=this.get("radius"),r=i,o=this.get("startAngle"),a=this.get("endAngle"),s=[];if(Math.abs(a-o)===2*Math.PI)s=[["M",e,n-r],["A",i,r,0,1,1,e,n+r],["A",i,r,0,1,1,e,n-r],["Z"]];else{var u=this.getCirclePoint(o),c=this.getCirclePoint(a),l=Math.abs(a-o)>Math.PI?1:0,h=o>a?0:1;s=[["M",e,n],["L",u.x,u.y],["A",i,r,0,l,h,c.x,c.y],["L",e,n]]}return s},e.prototype.getTickPoint=function(t){var e=this.get("startAngle"),n=e+(this.get("endAngle")-e)*t;return this.getCirclePoint(n)},e.prototype.getSideVector=function(t,e){var n=this.get("center"),i=[e.x-n.x,e.y-n.y],r=this.get("verticalFactor"),o=m.vec2.length(i);return m.vec2.scale(i,i,r*t/o),i},e.prototype.getAxisVector=function(t){var e=this.get("center"),n=[t.x-e.x,t.y-e.y];return[n[1],-1*n[0]]},e.prototype.getCirclePoint=function(t,e){var n=this.get("center");return e=e||this.get("radius"),{x:n.x+Math.cos(t)*e,y:n.y+Math.sin(t)*e}},e}(H),dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"crosshair",type:"base",line:{},text:null,textBackground:{},capture:!1,defaultCfg:{line:{style:{lineWidth:1,stroke:B.lineColor}},text:{position:"start",offset:10,autoRotate:!1,content:null,style:{fill:B.textColor,textAlign:"center",textBaseline:"middle",fontFamily:B.fontFamily}},textBackground:{padding:5,style:{stroke:B.lineColor}}}})},e.prototype.renderInner=function(t){this.get("line")&&this.renderLine(t),this.get("text")&&(this.renderText(t),this.renderBackground(t))},e.prototype.renderText=function(t){var e=this.get("text"),n=e.style,i=e.autoRotate,r=e.content;if(!Object(g.isNil)(r)){var o=this.getTextPoint(),a=null;i&&(a=b(o,this.getRotateAngle())),this.addShape(t,{type:"text",name:"crosshair-text",id:this.getElementId("text"),attrs:Object(d.__assign)(Object(d.__assign)(Object(d.__assign)({},o),{text:r,matrix:a}),n)})}},e.prototype.renderLine=function(t){var e=this.getLinePath(),n=this.get("line").style;this.addShape(t,{type:"path",name:"crosshair-line",id:this.getElementId("line"),attrs:Object(d.__assign)({path:e},n)})},e.prototype.renderBackground=function(t){var e=this.getElementId("text"),n=t.findById(e),i=this.get("textBackground");if(i&&n){var r=n.getBBox(),o=w(i.padding),a=i.style;this.addShape(t,{type:"rect",name:"crosshair-text-background",id:this.getElementId("text-background"),attrs:Object(d.__assign)({x:r.x-o[3],y:r.y-o[0],width:r.width+o[1]+o[3],height:r.height+o[0]+o[2],matrix:n.attr("matrix")},a)}).toBack()}},e}(L),gt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{type:"line",locationType:"region",start:null,end:null})},e.prototype.getRotateAngle=function(){var t=this.getLocation(),e=t.start,n=t.end,i=this.get("text").position,r=Math.atan2(n.y-e.y,n.x-e.x);return"start"===i?r-Math.PI/2:r+Math.PI/2},e.prototype.getTextPoint=function(){var t,e,n,i,r=this.getLocation(),o=r.start,a=r.end,s=this.get("text"),u=s.position,c=s.offset/(t=o,n=(e=a).x-t.x,i=e.y-t.y,Math.sqrt(n*n+i*i)),l=0;return"start"===u?l=0-c:"end"===u&&(l=1+c),{x:A(o.x,a.x,l),y:A(o.y,a.y,l)}},e.prototype.getLinePath=function(){var t=this.getLocation(),e=t.start,n=t.end;return[["M",e.x,e.y],["L",n.x,n.y]]},e}(dt),yt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{type:"circle",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:3*Math.PI/2})},e.prototype.getRotateAngle=function(){var t=this.getLocation(),e=t.startAngle,n=t.endAngle;return"start"===this.get("text").position?e+Math.PI/2:n-Math.PI/2},e.prototype.getTextPoint=function(){var t=this.get("text"),e=t.position,n=t.offset,i=this.getLocation(),r=i.center,o=i.radius,a=i.startAngle,s=i.endAngle,u="start"===e?a:s,c=this.getRotateAngle()-Math.PI,l=P(r,o,u),h=Math.cos(c)*n,p=Math.sin(c)*n;return{x:l.x+h,y:l.y+p}},e.prototype.getLinePath=function(){var t=this.getLocation(),e=t.center,n=t.radius,i=t.startAngle,r=t.endAngle,o=null;if(r-i==2*Math.PI){var a=e.x,s=e.y;o=[["M",a,s-n],["A",n,n,0,1,1,a,s+n],["A",n,n,0,1,1,a,s-n],["Z"]]}else{var u=P(e,n,i),c=P(e,n,r),l=Math.abs(r-i)>Math.PI?1:0,h=i>r?0:1;o=[["M",u.x,u.y],["A",n,n,0,l,h,c.x,c.y]]}return o},e}(dt),vt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"grid",line:{},alternateColor:null,capture:!1,items:[],closed:!1,defaultCfg:{line:{type:"line",style:{lineWidth:1,stroke:B.lineColor}}}})},e.prototype.getLineType=function(){return(this.get("line")||this.get("defaultCfg").line).type},e.prototype.renderInner=function(t){this.drawGrid(t)},e.prototype.getAlternatePath=function(t,e){var n=this.getGridPath(t),i=e.slice(0).reverse(),r=this.getGridPath(i,!0);return this.get("closed")?n=n.concat(r):(r[0][0]="L",(n=n.concat(r)).push(["Z"])),n},e.prototype.getPathStyle=function(){return this.get("line").style},e.prototype.drawGrid=function(t){var e=this,n=this.get("line"),i=this.get("items"),r=this.get("alternateColor"),o=null;Object(g.each)(i,(function(i,a){var s=i.id||a;if(n){var u=e.getPathStyle(),c=e.getElementId("line-"+s),l=e.getGridPath(i.points);e.addShape(t,{type:"path",name:"grid-line",id:c,attrs:Object(g.mix)({path:l},u)})}if(r&&a>0){var h=e.getElementId("region-"+s),p=a%2==0;if(Object(g.isString)(r))p&&e.drawAlternateRegion(h,t,o.points,i.points,r);else{var f=p?r[1]:r[0];e.drawAlternateRegion(h,t,o.points,i.points,f)}}o=i}))},e.prototype.drawAlternateRegion=function(t,e,n,i,r){var o=this.getAlternatePath(n,i);this.addShape(e,{type:"path",id:t,name:"grid-region",attrs:{path:o,fill:r}})},e}(L),mt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{type:"circle",center:null,closed:!0})},e.prototype.getGridPath=function(t,e){var n,i,r,o,a=this.getLineType(),s=this.get("closed"),u=[];if(t.length)if("circle"===a){var c=this.get("center"),l=t[0],h=(n=c.x,i=c.y,r=l.x-n,o=l.y-i,Math.sqrt(r*r+o*o)),p=e?0:1;s?(u.push(["M",c.x,c.y-h]),u.push(["A",h,h,0,0,p,c.x,c.y+h]),u.push(["A",h,h,0,0,p,c.x,c.y-h]),u.push(["Z"])):Object(g.each)(t,(function(t,e){0===e?u.push(["M",t.x,t.y]):u.push(["A",h,h,0,0,p,t.x,t.y])}))}else Object(g.each)(t,(function(t,e){0===e?u.push(["M",t.x,t.y]):u.push(["L",t.x,t.y])})),s&&u.push(["Z"]);return u},e}(vt),xt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{type:"line"})},e.prototype.getGridPath=function(t){var e=[];return Object(g.each)(t,(function(t,n){0===n?e.push(["M",t.x,t.y]):e.push(["L",t.x,t.y])})),e},e}(vt),bt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"legend",layout:"horizontal",locationType:"point",x:0,y:0,offsetX:0,offsetY:0,title:null,background:null})},e.prototype.getLayoutBBox=function(){var e=t.prototype.getLayoutBBox.call(this),n=this.get("x"),i=this.get("y"),r=this.get("offsetX"),o=this.get("offsetY"),a=this.get("maxWidth"),s=this.get("maxHeight"),u=n+r,c=i+o,l=e.maxX-u,h=e.maxY-c;return a&&(l=Math.min(l,a)),s&&(h=Math.min(h,s)),S(u,c,l,h)},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},e.prototype.resetLocation=function(){var t=this.get("x"),e=this.get("y"),n=this.get("offsetX"),i=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t+n,y:e+i})},e.prototype.applyOffset=function(){this.resetLocation()},e.prototype.getDrawPoint=function(){return this.get("currentPoint")},e.prototype.setDrawPoint=function(t){return this.set("currentPoint",t)},e.prototype.renderInner=function(t){this.resetDraw(),this.get("title")&&this.drawTitle(t),this.drawLegendContent(t),this.get("background")&&this.drawBackground(t)},e.prototype.drawBackground=function(t){var e=this.get("background"),n=t.getBBox(),i=w(e.padding),r=Object(d.__assign)({x:0,y:0,width:n.width+i[1]+i[3],height:n.height+i[0]+i[2]},e.style);this.addShape(t,{type:"rect",id:this.getElementId("background"),name:"legend-background",attrs:r}).toBack()},e.prototype.drawTitle=function(t){var e=this.get("currentPoint"),n=this.get("title"),i=n.spacing,r=n.style,o=n.text,a=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"legend-title",attrs:Object(d.__assign)({text:o,x:e.x,y:e.y},r)}).getBBox();this.set("currentPoint",{x:e.x,y:a.maxY+i})},e.prototype.resetDraw=function(){var t=this.get("background"),e={x:0,y:0};if(t){var n=w(t.padding);e.x=n[3],e.y=n[0]}this.set("currentPoint",e)},e}(L),Mt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.currentPageIndex=1,e.totalPagesCnt=1,e.pageWidth=0,e.pageHeight=0,e.startX=0,e.startY=0,e.onNavigationBack=function(){var t=e.getElementByLocalId("item-group");if(e.currentPageIndex>1){e.currentPageIndex-=1,e.updateNavigation();var n=e.getCurrentNavigationMatrix();e.get("animate")?t.animate({matrix:n},100):t.attr({matrix:n})}},e.onNavigationAfter=function(){var t=e.getElementByLocalId("item-group");if(e.currentPageIndexf&&(f=v),"horizontal"===l?(d&&dm&&(m=e.width)})),x=m,m+=l,s&&(m=Math.min(s,m),x=Math.min(s,x)),this.pageWidth=m,this.pageHeight=u-Math.max(f.height,h);var b=Math.floor(this.pageHeight/h);Object(g.each)(a,(function(t,e){0!==e&&e%b==0&&(y+=1,d.x+=m,d.y=r),n.moveElementTo(t,d),d.y+=h})),this.totalPagesCnt=y,this.moveElementTo(p,{x:i+x/2-f.width/2-f.minX,y:u-f.height-f.minY})}this.pageHeight&&this.pageWidth&&e.getParent().setClip({type:"rect",attrs:{x:this.startX,y:this.startY,width:this.pageWidth,height:this.pageHeight}}),this.totalPagesCnt=y,this.currentPageIndex>this.totalPagesCnt&&(this.currentPageIndex=1),this.updateNavigation(p),e.attr("matrix",this.getCurrentNavigationMatrix())},e.prototype.drawNavigation=function(t,e,n,i){var r={x:0,y:0},o=this.addGroup(t,{id:this.getElementId("navigation-group"),name:"legend-navigation"}),a=this.drawArrow(o,r,"navigation-arrow-left","horizontal"===e?"up":"left",i);a.on("click",this.onNavigationBack);var s=a.getBBox();r.x+=s.width+2;var u=this.addShape(o,{type:"text",id:this.getElementId("navigation-text"),name:"navigation-text",attrs:{x:r.x,y:r.y+i/2,text:n,fontSize:12,fill:"#ccc",textBaseline:"middle"}}).getBBox();return r.x+=u.width+2,this.drawArrow(o,r,"navigation-arrow-right","horizontal"===e?"down":"right",i).on("click",this.onNavigationAfter),o},e.prototype.updateNavigation=function(t){var e=this.currentPageIndex+"/"+this.totalPagesCnt,n=t?t.getChildren()[1]:this.getElementByLocalId("navigation-text"),i=t?t.findById(this.getElementId("navigation-arrow-left")):this.getElementByLocalId("navigation-arrow-left"),r=t?t.findById(this.getElementId("navigation-arrow-right")):this.getElementByLocalId("navigation-arrow-right"),o=n.getBBox();n.attr("text",e);var a=n.getBBox();n.attr("x",n.attr("x")-(a.width-o.width)/2),i.attr("opacity",1===this.currentPageIndex?.45:1),i.attr("cursor",1===this.currentPageIndex?"not-allowed":"pointer"),r.attr("opacity",this.currentPageIndex===this.totalPagesCnt?.45:1),r.attr("cursor",this.currentPageIndex===this.totalPagesCnt?"not-allowed":"pointer")},e.prototype.drawArrow=function(t,e,n,i,r){var o=e.x,a=e.y,s={right:90*Math.PI/180,left:270*Math.PI/180,up:0,down:180*Math.PI/180},u=this.addShape(t,{type:"path",id:this.getElementId(n),name:n,attrs:{path:[["M",o+r/2,a],["L",o,a+r],["L",o+r,a+r],["Z"]],fill:"#000",cursor:"pointer"}});return u.attr("matrix",b({x:o+r/2,y:a+r/2},s[i])),u},e.prototype.getCurrentNavigationMatrix=function(){var t=this.currentPageIndex,e=this.pageWidth,n=this.pageHeight;return M("horizontal"===this.get("layout")?{x:0,y:n*(1-t)}:{x:e*(1-t),y:0})},e.prototype.applyItemStates=function(t,e){if(this.getItemStates(t).length>0){var n=e.getChildren(),i=this.get("itemStates");Object(g.each)(n,(function(e){var n=e.get("name").split("-")[2],r=q(t,n,i);r&&(e.attr(r),"marker"!==n||e.get("isStroke")&&e.get("isFill")||(e.get("isStroke")&&e.attr("fill",null),e.get("isFill")&&e.attr("stroke",null)))}))}},e}(bt),_t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{type:"continue",min:0,max:100,value:null,colors:[],track:{},rail:{},label:{},handler:{},slidable:!0,tip:null,step:null,maxWidth:null,maxHeight:null,defaultCfg:{label:{align:"rail",spacing:5,formatter:null,style:{fontSize:12,fill:B.textColor,textBaseline:"middle",fontFamily:B.fontFamily}},handler:{size:10,style:{fill:"#fff",stroke:"#333"}},track:{},rail:{type:"color",size:20,defaultLength:100,style:{fill:"#DCDEE2"}},title:{spacing:5,style:{fill:B.textColor,fontSize:12,textAlign:"start",textBaseline:"top"}}}})},e.prototype.isSlider=function(){return!0},e.prototype.getValue=function(){return this.getCurrentValue()},e.prototype.getRange=function(){return{min:this.get("min"),max:this.get("max")}},e.prototype.setRange=function(t,e){this.update({min:t,max:e})},e.prototype.setValue=function(t){var e=this.getValue();this.set("value",t);var n=this.get("group");this.resetTrackClip(),this.get("slidable")&&this.resetHandlers(n),this.delegateEmit("valuechanged",{originValue:e,value:t})},e.prototype.initEvent=function(){var t=this.get("group");this.bindSliderEvent(t),this.bindRailEvent(t),this.bindTrackEvent(t)},e.prototype.drawLegendContent=function(t){this.drawRail(t),this.drawLabels(t),this.fixedElements(t),this.resetTrack(t),this.resetTrackClip(t),this.get("slidable")&&this.resetHandlers(t)},e.prototype.bindSliderEvent=function(t){this.bindHandlersEvent(t)},e.prototype.bindHandlersEvent=function(t){var e=this;t.on("legend-handler-min:drag",(function(t){var n=e.getValueByCanvasPoint(t.x,t.y),i=e.getCurrentValue()[1];in&&(i=n),e.setValue([i,n])}))},e.prototype.bindRailEvent=function(t){},e.prototype.bindTrackEvent=function(t){var e=this,n=null;t.on("legend-track:dragstart",(function(t){n={x:t.x,y:t.y}})),t.on("legend-track:drag",(function(t){if(n){var i=e.getValueByCanvasPoint(n.x,n.y),r=e.getValueByCanvasPoint(t.x,t.y),o=e.getCurrentValue(),a=o[1]-o[0],s=e.getRange(),u=r-i;u<0?o[0]+u>s.min?e.setValue([o[0]+u,o[1]+u]):e.setValue([s.min,s.min+a]):u>0&&(u>0&&o[1]+ur&&(u=r),u0&&this.changeRailLength(i,r,n[r]-c)}},e.prototype.changeRailLength=function(t,e,n){var i,r=t.getBBox();i="height"===e?this.getRailPath(r.x,r.y,r.width,n):this.getRailPath(r.x,r.y,n,r.height),t.attr("path",i)},e.prototype.changeRailPosition=function(t,e,n){var i=t.getBBox(),r=this.getRailPath(e,n,i.width,i.height);t.attr("path",r)},e.prototype.fixedHorizontal=function(t,e,n,i){var r=this.get("label"),o=r.align,a=r.spacing,s=n.getBBox(),u=t.getBBox(),c=e.getBBox(),l=s.height;this.fitRailLength(u,c,s,n),s=n.getBBox(),"rail"===o?(t.attr({x:i.x,y:i.y+l/2}),this.changeRailPosition(n,i.x+u.width+a,i.y),e.attr({x:i.x+u.width+s.width+2*a,y:i.y+l/2})):"top"===o?(t.attr({x:i.x,y:i.y}),e.attr({x:i.x+s.width,y:i.y}),this.changeRailPosition(n,i.x,i.y+u.height+a)):(this.changeRailPosition(n,i.x,i.y),t.attr({x:i.x,y:i.y+s.height+a}),e.attr({x:i.x+s.width,y:i.y+s.height+a}))},e.prototype.fixedVertail=function(t,e,n,i){var r=this.get("label"),o=r.align,a=r.spacing,s=n.getBBox(),u=t.getBBox(),c=e.getBBox();if(this.fitRailLength(u,c,s,n),s=n.getBBox(),"rail"===o)t.attr({x:i.x,y:i.y}),this.changeRailPosition(n,i.x,i.y+u.height+a),e.attr({x:i.x,y:i.y+u.height+s.height+2*a});else if("right"===o)t.attr({x:i.x+s.width+a,y:i.y}),this.changeRailPosition(n,i.x,i.y),e.attr({x:i.x+s.width+a,y:i.y+s.height});else{var l=Math.max(u.width,c.width);t.attr({x:i.x,y:i.y}),this.changeRailPosition(n,i.x+l+a,i.y),e.attr({x:i.x,y:i.y+s.height})}},e}(bt),wt=n(6),Ot=n(29),Ct=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{container:null,containerTpl:"
        ",updateAutoRender:!0,parent:null})},e.prototype.getContainer=function(){return this.get("container")},e.prototype.show=function(){this.get("container").style.display="",this.set("visible",!0)},e.prototype.hide=function(){this.get("container").style.display="none",this.set("visible",!1)},e.prototype.setCapture=function(t){var e=t?"auto":"none";this.getContainer().style.pointerEvents=e,this.set("capture",t)},e.prototype.getBBox=function(){var t=this.getContainer();return S(parseFloat(t.style.left)||0,parseFloat(t.style.top)||0,t.clientWidth,t.clientHeight)},e.prototype.clear=function(){O(this.get("container"))},e.prototype.destroy=function(){this.removeEvent(),this.removeDom(),t.prototype.destroy.call(this)},e.prototype.init=function(){t.prototype.init.call(this),this.initContainer(),this.initEvent(),this.initCapture(),this.initVisible()},e.prototype.initCapture=function(){this.setCapture(this.get("capture"))},e.prototype.initVisible=function(){this.get("visible")?this.show():this.hide()},e.prototype.initContainer=function(){var t=this.get("container");if(Object(g.isNil)(t)){t=this.createDom();var e=this.get("parent");Object(g.isString)(e)&&(e=document.getElementById(e),this.set("parent",e)),e.appendChild(t),this.set("container",t)}else Object(g.isString)(t)&&(t=document.getElementById(t),this.set("container",t));this.get("parent")||this.set("parent",t.parentNode)},e.prototype.createDom=function(){var t=this.get("containerTpl");return Object(wt.createDom)(t)},e.prototype.initEvent=function(){},e.prototype.removeDom=function(){var t=this.get("container");t&&t.parentNode.removeChild(t)},e.prototype.removeEvent=function(){},e}(T),St="g2-tooltip",At="g2-tooltip-title",Pt="g2-tooltip-list",jt="g2-tooltip-list-item",kt="g2-tooltip-marker",Tt="g2-tooltip-value",Et="g2-tooltip-name",It="g2-tooltip-crosshair-x",Lt="g2-tooltip-crosshair-y",Bt=((ht={})[""+St]={position:"absolute",visibility:"visible",zIndex:8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxShadow:"0px 0px 10px #aeaeae",borderRadius:"3px",color:"rgb(87, 87, 87)",fontSize:"12px",fontFamily:B.fontFamily,lineHeight:"20px",padding:"10px 10px 6px 10px"},ht[""+At]={marginBottom:"4px"},ht[""+Pt]={margin:0,listStyleType:"none",padding:0},ht[""+jt]={listStyleType:"none",marginBottom:"4px"},ht[""+kt]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},ht[""+Tt]={display:"inline-block",float:"right",marginLeft:"30px"},ht[""+It]={position:"absolute",width:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},ht[""+Lt]={position:"absolute",height:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},ht);function Dt(t){return t+"px"}var Ft=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"tooltip",type:"html",x:0,y:0,items:[],containerTpl:'
          ',itemTpl:'
        • \n \n {name}:\n {value}\n
        • ',xCrosshairTpl:'
          ',yCrosshairTpl:'
          ',title:null,showTitle:!0,region:null,crosshairsRegion:null,crosshairs:null,offset:10,position:"right",domStyles:null,defaultStyles:Bt})},e.prototype.render=function(){this.resetTitle(),this.renderItems(),this.resetPosition()},e.prototype.clear=function(){this.clearCrosshairs(),this.setTitle(""),this.clearItemDoms()},e.prototype.update=function(e){var n,i,r;t.prototype.update.call(this,e),n=e,i=["title","showTitle"],r=!1,Object(g.each)(i,(function(t){if(Object(g.hasKey)(n,t))return r=!0,!1})),r&&this.resetTitle(),Object(g.hasKey)(e,"items")&&this.renderItems(),Object(g.hasKey)(e,"domStyles")&&(this.resetStyles(),this.applyStyles()),this.resetPosition()},e.prototype.show=function(){var t=this.getContainer();t&&!this.destroyed&&(this.set("visible",!0),Object(wt.modifyCSS)(t,{visibility:"visible"}),this.setCrossHairsVisible(!0))},e.prototype.hide=function(){var t=this.getContainer();t&&!this.destroyed&&(this.set("visible",!1),Object(wt.modifyCSS)(t,{visibility:"hidden"}),this.setCrossHairsVisible(!1))},e.prototype.getLocation=function(){return{x:this.get("x"),y:this.get("y")}},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetPosition()},e.prototype.setCrossHairsVisible=function(t){var e=t?"":"none",n=this.get("xCrosshairDom"),i=this.get("yCrosshairDom");n&&Object(wt.modifyCSS)(n,{display:e}),i&&Object(wt.modifyCSS)(i,{display:e})},e.prototype.initContainer=function(){t.prototype.initContainer.call(this),this.cacheDoms(),this.resetStyles(),this.applyStyles()},e.prototype.removeDom=function(){t.prototype.removeDom.call(this),this.clearCrosshairs()},e.prototype.cacheDoms=function(){var t=this.getContainer(),e=t.getElementsByClassName(At)[0],n=t.getElementsByClassName(Pt)[0];this.set("titleDom",e),this.set("listDom",n)},e.prototype.resetPosition=function(){var t,e=this.get("x"),n=this.get("y"),i=this.get("offset"),r=this.getOffset(),o=r.offsetX,a=r.offsetY,s=this.get("position"),u=this.get("region"),c=this.getContainer(),l=this.getBBox(),h=l.width,p=l.height;u&&(t=C(u));var f=function(t,e,n,i,r,o,a){var s=function(t,e,n,i,r,o){var a=t,s=e;switch(o){case"left":a=t-i-n,s=e-r/2;break;case"right":a=t+n,s=e-r/2;break;case"top":a=t-i/2,s=e-r-n;break;case"bottom":a=t-i/2,s=e+n;break;default:a=t+n,s=e-r-n}return{x:a,y:s}}(t,e,n,i,r,o);if(a){var u=function(t,e,n,i,r){return{left:tr.x+r.width,top:er.y+r.height}}(s.x,s.y,i,r,a);"auto"===o?(u.right&&(s.x=t-i-n),u.top&&(s.y=e+n)):"top"===o||"bottom"===o?(u.left&&(s.x=a.x),u.right&&(s.x=a.x+a.width-i),"top"===o&&u.top&&(s.y=e+n),"bottom"===o&&u.bottom&&(s.y=e-r-n)):(u.top&&(s.y=a.y),u.bottom&&(s.y=a.y+a.height-r),"left"===o&&u.left&&(s.x=t+n),"right"===o&&u.right&&(s.x=t-i-n))}return s}(e,n,i,h,p,s,t);Object(wt.modifyCSS)(c,{left:Dt(f.x+o),top:Dt(f.y+a)}),this.resetCrosshairs()},e.prototype.resetTitle=function(){var t=this.get("title");this.get("showTitle")&&t?this.setTitle(t):this.setTitle("")},e.prototype.setTitle=function(t){var e=this.get("titleDom");e&&(e.innerText=t)},e.prototype.resetCrosshairs=function(){var t=this.get("crosshairsRegion"),e=this.get("crosshairs");if(t&&e){var n=C(t),i=this.get("xCrosshairDom"),r=this.get("yCrosshairDom");"x"===e?(this.resetCrosshair("x",n),r&&(r.remove(),this.set("yCrosshairDom",null))):"y"===e?(this.resetCrosshair("y",n),i&&(i.remove(),this.set("xCrosshairDom",null))):(this.resetCrosshair("x",n),this.resetCrosshair("y",n)),this.setCrossHairsVisible(this.get("visible"))}else this.clearCrosshairs()},e.prototype.resetCrosshair=function(t,e){var n=this.checkCrosshair(t),i=this.get(t);"x"===t?Object(wt.modifyCSS)(n,{left:Dt(i),top:Dt(e.y),height:Dt(e.height)}):Object(wt.modifyCSS)(n,{top:Dt(i),left:Dt(e.x),width:Dt(e.width)})},e.prototype.checkCrosshair=function(t){var e=t+"CrosshairDom",n=t+"CrosshairTpl",i="CROSSHAIR_"+t.toUpperCase(),r=p[i],o=this.get(e),a=this.get("parent");return o||(o=Object(wt.createDom)(this.get(n)),this.applyStyle(r,o),a.appendChild(o),this.set(e,o)),o},e.prototype.resetStyles=function(){var t=this.get("domStyles"),e=this.get("defaultStyles");t=t?Object(g.deepMix)({},e,t):e,this.set("domStyles",t)},e.prototype.applyStyles=function(){var t,e=this.get("domStyles"),n=this.getContainer();if(this.applyChildrenStyles(n,e),t=St,n.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))){var i=e[St];Object(wt.modifyCSS)(n,i)}},e.prototype.applyChildrenStyles=function(t,e){Object(g.each)(e,(function(e,n){var i=t.getElementsByClassName(n);Object(g.each)(i,(function(t){Object(wt.modifyCSS)(t,e)}))}))},e.prototype.applyStyle=function(t,e){var n=this.get("domStyles");Object(wt.modifyCSS)(e,n[t])},e.prototype.renderItems=function(){this.clearItemDoms();var t=this.get("items"),e=this.get("itemTpl"),n=this.get("listDom");Object(g.each)(t,(function(t){var i=Ot.default.toCSSGradient(t.color),r=Object(d.__assign)(Object(d.__assign)({},t),{color:i}),o=Object(g.substitute)(e,r),a=Object(wt.createDom)(o);n.appendChild(a)})),this.applyChildrenStyles(n,this.get("domStyles"))},e.prototype.clearItemDoms=function(){O(this.get("listDom"))},e.prototype.clearCrosshairs=function(){var t=this.get("xCrosshairDom"),e=this.get("yCrosshairDom");t&&t.remove(),e&&e.remove(),this.set("xCrosshairDom",null),this.set("yCrosshairDom",null)},e}(Ct),Rt={opacity:0},Nt={stroke:"#C5C5C5",strokeOpacity:.85},Yt={fill:"#CACED4",opacity:.85},Xt=n(64),Gt=n(19);function zt(t){return function(t){return Object(g.map)(t,(function(t,e){return[0===e?"M":"L",t[0],t[1]]}))}(t)}var qt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"trend",x:0,y:0,width:200,height:16,smooth:!0,isArea:!1,data:[],backgroundStyle:Rt,lineStyle:Nt,areaStyle:Yt})},e.prototype.renderInner=function(t){var e=this.cfg,n=e.width,i=e.height,r=e.data,o=e.smooth,a=e.isArea,s=e.backgroundStyle,u=e.lineStyle,c=e.areaStyle;this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:Object(d.__assign)({x:0,y:0,width:n,height:i},s)});var l=function(t,e,n,i){void 0===i&&(i=!0);var r=new Gt.Linear({values:t}),o=new Gt.Category({values:Object(g.map)(t,(function(t,e){return e}))}),a=Object(g.map)(t,(function(t,i){return[o.scale(i)*e,n-r.scale(t)*n]}));return i?function(t){if(t.length<=2)return zt(t);var e=[];Object(g.each)(t,(function(t){Object(g.isEqual)(t,e.slice(e.length-2))||e.push(t[0],t[1])}));var n=Object(Xt.catmullRom2Bezier)(e,!1),i=Object(g.head)(t),r=i[0],o=i[1];return n.unshift(["M",r,o]),n}(a):zt(a)}(r,n,i,o);if(this.addShape(t,{id:this.getElementId("line"),type:"path",attrs:Object(d.__assign)({path:l},u)}),a){var h=function(t,e,n){var i=Object(d.__spreadArrays)(t);return i.push(["L",e,0]),i.push(["L",0,n]),i.push(["Z"]),i}(l,n,i);this.addShape(t,{id:this.getElementId("area"),type:"path",attrs:Object(d.__assign)({path:h},c)})}},e.prototype.applyOffset=function(){var t=this.cfg,e=t.x,n=t.y;this.moveElementTo(this.get("group"),{x:e,y:n})},e}(L),Ht={fill:"#416180 ",opacity:.05},Vt={fill:"#5B8FF9",opacity:.15,cursor:"move"},Wt={width:10,height:24},Ut={textBaseline:"middle",fill:"#000",opacity:.45},Qt={fill:"#F7F7F7",stroke:"#BFBFBF",radius:2,opacity:1,cursor:"ew-resize",highLightFill:"#FFF"},Zt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"handler",x:0,y:0,width:10,height:24,style:Qt})},e.prototype.renderInner=function(t){var e=this.cfg,n=e.width,i=e.height,r=e.style,o=r.fill,a=r.stroke,s=r.radius,u=r.opacity,c=r.cursor;this.addShape(t,{type:"rect",id:this.getElementId("background"),attrs:{x:0,y:0,width:n,height:i,fill:o,stroke:a,radius:s,opacity:u,cursor:c}});var l=1/3*n,h=2/3*n,p=.25*i,f=.75*i;this.addShape(t,{id:this.getElementId("line-left"),type:"line",attrs:{x1:l,y1:p,x2:l,y2:f,stroke:a,cursor:c}}),this.addShape(t,{id:this.getElementId("line-right"),type:"line",attrs:{x1:h,y1:p,x2:h,y2:f,stroke:a,cursor:c}})},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.bindEvents=function(){var t=this;this.get("group").on("mouseenter",(function(){var e=t.get("style").highLightFill;t.getElementByLocalId("background").attr("fill",e),t.draw()})),this.get("group").on("mouseleave",(function(){var e=t.get("style").fill;t.getElementByLocalId("background").attr("fill",e),t.draw()}))},e.prototype.draw=function(){var t=this.get("container").get("canvas");t&&t.draw()},e}(L),$t=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onMouseDown=function(t){return function(n){e.currentTarget=t;var i=n.originalEvent;i.stopPropagation(),i.preventDefault(),e.prevX=Object(g.get)(i,"touches.0.pageX",i.pageX),e.prevY=Object(g.get)(i,"touches.0.pageY",i.pageY);var r=e.getContainerDOM();r.addEventListener("mousemove",e.onMouseMove),r.addEventListener("mouseup",e.onMouseUp),r.addEventListener("mouseleave",e.onMouseUp),r.addEventListener("touchmove",e.onMouseMove),r.addEventListener("touchend",e.onMouseUp),r.addEventListener("touchcancel",e.onMouseUp)}},e.onMouseMove=function(t){var n=e.cfg.width,i=[e.get("start"),e.get("end")];t.stopPropagation(),t.preventDefault();var r=Object(g.get)(t,"touches.0.pageX",t.pageX),o=Object(g.get)(t,"touches.0.pageY",t.pageY),a=r-e.prevX,s=e.adjustOffsetRange(a/n);e.updateStartEnd(s),e.updateUI(e.getElementByLocalId("foreground"),e.getElementByLocalId("minText"),e.getElementByLocalId("maxText")),e.prevX=r,e.prevY=o,e.draw(),e.emit("sliderchange",[e.get("start"),e.get("end")].sort()),e.delegateEmit("valuechanged",{originValue:i,value:[e.get("start"),e.get("end")]})},e.onMouseUp=function(){e.currentTarget&&(e.currentTarget=void 0);var t=e.getContainerDOM();t&&(t.removeEventListener("mousemove",e.onMouseMove),t.removeEventListener("mouseup",e.onMouseUp),t.removeEventListener("mouseleave",e.onMouseUp),t.removeEventListener("touchmove",e.onMouseMove),t.removeEventListener("touchend",e.onMouseUp),t.removeEventListener("touchcancel",e.onMouseUp))},e}return Object(d.__extends)(e,t),e.prototype.setRange=function(t,e){this.set("minLimit",t),this.set("maxLimit",e)},e.prototype.getRange=function(){return{min:this.get("minLimit")||0,max:this.get("maxLimit")||1}},e.prototype.setValue=function(t){if(Object(g.isArray)(t)&&2===t.length){var e=[this.get("start"),this.get("end")];this.update({start:t[0],end:t[1]}),this.get("updateAutoRender")||this.render(),this.delegateEmit("valuechanged",{originValue:e,value:t})}},e.prototype.getValue=function(){return[this.get("start"),this.get("end")]},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"slider",x:0,y:0,width:100,height:16,backgroundStyle:{},foregroundStyle:{},handlerStyle:{},textStyle:{},defaultCfg:{backgroundStyle:Ht,foregroundStyle:Vt,handlerStyle:Wt,textStyle:Ut}})},e.prototype.update=function(e){var n=e.start,i=e.end,r=Object(d.__assign)({},e);Object(g.isNil)(n)||(r.start=Object(g.clamp)(n,0,1)),Object(g.isNil)(i)||(r.end=Object(g.clamp)(i,0,1)),t.prototype.update.call(this,r),this.minHandler=this.getChildComponentById(this.getElementId("minHandler")),this.maxHandler=this.getChildComponentById(this.getElementId("maxHandler"))},e.prototype.init=function(){this.set("start",Object(g.clamp)(this.get("start"),0,1)),this.set("end",Object(g.clamp)(this.get("end"),0,1)),t.prototype.init.call(this)},e.prototype.renderInner=function(t){var e=this.cfg,n=(e.start,e.end,e.width),i=e.height,r=e.trendCfg,o=void 0===r?{}:r,a=e.minText,s=e.maxText,u=e.backgroundStyle,c=void 0===u?{}:u,l=e.foregroundStyle,h=void 0===l?{}:l,p=e.textStyle,f=void 0===p?{}:p,y=e.handlerStyle,v=void 0===y?{}:y;Object(g.size)(Object(g.get)(o,"data"))&&this.addComponent(t,Object(d.__assign)({component:qt,id:this.getElementId("trend"),x:0,y:0,width:n,height:i},o)),this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:Object(d.__assign)({x:0,y:0,width:n,height:i},c)});var m=this.addShape(t,{id:this.getElementId("minText"),type:"text",attrs:Object(d.__assign)({y:i/2,textAlign:"right",text:a,silent:!1},f)}),x=this.addShape(t,{id:this.getElementId("maxText"),type:"text",attrs:Object(d.__assign)({y:i/2,textAlign:"left",text:s,silent:!1},f)}),b=this.addShape(t,{id:this.getElementId("foreground"),name:"foreground",type:"rect",attrs:Object(d.__assign)({y:0,height:i},h)}),M=Object(g.get)(v,"height",24);this.minHandler=this.addComponent(t,Object(d.__assign)({component:Zt,id:this.getElementId("minHandler"),name:"handler-min",x:0,y:(i-M)/2,width:n,height:M,cursor:"ew-resize"},v)),this.maxHandler=this.addComponent(t,Object(d.__assign)({component:Zt,id:this.getElementId("maxHandler"),name:"handler-max",x:0,y:(i-M)/2,width:n,height:M,cursor:"ew-resize"},v)),this.updateUI(b,m,x)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.updateUI=function(t,e,n){var i=this.cfg,r=i.start,o=i.end,a=i.width,s=i.minText,u=i.maxText,c=i.handlerStyle,l=r*a,h=o*a;t.attr("x",l),t.attr("width",h-l);var p=Object(g.get)(c,"width",10);e.attr("text",s),n.attr("text",u);var f=this._dodgeText([l,h],e,n),d=f[0],y=f[1];this.minHandler&&(this.minHandler.update({x:l-p/2}),this.get("updateAutoRender")||this.minHandler.render()),Object(g.each)(d,(function(t,n){return e.attr(n,t)})),this.maxHandler&&(this.maxHandler.update({x:h-p/2}),this.get("updateAutoRender")||this.maxHandler.render()),Object(g.each)(y,(function(t,e){return n.attr(e,t)}))},e.prototype.bindEvents=function(){var t=this.get("group");t.on("handler-min:mousedown",this.onMouseDown("minHandler")),t.on("handler-min:touchstart",this.onMouseDown("minHandler")),t.on("handler-max:mousedown",this.onMouseDown("maxHandler")),t.on("handler-max:touchstart",this.onMouseDown("maxHandler"));var e=t.findById(this.getElementId("foreground"));e.on("mousedown",this.onMouseDown("foreground")),e.on("touchstart",this.onMouseDown("foreground"))},e.prototype.adjustOffsetRange=function(t){var e=this.cfg,n=e.start,i=e.end;switch(this.currentTarget){case"minHandler":var r=0-n,o=1-n;return Math.min(o,Math.max(r,t));case"maxHandler":return r=0-i,o=1-i,Math.min(o,Math.max(r,t));case"foreground":return r=0-n,o=1-i,Math.min(o,Math.max(r,t));default:return 0}},e.prototype.updateStartEnd=function(t){var e=this.cfg,n=e.start,i=e.end;switch(this.currentTarget){case"minHandler":n+=t;break;case"maxHandler":i+=t;break;case"foreground":n+=t,i+=t}this.set("start",n),this.set("end",i)},e.prototype._dodgeText=function(t,e,n){var i,r,o=this.cfg,a=o.handlerStyle,s=o.width,u=Object(g.get)(a,"width",10),c=t[0],l=t[1],h=!1;c>l&&(c=(i=[l,c])[0],l=i[1],e=(r=[n,e])[0],n=r[1],h=!0);var p=e.getBBox(),f=n.getBBox(),d=p.width>c-2?{x:c+u/2+2,textAlign:"left"}:{x:c-u/2-2,textAlign:"right"},y=f.width>s-l-2?{x:l-u/2-2,textAlign:"right"}:{x:l+u/2+2,textAlign:"left"};return h?[y,d]:[d,y]},e.prototype.draw=function(){var t=this.get("container"),e=t&&t.get("canvas");e&&e.draw()},e.prototype.getContainerDOM=function(){var t=this.get("container"),e=t&&t.get("canvas");return e&&e.get("container")},e}(L),Kt={default:{trackColor:"rgba(0,0,0,0)",thumbColor:"rgba(0,0,0,0.15)",size:8,lineCap:"round"},hover:{thumbColor:"rgba(0,0,0,0.2)"}},Jt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.clearEvents=g.noop,e.onStartEvent=function(t){return function(n){e.isMobile=t,n.originalEvent.preventDefault();var i=t?Object(g.get)(n.originalEvent,"touches.0.clientX"):n.clientX,r=t?Object(g.get)(n.originalEvent,"touches.0.clientY"):n.clientY;e.startPos=e.cfg.isHorizontal?i:r,e.bindLaterEvent()}},e.bindLaterEvent=function(){var t=e.getContainerDOM(),n=[];n=e.isMobile?[Object(wt.addEventListener)(t,"touchmove",e.onMouseMove),Object(wt.addEventListener)(t,"touchend",e.onMouseUp),Object(wt.addEventListener)(t,"touchcancel",e.onMouseUp)]:[Object(wt.addEventListener)(t,"mousemove",e.onMouseMove),Object(wt.addEventListener)(t,"mouseup",e.onMouseUp),Object(wt.addEventListener)(t,"mouseleave",e.onMouseUp)],e.clearEvents=function(){n.forEach((function(t){t.remove()}))}},e.onMouseMove=function(t){var n=e.cfg,i=n.isHorizontal,r=n.thumbOffset;t.preventDefault();var o=e.isMobile?Object(g.get)(t,"touches.0.clientX"):t.clientX,a=e.isMobile?Object(g.get)(t,"touches.0.clientY"):t.clientY,s=i?o:a,u=s-e.startPos;e.startPos=s,e.updateThumbOffset(r+u)},e.onMouseUp=function(t){t.preventDefault(),e.clearEvents()},e.onTrackClick=function(t){var n=e.cfg,i=n.isHorizontal,r=n.x,o=n.y,a=n.thumbLen,s=e.getContainerDOM().getBoundingClientRect(),u=t.clientX,c=t.clientY,l=i?u-s.left-r-a/2:c-s.top-o-a/2,h=e.validateRange(l);e.updateThumbOffset(h)},e.onThumbMouseOver=function(){var t=e.cfg.theme.hover.thumbColor;e.getElementByLocalId("thumb").attr("stroke",t),e.draw()},e.onThumbMouseOut=function(){var t=e.cfg.theme.default.thumbColor;e.getElementByLocalId("thumb").attr("stroke",t),e.draw()},e}return Object(d.__extends)(e,t),e.prototype.setRange=function(t,e){this.set("minLimit",t),this.set("maxLimit",e)},e.prototype.getRange=function(){return{min:this.get("minLimit"),max:this.get("maxLimit")}},e.prototype.setValue=function(t){var e=this.getValue();this.update({thumbOffset:this.get("trackLen")-this.get("thumbLen")*Object(g.clamp)(t,0,1)}),this.delegateEmit("valuechange",{originalValue:e,value:this.getValue()})},e.prototype.getValue=function(){return Object(g.clamp)(this.get("thumbOffset")/(this.get("trackLen")-this.get("thumbLen")),0,1)},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"scrollbar",isHorizontal:!0,minThumbLen:20,thumbOffset:0,theme:Kt})},e.prototype.renderInner=function(t){this.renderTrackShape(t),this.renderThumbShape(t)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.renderTrackShape=function(t){var e=this.cfg,n=e.trackLen,i=e.theme,r=(void 0===i?{default:{}}:i).default,o=r.lineCap,a=r.trackColor,s=r.size,u=this.get("isHorizontal")?{x1:0+s/2,y1:s/2,x2:n-s/2,y2:s/2,lineWidth:s,stroke:a,lineCap:o}:{x1:s/2,y1:0+s/2,x2:s/2,y2:n-s/2,lineWidth:s,stroke:a,lineCap:o};return this.addShape(t,{id:this.getElementId("track"),name:"track",type:"line",attrs:u})},e.prototype.renderThumbShape=function(t){var e=this.cfg,n=e.thumbOffset,i=e.thumbLen,r=e.theme,o=(void 0===r?{default:{}}:r).default,a=o.size,s=o.lineCap,u=o.thumbColor,c=this.get("isHorizontal")?{x1:n+a/2,y1:a/2,x2:n+i-a/2,y2:a/2,lineWidth:a,stroke:u,lineCap:s,cursor:"default"}:{x1:a/2,y1:n+a/2,x2:a/2,y2:n+i-a/2,lineWidth:a,stroke:u,lineCap:s,cursor:"default"};return this.addShape(t,{id:this.getElementId("thumb"),name:"thumb",type:"line",attrs:c})},e.prototype.bindEvents=function(){var t=this.get("group");t.on("mousedown",this.onStartEvent(!1)),t.on("mouseup",this.onMouseUp),t.on("touchstart",this.onStartEvent(!0)),t.on("touchend",this.onMouseUp),t.findById(this.getElementId("track")).on("click",this.onTrackClick);var e=t.findById(this.getElementId("thumb"));e.on("mouseover",this.onThumbMouseOver),e.on("mouseout",this.onThumbMouseOut)},e.prototype.getContainerDOM=function(){var t=this.get("container"),e=t&&t.get("canvas");return e&&e.get("container")},e.prototype.validateRange=function(t){var e=this.cfg,n=e.thumbLen,i=e.trackLen,r=t;return t+n>i?r=i-n:t+n=0},t.prototype.getAdjustRange=function(t,e,n){var i,r,o=this.yField,a=n.indexOf(e),s=n.length;return!o&&this.isAdjust("y")?(i=0,r=1):s>1?(i=n[0===a?0:a-1],r=n[a===s-1?s-1:a+1],0!==a?i+=(e-i)/2:i-=(r-e)/2,a!==s-1?r-=(r-e)/2:r+=(e-n[s-2])/2):(i=0===e?0:e-.5,r=0===e?1:e+.5),{pre:i,next:r}},t.prototype.adjustData=function(t,e){var n=this,r=this.getDimValues(e);i.each(t,(function(t,e){i.each(r,(function(i,r){n.adjustDim(r,i,t,e)}))}))},t.prototype.groupData=function(t,e){return i.each(t,(function(t){void 0===t[e]&&(t[e]=0)})),i.groupBy(t,e)},t.prototype.adjustDim=function(t,e,n,i){},t.prototype.getDimValues=function(t){var e=this.xField,n=this.yField,r={},o=[];return e&&this.isAdjust("x")&&o.push(e),n&&this.isAdjust("y")&&o.push(n),o.forEach((function(e){r[e]=i.valuesOfKey(t,e).sort((function(t,e){return t-e}))})),!n&&this.isAdjust("y")&&(r.y=[0,1]),r},t}(),o={},a=function(t){return o[t.toLowerCase()]},s=function(t,e){if(a(t))throw new Error("Adjust type '"+t+"' existed.");o[t.toLowerCase()]=e},u=n(1),c=function(t){function e(e){var n=t.call(this,e)||this;n.cacheMap={},n.adjustDataArray=[],n.mergeData=[];var i=e.marginRatio,r=void 0===i?.5:i,o=e.dodgeRatio,a=void 0===o?.5:o,s=e.dodgeBy;return n.marginRatio=r,n.dodgeRatio=a,n.dodgeBy=s,n}return Object(u.__extends)(e,t),e.prototype.process=function(t){var e=i.clone(t),n=i.flatten(e),r=this.dodgeBy,o=r?i.group(n,r):e;return this.cacheMap={},this.adjustDataArray=o,this.mergeData=n,this.adjustData(o,n),this.adjustDataArray=[],this.mergeData=[],e},e.prototype.adjustDim=function(t,e,n,r){var o=this,a=this.getDistribution(t),s=this.groupData(n,t);return i.each(s,(function(n,s){var u;u=1===e.length?{pre:e[0]-1,next:e[0]+1}:o.getAdjustRange(t,parseFloat(s),e),i.each(n,(function(e){var n=e[t],i=a[n],s=i.indexOf(r);e[t]=o.getDodgeOffset(u,s,i.length)}))})),[]},e.prototype.getDodgeOffset=function(t,e,n){var i=this.dodgeRatio,r=this.marginRatio,o=t.pre,a=t.next,s=a-o,u=s*i/n,c=r*u;return(o+a)/2+(.5*(s-n*u-(n-1)*c)+((e+1)*u+e*c)-.5*u-.5*s)},e.prototype.getDistribution=function(t){var e=this.adjustDataArray,n=this.cacheMap,r=n[t];return r||(r={},i.each(e,(function(e,n){var o=i.valuesOfKey(e,t);o.length||o.push(0),i.each(o,(function(t){r[t]||(r[t]=[]),r[t].push(n)}))})),n[t]=r),r},e}(r),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(u.__extends)(e,t),e.prototype.process=function(t){var e=i.clone(t),n=i.flatten(e);return this.adjustData(e,n),e},e.prototype.adjustDim=function(t,e,n){var r=this,o=this.groupData(n,t);return i.each(o,(function(n,i){return r.adjustGroup(n,t,parseFloat(i),e)}))},e.prototype.getAdjustOffset=function(t){var e,n=t.pre,i=t.next,r=.05*(i-n);return(i-r-(e=n+r))*Math.random()+e},e.prototype.adjustGroup=function(t,e,n,r){var o=this,a=this.getAdjustRange(e,n,r);return i.each(t,(function(t){t[e]=o.getAdjustOffset(a)})),t},e}(r),h=i.Cache,p=function(t){function e(e){var n=t.call(this,e)||this,i=e.adjustNames,r=void 0===i?["y"]:i,o=e.height,a=void 0===o?NaN:o,s=e.size,u=void 0===s?10:s,c=e.reverseOrder,l=void 0!==c&&c;return n.adjustNames=r,n.height=a,n.size=u,n.reverseOrder=l,n}return Object(u.__extends)(e,t),e.prototype.process=function(t){var e=this.yField,n=this.reverseOrder,i=e?this.processStack(t):this.processOneDimStack(t);return n?this.reverse(i):i},e.prototype.reverse=function(t){return t.slice(0).reverse()},e.prototype.processStack=function(t){var e=this.xField,n=this.yField,r=this.reverseOrder?this.reverse(t):t,o=new h,a=new h;return r.map((function(t){return t.map((function(t){var r,s=i.get(t,e,0),c=i.get(t,n),l=s.toString();if(c=i.isArray(c)?c[1]:c,!i.isNil(c)){var h=c>=0?o:a;h.has(l)||h.set(l,0);var p=h.get(l),f=c+p;return h.set(l,f),Object(u.__assign)(Object(u.__assign)({},t),((r={})[n]=[p,f],r))}return t}))}))},e.prototype.processOneDimStack=function(t){var e=this,n=this.xField,i=this.height,r=this.reverseOrder?this.reverse(t):t,o=new h;return r.map((function(t){return t.map((function(t){var r,a=e.size,s=t[n],c=2*a/i;o.has(s)||o.set(s,c/2);var l=o.get(s);return o.set(s,l+c),Object(u.__assign)(Object(u.__assign)({},t),((r={}).y=l,r))}))}))},e}(r),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(u.__extends)(e,t),e.prototype.process=function(t){var e=i.flatten(t),n=this.xField,r=this.yField,o=this.getXValuesMaxMap(e),a=Math.max.apply(Math,Object.keys(o).map((function(t){return o[t]})));return i.map(t,(function(t){return i.map(t,(function(t){var e,s,c=t[r],l=t[n];if(i.isArray(c)){var h=(a-o[l])/2;return Object(u.__assign)(Object(u.__assign)({},t),((e={})[r]=i.map(c,(function(t){return h+t})),e))}var p=(a-c)/2;return Object(u.__assign)(Object(u.__assign)({},t),((s={})[r]=[p,c+p],s))}))}))},e.prototype.getXValuesMaxMap=function(t){var e=this,n=this.xField,r=this.yField,o=i.groupBy(t,(function(t){return t[n]}));return i.mapValues(o,(function(t){return e.getDimMaxValue(t,r)}))},e.prototype.getDimMaxValue=function(t,e){var n=i.map(t,(function(t){return i.get(t,e,[])})),r=i.flatten(n);return Math.max.apply(Math,r)},e}(r);s("Dodge",c),s("Jitter",l),s("Stack",p),s("Symmetric",f)},function(t,e,n){"use strict";n.r(e),n.d(e,"getCoordinate",(function(){return h})),n.d(e,"registerCoordinate",(function(){return p})),n.d(e,"Coordinate",(function(){return a}));var i=n(1),r=n(2),o=n(0),a=function(){function t(t){this.type="coordinate",this.isRect=!1,this.isHelix=!1,this.isPolar=!1,this.isReflectX=!1,this.isReflectY=!1;var e=t.start,n=t.end,r=t.matrix,o=void 0===r?[1,0,0,0,1,0,0,0,1]:r,a=t.isTransposed,s=void 0!==a&&a;this.start=e,this.end=n,this.matrix=o,this.originalMatrix=Object(i.__spreadArrays)(o),this.isTransposed=s}return t.prototype.initial=function(){this.center={x:(this.start.x+this.end.x)/2,y:(this.start.y+this.end.y)/2},this.width=Math.abs(this.end.x-this.start.x),this.height=Math.abs(this.end.y-this.start.y)},t.prototype.update=function(t){o.assign(this,t),this.initial()},t.prototype.convertDim=function(t,e){var n,i=this[e],r=i.start,o=i.end;return this.isReflect(e)&&(r=(n=[o,r])[0],o=n[1]),r+t*(o-r)},t.prototype.invertDim=function(t,e){var n,i=this[e],r=i.start,o=i.end;return this.isReflect(e)&&(r=(n=[o,r])[0],o=n[1]),(t-r)/(o-r)},t.prototype.applyMatrix=function(t,e,n){void 0===n&&(n=0);var i=this.matrix,o=[t,e,n];return r.vec3.transformMat3(o,o,i),o},t.prototype.invertMatrix=function(t,e,n){void 0===n&&(n=0);var i=this.matrix,o=r.mat3.invert([],i),a=[t,e,n];return r.vec3.transformMat3(a,a,o),a},t.prototype.convert=function(t){var e=this.convertPoint(t),n=e.x,i=e.y,r=this.applyMatrix(n,i,1);return{x:r[0],y:r[1]}},t.prototype.invert=function(t){var e=this.invertMatrix(t.x,t.y,1);return this.invertPoint({x:e[0],y:e[1]})},t.prototype.rotate=function(t){var e=this.matrix,n=this.center;return r.mat3.translate(e,e,[-n.x,-n.y]),r.mat3.rotate(e,e,t),r.mat3.translate(e,e,[n.x,n.y]),this},t.prototype.reflect=function(t){return"x"===t?this.isReflectX=!this.isReflectX:this.isReflectY=!this.isReflectY,this},t.prototype.scale=function(t,e){var n=this.matrix,i=this.center;return r.mat3.translate(n,n,[-i.x,-i.y]),r.mat3.scale(n,n,[t,e]),r.mat3.translate(n,n,[i.x,i.y]),this},t.prototype.translate=function(t,e){var n=this.matrix;return r.mat3.translate(n,n,[t,e]),this},t.prototype.transpose=function(){return this.isTransposed=!this.isTransposed,this},t.prototype.getCenter=function(){return this.center},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.isReflect=function(t){return"x"===t?this.isReflectX:this.isReflectY},t.prototype.resetMatrix=function(t){this.matrix=t||Object(i.__spreadArrays)(this.originalMatrix)},t}(),s=function(t){function e(e){var n=t.call(this,e)||this;return n.isRect=!0,n.type="cartesian",n.initial(),n}return Object(i.__extends)(e,t),e.prototype.initial=function(){t.prototype.initial.call(this);var e=this.start,n=this.end;this.x={start:e.x,end:n.x},this.y={start:e.y,end:n.y}},e.prototype.convertPoint=function(t){var e,n=t.x,i=t.y;return this.isTransposed&&(n=(e=[i,n])[0],i=e[1]),{x:this.convertDim(n,"x"),y:this.convertDim(i,"y")}},e.prototype.invertPoint=function(t){var e,n=this.invertDim(t.x,"x"),i=this.invertDim(t.y,"y");return this.isTransposed&&(n=(e=[i,n])[0],i=e[1]),{x:n,y:i}},e}(a),u=function(t){function e(e){var n=t.call(this,e)||this;n.isHelix=!0,n.type="helix";var i=e.startAngle,r=void 0===i?1.25*Math.PI:i,o=e.endAngle,a=void 0===o?7.25*Math.PI:o,s=e.innerRadius,u=void 0===s?0:s,c=e.radius;return n.startAngle=r,n.endAngle=a,n.innerRadius=u,n.radius=c,n.initial(),n}return Object(i.__extends)(e,t),e.prototype.initial=function(){t.prototype.initial.call(this);var e=(this.endAngle-this.startAngle)/(2*Math.PI)+1,n=Math.min(this.width,this.height)/2;this.radius&&this.radius>=0&&this.radius<=1&&(n*=this.radius),this.d=Math.floor(n*(1-this.innerRadius)/e),this.a=this.d/(2*Math.PI),this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*n,end:this.innerRadius*n+.99*this.d}},e.prototype.convertPoint=function(t){var e,n=t.x,i=t.y;this.isTransposed&&(n=(e=[i,n])[0],i=e[1]);var r=this.convertDim(n,"x"),o=this.a*r,a=this.convertDim(i,"y");return{x:this.center.x+Math.cos(r)*(o+a),y:this.center.y+Math.sin(r)*(o+a)}},e.prototype.invertPoint=function(t){var e,n=this.d+this.y.start,i=r.vec2.subtract([],[t.x,t.y],[this.center.x,this.center.y]),a=r.vec2.angleTo(i,[1,0],!0),s=a*this.a;r.vec2.length(i)this.width/i?(e=this.width/i,this.circleCenter={x:this.center.x-(.5-o)*this.width,y:this.center.y-(.5-a)*e*r}):(e=this.height/r,this.circleCenter={x:this.center.x-(.5-o)*e*i,y:this.center.y-(.5-a)*this.height}),this.polarRadius=this.radius,this.radius?this.radius>0&&this.radius<=1?this.polarRadius=e*this.radius:(this.radius<=0||this.radius>e)&&(this.polarRadius=e):this.polarRadius=e,this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*this.polarRadius,end:this.polarRadius}},e.prototype.getRadius=function(){return this.polarRadius},e.prototype.convertPoint=function(t){var e,n=this.getCenter(),i=t.x,r=t.y;return this.isTransposed&&(i=(e=[r,i])[0],r=e[1]),i=this.convertDim(i,"x"),r=this.convertDim(r,"y"),{x:n.x+Math.cos(i)*r,y:n.y+Math.sin(i)*r}},e.prototype.invertPoint=function(t){var e=this.getCenter(),n=[t.x-e.x,t.y-e.y],i=[1,0,0,0,1,0,0,0,1];r.mat3.rotate(i,i,this.startAngle);var a=[1,0,0];r.vec3.transformMat3(a,a,i),a=[a[0],a[1]];var s=r.vec2.angleTo(a,n,this.endAngle0?c:-c;var l=this.invertDim(u,"y"),h={x:0,y:0};return h.x=this.isTransposed?l:c,h.y=this.isTransposed?c:l,h},e.prototype.getCenter=function(){return this.circleCenter},e.prototype.getOneBox=function(){var t=this.startAngle,e=this.endAngle;if(Math.abs(e-t)>=2*Math.PI)return{minX:-1,maxX:1,minY:-1,maxY:1};for(var n=[0,Math.cos(t),Math.cos(e)],i=[0,Math.sin(t),Math.sin(e)],r=Math.min(t,e);r=0;return n?r?2*Math.PI-i:i:r?i:2*Math.PI-i},o.vertical=function(t,e,n){return n?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t};var s=o,u=n("knIs"),c=function(t,e){var n=t?Object(a.clone)(t):[1,0,0,0,1,0,0,0,1];return Object(a.each)(e,(function(t){switch(t[0]){case"t":r.translate(n,n,[t[1],t[2]]);break;case"s":r.scale(n,n,[t[1],t[2]]);break;case"r":r.rotate(n,n,t[1]);break;case"m":r.multiply(n,n,t[1]);break;default:return!1}})),n};n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return s})),n.d(e,"d",(function(){return u})),n.d(e,"b",(function(){return c}))},"6UX8":function(t,e,n){"use strict";n.r(e);var i=n("iTfj"),r=/rgba?\(([\s.,0-9]+)\)/,o=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,a=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,s=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,u=function(t,e,n,i){return t[i]+(e[i]-t[i])*n};function c(t){return"#"+p(t[0])+p(t[1])+p(t[2])}var l,h=function(t){return[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16)]},p=function(t){var e=Math.round(t).toString(16);return 1===e.length?"0"+e:e},f=function(t){if("#"===t[0]&&7===t.length)return t;var e;l||((e=document.createElement("i")).title="Web Colour Picker",e.style.display="none",document.body.appendChild(e),l=e),l.style.color=t;var n=document.defaultView.getComputedStyle(l,"").getPropertyValue("color");return n=c(r.exec(n)[1].split(/\s*,\s*/).map((function(t){return Number(t)})))};e.default={rgb2arr:h,gradient:function(t){var e=Object(i.isString)(t)?t.split("-"):t,n=Object(i.map)(e,(function(t){return h(-1===t.indexOf("#")?f(t):t)}));return function(t){return function(t,e){var n=isNaN(Number(e))||e<0?0:e>1?1:Number(e),i=t.length-1,r=Math.floor(i*n),o=i*n-r,a=t[r],s=r===i?a:t[r+1];return c([u(a,s,o,0),u(a,s,o,1),u(a,s,o,2)])}(n,t)}},toRGB:Object(i.memoize)(f),toCSSGradient:function(t){if(/^[r,R,L,l]{1}[\s]*\(/.test(t)){var e,n=void 0;if("l"===t[0]){var r=+(u=o.exec(t))[1]+90;n=u[2],e="linear-gradient("+r+"deg, "}else if("r"===t[0]){var u;e="radial-gradient(",n=(u=a.exec(t))[4]}var c=n.match(s);return Object(i.each)(c,(function(t,n){var i=t.split(":");e+=i[1]+" "+100*i[0]+"%",n!==c.length-1&&(e+=", ")})),e+=")"}return t}}},"9f2G":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("mrSG"),r=n("iTfj"),o=n("yLks"),a=n("sB4O");e.DEFAULT_ANIMATE_CFG={appear:{duration:450,easing:"easeQuadOut"},update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}};var s={interval:function(t){return{enter:{animation:t.isRect?t.isTransposed?"scale-in-x":"scale-in-y":"fade-in"},update:{animation:t.isPolar&&t.isTransposed?"sector-path-update":null},leave:{animation:"fade-out"}}},line:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},path:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},point:{appear:{animation:"zoom-in"},enter:{animation:"zoom-in"},leave:{animation:"zoom-out"}},area:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},polygon:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},schema:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},edge:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},label:{appear:{animation:"fade-in",delay:450},enter:{animation:"fade-in"},update:{animation:"position-update"},leave:{animation:"fade-out"}}},u={line:function(){return{animation:"wave-in"}},area:function(){return{animation:"wave-in"}},path:function(){return{animation:"fade-in"}},interval:function(t){var e;return t.isRect?e=t.isTransposed?"grow-in-x":"grow-in-y":(e="grow-in-xy",t.isPolar&&t.isTransposed&&(e="wave-in")),{animation:e}},schema:function(t){return{animation:t.isRect?t.isTransposed?"grow-in-x":"grow-in-y":"grow-in-xy"}},polygon:function(){return{animation:"fade-in",duration:500}},edge:function(){return{animation:"fade-in"}}};e.getDefaultAnimateCfg=function(t,n,i){var o=s[t];return o&&(r.isFunction(o)&&(o=o(n)),o=r.deepMix({},e.DEFAULT_ANIMATE_CFG,o),i)?o[i]:o},e.doAnimate=function(t,e,n){var i=r.get(t.get("origin"),"data",o.FIELD_ORIGIN),s=e.animation,u=function(t,e){return{delay:r.isFunction(t.delay)?t.delay(e):t.delay,easing:r.isFunction(t.easing)?t.easing(e):t.easing,duration:r.isFunction(t.duration)?t.duration(e):t.duration,callback:t.callback}}(e,i);if(s){var c=a.getAnimation(s);c&&c(t,u,n)}else t.animate(n.toAttrs,u)},e.doGroupAppearAnimate=function(t,n,o,s,c){if(u[o]){var l=u[o](s),h=a.getAnimation(r.get(l,"animation",""));if(h){var p=i.__assign(i.__assign(i.__assign({},e.DEFAULT_ANIMATE_CFG.appear),l),n);t.stopAnimate(),h(t,p,{coordinate:s,minYPoint:c,toAttrs:null})}}}},Afl5:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("vYtJ");e.default=function(t){return Array.isArray?Array.isArray(t):i.default(t,"Array")}},"AmJ+":function(t,e,n){"use strict";function i(t,e,n,i,r){return{left:tr.x+r.width,top:er.y+r.height}}function r(t,e,n,i,r,o){var a=t,s=e;switch(o){case"left":a=t-i-n,s=e-r/2;break;case"right":a=t+n,s=e-r/2;break;case"top":a=t-i/2,s=e-r-n;break;case"bottom":a=t-i/2,s=e+n;break;default:a=t+n,s=e-r-n}return{x:a,y:s}}Object.defineProperty(e,"__esModule",{value:!0}),e.getOutSides=i,e.getPointByPosition=r,e.getAlignPoint=function(t,e,n,o,a,s,u){var c=r(t,e,n,o,a,s);if(u){var l=i(c.x,c.y,o,a,u);"auto"===s?(l.right&&(c.x=t-o-n),l.top&&(c.y=e+n)):"top"===s||"bottom"===s?(l.left&&(c.x=u.x),l.right&&(c.x=u.x+u.width-o),"top"===s&&l.top&&(c.y=e+n),"bottom"===s&&l.bottom&&(c.y=e-a-n)):(l.top&&(c.y=u.y),l.bottom&&(c.y=u.y+u.height-a),"left"===s&&l.left&&(c.x=t+n),"right"===s&&l.right&&(c.x=t-o-n))}return c}},Bu9b:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){return"object"==typeof t&&null!==t}},CtsN:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={fontFamily:'\n "-apple-system", BlinkMacSystemFont, "Segoe UI", Roboto,"Helvetica Neue",\n Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",\n SimSun, "sans-serif"',textColor:"#2C3542",activeTextColor:"#333333",uncheckedColor:"#D8D8D8",lineColor:"#416180",regionColor:"#CCD7EB",verticalAxisRotate:-Math.PI/4,horizontalAxisRotate:Math.PI/4}},Gd02:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this._events={}}return t.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},t.prototype.once=function(t,e){return this.on(t,e,!0),this},t.prototype.emit=function(t){for(var e=this,n=[],i=1;i=0;n--)t.removeChild(e[n])},e.hasClass=function(t,e){return!!t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))},e.regionToBBox=function(t){var e=t.start,n=t.end,i=Math.min(e.x,n.x),r=Math.min(e.y,n.y),o=Math.max(e.x,n.x),a=Math.max(e.y,n.y);return{x:i,y:r,minX:i,minY:r,maxX:o,maxY:a,width:o-i,height:a-r}},e.pointsToBBox=function(t){var e=t.map((function(t){return t.x})),n=t.map((function(t){return t.y})),i=Math.min.apply(Math,e),r=Math.min.apply(Math,n),o=Math.max.apply(Math,e),a=Math.max.apply(Math,n);return{x:i,y:r,minX:i,minY:r,maxX:o,maxY:a,width:o-i,height:a-r}},e.createBBox=r,e.getValueByPercent=function(t,e,n){return(1-n)*t+e*n},e.getCirclePoint=function(t,e,n){return{x:t.x+Math.cos(n)*e,y:t.y+Math.sin(n)*e}},e.distance=function(t,e){var n=e.x-t.x,i=e.y-t.y;return Math.sqrt(n*n+i*i)},e.wait=function(t){return new Promise((function(e){setTimeout(e,t)}))},e.near=function(t,e){return[t,e].includes(1/0)?Math.abs(t)===Math.abs(e):Math.abs(t-e)0?i.each(p,(function(e){if(e.get("visible")){if(e.isGroup()&&0===e.get("children").length)return!0;var n=t(e),i=e.applyToMatrix([n.minX,n.minY,1]),r=e.applyToMatrix([n.minX,n.maxY,1]),o=e.applyToMatrix([n.maxX,n.minY,1]),a=e.applyToMatrix([n.maxX,n.maxY,1]),s=Math.min(i[0],r[0],o[0],a[0]),p=Math.max(i[0],r[0],o[0],a[0]),f=Math.min(i[1],r[1],o[1],a[1]),d=Math.max(i[1],r[1],o[1],a[1]);sc&&(c=p),fh&&(h=d)}})):(u=0,c=0,l=0,h=0),n=r(u,l,c-u,h-l)}else n=e.getBBox();return s?o(n,s):n},e.updateClip=function(t,e){if(t.getClip()||e.getClip()){var n=e.getClip();if(n){var i={type:n.get("type"),attrs:n.attr()};t.setClip(i)}else t.setClip(null)}}},PFw5:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("c54I");e.default=function(t){var e=i.default(t);return e.charAt(0).toUpperCase()+e.substring(1)}},PXQu:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("mrSG"),r=n("fW3x"),o=n("fggK");e.SHAPES=["circle","square","bowtie","diamond","hexagon","triangle","triangle-down"],e.HOLLOW_SHAPES=["cross","tick","plus","hyphen","line"],e.drawPoints=function(t,e,n,a,s){var u=o.getStyle(e,s,!s,"r"),c=t.parsePoints(e.points);if(c.length>1){for(var l=n.addGroup(),h=0,p=c;h0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r);return t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,n){var i=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=i,t},e.lerp=function(t,e,n,i){var r=e[0],o=e[1];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t},e.random=function(t,e){e=e||1;var n=2*i.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.transformMat2=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t},e.transformMat2d=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t},e.transformMat3=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[3]*r+n[6],t[1]=n[1]*i+n[4]*r+n[7],t},e.transformMat4=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[4]*r+n[12],t[1]=n[1]*i+n[5]*r+n[13],t},e.rotate=function(t,e,n,i){var r=e[0]-n[0],o=e[1]-n[1],a=Math.sin(i),s=Math.cos(i);return t[0]=r*s-o*a+n[0],t[1]=r*a+o*s+n[1],t},e.angle=function(t,e){var n=t[0],i=t[1],r=e[0],o=e[1],a=n*n+i*i;a>0&&(a=1/Math.sqrt(a));var s=r*r+o*o;s>0&&(s=1/Math.sqrt(s));var u=(n*r+i*o)*a*s;return u>1?0:u<-1?Math.PI:Math.acos(u)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],r=t[1],o=e[0],a=e[1];return Math.abs(n-o)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(a))};var i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n("jWDG"));function r(){var t=new i.ARRAY_TYPE(2);return i.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function o(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function a(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function s(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function u(t,e){var n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)}function c(t,e){var n=e[0]-t[0],i=e[1]-t[1];return n*n+i*i}function l(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function h(t){var e=t[0],n=t[1];return e*e+n*n}var p;e.len=l,e.sub=o,e.mul=a,e.div=s,e.dist=u,e.sqrDist=c,e.sqrLen=h,e.forEach=(p=r(),function(t,e,n,i,r,o){var a=void 0,s=void 0;for(e||(e=2),n||(n=0),s=i?Math.min(i*e+n,t.length):t.length,a=n;a",updateAutoRender:!0,parent:null})},e.prototype.getContainer=function(){return this.get("container")},e.prototype.show=function(){this.get("container").style.display="",this.set("visible",!0)},e.prototype.hide=function(){this.get("container").style.display="none",this.set("visible",!1)},e.prototype.setCapture=function(t){var e=t?"auto":"none";this.getContainer().style.pointerEvents=e,this.set("capture",t)},e.prototype.getBBox=function(){var t=this.getContainer(),e=parseFloat(t.style.left)||0,n=parseFloat(t.style.top)||0;return a.createBBox(e,n,t.clientWidth,t.clientHeight)},e.prototype.clear=function(){var t=this.get("container");a.clearDom(t)},e.prototype.destroy=function(){this.removeEvent(),this.removeDom(),t.prototype.destroy.call(this)},e.prototype.init=function(){t.prototype.init.call(this),this.initContainer(),this.initEvent(),this.initCapture(),this.initVisible()},e.prototype.initCapture=function(){this.setCapture(this.get("capture"))},e.prototype.initVisible=function(){this.get("visible")?this.show():this.hide()},e.prototype.initContainer=function(){var t=this.get("container");if(o.isNil(t)){t=this.createDom();var e=this.get("parent");o.isString(e)&&(e=document.getElementById(e),this.set("parent",e)),e.appendChild(t),this.set("container",t)}else o.isString(t)&&(t=document.getElementById(t),this.set("container",t));this.get("parent")||this.set("parent",t.parentNode)},e.prototype.createDom=function(){var t=this.get("containerTpl");return r.createDom(t)},e.prototype.initEvent=function(){},e.prototype.removeDom=function(){var t=this.get("container");t&&t.parentNode.removeChild(t)},e.prototype.removeEvent=function(){},e}(n("rDfp").default);e.default=s},aFU3:function(t,e,n){"use strict";n.r(e);var i={};n.r(i),n.d(i,"catmullRomToBezier",(function(){return l})),n.d(i,"fillPath",(function(){return E})),n.d(i,"fillPathByDiff",(function(){return B})),n.d(i,"formatPath",(function(){return R})),n.d(i,"intersection",(function(){return j})),n.d(i,"parsePathArray",(function(){return m})),n.d(i,"parsePathString",(function(){return c})),n.d(i,"pathToAbsolute",(function(){return p})),n.d(i,"pathToCurve",(function(){return y})),n.d(i,"rectPath",(function(){return O}));var r={};n.r(r),n.d(r,"easeLinear",(function(){return Bt})),n.d(r,"easeQuad",(function(){return Rt})),n.d(r,"easeQuadIn",(function(){return Dt})),n.d(r,"easeQuadOut",(function(){return Ft})),n.d(r,"easeQuadInOut",(function(){return Rt})),n.d(r,"easeCubic",(function(){return Xt})),n.d(r,"easeCubicIn",(function(){return Nt})),n.d(r,"easeCubicOut",(function(){return Yt})),n.d(r,"easeCubicInOut",(function(){return Xt})),n.d(r,"easePoly",(function(){return qt})),n.d(r,"easePolyIn",(function(){return Gt})),n.d(r,"easePolyOut",(function(){return zt})),n.d(r,"easePolyInOut",(function(){return qt})),n.d(r,"easeSin",(function(){return Qt})),n.d(r,"easeSinIn",(function(){return Wt})),n.d(r,"easeSinOut",(function(){return Ut})),n.d(r,"easeSinInOut",(function(){return Qt})),n.d(r,"easeExp",(function(){return Kt})),n.d(r,"easeExpIn",(function(){return Zt})),n.d(r,"easeExpOut",(function(){return $t})),n.d(r,"easeExpInOut",(function(){return Kt})),n.d(r,"easeCircle",(function(){return ee})),n.d(r,"easeCircleIn",(function(){return Jt})),n.d(r,"easeCircleOut",(function(){return te})),n.d(r,"easeCircleInOut",(function(){return ee})),n.d(r,"easeBounce",(function(){return fe})),n.d(r,"easeBounceIn",(function(){return pe})),n.d(r,"easeBounceOut",(function(){return fe})),n.d(r,"easeBounceInOut",(function(){return de})),n.d(r,"easeBack",(function(){return ve})),n.d(r,"easeBackIn",(function(){return ge})),n.d(r,"easeBackOut",(function(){return ye})),n.d(r,"easeBackInOut",(function(){return ve})),n.d(r,"easeElastic",(function(){return be})),n.d(r,"easeElasticIn",(function(){return xe})),n.d(r,"easeElasticOut",(function(){return be})),n.d(r,"easeElasticInOut",(function(){return Me}));var o=n("iTfj"),a="\t\n\v\f\r   ᠎              \u2028\u2029",s=new RegExp("([a-z])["+a+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+a+"]*,?["+a+"]*)+)","ig"),u=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+a+"]*,?["+a+"]*","ig"),c=function(t){if(!t)return null;if(Object(o.isArray)(t))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(t).replace(s,(function(i,r,o){var a=[],s=r.toLowerCase();if(o.replace(u,(function(t,e){e&&a.push(+e)})),"m"===s&&a.length>2&&(n.push([r].concat(a.splice(0,2))),s="l",r="m"===r?"l":"L"),"o"===s&&1===a.length&&n.push([r,a[0]]),"r"===s)n.push([r].concat(a));else for(;a.length>=e[s]&&(n.push([r].concat(a.splice(0,e[s]))),e[s]););return t})),n},l=function(t,e){for(var n=[],i=0,r=t.length;r-2*!e>i;i+=2){var o=[{x:+t[i-2],y:+t[i-1]},{x:+t[i],y:+t[i+1]},{x:+t[i+2],y:+t[i+3]},{x:+t[i+4],y:+t[i+5]}];e?i?r-4===i?o[3]={x:+t[0],y:+t[1]}:r-2===i&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[r-2],y:+t[r-1]}:r-4===i?o[3]=o[2]:i||(o[0]={x:+t[i],y:+t[i+1]}),n.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return n},h=function(t,e,n,i,r){var o=[];if(null===r&&null===i&&(i=n),t=+t,e=+e,n=+n,i=+i,null!==r){var a=Math.PI/180,s=t+n*Math.cos(-i*a),u=t+n*Math.cos(-r*a);o=[["M",s,e+n*Math.sin(-i*a)],["A",n,n,0,+(r-i>180),0,u,e+n*Math.sin(-r*a)]]}else o=[["M",t,e],["m",0,-i],["a",n,i,0,1,1,0,2*i],["a",n,i,0,1,1,0,-2*i],["z"]];return o},p=function(t){if(!(t=c(t))||!t.length)return[["M",0,0]];var e,n,i=[],r=0,o=0,a=0,s=0,u=0;"M"===t[0][0]&&(a=r=+t[0][1],s=o=+t[0][2],u++,i[0]=["M",r,o]);for(var p=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),f=void 0,d=void 0,g=u,y=t.length;g1&&(n*=_=Math.sqrt(_),i*=_);var w=n*n,O=i*i,C=(o===a?-1:1)*Math.sqrt(Math.abs((w*O-w*M*M-O*b*b)/(w*M*M+O*b*b)));f=C*n*M/i+(t+s)/2,d=C*-i*b/n+(e+u)/2,h=Math.asin(((e-d)/i).toFixed(9)),p=Math.asin(((u-d)/i).toFixed(9)),h=tp&&(h-=2*Math.PI),!a&&p>h&&(p-=2*Math.PI)}var S=p-h;if(Math.abs(S)>y){var A=p,P=s,j=u;p=h+y*(a&&p>h?1:-1),s=f+n*Math.cos(p),u=d+i*Math.sin(p),m=g(s,u,n,i,r,0,a,P,j,[p,A,f,d])}S=p-h;var k=Math.cos(h),T=Math.sin(h),E=Math.cos(p),I=Math.sin(p),L=Math.tan(S/4),B=4/3*n*L,D=4/3*i*L,F=[t,e],R=[t+B*T,e-D*k],N=[s+B*I,u-D*E],Y=[s,u];if(R[0]=2*F[0]-R[0],R[1]=2*F[1]-R[1],c)return[R,N,Y].concat(m);for(var X=[],G=0,z=(m=[R,N,Y].concat(m).join().split(",")).length;G7){t[e].shift();for(var o=t[e];o.length;)s[e]="A",r&&(u[e]="A"),t.splice(e++,0,["C"].concat(o.splice(0,6)));t.splice(e,1),n=Math.max(i.length,r&&r.length||0)}},v=function(t,e,o,a,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),o.bx=0,o.by=0,o.x=t[s][1],o.y=t[s][2],n=Math.max(i.length,r&&r.length||0))};n=Math.max(i.length,r&&r.length||0);for(var m=0;m1?1:u<0?0:u)/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],p=0,f=0;f<12;f++){var d=c*l[f]+c,g=x(d,t,n,r,a),y=x(d,e,i,o,s),v=g*g+y*y;p+=h[f]*Math.sqrt(v)}return c*p},M=function(t,e,n,i,r,o,a,s){for(var u,c,l,h,p=[],f=[[],[]],d=0;d<2;++d)if(0===d?(c=6*t-12*n+6*r,u=-3*t+9*n-9*r+3*a,l=3*n-3*t):(c=6*e-12*i+6*o,u=-3*e+9*i-9*o+3*s,l=3*i-3*e),Math.abs(u)<1e-12){if(Math.abs(c)<1e-12)continue;(h=-l/c)>0&&h<1&&p.push(h)}else{var g=c*c-4*l*u,y=Math.sqrt(g);if(!(g<0)){var v=(-c+y)/(2*u);v>0&&v<1&&p.push(v);var m=(-c-y)/(2*u);m>0&&m<1&&p.push(m)}}for(var x,b=p.length,M=b;b--;)x=1-(h=p[b]),f[0][b]=x*x*x*t+3*x*x*h*n+3*x*h*h*r+h*h*h*a,f[1][b]=x*x*x*e+3*x*x*h*i+3*x*h*h*o+h*h*h*s;return f[0][M]=t,f[1][M]=e,f[0][M+1]=a,f[1][M+1]=s,f[0].length=f[1].length=M+2,{min:{x:Math.min.apply(0,f[0]),y:Math.min.apply(0,f[1])},max:{x:Math.max.apply(0,f[0]),y:Math.max.apply(0,f[1])}}},_=function(t,e,n,i,r,o,a,s){if(!(Math.max(t,n)Math.max(r,a)||Math.max(e,i)Math.max(o,s))){var u=(t-n)*(o-s)-(e-i)*(r-a);if(u){var c=((t*i-e*n)*(r-a)-(t-n)*(r*s-o*a))/u,l=((t*i-e*n)*(o-s)-(e-i)*(r*s-o*a))/u,h=+c.toFixed(2),p=+l.toFixed(2);if(!(h<+Math.min(t,n).toFixed(2)||h>+Math.max(t,n).toFixed(2)||h<+Math.min(r,a).toFixed(2)||h>+Math.max(r,a).toFixed(2)||p<+Math.min(e,i).toFixed(2)||p>+Math.max(e,i).toFixed(2)||p<+Math.min(o,s).toFixed(2)||p>+Math.max(o,s).toFixed(2)))return{x:c,y:l}}}},w=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},O=function(t,e,n,i,r){if(r)return[["M",+t+ +r,e],["l",n-2*r,0],["a",r,r,0,0,1,r,r],["l",0,i-2*r],["a",r,r,0,0,1,-r,r],["l",2*r-n,0],["a",r,r,0,0,1,-r,-r],["l",0,2*r-i],["a",r,r,0,0,1,r,-r],["z"]];var o=[["M",t,e],["l",n,0],["l",0,i],["l",-n,0],["z"]];return o.parsePathArray=m,o},C=function(t,e,n,i){return null===t&&(t=e=n=i=0),null===e&&(e=t.y,n=t.width,i=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:i,h:i,x2:t+n,y2:e+i,cx:t+n/2,cy:e+i/2,r1:Math.min(n,i)/2,r2:Math.max(n,i)/2,r0:Math.sqrt(n*n+i*i)/2,path:O(t,e,n,i),vb:[t,e,n,i].join(" ")}},S=function(t,e,n,i,r,a,s,u){Object(o.isArray)(t)||(t=[t,e,n,i,r,a,s,u]);var c=M.apply(null,t);return C(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)},A=function(t,e,n,i,r,o,a,s,u){var c=1-u,l=Math.pow(c,3),h=Math.pow(c,2),p=u*u,f=p*u,d=t+2*u*(n-t)+p*(r-2*n+t),g=e+2*u*(i-e)+p*(o-2*i+e),y=n+2*u*(r-n)+p*(a-2*r+n),v=i+2*u*(o-i)+p*(s-2*o+i);return{x:l*t+3*h*u*n+3*c*u*u*r+f*a,y:l*e+3*h*u*i+3*c*u*u*o+f*s,m:{x:d,y:g},n:{x:y,y:v},start:{x:c*t+u*n,y:c*e+u*i},end:{x:c*r+u*a,y:c*o+u*s},alpha:90-180*Math.atan2(d-y,g-v)/Math.PI}},P=function(t,e,n){if(!function(t,e){return t=C(t),e=C(e),w(e,t.x,t.y)||w(e,t.x2,t.y)||w(e,t.x,t.y2)||w(e,t.x2,t.y2)||w(t,e.x,e.y)||w(t,e.x2,e.y)||w(t,e.x,e.y2)||w(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(S(t),S(e)))return n?0:[];for(var i=~~(b.apply(0,t)/8),r=~~(b.apply(0,e)/8),o=[],a=[],s={},u=n?0:[],c=0;c=0&&x<=1&&M>=0&&M<=1&&(n?u+=1:u.push({x:m.x,y:m.y,t1:x,t2:M}))}}return u},j=function(t,e){return function(t,e,n){var i,r,o,a,s,u,c,l,h,p;t=y(t),e=y(e);for(var f=n?0:[],d=0,g=t.length;d=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e=e.concat(t[t.length-1])}))}(t,e,n));else{var r=[].concat(t);"M"===r[0]&&(r[0]="L");for(var o=0;o<=n-1;o++)i.push(r)}return i},E=function(t,e){if(1===t.length)return t;var n=t.length-1,i=e.length-1,r=n/i,o=[];if(1===t.length&&"M"===t[0][0]){for(var a=0;a=0;u--)a=o[u].index,"add"===o[u].type?t.splice(a,0,[].concat(t[a])):t.splice(a,1)}var h=r-(i=t.length);if(i0)){t[i]=e[i];break}n=D(n,t[i-1],1)}t[i]=["Q"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[i]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(i>0)){t[i]=e[i];break}n=D(n,t[i-1],2)}t[i]=["C"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(n.length<2){if(!(i>0)){t[i]=e[i];break}n=D(n,t[i-1],1)}t[i]=["S"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[i]=e[i]}return t},N=function(){function t(t,e){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}(),Y=n("mrSG"),X=n("Gd02"),G=n.n(X),z=(n("KPlw"),n("IEcg")),q=n.n(z),H=n("Ydjw"),V=n.n(H),W=n("mrT1"),U=n.n(W),Q=(n("Afl5"),n("UD5B")),Z=n.n(Q),$=n("cvtA"),K=n.n($),J=n("PFw5"),tt=n.n(J);function et(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}var nt="undefined"!=typeof window&&void 0!==window.document,it=function(t){function e(e){var n=t.call(this)||this;n.destroyed=!1;var i=n.getDefaultCfg();return n.cfg=Z()(i,e),n}return Object(Y.__extends)(e,t),e.prototype.getDefaultCfg=function(){return{}},e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){this.cfg[t]=e},e.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},e}(G.a),rt=n("6JdA");function ot(t,e){var n=[],i=t[0],r=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],p=e[0],f=e[1],d=e[2],g=e[3],y=e[4],v=e[5],m=e[6],x=e[7],b=e[8];return n[0]=p*i+f*a+d*c,n[1]=p*r+f*s+d*l,n[2]=p*o+f*u+d*h,n[3]=g*i+y*a+v*c,n[4]=g*r+y*s+v*l,n[5]=g*o+y*u+v*h,n[6]=m*i+x*a+b*c,n[7]=m*r+x*s+b*l,n[8]=m*o+x*u+b*h,n}function at(t,e){var n=[],i=e[0],r=e[1];return n[0]=t[0]*i+t[3]*r+t[6],n[1]=t[1]*i+t[4]*r+t[7],n}var st=["zIndex","capture","visible","type"],ut=["repeat"];function ct(t,e){var n={},i=e.attrs;for(var r in t)n[r]=i[r];return n}function lt(t,e){var n={},i=e.attr();return Object(o.each)(t,(function(t,e){-1!==ut.indexOf(e)||Object(o.isEqual)(i[e],t)||(n[e]=t)})),n}function ht(t,e){if(e.onFrame)return t;var n=e.startTime,i=e.delay,r=e.duration,a=Object.prototype.hasOwnProperty;return Object(o.each)(t,(function(t){n+it.delay&&Object(o.each)(e.toAttrs,(function(e,n){a.call(t.toAttrs,n)&&(delete t.toAttrs[n],delete t.fromAttrs[n])}))})),t}var pt=function(t){function e(e){var n=t.call(this,e)||this;n.attrs={};var i=n.getDefaultAttrs();return Object(o.mix)(i,e.attrs),n.attrs=i,n.initAttrs(i),n.initAnimate(),n}return Object(Y.__extends)(e,t),e.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},e.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},e.prototype.onCanvasChange=function(t){},e.prototype.initAttrs=function(t){},e.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},e.prototype.isGroup=function(){return!1},e.prototype.getParent=function(){return this.get("parent")},e.prototype.getCanvas=function(){return this.get("canvas")},e.prototype.attr=function(){for(var t,e=[],n=0;n0?i=ht(i,x):n.addAnimator(this),i.push(x),this.set("animations",i),this.set("_pause",{isPaused:!1})},e.prototype.stopAnimate=function(t){var e=this;void 0===t&&(t=!0);var n=this.get("animations");Object(o.each)(n,(function(n){t&&(n.onFrame?e.attr(n.onFrame(1)):e.attr(n.toAttrs)),n.callback&&n.callback()})),this.set("animating",!1),this.set("animations",[])},e.prototype.pauseAnimate=function(){var t=this.get("timeline"),e=this.get("animations");return Object(o.each)(e,(function(t){t.pauseCallback&&t.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:t.getTime()}),this},e.prototype.resumeAnimate=function(){var t=this.get("timeline").getTime(),e=this.get("animations"),n=this.get("_pause").pauseTime;return Object(o.each)(e,(function(e){e.startTime=e.startTime+(t-n),e._paused=!1,e._pauseTime=null,e.resumeCallback&&e.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",e),this},e.prototype.emitDelegation=function(t,e){for(var n=e.propagationPath,i=this.getEvents(),r=0;r0)}));return a.length>0?(K()(a,(function(t){var e=t.getBBox();r.push(e.minX,e.maxX),o.push(e.minY,e.maxY)})),t=Math.min.apply(null,r),e=Math.max.apply(null,r),n=Math.min.apply(null,o),i=Math.max.apply(null,o)):(t=0,e=0,n=0,i=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:i,width:e-t,height:i-n}},e.prototype.getCanvasBBox=function(){var t=1/0,e=-1/0,n=1/0,i=-1/0,r=[],o=[],a=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));return a.length>0?(K()(a,(function(t){var e=t.getCanvasBBox();r.push(e.minX,e.maxX),o.push(e.minY,e.maxY)})),t=Math.min.apply(null,r),e=Math.max.apply(null,r),n=Math.min.apply(null,o),i=Math.max.apply(null,o)):(t=0,e=0,n=0,i=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:i,width:e-t,height:i-n}},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.children=[],e},e.prototype.onAttrChange=function(e,n,i){if(t.prototype.onAttrChange.call(this,e,n,i),"matrix"===e){var r=this.getTotalMatrix();this._applyChildrenMarix(r)}},e.prototype.applyMatrix=function(e){var n=this.getTotalMatrix();t.prototype.applyMatrix.call(this,e);var i=this.getTotalMatrix();i!==n&&this._applyChildrenMarix(i)},e.prototype._applyChildrenMarix=function(t){var e=this.getChildren();K()(e,(function(e){e.applyMatrix(t)}))},e.prototype.addShape=function(){for(var t=[],e=0;e=0;o--){var a=t[o];if(gt(a)&&(a.isGroup()?r=a.getShape(e,n,i):a.isHit(e,n)&&(r=a)),r)break}return r},e.prototype.add=function(t){var e=this.getCanvas(),n=this.getChildren(),i=this.get("timeline"),r=t.getParent();r&&function(t,e,n){void 0===n&&(n=!0),n?e.destroy():(e.set("parent",null),e.set("canvas",null)),et(t.getChildren(),e)}(r,t,!1),t.set("parent",this),e&&function t(e,n){if(e.set("canvas",n),e.isGroup()){var i=e.get("children");i.length&&i.forEach((function(e){t(e,n)}))}}(t,e),i&&function t(e,n){if(e.set("timeline",n),e.isGroup()){var i=e.get("children");i.length&&i.forEach((function(e){t(e,n)}))}}(t,i),n.push(t),function(t){t.isGroup()?(t.isEntityGroup()||t.get("children").length)&&t.onCanvasChange("add"):t.onCanvasChange("add")}(t),this._applyElementMatrix(t)},e.prototype._applyElementMatrix=function(t){var e=this.getTotalMatrix();e&&t.applyMatrix(e)},e.prototype.getChildren=function(){return this.get("children")},e.prototype.sort=function(){var t,e=this.getChildren();K()(e,(function(t,e){return t[dt]=e,t})),e.sort((t=function(t,e){return t.get("zIndex")-e.get("zIndex")},function(e,n){var i=t(e,n);return 0===i?e[dt]-n[dt]:i})),this.onCanvasChange("sort")},e.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),e=t.length-1;e>=0;e--)t[e].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},e.prototype.destroy=function(){this.get("destroyed")||(this.clear(),t.prototype.destroy.call(this))},e.prototype.getFirst=function(){return this.getChildByIndex(0)},e.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},e.prototype.getChildByIndex=function(t){return this.getChildren()[t]},e.prototype.getCount=function(){return this.getChildren().length},e.prototype.contain=function(t){return this.getChildren().indexOf(t)>-1},e.prototype.removeChild=function(t,e){void 0===e&&(e=!0),this.contain(t)&&t.remove(e)},e.prototype.findAll=function(t){var e=[],n=this.getChildren();return K()(n,(function(n){t(n)&&e.push(n),n.isGroup()&&(e=e.concat(n.findAll(t)))})),e},e.prototype.find=function(t){var e=null,n=this.getChildren();return K()(n,(function(n){if(t(n)?e=n:n.isGroup()&&(e=n.find(t)),e)return!1})),e},e.prototype.findById=function(t){return this.find((function(e){return e.get("id")===t}))},e.prototype.findByClassName=function(t){return this.find((function(e){return e.get("className")===t}))},e.prototype.findAllByName=function(t){return this.findAll((function(e){return e.get("name")===t}))},e}(pt),xt=0,bt=0,Mt=0,_t=1e3,wt=0,Ot=0,Ct=0,St="object"==typeof performance&&performance.now?performance:Date,At="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Pt(){return Ot||(At(jt),Ot=St.now()+Ct)}function jt(){Ot=0}function kt(){this._call=this._time=this._next=null}function Tt(t,e,n){var i=new kt;return i.restart(t,e,n),i}function Et(){Ot=(wt=St.now())+Ct,xt=bt=0;try{!function(){Pt(),++xt;for(var t,e=yt;e;)(t=Ot-e._time)>=0&&e._call.call(null,t),e=e._next;--xt}()}finally{xt=0,function(){var t,e,n=yt,i=1/0;for(;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:yt=e);vt=t,Lt(i)}(),Ot=0}}function It(){var t=St.now(),e=t-wt;e>_t&&(Ct-=e,wt=t)}function Lt(t){xt||(bt&&(bt=clearTimeout(bt)),t-Ot>24?(t<1/0&&(bt=setTimeout(Et,t-St.now()-Ct)),Mt&&(Mt=clearInterval(Mt))):(Mt||(wt=St.now(),Mt=setInterval(It,_t)),xt=1,At(Et)))}function Bt(t){return+t}function Dt(t){return t*t}function Ft(t){return t*(2-t)}function Rt(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function Nt(t){return t*t*t}function Yt(t){return--t*t*t+1}function Xt(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}kt.prototype=Tt.prototype={constructor:kt,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Pt():+n)+(null==e?0:+e),this._next||vt===this||(vt?vt._next=this:yt=this,vt=this),this._call=t,this._time=n,Lt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Lt())}};var Gt=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),zt=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),qt=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),Ht=Math.PI,Vt=Ht/2;function Wt(t){return 1-Math.cos(t*Vt)}function Ut(t){return Math.sin(t*Vt)}function Qt(t){return(1-Math.cos(Ht*t))/2}function Zt(t){return Math.pow(2,10*t-10)}function $t(t){return 1-Math.pow(2,-10*t)}function Kt(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function Jt(t){return 1-Math.sqrt(1-t*t)}function te(t){return Math.sqrt(1- --t*t)}function ee(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var ne=4/11,ie=6/11,re=8/11,oe=.75,ae=9/11,se=10/11,ue=.9375,ce=21/22,le=63/64,he=1/ne/ne;function pe(t){return 1-fe(1-t)}function fe(t){return(t=+t)>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Ge(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Ge(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=je.exec(t))?new Ge(e[1],e[2],e[3],1):(e=ke.exec(t))?new Ge(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Te.exec(t))?Ye(e[1],e[2],e[3],e[4]):(e=Ee.exec(t))?Ye(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ie.exec(t))?Ve(e[1],e[2]/100,e[3]/100,1):(e=Le.exec(t))?Ve(e[1],e[2]/100,e[3]/100,e[4]):Be.hasOwnProperty(t)?Ne(Be[t]):"transparent"===t?new Ge(NaN,NaN,NaN,0):null}function Ne(t){return new Ge(t>>16&255,t>>8&255,255&t,1)}function Ye(t,e,n,i){return i<=0&&(t=e=n=NaN),new Ge(t,e,n,i)}function Xe(t,e,n,i){return 1===arguments.length?((r=t)instanceof Oe||(r=Re(r)),r?new Ge((r=r.rgb()).r,r.g,r.b,r.opacity):new Ge):new Ge(t,e,n,null==i?1:i);var r}function Ge(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function ze(){return"#"+He(this.r)+He(this.g)+He(this.b)}function qe(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function He(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Ve(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ue(t,e,n,i)}function We(t){if(t instanceof Ue)return new Ue(t.h,t.s,t.l,t.opacity);if(t instanceof Oe||(t=Re(t)),!t)return new Ue;if(t instanceof Ue)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),a=NaN,s=o-r,u=(o+r)/2;return s?(a=e===o?(n-i)/s+6*(n0&&u<1?0:a,new Ue(a,s,u,t.opacity)}function Ue(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function Qe(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Ze(t,e,n,i,r){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*i+a*r)/6}_e(Oe,Re,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:De,formatHex:De,formatHsl:function(){return We(this).formatHsl()},formatRgb:Fe,toString:Fe}),_e(Ge,Xe,we(Oe,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ge(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ge(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ze,formatHex:ze,formatRgb:qe,toString:qe})),_e(Ue,(function(t,e,n,i){return 1===arguments.length?We(t):new Ue(t,e,n,null==i?1:i)}),we(Oe,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ue(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ue(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Ge(Qe(t>=240?t-240:t+120,r,i),Qe(t,r,i),Qe(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var $e=function(t){return function(){return t}};function Ke(t,e){return function(n){return t+n*e}}function Je(t){return 1==(t=+t)?tn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):$e(isNaN(e)?n:e)}}function tn(t,e){var n=e-t;return n?Ke(t,n):$e(isNaN(t)?e:t)}var en=function t(e){var n=Je(e);function i(t,e){var i=n((t=Xe(t)).r,(e=Xe(e)).r),r=n(t.g,e.g),o=n(t.b,e.b),a=tn(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=o(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);function nn(t){return function(e){var n,i,r=e.length,o=new Array(r),a=new Array(r),s=new Array(r);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),r=t[i],o=t[i+1],a=i>0?t[i-1]:2*r-o,s=io&&(r=e.slice(o,r),s[a]?s[a]+=r:s[++a]=r),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:cn(n,i)})),o=pn.lastIndex;return oh.length?(l=c(a[u]),h=c(r[u]),h=B(h,l),h=R(h,l),e.fromAttrs.path=h,e.toAttrs.path=l):e.pathFormatted||(l=c(a[u]),h=c(r[u]),h=R(h,l),e.fromAttrs.path=h,e.toAttrs.path=l,e.pathFormatted=!0),i[u]=[];for(var p=0;p0){for(var o=i.animators.length-1;o>=0;o--)if((t=i.animators[o]).destroyed)i.removeAnimator(o);else{if(!t.isAnimatePaused())for(var a=(e=t.get("animations")).length-1;a>=0;a--)n=e[a],mn(t,n,r)&&(e.splice(a,1),!1,n.callback&&n.callback());0===e.length&&i.removeAnimator(o)}i.canvas.get("autoDraw")||i.canvas.draw()}}))},t.prototype.addAnimator=function(t){this.animators.push(t)},t.prototype.removeAnimator=function(t){this.animators.splice(t,1)},t.prototype.isAnimating=function(){return!!this.animators.length},t.prototype.stop=function(){this.timer&&this.timer.stop()},t.prototype.stopAllAnimations=function(t){void 0===t&&(t=!0),this.animators.forEach((function(e){e.stopAnimate(t)})),this.animators=[],this.canvas.draw()},t.prototype.getTime=function(){return this.current},t}(),bn=function(t){function e(e){var n=t.call(this,e)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}return Object(Y.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.cursor="default",e},e.prototype.initContainer=function(){var t=this.get("container");V()(t)&&(t=document.getElementById(t),this.set("container",t))},e.prototype.initDom=function(){var t=this.createDom();this.set("el",t),this.get("container").appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},e.prototype.initEvents=function(){},e.prototype.initTimeline=function(){var t=new xn(this);this.set("timeline",t)},e.prototype.setDOMSize=function(t,e){var n=this.get("el");nt&&(n.style.width=t+"px",n.style.height=e+"px")},e.prototype.changeSize=function(t,e){this.setDOMSize(t,e),this.set("width",t),this.set("height",e),this.onCanvasChange("changeSize")},e.prototype.getRenderer=function(){return this.get("renderer")},e.prototype.getCursor=function(){return this.get("cursor")},e.prototype.setCursor=function(t){this.set("cursor",t);var e=this.get("el");nt&&e&&(e.style.cursor=t)},e.prototype.getPointByClient=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t-n.left,y:e-n.top}},e.prototype.getClientByPoint=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t+n.left,y:e+n.top}},e.prototype.draw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},e.prototype.clearEvents=function(){},e.prototype.isCanvas=function(){return!0},e.prototype.getParent=function(){return null},e.prototype.destroy=function(){var e=this.get("timeline");this.get("destroyed")||(this.clear(),e&&e.stop(),this.clearEvents(),this.removeDom(),t.prototype.destroy.call(this))},e}(mt),Mn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(Y.__extends)(e,t),e.prototype.isGroup=function(){return!0},e.prototype.isEntityGroup=function(){return!1},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=this.getChildren(),i=0;i=t&&n.minY<=e&&n.maxY>=e},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e),this.clearCacheBBox()},e.prototype.getBBox=function(){var t=this.get("bbox");return t||(t=this.calculateBBox(),this.set("bbox",t)),t},e.prototype.getCanvasBBox=function(){var t=this.get("canvasBox");return t||(t=this.calculateCanvasBBox(),this.set("canvasBox",t)),t},e.prototype.applyMatrix=function(e){t.prototype.applyMatrix.call(this,e),this.set("canvasBox",null)},e.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),e=this.getTotalMatrix(),n=t.minX,i=t.minY,r=t.maxX,o=t.maxY;if(e){var a=at(e,[t.minX,t.minY]),s=at(e,[t.maxX,t.minY]),u=at(e,[t.minX,t.maxY]),c=at(e,[t.maxX,t.maxY]);n=Math.min(a[0],s[0],u[0],c[0]),r=Math.max(a[0],s[0],u[0],c[0]),i=Math.min(a[1],s[1],u[1],c[1]),o=Math.max(a[1],s[1],u[1],c[1])}var l=this.attrs;if(l.shadowColor){var h=l.shadowBlur,p=void 0===h?0:h,f=l.shadowOffsetX,d=void 0===f?0:f,g=l.shadowOffsetY,y=void 0===g?0:g,v=n-p+d,m=r+p+d,x=i-p+y,b=o+p+y;n=Math.min(n,v),r=Math.max(r,m),i=Math.min(i,x),o=Math.max(o,b)}return{x:n,y:i,minX:n,minY:i,maxX:r,maxY:o,width:r-n,height:o-i}},e.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBox",null)},e.prototype.isClipShape=function(){return this.get("isClipShape")},e.prototype.isInShape=function(t,e){return!1},e.prototype.isOnlyHitBox=function(){return!1},e.prototype.isHit=function(t,e){var n=this.get("startArrowShape"),i=this.get("endArrowShape"),r=[t,e,1],o=(r=this.invertFromMatrix(r))[0],a=r[1],s=this._isInBBox(o,a);if(this.isOnlyHitBox())return s;if(s&&!this.isClipped(o,a)){if(this.isInShape(o,a))return!0;if(n&&n.isHit(o,a))return!0;if(i&&i.isHit(o,a))return!0}return!1},e}(pt);n.d(e,"version",(function(){return wn})),n.d(e,"Event",(function(){return N})),n.d(e,"Base",(function(){return it})),n.d(e,"AbstractCanvas",(function(){return bn})),n.d(e,"AbstractGroup",(function(){return Mn})),n.d(e,"AbstractShape",(function(){return _n})),n.d(e,"PathUtil",(function(){return i}));var wn=n("KjeG").version},"bH/o":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sub=e.mul=void 0,e.create=function(){var t=new i.ARRAY_TYPE(9);i.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0);return t[0]=1,t[4]=1,t[8]=1,t},e.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},e.clone=function(t){var e=new i.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromValues=function(t,e,n,r,o,a,s,u,c){var l=new i.ARRAY_TYPE(9);return l[0]=t,l[1]=e,l[2]=n,l[3]=r,l[4]=o,l[5]=a,l[6]=s,l[7]=u,l[8]=c,l},e.set=function(t,e,n,i,r,o,a,s,u,c){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=c,t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.transpose=function(t,e){if(t===e){var n=e[1],i=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=i,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},e.invert=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=l*a-s*c,p=-l*o+s*u,f=c*o-a*u,d=n*h+i*p+r*f;if(!d)return null;return d=1/d,t[0]=h*d,t[1]=(-l*i+r*c)*d,t[2]=(s*i-r*a)*d,t[3]=p*d,t[4]=(l*n-r*u)*d,t[5]=(-s*n+r*o)*d,t[6]=f*d,t[7]=(-c*n+i*u)*d,t[8]=(a*n-i*o)*d,t},e.adjoint=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8];return t[0]=a*l-s*c,t[1]=r*c-i*l,t[2]=i*s-r*a,t[3]=s*u-o*l,t[4]=n*l-r*u,t[5]=r*o-n*s,t[6]=o*c-a*u,t[7]=i*u-n*c,t[8]=n*a-i*o,t},e.determinant=function(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8];return e*(c*o-a*u)+n*(-c*r+a*s)+i*(u*r-o*s)},e.multiply=r,e.translate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=n[0],f=n[1];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=p*i+f*a+c,t[7]=p*r+f*s+l,t[8]=p*o+f*u+h,t},e.rotate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=Math.sin(n),f=Math.cos(n);return t[0]=f*i+p*a,t[1]=f*r+p*s,t[2]=f*o+p*u,t[3]=f*a-p*i,t[4]=f*s-p*r,t[5]=f*u-p*o,t[6]=c,t[7]=l,t[8]=h,t},e.scale=function(t,e,n){var i=n[0],r=n[1];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},e.fromRotation=function(t,e){var n=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=n,t[2]=0,t[3]=-n,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat2d=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},e.fromQuat=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n+n,s=i+i,u=r+r,c=n*a,l=i*a,h=i*s,p=r*a,f=r*s,d=r*u,g=o*a,y=o*s,v=o*u;return t[0]=1-h-d,t[3]=l-v,t[6]=p+y,t[1]=l+v,t[4]=1-c-d,t[7]=f-g,t[2]=p-y,t[5]=f+g,t[8]=1-c-h,t},e.normalFromMat4=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],p=e[10],f=e[11],d=e[12],g=e[13],y=e[14],v=e[15],m=n*s-i*a,x=n*u-r*a,b=n*c-o*a,M=i*u-r*s,_=i*c-o*s,w=r*c-o*u,O=l*g-h*d,C=l*y-p*d,S=l*v-f*d,A=h*y-p*g,P=h*v-f*g,j=p*v-f*y,k=m*j-x*P+b*A+M*S-_*C+w*O;if(!k)return null;return k=1/k,t[0]=(s*j-u*P+c*A)*k,t[1]=(u*S-a*j-c*C)*k,t[2]=(a*P-s*S+c*O)*k,t[3]=(r*P-i*j-o*A)*k,t[4]=(n*j-r*S+o*C)*k,t[5]=(i*S-n*P-o*O)*k,t[6]=(g*w-y*_+v*M)*k,t[7]=(y*b-d*w-v*x)*k,t[8]=(d*_-g*b+v*m)*k,t},e.projection=function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},e.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},e.subtract=o,e.multiplyScalar=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},e.multiplyScalarAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t[3]=e[3]+n[3]*i,t[4]=e[4]+n[4]*i,t[5]=e[5]+n[5]*i,t[6]=e[6]+n[6]*i,t[7]=e[7]+n[7]*i,t[8]=e[8]+n[8]*i,t},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},e.equals=function(t,e){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],p=e[0],f=e[1],d=e[2],g=e[3],y=e[4],v=e[5],m=e[6],x=e[7],b=e[8];return Math.abs(n-p)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(r-f)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(o-d)<=i.EPSILON*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(a-g)<=i.EPSILON*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(s-y)<=i.EPSILON*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(u-v)<=i.EPSILON*Math.max(1,Math.abs(u),Math.abs(v))&&Math.abs(c-m)<=i.EPSILON*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(l-x)<=i.EPSILON*Math.max(1,Math.abs(l),Math.abs(x))&&Math.abs(h-b)<=i.EPSILON*Math.max(1,Math.abs(h),Math.abs(b))};var i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n("jWDG"));function r(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=n[0],f=n[1],d=n[2],g=n[3],y=n[4],v=n[5],m=n[6],x=n[7],b=n[8];return t[0]=p*i+f*a+d*c,t[1]=p*r+f*s+d*l,t[2]=p*o+f*u+d*h,t[3]=g*i+y*a+v*c,t[4]=g*r+y*s+v*l,t[5]=g*o+y*u+v*h,t[6]=m*i+x*a+b*c,t[7]=m*r+x*s+b*l,t[8]=m*o+x*u+b*h,t}function o(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}e.mul=r,e.sub=o},bnPk:function(t,e,n){window,t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=31)}([function(t,e,n){"use strict";n.r(e);var i=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},r=function(t,e){return!!i(t)&&t.indexOf(e)>-1},o={}.toString,a=function(t,e){return o.call(t)==="[object "+e+"]"},s=function(t){return Array.isArray?Array.isArray(t):a(t,"Array")},u=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},c=function(t,e){if(t)if(s(t))for(var n=0,i=t.length;n-1;)S.call(t,o,1);return t},j=Array.prototype.splice,k=function(t,e){if(!i(t))return[];for(var n=t?e.length:0,r=n-1;n--;){var o=void 0,a=e[n];n!==r&&a===o||(o=a,j.call(t,a,1))}return t},T=function(t,e,n){if(!s(t)&&!v(t))return t;var i=n;return c(t,(function(t,n){i=e(i,t,n)})),i},E=function(t,e){var n=[];if(!i(t))return n;for(var r=-1,o=[],a=t.length;++re[r])return 1;if(t[r]n?n:t},tt=function(t,e){var n=e.toString(),i=n.indexOf(".");if(-1===i)return Math.round(t);var r=n.substr(i+1).length;return r>20&&(r=20),parseFloat(t.toFixed(r))},et=function(t){return a(t,"Number")},nt=function(t){return et(t)&&t%1!=0},it=function(t){return et(t)&&t%2==0},rt=Number.isInteger?Number.isInteger:function(t){return et(t)&&t%1==0},ot=function(t){return et(t)&&t<0};function at(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)0},ct=function(t,e){if(s(t)){var n,i,r=t[0];return n=p(e)?e(t[0]):t[0][e],c(t,(function(t){(i=p(e)?e(t):t[e])>n&&(r=t,n=i)})),r}},lt=function(t,e){if(s(t)){var n,i,r=t[0];return n=p(e)?e(t[0]):t[0][e],c(t,(function(t){(i=p(e)?e(t):t[e])e?(i&&(clearTimeout(i),i=null),s=c,a=t.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(u,l)),a};return c.cancel=function(){clearTimeout(i),s=0,i=r=o=null},c},fe=function(t){return i(t)?Array.prototype.slice.call(t):[]},de={},ge=function(t){return de[t=t||"g"]?de[t]+=1:de[t]=1,t+de[t]},ye=function(){},ve=function(t){return t};function me(t){return f(t)?0:i(t)?t.length:Object.keys(t).length}var xe=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}();n.d(e,"contains",(function(){return r})),n.d(e,"includes",(function(){return r})),n.d(e,"difference",(function(){return h})),n.d(e,"find",(function(){return m})),n.d(e,"findIndex",(function(){return x})),n.d(e,"firstValue",(function(){return b})),n.d(e,"flatten",(function(){return M})),n.d(e,"flattenDeep",(function(){return w})),n.d(e,"getRange",(function(){return O})),n.d(e,"pull",(function(){return P})),n.d(e,"pullAt",(function(){return k})),n.d(e,"reduce",(function(){return T})),n.d(e,"remove",(function(){return E})),n.d(e,"sortBy",(function(){return L})),n.d(e,"union",(function(){return D})),n.d(e,"uniq",(function(){return B})),n.d(e,"valuesOfKey",(function(){return F})),n.d(e,"head",(function(){return R})),n.d(e,"last",(function(){return N})),n.d(e,"startsWith",(function(){return Y})),n.d(e,"endsWith",(function(){return X})),n.d(e,"filter",(function(){return l})),n.d(e,"every",(function(){return G})),n.d(e,"some",(function(){return z})),n.d(e,"group",(function(){return W})),n.d(e,"groupBy",(function(){return H})),n.d(e,"groupToMap",(function(){return V})),n.d(e,"getWrapBehavior",(function(){return U})),n.d(e,"wrapBehavior",(function(){return Q})),n.d(e,"number2color",(function(){return $})),n.d(e,"parseRadius",(function(){return K})),n.d(e,"clamp",(function(){return J})),n.d(e,"fixedBase",(function(){return tt})),n.d(e,"isDecimal",(function(){return nt})),n.d(e,"isEven",(function(){return it})),n.d(e,"isInteger",(function(){return rt})),n.d(e,"isNegative",(function(){return ot})),n.d(e,"isNumberEqual",(function(){return at})),n.d(e,"isOdd",(function(){return st})),n.d(e,"isPositive",(function(){return ut})),n.d(e,"maxBy",(function(){return ct})),n.d(e,"minBy",(function(){return lt})),n.d(e,"mod",(function(){return ht})),n.d(e,"toDegree",(function(){return ft})),n.d(e,"toInteger",(function(){return dt})),n.d(e,"toRadian",(function(){return yt})),n.d(e,"forIn",(function(){return vt})),n.d(e,"has",(function(){return mt})),n.d(e,"hasKey",(function(){return xt})),n.d(e,"hasValue",(function(){return Mt})),n.d(e,"keys",(function(){return d})),n.d(e,"isMatch",(function(){return g})),n.d(e,"values",(function(){return bt})),n.d(e,"lowerCase",(function(){return wt})),n.d(e,"lowerFirst",(function(){return Ot})),n.d(e,"substitute",(function(){return Ct})),n.d(e,"upperCase",(function(){return St})),n.d(e,"upperFirst",(function(){return At})),n.d(e,"getType",(function(){return jt})),n.d(e,"isArguments",(function(){return kt})),n.d(e,"isArray",(function(){return s})),n.d(e,"isArrayLike",(function(){return i})),n.d(e,"isBoolean",(function(){return Tt})),n.d(e,"isDate",(function(){return Et})),n.d(e,"isError",(function(){return It})),n.d(e,"isFunction",(function(){return p})),n.d(e,"isFinite",(function(){return Lt})),n.d(e,"isNil",(function(){return f})),n.d(e,"isNull",(function(){return Bt})),n.d(e,"isNumber",(function(){return et})),n.d(e,"isObject",(function(){return u})),n.d(e,"isObjectLike",(function(){return y})),n.d(e,"isPlainObject",(function(){return v})),n.d(e,"isPrototype",(function(){return Ft})),n.d(e,"isRegExp",(function(){return Rt})),n.d(e,"isString",(function(){return I})),n.d(e,"isType",(function(){return a})),n.d(e,"isUndefined",(function(){return Nt})),n.d(e,"isElement",(function(){return Yt})),n.d(e,"requestAnimationFrame",(function(){return Xt})),n.d(e,"clearAnimationFrame",(function(){return Gt})),n.d(e,"augment",(function(){return Ht})),n.d(e,"clone",(function(){return Wt})),n.d(e,"debounce",(function(){return Ut})),n.d(e,"memoize",(function(){return Qt})),n.d(e,"deepMix",(function(){return $t})),n.d(e,"each",(function(){return c})),n.d(e,"extend",(function(){return Kt})),n.d(e,"indexOf",(function(){return Jt})),n.d(e,"isEmpty",(function(){return ee})),n.d(e,"isEqual",(function(){return ie})),n.d(e,"isEqualWith",(function(){return re})),n.d(e,"map",(function(){return oe})),n.d(e,"mapValues",(function(){return se})),n.d(e,"mix",(function(){return qt})),n.d(e,"assign",(function(){return qt})),n.d(e,"get",(function(){return ue})),n.d(e,"set",(function(){return ce})),n.d(e,"pick",(function(){return he})),n.d(e,"throttle",(function(){return pe})),n.d(e,"toArray",(function(){return fe})),n.d(e,"toString",(function(){return _t})),n.d(e,"uniqueId",(function(){return ge})),n.d(e,"noop",(function(){return ye})),n.d(e,"identity",(function(){return ve})),n.d(e,"size",(function(){return me})),n.d(e,"Cache",(function(){return xe}))},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",(function(){return r})),n.d(e,"__assign",(function(){return o})),n.d(e,"__rest",(function(){return a})),n.d(e,"__decorate",(function(){return s})),n.d(e,"__param",(function(){return u})),n.d(e,"__metadata",(function(){return c})),n.d(e,"__awaiter",(function(){return l})),n.d(e,"__generator",(function(){return h})),n.d(e,"__exportStar",(function(){return p})),n.d(e,"__values",(function(){return f})),n.d(e,"__read",(function(){return d})),n.d(e,"__spread",(function(){return g})),n.d(e,"__spreadArrays",(function(){return y})),n.d(e,"__await",(function(){return v})),n.d(e,"__asyncGenerator",(function(){return m})),n.d(e,"__asyncDelegator",(function(){return x})),n.d(e,"__asyncValues",(function(){return b})),n.d(e,"__makeTemplateObject",(function(){return M})),n.d(e,"__importStar",(function(){return _})),n.d(e,"__importDefault",(function(){return w})),n.d(e,"__classPrivateFieldGet",(function(){return O})),n.d(e,"__classPrivateFieldSet",(function(){return C}));var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,i){e(n,i,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{u(i.next(t))}catch(t){o(t)}}function s(t){try{u(i.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((i=i.apply(t,e||[])).next())}))}function h(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function g(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{(n=r[t](e)).value instanceof v?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function x(t){var e,n;return e={},i("next"),i("throw",(function(t){throw t})),i("return"),e[Symbol.iterator]=function(){return this},e;function i(i,r){e[i]=t[i]?function(e){return(n=!n)?{value:v(t[i](e)),done:"return"===i}:r?r(e):e}:r}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=f(t),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(e){return new Promise((function(i,r){!function(t,e,n,i){Promise.resolve(i).then((function(e){t({value:e,done:n})}),e)}(i,r,(e=t[n](e)).done,e.value)}))}}}function M(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function _(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function w(t){return t&&t.__esModule?t:{default:t}}function O(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function C(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sub=e.mul=void 0,e.create=function(){var t=new i.ARRAY_TYPE(9);return i.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},e.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},e.clone=function(t){var e=new i.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromValues=function(t,e,n,r,o,a,s,u,c){var l=new i.ARRAY_TYPE(9);return l[0]=t,l[1]=e,l[2]=n,l[3]=r,l[4]=o,l[5]=a,l[6]=s,l[7]=u,l[8]=c,l},e.set=function(t,e,n,i,r,o,a,s,u,c){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=c,t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.transpose=function(t,e){if(t===e){var n=e[1],i=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=i,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},e.invert=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=l*a-s*c,p=-l*o+s*u,f=c*o-a*u,d=n*h+i*p+r*f;return d?(d=1/d,t[0]=h*d,t[1]=(-l*i+r*c)*d,t[2]=(s*i-r*a)*d,t[3]=p*d,t[4]=(l*n-r*u)*d,t[5]=(-s*n+r*o)*d,t[6]=f*d,t[7]=(-c*n+i*u)*d,t[8]=(a*n-i*o)*d,t):null},e.adjoint=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8];return t[0]=a*l-s*c,t[1]=r*c-i*l,t[2]=i*s-r*a,t[3]=s*u-o*l,t[4]=n*l-r*u,t[5]=r*o-n*s,t[6]=o*c-a*u,t[7]=i*u-n*c,t[8]=n*a-i*o,t},e.determinant=function(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8];return e*(c*o-a*u)+n*(-c*r+a*s)+i*(u*r-o*s)},e.multiply=r,e.translate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=n[0],f=n[1];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=p*i+f*a+c,t[7]=p*r+f*s+l,t[8]=p*o+f*u+h,t},e.rotate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=Math.sin(n),f=Math.cos(n);return t[0]=f*i+p*a,t[1]=f*r+p*s,t[2]=f*o+p*u,t[3]=f*a-p*i,t[4]=f*s-p*r,t[5]=f*u-p*o,t[6]=c,t[7]=l,t[8]=h,t},e.scale=function(t,e,n){var i=n[0],r=n[1];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},e.fromRotation=function(t,e){var n=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=n,t[2]=0,t[3]=-n,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat2d=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},e.fromQuat=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n+n,s=i+i,u=r+r,c=n*a,l=i*a,h=i*s,p=r*a,f=r*s,d=r*u,g=o*a,y=o*s,v=o*u;return t[0]=1-h-d,t[3]=l-v,t[6]=p+y,t[1]=l+v,t[4]=1-c-d,t[7]=f-g,t[2]=p-y,t[5]=f+g,t[8]=1-c-h,t},e.normalFromMat4=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],p=e[10],f=e[11],d=e[12],g=e[13],y=e[14],v=e[15],m=n*s-i*a,x=n*u-r*a,b=n*c-o*a,M=i*u-r*s,_=i*c-o*s,w=r*c-o*u,O=l*g-h*d,C=l*y-p*d,S=l*v-f*d,A=h*y-p*g,P=h*v-f*g,j=p*v-f*y,k=m*j-x*P+b*A+M*S-_*C+w*O;return k?(k=1/k,t[0]=(s*j-u*P+c*A)*k,t[1]=(u*S-a*j-c*C)*k,t[2]=(a*P-s*S+c*O)*k,t[3]=(r*P-i*j-o*A)*k,t[4]=(n*j-r*S+o*C)*k,t[5]=(i*S-n*P-o*O)*k,t[6]=(g*w-y*_+v*M)*k,t[7]=(y*b-d*w-v*x)*k,t[8]=(d*_-g*b+v*m)*k,t):null},e.projection=function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},e.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},e.subtract=o,e.multiplyScalar=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},e.multiplyScalarAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t[3]=e[3]+n[3]*i,t[4]=e[4]+n[4]*i,t[5]=e[5]+n[5]*i,t[6]=e[6]+n[6]*i,t[7]=e[7]+n[7]*i,t[8]=e[8]+n[8]*i,t},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},e.equals=function(t,e){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],p=e[0],f=e[1],d=e[2],g=e[3],y=e[4],v=e[5],m=e[6],x=e[7],b=e[8];return Math.abs(n-p)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(r-f)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(o-d)<=i.EPSILON*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(a-g)<=i.EPSILON*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(s-y)<=i.EPSILON*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(u-v)<=i.EPSILON*Math.max(1,Math.abs(u),Math.abs(v))&&Math.abs(c-m)<=i.EPSILON*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(l-x)<=i.EPSILON*Math.max(1,Math.abs(l),Math.abs(x))&&Math.abs(h-b)<=i.EPSILON*Math.max(1,Math.abs(h),Math.abs(b))};var i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(21));function r(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=n[0],f=n[1],d=n[2],g=n[3],y=n[4],v=n[5],m=n[6],x=n[7],b=n[8];return t[0]=p*i+f*a+d*c,t[1]=p*r+f*s+d*l,t[2]=p*o+f*u+d*h,t[3]=g*i+y*a+v*c,t[4]=g*r+y*s+v*l,t[5]=g*o+y*u+v*h,t[6]=m*i+x*a+b*c,t[7]=m*r+x*s+b*l,t[8]=m*o+x*u+b*h,t}function o(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}e.mul=r,e.sub=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHAPE_TO_TAGS={rect:"path",circle:"circle",line:"line",path:"path",marker:"path",text:"text",polyline:"polyline",polygon:"polygon",image:"image",ellipse:"ellipse",dom:"foreignObject"},e.SVG_ATTR_MAP={opacity:"opacity",fillStyle:"fill",fill:"fill",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",x:"x",y:"y",r:"r",rx:"rx",ry:"ry",width:"width",height:"height",x1:"x1",x2:"x2",y1:"y1",y2:"y2",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",startArrow:"marker-start",endArrow:"marker-end",path:"d",class:"class",id:"id",style:"style",preserveAspectRatio:"preserveAspectRatio"},e.EVENTS=["click","mousedown","mouseup","dblclick","contextmenu","mouseenter","mouseleave","mouseover","mouseout","mousemove","wheel"]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(16),o=n(8),a=n(15),s=n(22),u=n(3),c=n(10),l=n(23),h=n(34),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="svg",e.canFill=!1,e.canStroke=!1,e}return i.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return i.__assign(i.__assign({},e),{lineWidth:1,lineAppendWidth:0,strokeOpacity:1,fillOpacity:1})},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e);var n=this.get("canvas");if(n&&n.get("autoDraw")){var i=n.get("context");this.draw(i,e)}},e.prototype.getShapeBase=function(){return c},e.prototype.getGroupBase=function(){return l.default},e.prototype.onCanvasChange=function(t){s.refreshElement(this,t)},e.prototype.calculateBBox=function(){var t=this.get("el"),e=null;if(t)e=t.getBBox();else{var n=h.getBBoxMethod(this.get("type"));n&&(e=n(this))}if(e){var i=e.x,r=e.y,o=e.width,a=e.height,s=this.getHitLineWidth(),u=s/2,c=i-u,l=r-u;return{x:c,y:l,minX:c,minY:l,maxX:i+o+u,maxY:r+a+u,width:o+s,height:a+s}}return{x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0}},e.prototype.isFill=function(){var t=this.attr(),e=t.fill,n=t.fillStyle;return(e||n||this.isClipShape())&&this.canFill},e.prototype.isStroke=function(){var t=this.attr(),e=t.stroke,n=t.strokeStyle;return(e||n)&&this.canStroke},e.prototype.draw=function(t,e){var n=this.get("el");this.get("destroyed")?n&&n.parentNode.removeChild(n):(n||a.createDom(this),o.setClip(this,t),this.createPath(t,e),this.shadow(t,e),this.strokeAndFill(t,e),this.transform(e))},e.prototype.createPath=function(t,e){},e.prototype.strokeAndFill=function(t,e){var n=e||this.attr(),i=n.fill,r=n.fillStyle,o=n.stroke,a=n.strokeStyle,s=n.fillOpacity,c=n.strokeOpacity,l=n.lineWidth,h=this.get("el");this.canFill&&(e?"fill"in n?this._setColor(t,"fill",i):"fillStyle"in n&&this._setColor(t,"fill",r):this._setColor(t,"fill",i||r),s&&h.setAttribute(u.SVG_ATTR_MAP.fillOpacity,s)),this.canStroke&&l>0&&(e?"stroke"in n?this._setColor(t,"stroke",o):"strokeStyle"in n&&this._setColor(t,"stroke",a):this._setColor(t,"stroke",o||a),c&&h.setAttribute(u.SVG_ATTR_MAP.strokeOpacity,c),l&&h.setAttribute(u.SVG_ATTR_MAP.lineWidth,l))},e.prototype._setColor=function(t,e,n){var i=this.get("el");if(n)if(n=n.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(n))(r=t.find("gradient",n))||(r=t.addGradient(n)),i.setAttribute(u.SVG_ATTR_MAP[e],"url(#"+r+")");else if(/^[p,P]{1}[\s]*\(/.test(n)){var r;(r=t.find("pattern",n))||(r=t.addPattern(n)),i.setAttribute(u.SVG_ATTR_MAP[e],"url(#"+r+")")}else i.setAttribute(u.SVG_ATTR_MAP[e],n);else i.setAttribute(u.SVG_ATTR_MAP[e],"none")},e.prototype.shadow=function(t,e){var n=this.attr(),i=e||n,r=i.shadowOffsetX,a=i.shadowOffsetY,s=i.shadowBlur,u=i.shadowColor;(r||a||s||u)&&o.setShadow(this,t)},e.prototype.transform=function(t){var e=this.attr();(t||e).matrix&&o.setTransform(this)},e.prototype.isInShape=function(t,e){return this.isPointInPath(t,e)},e.prototype.isPointInPath=function(t,e){var n=this.get("el"),i=this.get("canvas").get("el").getBoundingClientRect(),r=t+i.left,o=e+i.top,a=document.elementFromPoint(r,o);return!(!a||!a.isEqualNode(n))},e.prototype.getHitLineWidth=function(){var t=this.attrs,e=t.lineWidth,n=t.lineAppendWidth;return this.isStroke()?e+n:0},e}(r.AbstractShape);e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.sqrDist=e.dist=e.div=e.mul=e.sub=e.len=void 0,e.create=o,e.clone=function(t){var e=new r.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},e.fromValues=function(t,e){var n=new r.ARRAY_TYPE(2);return n[0]=t,n[1]=e,n},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.set=function(t,e,n){return t[0]=e,t[1]=n,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},e.subtract=a,e.multiply=s,e.divide=u,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},e.scaleAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},e.distance=c,e.squaredDistance=l,e.length=h,e.squaredLength=p,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},e.normalize=function(t,e){var n=e[0],i=e[1],r=n*n+i*i;return r>0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,n){var i=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=i,t},e.lerp=function(t,e,n,i){var r=e[0],o=e[1];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t},e.random=function(t,e){e=e||1;var n=2*r.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.transformMat2=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t},e.transformMat2d=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t},e.transformMat3=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[3]*r+n[6],t[1]=n[1]*i+n[4]*r+n[7],t},e.transformMat4=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[4]*r+n[12],t[1]=n[1]*i+n[5]*r+n[13],t},e.rotate=function(t,e,n,i){var r=e[0]-n[0],o=e[1]-n[1],a=Math.sin(i),s=Math.cos(i);return t[0]=r*s-o*a+n[0],t[1]=r*a+o*s+n[1],t},e.angle=function(t,e){var n=t[0],i=t[1],r=e[0],o=e[1],a=n*n+i*i;a>0&&(a=1/Math.sqrt(a));var s=r*r+o*o;s>0&&(s=1/Math.sqrt(s));var u=(n*r+i*o)*a*s;return u>1?0:u<-1?Math.PI:Math.acos(u)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],i=t[1],o=e[0],a=e[1];return Math.abs(n-o)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-a)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(a))};var i,r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(21));function o(){var t=new r.ARRAY_TYPE(2);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function s(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function u(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function c(t,e){var n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)}function l(t,e){var n=e[0]-t[0],i=e[1]-t[1];return n*n+i*i}function h(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function p(t){var e=t[0],n=t[1];return e*e+n*n}e.len=h,e.sub=a,e.mul=s,e.div=u,e.dist=c,e.sqrDist=l,e.sqrLen=p,e.forEach=(i=o(),function(t,e,n,r,o,a){var s,u=void 0;for(e||(e=2),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,u=n;u(n-t)*(n-t)+(r-e)*(r-e)?i.distance(n,r,o,a):this.pointToLine(t,e,n,r,o,a)},pointToLine:function(t,e,n,i,o,a){var s=[n-t,i-e];if(r.exactEquals(s,[0,0]))return Math.sqrt((o-t)*(o-t)+(a-e)*(a-e));var u=[-s[1],s[0]];r.normalize(u,u);var c=[o-t,a-e];return Math.abs(r.dot(c,u))},tangentAngle:function(t,e,n,i){return Math.atan2(i-e,n-t)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(4);e.Base=i.default;var r=n(57);e.Circle=r.default;var o=n(58);e.Dom=o.default;var a=n(59);e.Ellipse=a.default;var s=n(60);e.Image=s.default;var u=n(61);e.Line=u.default;var c=n(62);e.Marker=c.default;var l=n(64);e.Path=l.default;var h=n(65);e.Polygon=h.default;var p=n(66);e.Polyline=p.default;var f=n(69);e.Rect=f.default;var d=n(71);e.Text=d.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return null==t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(18);e.default=function(t){return i.default(t,"String")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(7),r=n(13);e.default=function(t,e){if(t)if(i.default(t))for(var n=0,o=t.length;n2&&(n.push([r].concat(a.splice(0,2))),s="l",r="m"===r?"l":"L"),"o"===s&&1===a.length&&n.push([r,a[0]]),"r"===s)n.push([r].concat(a));else for(;a.length>=e[s]&&(n.push([r].concat(a.splice(0,e[s]))),e[s]););return t})),n},P=function(t,e){for(var n=[],i=0,r=t.length;r-2*!e>i;i+=2){var o=[{x:+t[i-2],y:+t[i-1]},{x:+t[i],y:+t[i+1]},{x:+t[i+2],y:+t[i+3]},{x:+t[i+4],y:+t[i+5]}];e?i?r-4===i?o[3]={x:+t[0],y:+t[1]}:r-2===i&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[r-2],y:+t[r-1]}:r-4===i?o[3]=o[2]:i||(o[0]={x:+t[i],y:+t[i+1]}),n.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return n},j=function(t,e,n,i,r){var o=[];if(null===r&&null===i&&(i=n),t=+t,e=+e,n=+n,i=+i,null!==r){var a=Math.PI/180,s=t+n*Math.cos(-i*a),u=t+n*Math.cos(-r*a);o=[["M",s,e+n*Math.sin(-i*a)],["A",n,n,0,+(r-i>180),0,u,e+n*Math.sin(-r*a)]]}else o=[["M",t,e],["m",0,-i],["a",n,i,0,1,1,0,2*i],["a",n,i,0,1,1,0,-2*i],["z"]];return o},k=function(t){if(!(t=A(t))||!t.length)return[["M",0,0]];var e,n,i=[],r=0,o=0,a=0,s=0,u=0;"M"===t[0][0]&&(a=r=+t[0][1],s=o=+t[0][2],u++,i[0]=["M",r,o]);for(var c=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),l=void 0,h=void 0,p=u,f=t.length;p1&&(n*=M=Math.sqrt(M),i*=M);var _=n*n,w=i*i,O=(o===a?-1:1)*Math.sqrt(Math.abs((_*w-_*b*b-w*x*x)/(_*b*b+w*x*x)));f=O*n*b/i+(t+s)/2,d=O*-i*x/n+(e+u)/2,h=Math.asin(((e-d)/i).toFixed(9)),p=Math.asin(((u-d)/i).toFixed(9)),h=tp&&(h-=2*Math.PI),!a&&p>h&&(p-=2*Math.PI)}var C=p-h;if(Math.abs(C)>g){var S=p,A=s,P=u;p=h+g*(a&&p>h?1:-1),s=f+n*Math.cos(p),u=d+i*Math.sin(p),v=I(s,u,n,i,r,0,a,A,P,[p,S,f,d])}C=p-h;var j=Math.cos(h),k=Math.sin(h),T=Math.cos(p),E=Math.sin(p),L=Math.tan(C/4),B=4/3*n*L,D=4/3*i*L,F=[t,e],R=[t+B*k,e-D*j],N=[s+B*E,u-D*T],Y=[s,u];if(R[0]=2*F[0]-R[0],R[1]=2*F[1]-R[1],c)return[R,N,Y].concat(v);for(var X=[],G=0,z=(v=[R,N,Y].concat(v).join().split(",")).length;G7){t[e].shift();for(var o=t[e];o.length;)s[e]="A",r&&(u[e]="A"),t.splice(e++,0,["C"].concat(o.splice(0,6)));t.splice(e,1),n=Math.max(i.length,r&&r.length||0)}},f=function(t,e,o,a,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),o.bx=0,o.by=0,o.x=t[s][1],o.y=t[s][2],n=Math.max(i.length,r&&r.length||0))};n=Math.max(i.length,r&&r.length||0);for(var d=0;d1?1:u<0?0:u)/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],p=0,f=0;f<12;f++){var d=c*l[f]+c,g=F(d,t,n,r,a),y=F(d,e,i,o,s),v=g*g+y*y;p+=h[f]*Math.sqrt(v)}return c*p},N=function(t,e,n,i,r,o,a,s){for(var u,c,l,h,p=[],f=[[],[]],d=0;d<2;++d)if(0===d?(c=6*t-12*n+6*r,u=-3*t+9*n-9*r+3*a,l=3*n-3*t):(c=6*e-12*i+6*o,u=-3*e+9*i-9*o+3*s,l=3*i-3*e),Math.abs(u)<1e-12){if(Math.abs(c)<1e-12)continue;(h=-l/c)>0&&h<1&&p.push(h)}else{var g=c*c-4*l*u,y=Math.sqrt(g);if(!(g<0)){var v=(-c+y)/(2*u);v>0&&v<1&&p.push(v);var m=(-c-y)/(2*u);m>0&&m<1&&p.push(m)}}for(var x,b=p.length,M=b;b--;)x=1-(h=p[b]),f[0][b]=x*x*x*t+3*x*x*h*n+3*x*h*h*r+h*h*h*a,f[1][b]=x*x*x*e+3*x*x*h*i+3*x*h*h*o+h*h*h*s;return f[0][M]=t,f[1][M]=e,f[0][M+1]=a,f[1][M+1]=s,f[0].length=f[1].length=M+2,{min:{x:Math.min.apply(0,f[0]),y:Math.min.apply(0,f[1])},max:{x:Math.max.apply(0,f[0]),y:Math.max.apply(0,f[1])}}},Y=function(t,e,n,i,r,o,a,s){if(!(Math.max(t,n)Math.max(r,a)||Math.max(e,i)Math.max(o,s))){var u=(t-n)*(o-s)-(e-i)*(r-a);if(u){var c=((t*i-e*n)*(r-a)-(t-n)*(r*s-o*a))/u,l=((t*i-e*n)*(o-s)-(e-i)*(r*s-o*a))/u,h=+c.toFixed(2),p=+l.toFixed(2);if(!(h<+Math.min(t,n).toFixed(2)||h>+Math.max(t,n).toFixed(2)||h<+Math.min(r,a).toFixed(2)||h>+Math.max(r,a).toFixed(2)||p<+Math.min(e,i).toFixed(2)||p>+Math.max(e,i).toFixed(2)||p<+Math.min(o,s).toFixed(2)||p>+Math.max(o,s).toFixed(2)))return{x:c,y:l}}}},X=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},G=function(t,e,n,i,r){if(r)return[["M",+t+ +r,e],["l",n-2*r,0],["a",r,r,0,0,1,r,r],["l",0,i-2*r],["a",r,r,0,0,1,-r,r],["l",2*r-n,0],["a",r,r,0,0,1,-r,-r],["l",0,2*r-i],["a",r,r,0,0,1,r,-r],["z"]];var o=[["M",t,e],["l",n,0],["l",0,i],["l",-n,0],["z"]];return o.parsePathArray=D,o},z=function(t,e,n,i){return null===t&&(t=e=n=i=0),null===e&&(e=t.y,n=t.width,i=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:i,h:i,x2:t+n,y2:e+i,cx:t+n/2,cy:e+i/2,r1:Math.min(n,i)/2,r2:Math.max(n,i)/2,r0:Math.sqrt(n*n+i*i)/2,path:G(t,e,n,i),vb:[t,e,n,i].join(" ")}},q=function(t,e,n,i,r,o,a,s){u(t)||(t=[t,e,n,i,r,o,a,s]);var c=N.apply(null,t);return z(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)},H=function(t,e,n,i,r,o,a,s,u){var c=1-u,l=Math.pow(c,3),h=Math.pow(c,2),p=u*u,f=p*u,d=t+2*u*(n-t)+p*(r-2*n+t),g=e+2*u*(i-e)+p*(o-2*i+e),y=n+2*u*(r-n)+p*(a-2*r+n),v=i+2*u*(o-i)+p*(s-2*o+i);return{x:l*t+3*h*u*n+3*c*u*u*r+f*a,y:l*e+3*h*u*i+3*c*u*u*o+f*s,m:{x:d,y:g},n:{x:y,y:v},start:{x:c*t+u*n,y:c*e+u*i},end:{x:c*r+u*a,y:c*o+u*s},alpha:90-180*Math.atan2(d-y,g-v)/Math.PI}},V=function(t,e,n){if(!function(t,e){return t=z(t),e=z(e),X(e,t.x,t.y)||X(e,t.x2,t.y)||X(e,t.x,t.y2)||X(e,t.x2,t.y2)||X(t,e.x,e.y)||X(t,e.x2,e.y)||X(t,e.x,e.y2)||X(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(q(t),q(e)))return n?0:[];for(var i=~~(R.apply(0,t)/8),r=~~(R.apply(0,e)/8),o=[],a=[],s={},u=n?0:[],c=0;c=0&&x<=1&&b>=0&&b<=1&&(n?u+=1:u.push({x:m.x,y:m.y,t1:x,t2:b}))}}return u},W=function(t,e){return function(t,e,n){var i,r,o,a,s,u,c,l,h,p;t=L(t),e=L(e);for(var f=[],d=0,g=t.length;d=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e.concat(t[t.length-1])}))}(t,e,n));else{var r=[].concat(t);"M"===r[0]&&(r[0]="L");for(var o=0;o<=n-1;o++)i.push(r)}return i}(t[r],t[r+1],i))}),[]);return u.unshift(t[0]),"Z"!==e[i]&&"z"!==e[i]||u.push("Z"),u},Z=function(t,e){if(t.length!==e.length)return!1;var n=!0;return l(t,(function(t,i){if(t!==e[i])return n=!1,!1})),n};function $(t,e,n){var i=null,r=n;return e=0;u--)a=o[u].index,"add"===o[u].type?t.splice(a,0,[].concat(t[a])):t.splice(a,1)}var h=r-(i=t.length);if(i0)){t[i]=e[i];break}n=J(n,t[i-1],1)}t[i]=["Q"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[i]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(i>0)){t[i]=e[i];break}n=J(n,t[i-1],2)}t[i]=["C"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(n.length<2){if(!(i>0)){t[i]=e[i];break}n=J(n,t[i-1],1)}t[i]=["S"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[i]=e[i]}return t},nt=function(){function t(t,e){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}(),it=function(t,e){return(it=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function rt(t,e){function n(){this.constructor=t}it(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ot=n(28),at=n.n(ot),st=(n(11),n(17)),ut=n.n(st),ct=n(12),lt=n.n(ct),ht=n(13),pt=n.n(ht),ft=(n(7),n(19)),dt=n.n(ft),gt=n(14),yt=n.n(gt),vt=n(20),mt=n.n(vt);function xt(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}var bt="undefined"!=typeof window&&void 0!==window.document,Mt=function(t){function e(e){var n=t.call(this)||this;n.destroyed=!1;var i=n.getDefaultCfg();return n.cfg=dt()(i,e),n}return rt(e,t),e.prototype.getDefaultCfg=function(){return{}},e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){this.cfg[t]=e},e.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},e}(at.a),_t=n(2);_t.translate=function(t,e,n){var i=new Array(9);return _t.fromTranslation(i,n),_t.multiply(t,i,e)},_t.rotate=function(t,e,n){var i=new Array(9);return _t.fromRotation(i,n),_t.multiply(t,i,e)},_t.scale=function(t,e,n){var i=new Array(9);return _t.fromScaling(i,n),_t.multiply(t,i,e)},_t.transform=function(t,e){for(var n=[].concat(t),i=0,r=e.length;in?n:t}(n,-1,1))},Ot.direction=function(t,e){return t[0]*e[1]-e[0]*t[1]},Ot.angleTo=function(t,e,n){var i=Ot.angle(t,e),r=Ot.direction(t,e)>=0;return n?r?2*Math.PI-i:i:r?i:2*Math.PI-i},Ot.vertical=function(t,e,n){return n?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t},n(29);var Ct=function(t,e){var n=t?m(t):[1,0,0,0,1,0,0,0,1];return l(e,(function(t){switch(t[0]){case"t":wt.translate(n,n,[t[1],t[2]]);break;case"s":wt.scale(n,n,[t[1],t[2]]);break;case"r":wt.rotate(n,n,t[1]);break;case"m":wt.multiply(n,n,t[1]);break;default:return!1}})),n};function St(t,e){var n=[],i=t[0],r=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],p=e[0],f=e[1],d=e[2],g=e[3],y=e[4],v=e[5],m=e[6],x=e[7],b=e[8];return n[0]=p*i+f*a+d*c,n[1]=p*r+f*s+d*l,n[2]=p*o+f*u+d*h,n[3]=g*i+y*a+v*c,n[4]=g*r+y*s+v*l,n[5]=g*o+y*u+v*h,n[6]=m*i+x*a+b*c,n[7]=m*r+x*s+b*l,n[8]=m*o+x*u+b*h,n}function At(t,e){var n=[],i=e[0],r=e[1];return n[0]=t[0]*i+t[3]*r+t[6],n[1]=t[1]*i+t[4]*r+t[7],n}var Pt=["zIndex","capture","visible","type"],jt=["repeat"];function kt(t,e){var n={},i=e.attrs;for(var r in t)n[r]=i[r];return n}function Tt(t,e){var n={},i=e.attr();return l(t,(function(t,e){-1!==jt.indexOf(e)||b(i[e],t)||(n[e]=t)})),n}function Et(t,e){if(e.onFrame)return t;var n=e.startTime,i=e.delay,r=e.duration,o=Object.prototype.hasOwnProperty;return l(t,(function(t){n+it.delay&&l(e.toAttrs,(function(e,n){o.call(t.toAttrs,n)&&(delete t.toAttrs[n],delete t.fromAttrs[n])}))})),t}var It=function(t){function e(e){var n=t.call(this,e)||this;n.attrs={};var i=n.getDefaultAttrs();return function(t,e,n,i){e&&y(t,e),n&&y(t,n),i&&y(t,i)}(i,e.attrs),n.attrs=i,n.initAttrs(i),n.initAnimate(),n}return rt(e,t),e.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},e.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},e.prototype.onCanvasChange=function(t){},e.prototype.initAttrs=function(t){},e.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},e.prototype.isGroup=function(){return!1},e.prototype.getParent=function(){return this.get("parent")},e.prototype.getCanvas=function(){return this.get("canvas")},e.prototype.attr=function(){for(var t,e=[],n=0;n0?i=Et(i,M):n.addAnimator(this),i.push(M),this.set("animations",i),this.set("_pause",{isPaused:!1})},e.prototype.stopAnimate=function(t){var e=this;void 0===t&&(t=!0);var n=this.get("animations");l(n,(function(n){t&&(n.onFrame?e.attr(n.onFrame(1)):e.attr(n.toAttrs)),n.callback&&n.callback()})),this.set("animating",!1),this.set("animations",[])},e.prototype.pauseAnimate=function(){var t=this.get("timeline"),e=this.get("animations");return l(e,(function(t){t.pauseCallback&&t.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:t.getTime()}),this},e.prototype.resumeAnimate=function(){var t=this.get("timeline").getTime(),e=this.get("animations"),n=this.get("_pause").pauseTime;return l(e,(function(e){e.startTime=e.startTime+(t-n),e._paused=!1,e._pauseTime=null,e.resumeCallback&&e.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",e),this},e.prototype.emitDelegation=function(t,e){for(var n=e.propagationPath,i=this.getEvents(),r=0;r0)}));return a.length>0?(yt()(a,(function(t){var e=t.getBBox();r.push(e.minX,e.maxX),o.push(e.minY,e.maxY)})),t=Math.min.apply(null,r),e=Math.max.apply(null,r),n=Math.min.apply(null,o),i=Math.max.apply(null,o)):(t=0,e=0,n=0,i=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:i,width:e-t,height:i-n}},e.prototype.getCanvasBBox=function(){var t=1/0,e=-1/0,n=1/0,i=-1/0,r=[],o=[],a=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));return a.length>0?(yt()(a,(function(t){var e=t.getCanvasBBox();r.push(e.minX,e.maxX),o.push(e.minY,e.maxY)})),t=Math.min.apply(null,r),e=Math.max.apply(null,r),n=Math.min.apply(null,o),i=Math.max.apply(null,o)):(t=0,e=0,n=0,i=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:i,width:e-t,height:i-n}},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.children=[],e},e.prototype.onAttrChange=function(e,n,i){if(t.prototype.onAttrChange.call(this,e,n,i),"matrix"===e){var r=this.getTotalMatrix();this._applyChildrenMarix(r)}},e.prototype.applyMatrix=function(e){var n=this.getTotalMatrix();t.prototype.applyMatrix.call(this,e);var i=this.getTotalMatrix();i!==n&&this._applyChildrenMarix(i)},e.prototype._applyChildrenMarix=function(t){var e=this.getChildren();yt()(e,(function(e){e.applyMatrix(t)}))},e.prototype.addShape=function(){for(var t=[],e=0;e=0;o--){var a=t[o];if(Bt(a)&&(a.isGroup()?r=a.getShape(e,n,i):a.isHit(e,n)&&(r=a)),r)break}return r},e.prototype.add=function(t){var e=this.getCanvas(),n=this.getChildren(),i=this.get("timeline"),r=t.getParent();r&&function(t,e,n){void 0===n&&(n=!0),n?e.destroy():(e.set("parent",null),e.set("canvas",null)),xt(t.getChildren(),e)}(r,t,!1),t.set("parent",this),e&&function t(e,n){if(e.set("canvas",n),e.isGroup()){var i=e.get("children");i.length&&i.forEach((function(e){t(e,n)}))}}(t,e),i&&function t(e,n){if(e.set("timeline",n),e.isGroup()){var i=e.get("children");i.length&&i.forEach((function(e){t(e,n)}))}}(t,i),n.push(t),function(t){t.isGroup()?(t.isEntityGroup()||t.get("children").length)&&t.onCanvasChange("add"):t.onCanvasChange("add")}(t),this._applyElementMatrix(t)},e.prototype._applyElementMatrix=function(t){var e=this.getTotalMatrix();e&&t.applyMatrix(e)},e.prototype.getChildren=function(){return this.get("children")},e.prototype.sort=function(){var t,e=this.getChildren();yt()(e,(function(t,e){return t._INDEX=e,t})),e.sort((t=function(t,e){return t.get("zIndex")-e.get("zIndex")},function(e,n){var i=t(e,n);return 0===i?e._INDEX-n._INDEX:i})),this.onCanvasChange("sort")},e.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),e=t.length-1;e>=0;e--)t[e].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},e.prototype.destroy=function(){this.get("destroyed")||(this.clear(),t.prototype.destroy.call(this))},e.prototype.getFirst=function(){return this.getChildByIndex(0)},e.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},e.prototype.getChildByIndex=function(t){return this.getChildren()[t]},e.prototype.getCount=function(){return this.getChildren().length},e.prototype.contain=function(t){return this.getChildren().indexOf(t)>-1},e.prototype.removeChild=function(t,e){void 0===e&&(e=!0),this.contain(t)&&t.remove(e)},e.prototype.findAll=function(t){var e=[],n=this.getChildren();return yt()(n,(function(n){t(n)&&e.push(n),n.isGroup()&&(e=e.concat(n.findAll(t)))})),e},e.prototype.find=function(t){var e=null,n=this.getChildren();return yt()(n,(function(n){if(t(n)?e=n:n.isGroup()&&(e=n.find(t)),e)return!1})),e},e.prototype.findById=function(t){return this.find((function(e){return e.get("id")===t}))},e.prototype.findByClassName=function(t){return this.find((function(e){return e.get("className")===t}))},e.prototype.findAllByName=function(t){return this.findAll((function(e){return e.get("name")===t}))},e}(It),Nt=0,Yt=0,Xt=0,Gt=0,zt=0,qt=0,Ht="object"==typeof performance&&performance.now?performance:Date,Vt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Wt(){return zt||(Vt(Ut),zt=Ht.now()+qt)}function Ut(){zt=0}function Qt(){this._call=this._time=this._next=null}function Zt(t,e,n){var i=new Qt;return i.restart(t,e,n),i}function $t(){zt=(Gt=Ht.now())+qt,Nt=Yt=0;try{!function(){Wt(),++Nt;for(var t,e=Dt;e;)(t=zt-e._time)>=0&&e._call.call(null,t),e=e._next;--Nt}()}finally{Nt=0,function(){for(var t,e,n=Dt,i=1/0;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Dt=e);Ft=t,Jt(i)}(),zt=0}}function Kt(){var t=Ht.now(),e=t-Gt;e>1e3&&(qt-=e,Gt=t)}function Jt(t){Nt||(Yt&&(Yt=clearTimeout(Yt)),t-zt>24?(t<1/0&&(Yt=setTimeout($t,t-Ht.now()-qt)),Xt&&(Xt=clearInterval(Xt))):(Xt||(Gt=Ht.now(),Xt=setInterval(Kt,1e3)),Nt=1,Vt($t)))}function te(t){return+t}function ee(t){return t*t}function ne(t){return t*(2-t)}function ie(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function re(t){return t*t*t}function oe(t){return--t*t*t+1}function ae(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Qt.prototype=Zt.prototype={constructor:Qt,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Wt():+n)+(null==e?0:+e),this._next||Ft===this||(Ft?Ft._next=this:Dt=this,Ft=this),this._call=t,this._time=n,Jt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jt())}};var se=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),ue=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),ce=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),le=Math.PI,he=le/2;function pe(t){return 1-Math.cos(t*he)}function fe(t){return Math.sin(t*he)}function de(t){return(1-Math.cos(le*t))/2}function ge(t){return Math.pow(2,10*t-10)}function ye(t){return 1-Math.pow(2,-10*t)}function ve(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function me(t){return 1-Math.sqrt(1-t*t)}function xe(t){return Math.sqrt(1- --t*t)}function be(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Me=7.5625;function _e(t){return 1-we(1-t)}function we(t){return(t=+t)<4/11?Me*t*t:t<8/11?Me*(t-=6/11)*t+.75:t<10/11?Me*(t-=9/11)*t+.9375:Me*(t-=21/22)*t+63/64}function Oe(t){return((t*=2)<=1?1-we(1-t):we(t-1)+1)/2}var Ce=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),Se=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),Ae=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),Pe=2*Math.PI,je=function t(e,n){var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Pe);function r(t){return e*Math.pow(2,10*--t)*Math.sin((i-t)/n)}return r.amplitude=function(e){return t(e,n*Pe)},r.period=function(n){return t(e,n)},r}(1,.3),ke=function t(e,n){var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Pe);function r(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+i)/n)}return r.amplitude=function(e){return t(e,n*Pe)},r.period=function(n){return t(e,n)},r}(1,.3),Te=function t(e,n){var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Pe);function r(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((i-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((i+t)/n))/2}return r.amplitude=function(e){return t(e,n*Pe)},r.period=function(n){return t(e,n)},r}(1,.3),Ee=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function Ie(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Le(){}var Be="\\s*([+-]?\\d+)\\s*",De="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Re=/^#([0-9a-f]{3,8})$/,Ne=new RegExp("^rgb\\("+[Be,Be,Be]+"\\)$"),Ye=new RegExp("^rgb\\("+[Fe,Fe,Fe]+"\\)$"),Xe=new RegExp("^rgba\\("+[Be,Be,Be,De]+"\\)$"),Ge=new RegExp("^rgba\\("+[Fe,Fe,Fe,De]+"\\)$"),ze=new RegExp("^hsl\\("+[De,Fe,Fe]+"\\)$"),qe=new RegExp("^hsla\\("+[De,Fe,Fe,De]+"\\)$"),He={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ve(){return this.rgb().formatHex()}function We(){return this.rgb().formatRgb()}function Ue(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Re.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Qe(e):3===n?new Ke(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Ke(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Ke(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Ne.exec(t))?new Ke(e[1],e[2],e[3],1):(e=Ye.exec(t))?new Ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Xe.exec(t))?Ze(e[1],e[2],e[3],e[4]):(e=Ge.exec(t))?Ze(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ze.exec(t))?nn(e[1],e[2]/100,e[3]/100,1):(e=qe.exec(t))?nn(e[1],e[2]/100,e[3]/100,e[4]):He.hasOwnProperty(t)?Qe(He[t]):"transparent"===t?new Ke(NaN,NaN,NaN,0):null}function Qe(t){return new Ke(t>>16&255,t>>8&255,255&t,1)}function Ze(t,e,n,i){return i<=0&&(t=e=n=NaN),new Ke(t,e,n,i)}function $e(t,e,n,i){return 1===arguments.length?function(t){return t instanceof Le||(t=Ue(t)),t?new Ke((t=t.rgb()).r,t.g,t.b,t.opacity):new Ke}(t):new Ke(t,e,n,null==i?1:i)}function Ke(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function Je(){return"#"+en(this.r)+en(this.g)+en(this.b)}function tn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function en(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function nn(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new on(t,e,n,i)}function rn(t){if(t instanceof on)return new on(t.h,t.s,t.l,t.opacity);if(t instanceof Le||(t=Ue(t)),!t)return new on;if(t instanceof on)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),a=NaN,s=o-r,u=(o+r)/2;return s?(a=e===o?(n-i)/s+6*(n0&&u<1?0:a,new on(a,s,u,t.opacity)}function on(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function an(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function sn(t,e,n,i,r){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*i+a*r)/6}Ee(Le,Ue,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Ve,formatHex:Ve,formatHsl:function(){return rn(this).formatHsl()},formatRgb:We,toString:We}),Ee(Ke,$e,Ie(Le,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Je,formatHex:Je,formatRgb:tn,toString:tn})),Ee(on,(function(t,e,n,i){return 1===arguments.length?rn(t):new on(t,e,n,null==i?1:i)}),Ie(Le,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new on(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new on(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Ke(an(t>=240?t-240:t+120,r,i),an(t,r,i),an(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var un=function(t){return function(){return t}};function cn(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):un(isNaN(t)?e:t)}var ln=function t(e){var n=function(t){return 1==(t=+t)?cn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):un(isNaN(e)?n:e)}}(e);function i(t,e){var i=n((t=$e(t)).r,(e=$e(e)).r),r=n(t.g,e.g),o=n(t.b,e.b),a=cn(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=o(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);function hn(t){return function(e){var n,i,r=e.length,o=new Array(r),a=new Array(r),s=new Array(r);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),r=t[i],o=t[i+1],a=i>0?t[i-1]:2*r-o,s=io&&(r=e.slice(o,r),s[a]?s[a]+=r:s[++a]=r),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:yn(n,i)})),o=xn.lastIndex;return of.length?(p=A(o[l]),f=A(r[l]),f=K(f,p),f=et(f,p),e.fromAttrs.path=f,e.toAttrs.path=p):e.pathFormatted||(p=A(o[l]),f=A(r[l]),f=et(f,p),e.fromAttrs.path=f,e.toAttrs.path=p,e.pathFormatted=!0),i[l]=[];for(var d=0;d0){for(var o=i.animators.length-1;o>=0;o--)if((t=i.animators[o]).destroyed)i.removeAnimator(o);else{if(!t.isAnimatePaused())for(var a=(e=t.get("animations")).length-1;a>=0;a--)n=e[a],wn(t,n,r)&&(e.splice(a,1),n.callback&&n.callback());0===e.length&&i.removeAnimator(o)}i.canvas.get("autoDraw")||i.canvas.draw()}}))},t.prototype.addAnimator=function(t){this.animators.push(t)},t.prototype.removeAnimator=function(t){this.animators.splice(t,1)},t.prototype.isAnimating=function(){return!!this.animators.length},t.prototype.stop=function(){this.timer&&this.timer.stop()},t.prototype.stopAllAnimations=function(t){void 0===t&&(t=!0),this.animators.forEach((function(e){e.stopAnimate(t)})),this.animators=[],this.canvas.draw()},t.prototype.getTime=function(){return this.current},t}(),Cn=function(t){function e(e){var n=t.call(this,e)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}return rt(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.cursor="default",e},e.prototype.initContainer=function(){var t=this.get("container");lt()(t)&&(t=document.getElementById(t),this.set("container",t))},e.prototype.initDom=function(){var t=this.createDom();this.set("el",t),this.get("container").appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},e.prototype.initEvents=function(){},e.prototype.initTimeline=function(){var t=new On(this);this.set("timeline",t)},e.prototype.setDOMSize=function(t,e){var n=this.get("el");bt&&(n.style.width=t+"px",n.style.height=e+"px")},e.prototype.changeSize=function(t,e){this.setDOMSize(t,e),this.set("width",t),this.set("height",e),this.onCanvasChange("changeSize")},e.prototype.getRenderer=function(){return this.get("renderer")},e.prototype.getCursor=function(){return this.get("cursor")},e.prototype.setCursor=function(t){this.set("cursor",t);var e=this.get("el");bt&&e&&(e.style.cursor=t)},e.prototype.getPointByClient=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t-n.left,y:e-n.top}},e.prototype.getClientByPoint=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t+n.left,y:e+n.top}},e.prototype.draw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},e.prototype.clearEvents=function(){},e.prototype.isCanvas=function(){return!0},e.prototype.getParent=function(){return null},e.prototype.destroy=function(){var e=this.get("timeline");this.get("destroyed")||(this.clear(),e&&e.stop(),this.clearEvents(),this.removeDom(),t.prototype.destroy.call(this))},e}(Rt),Sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return rt(e,t),e.prototype.isGroup=function(){return!0},e.prototype.isEntityGroup=function(){return!1},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=this.getChildren(),i=0;i=t&&n.minY<=e&&n.maxY>=e},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e),this.clearCacheBBox()},e.prototype.getBBox=function(){var t=this.get("bbox");return t||(t=this.calculateBBox(),this.set("bbox",t)),t},e.prototype.getCanvasBBox=function(){var t=this.get("canvasBox");return t||(t=this.calculateCanvasBBox(),this.set("canvasBox",t)),t},e.prototype.applyMatrix=function(e){t.prototype.applyMatrix.call(this,e),this.set("canvasBox",null)},e.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),e=this.getTotalMatrix(),n=t.minX,i=t.minY,r=t.maxX,o=t.maxY;if(e){var a=At(e,[t.minX,t.minY]),s=At(e,[t.maxX,t.minY]),u=At(e,[t.minX,t.maxY]),c=At(e,[t.maxX,t.maxY]);n=Math.min(a[0],s[0],u[0],c[0]),r=Math.max(a[0],s[0],u[0],c[0]),i=Math.min(a[1],s[1],u[1],c[1]),o=Math.max(a[1],s[1],u[1],c[1])}var l=this.attrs;if(l.shadowColor){var h=l.shadowBlur,p=void 0===h?0:h,f=l.shadowOffsetX,d=void 0===f?0:f,g=l.shadowOffsetY,y=void 0===g?0:g,v=n-p+d,m=r+p+d,x=i-p+y,b=o+p+y;n=Math.min(n,v),r=Math.max(r,m),i=Math.min(i,x),o=Math.max(o,b)}return{x:n,y:i,minX:n,minY:i,maxX:r,maxY:o,width:r-n,height:o-i}},e.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBox",null)},e.prototype.isClipShape=function(){return this.get("isClipShape")},e.prototype.isInShape=function(t,e){return!1},e.prototype.isOnlyHitBox=function(){return!1},e.prototype.isHit=function(t,e){var n=this.get("startArrowShape"),i=this.get("endArrowShape"),r=[t,e,1],o=(r=this.invertFromMatrix(r))[0],a=r[1],s=this._isInBBox(o,a);if(this.isOnlyHitBox())return s;if(s&&!this.isClipped(o,a)){if(this.isInShape(o,a))return!0;if(n&&n.isHit(o,a))return!0;if(i&&i.isHit(o,a))return!0}return!1},e}(It);n.d(e,"version",(function(){return Pn})),n.d(e,"Event",(function(){return nt})),n.d(e,"Base",(function(){return Mt})),n.d(e,"AbstractCanvas",(function(){return Cn})),n.d(e,"AbstractGroup",(function(){return Sn})),n.d(e,"AbstractShape",(function(){return An})),n.d(e,"PathUtil",(function(){return i}));var Pn=n(32).version},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(18);e.default=function(t){return i.default(t,"Function")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={}.toString;e.default=function(t,e){return i.call(t)==="[object "+e+"]"}},function(t,e,n){"use strict";function i(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n,r){return e&&i(t,e),n&&i(t,n),r&&i(t,r),t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(33);e.default=function(t){var e=i.default(t);return e.charAt(0).toUpperCase()+e.substring(1)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=function(t){e.ARRAY_TYPE=t},e.toRadian=function(t){return t*r},e.equals=function(t,e){return Math.abs(t-e)<=i*Math.max(1,Math.abs(t),Math.abs(e))};var i=e.EPSILON=1e-6;e.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,e.RANDOM=Math.random;var r=Math.PI/180},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8),r=n(15);e.drawChildren=function(t,e){e.forEach((function(e){e.draw(t)}))},e.refreshElement=function(t,e){var n=t.get("canvas");if(n&&n.get("autoDraw")){var o=n.get("context"),a=t.getParent(),s=a?a.getChildren():[n],u=t.get("el");if("remove"===e)if(t.get("isClipShape")){var c=u&&u.parentNode,l=c&&c.parentNode;c&&l&&l.removeChild(c)}else u&&u.parentNode&&u.parentNode.removeChild(u);else if("show"===e)u.setAttribute("visibility","visible");else if("hide"===e)u.setAttribute("visibility","hidden");else if("zIndex"===e)r.moveTo(u,s.indexOf(t));else if("sort"===e){var h=t.get("children");h&&h.length&&r.sortDom(t,(function(t,e){return h.indexOf(t)-h.indexOf(e)?1:0}))}else"clear"===e?u&&(u.innerHTML=""):"matrix"===e?i.setTransform(t):"clip"===e?i.setClip(t,o):"attr"===e||"add"===e&&t.draw(o)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(16),o=n(0),a=n(10),s=n(22),u=n(8),c=n(3),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.isEntityGroup=function(){return!0},e.prototype.createDom=function(){var t=document.createElementNS("http://www.w3.org/2000/svg","g");this.set("el",t);var e=this.getParent();if(e){var n=e.get("el");n?n.appendChild(t):(n=e.createDom(),e.set("el",n),n.appendChild(t))}return t},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e);var n=this.get("canvas");if(n&&n.get("autoDraw")){var i=n.get("context");this.createPath(i,e)}},e.prototype.onCanvasChange=function(t){s.refreshElement(this,t)},e.prototype.getShapeBase=function(){return a},e.prototype.getGroupBase=function(){return e},e.prototype.draw=function(t){var e=this.getChildren(),n=this.get("el");this.get("destroyed")?n&&n.parentNode.removeChild(n):(n||this.createDom(),u.setClip(this,t),this.createPath(t),e.length&&s.drawChildren(t,e))},e.prototype.createPath=function(t,e){var n=this.attr(),i=this.get("el");o.each(e||n,(function(t,e){c.SVG_ATTR_MAP[e]&&i.setAttribute(c.SVG_ATTR_MAP[e],t)})),u.setTransform(this)},e}(r.AbstractGroup);e.default=l},function(t,e,n){"use strict";function i(t,e){return t&&e?{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}:t||e}Object.defineProperty(e,"__esModule",{value:!0}),e.mergeBBox=i,e.mergeArrowBBox=function(t,e){var n=t.get("startArrowShape"),r=t.get("endArrowShape");return n&&(e=i(e,n.getCanvasBBox())),r&&(e=i(e,r.getCanvasBBox())),e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeFromArray=function(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)},e.isBrowser="undefined"!=typeof window&&void 0!==window.document;var i=n(11);e.isNil=i.default;var r=n(17);e.isFunction=r.default;var o=n(12);e.isString=o.default;var a=n(13);e.isObject=a.default;var s=n(7);e.isArray=s.default;var u=n(19);e.mix=u.default;var c=n(14);e.each=c.default;var l=n(20);e.upperFirst=l.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(6);e.nearestPoint=function(t,e,n,r,o){for(var a,s=.005,u=1/0,c=[n,r],l=0;l<=20;l++){var h=.05*l,p=[o.apply(null,t.concat([h])),o.apply(null,e.concat([h]))];(y=i.distance(c[0],c[1],p[0],p[1]))=0&&y1&&(n*=Math.sqrt(m),o*=Math.sqrt(m));var x=n*n*(v*v)+o*o*(y*y),b=x?Math.sqrt((n*n*(o*o)-x)/x):1;l===h&&(b*=-1),isNaN(b)&&(b=0);var M=o?b*n*v/o:0,_=n?b*-o*y/n:0,w=(p+d)/2+Math.cos(c)*M-Math.sin(c)*_,O=(f+g)/2+Math.sin(c)*M+Math.cos(c)*_,C=[(y-M)/n,(v-_)/o],S=[(-1*y-M)/n,(-1*v-_)/o],A=s([1,0],C),P=s(C,S);return a(C,S)<=-1&&(P=Math.PI),a(C,S)>=1&&(P=0),0===h&&P>0&&(P-=2*Math.PI),1===h&&P<0&&(P+=2*Math.PI),{cx:w,cy:O,rx:u(t,[d,g])?0:n,ry:u(t,[d,g])?0:o,startAngle:A,endAngle:A+P,xRotation:c,arcFlag:l,sweepFlag:h}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this._events={}}return t.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},t.prototype.once=function(t,e){return this.on(t,e,!0),this},t.prototype.emit=function(t){for(var e=this,n=[],i=1;i1?0:r<-1?Math.PI:Math.acos(r)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.equals=function(t,e){var n=t[0],i=t[1],o=t[2],a=e[0],s=e[1],u=e[2];return Math.abs(n-a)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-s)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-u)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(u))};var i,r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(21));function o(){var t=new r.ARRAY_TYPE(3);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function a(t){var e=t[0],n=t[1],i=t[2];return Math.sqrt(e*e+n*n+i*i)}function s(t,e,n){var i=new r.ARRAY_TYPE(3);return i[0]=t,i[1]=e,i[2]=n,i}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function c(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function l(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function h(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(n*n+i*i+r*r)}function p(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return n*n+i*i+r*r}function f(t){var e=t[0],n=t[1],i=t[2];return e*e+n*n+i*i}function d(t,e){var n=e[0],i=e[1],r=e[2],o=n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function g(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}e.sub=u,e.mul=c,e.div=l,e.dist=h,e.sqrDist=p,e.len=a,e.sqrLen=f,e.forEach=(i=o(),function(t,e,n,r,o,a){var s,u=void 0;for(e||(e=3),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,u=n;u1?e*r+o(e,n)*(r-1):e},e.getLineSpaceing=o,e.getTextWidth=function(t,e){var n=r.getOffScreenContext(),o=0;if(i.isNil(t)||""===t)return o;if(n.save(),n.font=e,i.isString(t)&&t.includes("\n")){var a=t.split("\n");i.each(a,(function(t){var e=n.measureText(t).width;oMath.PI/2?Math.PI-l:l,h=h>Math.PI/2?Math.PI-h:h,{xExtra:Math.cos(c/2-l)*(e/2*(1/Math.sin(c/2)))-e/2||0,yExtra:Math.cos(h-c/2)*(e/2*(1/Math.sin(c/2)))-e/2||0}}e.default=function(t){var e=t.attr(),n=e.path,s=e.stroke?e.lineWidth:0,l=function(t,e){for(var n=[],a=[],s=[],u=0;u=0?[o]:[]}function u(t,e,n,i){return 2*(1-i)*(e-t)+2*i*(n-e)}function c(t,e,n,r,o,s,u){var c=a(t,n,o,u),l=a(e,r,s,u),h=i.default.pointAt(t,e,n,r,u),p=i.default.pointAt(n,r,o,s,u);return[[t,e,h.x,h.y,c,l],[c,l,p.x,p.y,o,s]]}e.default={box:function(t,e,n,i,o,u){var c=s(t,n,o)[0],l=s(e,i,u)[0],h=[t,o],p=[e,u];return void 0!==c&&h.push(a(t,n,o,c)),void 0!==l&&p.push(a(e,i,u,l)),r.getBBoxByArray(h,p)},length:function(t,e,n,i,o,a){return function t(e,n,i,o,a,s,u){if(0===u)return(r.distance(e,n,i,o)+r.distance(i,o,a,s)+r.distance(e,n,a,s))/2;var l=c(e,n,i,o,a,s,.5),h=l[0],p=l[1];return h.push(u-1),p.push(u-1),t.apply(null,h)+t.apply(null,p)}(t,e,n,i,o,a,3)},nearestPoint:function(t,e,n,i,r,s,u,c){return o.nearestPoint([t,n,r],[e,i,s],u,c,a)},pointDistance:function(t,e,n,i,o,a,s,u){var c=this.nearestPoint(t,e,n,i,o,a,s,u);return r.distance(c.x,c.y,s,u)},interpolationAt:a,pointAt:function(t,e,n,i,r,o,s){return{x:a(t,n,r,s),y:a(e,i,o,s)}},divide:function(t,e,n,i,r,o,a){return c(t,e,n,i,r,o,a)},tangentAngle:function(t,e,n,i,o,a,s){var c=u(t,n,o,s),l=u(e,i,a,s),h=Math.atan2(l,c);return r.piMod(h)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.sqrDist=e.dist=e.div=e.mul=e.sub=e.len=void 0,e.create=o,e.clone=function(t){var e=new r.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},e.fromValues=function(t,e){var n=new r.ARRAY_TYPE(2);return n[0]=t,n[1]=e,n},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.set=function(t,e,n){return t[0]=e,t[1]=n,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},e.subtract=a,e.multiply=s,e.divide=u,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},e.scaleAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},e.distance=c,e.squaredDistance=l,e.length=h,e.squaredLength=p,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},e.normalize=function(t,e){var n=e[0],i=e[1],r=n*n+i*i;return r>0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,n){var i=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=i,t},e.lerp=function(t,e,n,i){var r=e[0],o=e[1];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t},e.random=function(t,e){e=e||1;var n=2*r.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.transformMat2=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t},e.transformMat2d=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t},e.transformMat3=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[3]*r+n[6],t[1]=n[1]*i+n[4]*r+n[7],t},e.transformMat4=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[4]*r+n[12],t[1]=n[1]*i+n[5]*r+n[13],t},e.rotate=function(t,e,n,i){var r=e[0]-n[0],o=e[1]-n[1],a=Math.sin(i),s=Math.cos(i);return t[0]=r*s-o*a+n[0],t[1]=r*a+o*s+n[1],t},e.angle=function(t,e){var n=t[0],i=t[1],r=e[0],o=e[1],a=n*n+i*i;a>0&&(a=1/Math.sqrt(a));var s=r*r+o*o;s>0&&(s=1/Math.sqrt(s));var u=(n*r+i*o)*a*s;return u>1?0:u<-1?Math.PI:Math.acos(u)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],i=t[1],o=e[0],a=e[1];return Math.abs(n-o)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-a)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(a))};var i,r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(46));function o(){var t=new r.ARRAY_TYPE(2);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function s(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function u(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function c(t,e){var n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)}function l(t,e){var n=e[0]-t[0],i=e[1]-t[1];return n*n+i*i}function h(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function p(t){var e=t[0],n=t[1];return e*e+n*n}e.len=h,e.sub=a,e.mul=s,e.div=u,e.dist=c,e.sqrDist=l,e.sqrLen=p,e.forEach=(i=o(),function(t,e,n,r,o,a){var s,u=void 0;for(e||(e=2),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,u=n;u=0&&o<=1&&h.push(o);else{var p=c*c-4*u*l;i.isNumberEqual(p,0)?h.push(-c/(2*u)):p>0&&(a=(-c-(s=Math.sqrt(p)))/(2*u),(o=(-c+s)/(2*u))>=0&&o<=1&&h.push(o),a>=0&&a<=1&&h.push(a))}return h}function c(t,e,n,i,o,s,u,c,l){var h=a(t,n,o,u,l),p=a(e,i,s,c,l),f=r.default.pointAt(t,e,n,i,l),d=r.default.pointAt(n,i,o,s,l),g=r.default.pointAt(o,s,u,c,l),y=r.default.pointAt(f.x,f.y,d.x,d.y,l),v=r.default.pointAt(d.x,d.y,g.x,g.y,l);return[[t,e,f.x,f.y,y.x,y.y,h,p],[h,p,v.x,v.y,g.x,g.y,u,c]]}e.default={extrema:u,box:function(t,e,n,r,o,s,c,l){for(var h=[t,c],p=[e,l],f=u(t,n,o,c),d=u(e,r,s,l),g=0;gh&&(h=g)}var y=function(t,e,n){return Math.atan(e/(t*Math.tan(n)))}(n,i,r),v=1/0,m=-1/0,x=[s,u];for(f=2*-Math.PI;f<=2*Math.PI;f+=Math.PI){var b=y+f;sm&&(m=M)}return{x:l,y:v,width:h-l,height:m-v}},length:function(t,e,n,i,r,o,a){},nearestPoint:function(t,e,n,i,o,a,c,l,h){var p=u(l-t,h-e,-o),f=p[0],d=p[1],g=r.default.nearestPoint(0,0,n,i,f,d),y=function(t,e,n,i){return(Math.atan2(i*t,n*e)+2*Math.PI)%(2*Math.PI)}(n,i,g.x,g.y);yc&&(g=s(n,i,c));var v=u(g.x,g.y,o);return{x:v[0]+t,y:v[1]+e}},pointDistance:function(t,e,n,r,o,a,s,u,c){var l=this.nearestPoint(t,e,n,r,u,c);return i.distance(l.x,l.y,u,c)},pointAt:function(t,e,n,i,r,s,u,c){var l=(u-s)*c+s;return{x:o(t,0,n,i,r,l),y:a(0,e,n,i,r,l)}},tangentAngle:function(t,e,n,r,o,a,s,u){var c=(s-a)*u+a,l=function(t,e,n,i,r,o,a,s){return-1*n*Math.cos(r)*Math.sin(s)-i*Math.sin(r)*Math.cos(s)}(0,0,n,r,o,0,0,c),h=function(t,e,n,i,r,o,a,s){return-1*n*Math.sin(r)*Math.sin(s)+i*Math.cos(r)*Math.cos(s)}(0,0,n,r,o,0,0,c);return i.piMod(Math.atan2(h,l))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(6);function r(t,e){var n=Math.abs(t);return e>0?n:-1*n}e.default={box:function(t,e,n,i){return{x:t-n,y:e-i,width:2*n,height:2*i}},length:function(t,e,n,i){return Math.PI*(3*(n+i)-Math.sqrt((3*n+i)*(n+3*i)))},nearestPoint:function(t,e,n,i,o,a){var s=n,u=i;if(0===s||0===u)return{x:t,y:e};for(var c,l,h=o-t,p=a-e,f=Math.abs(h),d=Math.abs(p),g=s*s,y=u*u,v=Math.PI/4,m=0;m<4;m++){c=s*Math.cos(v),l=u*Math.sin(v);var x=(g-y)*Math.pow(Math.cos(v),3)/s,b=(y-g)*Math.pow(Math.sin(v),3)/u,M=c-x,_=l-b,w=f-x,O=d-b,C=Math.hypot(_,M),S=Math.hypot(O,w);v+=C*Math.asin((M*O-_*w)/(C*S))/Math.sqrt(g+y-c*c-l*l),v=Math.min(Math.PI/2,Math.max(0,v))}return{x:t+r(c,h),y:e+r(l,p)}},pointDistance:function(t,e,n,r,o,a){var s=this.nearestPoint(t,e,n,r,o,a);return i.distance(s.x,s.y,o,a)},pointAt:function(t,e,n,i,r){var o=2*Math.PI*r;return{x:t+n*Math.cos(o),y:e+i*Math.sin(o)}},tangentAngle:function(t,e,n,r,o){var a=2*Math.PI*o,s=Math.atan2(r*Math.cos(a),-n*Math.sin(a));return i.piMod(s)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(27),r=n(27),o=n(53);function a(t,e){return{x:e.x+(e.x-t.x),y:e.y+(e.y-t.y)}}e.default=function(t){for(var e=[],n=null,s=null,u=null,c=0,l=(t=o.default(t)).length,h=0;h1){var r=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=r}i.default(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)=2?i.setAttribute("points",t.map((function(t){return t[0]+","+t[1]})).join(" ")):o.SVG_ATTR_MAP[e]&&i.setAttribute(o.SVG_ATTR_MAP[e],t)}))},e}(n(4).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(9),o=n(67),a=n(0),s=n(3),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="polyline",e.canFill=!0,e.canStroke=!0,e}return i.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return i.__assign(i.__assign({},e),{startArrow:!1,endArrow:!1})},e.prototype.onAttrChange=function(e,n,i){t.prototype.onAttrChange.call(this,e,n,i),-1!==["points"].indexOf(e)&&this._resetCache()},e.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},e.prototype.createPath=function(t,e){var n=this.attr(),i=this.get("el");a.each(e||n,(function(t,e){"points"===e&&a.isArray(t)&&t.length>=2?i.setAttribute("points",t.map((function(t){return t[0]+","+t[1]})).join(" ")):s.SVG_ATTR_MAP[e]&&i.setAttribute(s.SVG_ATTR_MAP[e],t)}))},e.prototype.getTotalLength=function(){var t=this.attr().points,e=this.get("totalLength");return a.isNil(e)?(this.set("totalLength",o.default.length(t)),this.get("totalLength")):e},e.prototype.getPoint=function(t){var e,n,i=this.attr().points,o=this.get("tCache");return o||(this._setTcache(),o=this.get("tCache")),a.each(o,(function(i,r){t>=i[0]&&t<=i[1]&&(e=(t-i[0])/(i[1]-i[0]),n=r)})),r.default.pointAt(i[n][0],i[n][1],i[n+1][0],i[n+1][1],e)},e.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var e=this.getTotalLength();if(!(e<=0)){var n,i,o=0,s=[];a.each(t,(function(a,u){t[u+1]&&((n=[])[0]=o/e,i=r.default.length(a[0],a[1],t[u+1][0],t[u+1][1]),o+=i,n[1]=o/e,s.push(n))})),this.set("tCache",s)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.attr().points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(n(4).default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(68),r=n(6);e.default={box:function(t){for(var e=[],n=[],i=0;i1||e<0||t.length<2)return null;var n=o(t),r=n.segments,a=n.totalLength;if(0===a)return{x:t[0][0],y:t[0][1]};for(var s=0,u=null,c=0;c=s&&e<=s+f){var d=(e-s)/f;u=i.default.pointAt(h[0],h[1],p[0],p[1],d);break}s+=f}return u},e.angleAtSegments=function(t,e){if(e>1||e<0||t.length<2)return 0;for(var n=o(t),i=n.segments,r=n.totalLength,a=0,s=0,u=0;u=a&&e<=a+p){s=Math.atan2(h[1]-l[1],h[0]-l[0]);break}a+=p}return s},e.distanceAtSegment=function(t,e,n){for(var r=1/0,o=0;o1){var r=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=r}i.each(e,(function(t,n){isNaN(t)||(e[n]=+t)})),t[n]=e})),t):void 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(0),o=n(72),a=n(8),s=n(3),u=n(4),c={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"baseline",hanging:"hanging"},l={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",hanging:"hanging"},h={left:"left",start:"left",center:"middle",right:"end",end:"end"},p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="text",e.canFill=!0,e.canStroke=!0,e}return i.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return i.__assign(i.__assign({},e),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},e.prototype.createPath=function(t,e){var n=this,i=this.attr(),o=this.get("el");this._setFont(),r.each(e||i,(function(t,e){"text"===e?n._setText(""+t):"matrix"===e&&t?a.setTransform(n):s.SVG_ATTR_MAP[e]&&o.setAttribute(s.SVG_ATTR_MAP[e],t)})),o.setAttribute("paint-order","stroke"),o.setAttribute("style","stroke-linecap:butt; stroke-linejoin:miter;")},e.prototype._setFont=function(){var t=this.get("el"),e=this.attr(),n=e.fontSize,i=e.textBaseline,r=e.textAlign,a=o.detect();a&&"firefox"===a.name?t.setAttribute("dominant-baseline",l[i]||"alphabetic"):t.setAttribute("alignment-baseline",c[i]||"baseline"),t.setAttribute("text-anchor",h[r]||"left"),n&&+n<12&&(this.attr("matrix",[1,0,0,0,1,0,0,0,1]),this.transform())},e.prototype._setText=function(t){var e=this.get("el"),n=this.attr(),i=n.x,o=n.textBaseline,a=void 0===o?"bottom":o;if(t)if(~t.indexOf("\n")){var s=t.split("\n"),u=s.length-1,c="";r.each(s,(function(t,e){0===e?"alphabetic"===a?c+=''+t+"":"top"===a?c+=''+t+"":"middle"===a?c+=''+t+"":"bottom"===a?c+=''+t+"":"hanging"===a&&(c+=''+t+""):c+=''+t+""})),e.innerHTML=c}else e.innerHTML=t;else e.innerHTML=""},e}(u.default);e.default=p},function(t,e,n){"use strict";(function(t){var n=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e1)for(var n=1;n120||c*c+l*l>40?s&&s.get("draggable")?((o=this.mousedownShape).set("capture",!1),this.draggingShape=o,this.dragging=!0,this._emitEvent("dragstart",n,t,o),this.mousedownShape=null,this.mousedownPoint=null):!s&&i.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",n,t,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(n,t,r,e),this._emitEvent("mousemove",n,t,e)):(this._emitMouseoverEvents(n,t,r,e),this._emitEvent("mousemove",n,t,e))}else this._emitMouseoverEvents(n,t,r,e),this._emitEvent("mousemove",n,t,e)}},t.prototype._emitEvent=function(t,e,n,i,r,o){var u=this._getEventObj(t,e,n,i,r,o);if(i){u.shape=i,a(i,t,u);for(var c=i.getParent();c;)c.emitDelegation(t,u),u.propagationStopped||s(c,t,u),u.propagationPath.push(c),c=c.getParent()}else a(this.canvas,t,u)},t.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(83),o=n(84),a=n(85),s=n(86),u=n(87),c=function(){function t(t){var e=document.createElementNS("http://www.w3.org/2000/svg","defs"),n=i.uniqueId("defs_");e.id=n,t.appendChild(e),this.children=[],this.defaultArrow={},this.el=e,this.canvas=t}return t.prototype.find=function(t,e){for(var n=this.children,i=null,r=0;r'})),n}var u=function(){function t(t){this.cfg={};var e,n,a,u,c,l,h,p=null,f=i.uniqueId("gradient_");return"l"===t.toLowerCase()[0]?function(t,e){var n,o,a=r.exec(t),u=i.mod(i.toRadian(parseFloat(a[1])),2*Math.PI),c=a[2];u>=0&&u<.5*Math.PI?(n={x:0,y:0},o={x:1,y:1}):.5*Math.PI<=u&&u';e.innerHTML=n},t}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=function(){function t(t,e){this.cfg={};var n=document.createElementNS("http://www.w3.org/2000/svg","marker"),r=i.uniqueId("marker_");n.setAttribute("id",r);var o=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttribute("stroke",t.stroke||"none"),o.setAttribute("fill",t.fill||"none"),n.appendChild(o),n.setAttribute("overflow","visible"),n.setAttribute("orient","auto-start-reverse"),this.el=n,this.child=o,this.id=r;var a=t["marker-start"===e?"startArrow":"endArrow"];return this.stroke=t.stroke||"#000",!0===a?this._setDefaultPath(e,o):(this.cfg=a,this._setMarker(t.lineWidth,o)),this}return t.prototype.match=function(){return!1},t.prototype._setDefaultPath=function(t,e){var n=this.el;e.setAttribute("d","M0,0 L"+10*Math.cos(Math.PI/6)+",5 L0,10"),n.setAttribute("refX",""+10*Math.cos(Math.PI/6)),n.setAttribute("refY","5")},t.prototype._setMarker=function(t,e){var n=this.el,r=this.cfg.path,o=this.cfg.d;i.isArray(r)&&(r=r.map((function(t){return t.join(" ")})).join("")),e.setAttribute("d",r),n.appendChild(e),o&&n.setAttribute("refX",""+o/t)},t.prototype.update=function(t){var e=this.child;e.attr?e.attr("fill",t):e.setAttribute("fill",t)},t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=function(){function t(t){this.type="clip",this.cfg={};var e=document.createElementNS("http://www.w3.org/2000/svg","clipPath");this.el=e,this.id=i.uniqueId("clip_"),e.id=this.id;var n=t.cfg.el;return e.appendChild(n),this.cfg=t,this}return t.prototype.match=function(){return!1},t.prototype.remove=function(){var t=this.el;t.parentNode.removeChild(t)},t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,o=function(){function t(t){this.cfg={};var e=document.createElementNS("http://www.w3.org/2000/svg","pattern");e.setAttribute("patternUnits","userSpaceOnUse");var n=document.createElementNS("http://www.w3.org/2000/svg","image");e.appendChild(n);var o=i.uniqueId("pattern_");e.id=o,this.el=e,this.id=o,this.cfg=t;var a=r.exec(t)[2];n.setAttribute("href",a);var s=new Image;function u(){e.setAttribute("width",""+s.width),e.setAttribute("height",""+s.height)}return a.match(/^data:/i)||(s.crossOrigin="Anonymous"),s.src=a,s.complete?u():(s.onload=u,s.src=s.src),this}return t.prototype.match=function(t,e){return this.cfg===e},t}();e.default=o}])},c54I:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("KPlw");e.default=function(t){return i.default(t)?"":t.toString()}},cvtA:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("Afl5"),r=n("mrT1");e.default=function(t,e){if(t)if(i.default(t))for(var n=0,o=t.length;n]*>/,s={tr:document.createElement("tbody"),tbody:r,thead:r,tfoot:r,td:o,th:o,"*":document.createElement("div")});var e=a.test(t)&&RegExp.$1;e&&e in s||(e="*");var n=s[e];t=t.replace(/(^\s*)|(\s*$)/g,""),n.innerHTML=""+t;var i=n.childNodes[0];return n.removeChild(i),i}function c(t,e,n){var i;try{i=window.getComputedStyle?window.getComputedStyle(t,null)[e]:t.style[e]}catch(t){}finally{i=void 0===i?n:i}return i}function l(t,e){var n=c(t,"height",e);return"auto"===n&&(n=t.offsetHeight),parseFloat(n)}function h(t,e){var n=l(t,e),i=parseFloat(c(t,"borderTopWidth"))||0,r=parseFloat(c(t,"paddingTop"))||0,o=parseFloat(c(t,"paddingBottom"))||0;return n+i+(parseFloat(c(t,"borderBottomWidth"))||0)+r+o+(parseFloat(c(t,"marginTop"))||0)+(parseFloat(c(t,"marginBottom"))||0)}function p(t,e){var n=c(t,"width",e);return"auto"===n&&(n=t.offsetWidth),parseFloat(n)}function f(t,e){var n=p(t,e),i=parseFloat(c(t,"borderLeftWidth"))||0,r=parseFloat(c(t,"paddingLeft"))||0,o=parseFloat(c(t,"paddingRight"))||0,a=parseFloat(c(t,"borderRightWidth"))||0,s=parseFloat(c(t,"marginRight"))||0;return n+i+a+r+o+(parseFloat(c(t,"marginLeft"))||0)+s}function d(){return window.devicePixelRatio?window.devicePixelRatio:2}function g(t,e){if(t)for(var n in e)e.hasOwnProperty(n)&&(t.style[n]=e[n]);return t}n.r(e),n.d(e,"addEventListener",(function(){return i})),n.d(e,"createDom",(function(){return u})),n.d(e,"getHeight",(function(){return l})),n.d(e,"getOuterHeight",(function(){return h})),n.d(e,"getOuterWidth",(function(){return f})),n.d(e,"getRatio",(function(){return d})),n.d(e,"getStyle",(function(){return c})),n.d(e,"getWidth",(function(){return p})),n.d(e,"modifyCSS",(function(){return g}))},fW3x:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerSymbols={hexagon:function(t,e,n){var i=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+i,e-n/2],["L",t+i,e+n/2],["L",t,e+n],["L",t-i,e+n/2],["L",t-i,e-n/2],["Z"]]},bowtie:function(t,e,n){var i=n-1.5;return[["M",t-n,e-i],["L",t+n,e+i],["L",t+n,e-i],["L",t-n,e+i],["Z"]]},cross:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]},tick:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},plus:function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},hyphen:function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},line:function(t,e,n){return[["M",t,e-n],["L",t,e+n]]}}},fggK:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("mrSG"),r=n("iTfj");e.getStyle=function(t,e,n,o){void 0===o&&(o="");var a=t.style,s=t.defaultStyle,u=t.color,c=t.size,l=i.__assign(i.__assign({},s),a);return u&&(e&&(r.get(a,"stroke")||(l.stroke=u)),n&&(r.get(a,"fill")||(l.fill=u))),o&&r.isNil(r.get(a,o))&&!r.isNil(c)&&(l[o]=c),l}},iTfj:function(t,e,n){"use strict";n.r(e);var i=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},r=function(t,e){return!!i(t)&&t.indexOf(e)>-1},o={}.toString,a=function(t,e){return o.call(t)==="[object "+e+"]"},s=function(t){return Array.isArray?Array.isArray(t):a(t,"Array")},u=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e};var c=function(t,e){if(t)if(s(t))for(var n=0,i=t.length;n-1;)S.call(t,o,1);return t},j=Array.prototype.splice,k=function(t,e){if(!i(t))return[];for(var n=t?e.length:0,r=n-1;n--;){var o=void 0,a=e[n];n!==r&&a===o||(o=a,j.call(t,a,1))}return t},T=function(t,e,n){if(!s(t)&&!v(t))return t;var i=n;return c(t,(function(t,n){i=e(i,t,n)})),i},E=function(t,e){var n=[];if(!i(t))return n;for(var r=-1,o=[],a=t.length;++re[r])return 1;if(t[r]n?n:t},tt=function(t,e){var n=e.toString(),i=n.indexOf(".");if(-1===i)return Math.round(t);var r=n.substr(i+1).length;return r>20&&(r=20),parseFloat(t.toFixed(r))},et=function(t){return a(t,"Number")},nt=function(t){return et(t)&&t%1!=0},it=function(t){return et(t)&&t%2==0},rt=Number.isInteger?Number.isInteger:function(t){return et(t)&&t%1==0},ot=function(t){return et(t)&&t<0},at=1e-5;function st(t,e,n){return void 0===n&&(n=at),Math.abs(t-e)0},lt=function(t,e){if(s(t)){var n,i,r=t[0];return n=p(e)?e(t[0]):t[0][e],c(t,(function(t){(i=p(e)?e(t):t[e])>n&&(r=t,n=i)})),r}},ht=function(t,e){if(s(t)){var n,i,r=t[0];return n=p(e)?e(t[0]):t[0][e],c(t,(function(t){(i=p(e)?e(t):t[e])e?(i&&(clearTimeout(i),i=null),s=c,a=t.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(u,l)),a};return c.cancel=function(){clearTimeout(i),s=0,i=r=o=null},c},ge=function(t){return i(t)?Array.prototype.slice.call(t):[]},ye={},ve=function(t){return ye[t=t||"g"]?ye[t]+=1:ye[t]=1,t+ye[t]},me=function(){},xe=function(t){return t};function be(t){return f(t)?0:i(t)?t.length:Object.keys(t).length}var Me=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}();n.d(e,"contains",(function(){return r})),n.d(e,"includes",(function(){return r})),n.d(e,"difference",(function(){return h})),n.d(e,"find",(function(){return m})),n.d(e,"findIndex",(function(){return x})),n.d(e,"firstValue",(function(){return b})),n.d(e,"flatten",(function(){return M})),n.d(e,"flattenDeep",(function(){return w})),n.d(e,"getRange",(function(){return O})),n.d(e,"pull",(function(){return P})),n.d(e,"pullAt",(function(){return k})),n.d(e,"reduce",(function(){return T})),n.d(e,"remove",(function(){return E})),n.d(e,"sortBy",(function(){return L})),n.d(e,"union",(function(){return D})),n.d(e,"uniq",(function(){return B})),n.d(e,"valuesOfKey",(function(){return F})),n.d(e,"head",(function(){return R})),n.d(e,"last",(function(){return N})),n.d(e,"startsWith",(function(){return Y})),n.d(e,"endsWith",(function(){return X})),n.d(e,"filter",(function(){return l})),n.d(e,"every",(function(){return G})),n.d(e,"some",(function(){return z})),n.d(e,"group",(function(){return W})),n.d(e,"groupBy",(function(){return H})),n.d(e,"groupToMap",(function(){return V})),n.d(e,"getWrapBehavior",(function(){return U})),n.d(e,"wrapBehavior",(function(){return Q})),n.d(e,"number2color",(function(){return $})),n.d(e,"parseRadius",(function(){return K})),n.d(e,"clamp",(function(){return J})),n.d(e,"fixedBase",(function(){return tt})),n.d(e,"isDecimal",(function(){return nt})),n.d(e,"isEven",(function(){return it})),n.d(e,"isInteger",(function(){return rt})),n.d(e,"isNegative",(function(){return ot})),n.d(e,"isNumberEqual",(function(){return st})),n.d(e,"isOdd",(function(){return ut})),n.d(e,"isPositive",(function(){return ct})),n.d(e,"maxBy",(function(){return lt})),n.d(e,"minBy",(function(){return ht})),n.d(e,"mod",(function(){return pt})),n.d(e,"toDegree",(function(){return dt})),n.d(e,"toInteger",(function(){return gt})),n.d(e,"toRadian",(function(){return vt})),n.d(e,"forIn",(function(){return mt})),n.d(e,"has",(function(){return xt})),n.d(e,"hasKey",(function(){return bt})),n.d(e,"hasValue",(function(){return _t})),n.d(e,"keys",(function(){return d})),n.d(e,"isMatch",(function(){return g})),n.d(e,"values",(function(){return Mt})),n.d(e,"lowerCase",(function(){return Ot})),n.d(e,"lowerFirst",(function(){return Ct})),n.d(e,"substitute",(function(){return St})),n.d(e,"upperCase",(function(){return At})),n.d(e,"upperFirst",(function(){return Pt})),n.d(e,"getType",(function(){return kt})),n.d(e,"isArguments",(function(){return Tt})),n.d(e,"isArray",(function(){return s})),n.d(e,"isArrayLike",(function(){return i})),n.d(e,"isBoolean",(function(){return Et})),n.d(e,"isDate",(function(){return It})),n.d(e,"isError",(function(){return Lt})),n.d(e,"isFunction",(function(){return p})),n.d(e,"isFinite",(function(){return Bt})),n.d(e,"isNil",(function(){return f})),n.d(e,"isNull",(function(){return Dt})),n.d(e,"isNumber",(function(){return et})),n.d(e,"isObject",(function(){return u})),n.d(e,"isObjectLike",(function(){return y})),n.d(e,"isPlainObject",(function(){return v})),n.d(e,"isPrototype",(function(){return Rt})),n.d(e,"isRegExp",(function(){return Nt})),n.d(e,"isString",(function(){return I})),n.d(e,"isType",(function(){return a})),n.d(e,"isUndefined",(function(){return Yt})),n.d(e,"isElement",(function(){return Xt})),n.d(e,"requestAnimationFrame",(function(){return Gt})),n.d(e,"clearAnimationFrame",(function(){return zt})),n.d(e,"augment",(function(){return Vt})),n.d(e,"clone",(function(){return Ut})),n.d(e,"debounce",(function(){return Qt})),n.d(e,"memoize",(function(){return Zt})),n.d(e,"deepMix",(function(){return Jt})),n.d(e,"each",(function(){return c})),n.d(e,"extend",(function(){return te})),n.d(e,"indexOf",(function(){return ee})),n.d(e,"isEmpty",(function(){return ie})),n.d(e,"isEqual",(function(){return oe})),n.d(e,"isEqualWith",(function(){return ae})),n.d(e,"map",(function(){return se})),n.d(e,"mapValues",(function(){return ce})),n.d(e,"mix",(function(){return Ht})),n.d(e,"assign",(function(){return Ht})),n.d(e,"get",(function(){return le})),n.d(e,"set",(function(){return he})),n.d(e,"pick",(function(){return fe})),n.d(e,"throttle",(function(){return de})),n.d(e,"toArray",(function(){return ge})),n.d(e,"toString",(function(){return wt})),n.d(e,"uniqueId",(function(){return ve})),n.d(e,"noop",(function(){return me})),n.d(e,"identity",(function(){return xe})),n.d(e,"size",(function(){return be})),n.d(e,"Cache",(function(){return Me}))},jCkq:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("mrSG"),r=n("fIp6"),o=n("iTfj"),a=n("6UX8"),s=n("Zsql"),u=n("O4U/"),c=n("nkna"),l=n("/OH1"),h=n("AmJ+");function p(t){return t+"px"}var f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.__assign(i.__assign({},e),{name:"tooltip",type:"html",x:0,y:0,items:[],containerTpl:'
            ',itemTpl:'
          • \n \n {name}:\n {value}\n
          • ',xCrosshairTpl:'
            ',yCrosshairTpl:'
            ',title:null,showTitle:!0,region:null,crosshairsRegion:null,crosshairs:null,offset:10,position:"right",domStyles:null,defaultStyles:l.default})},e.prototype.render=function(){this.resetTitle(),this.renderItems(),this.resetPosition()},e.prototype.clear=function(){this.clearCrosshairs(),this.setTitle(""),this.clearItemDoms()},e.prototype.update=function(e){var n,i,r;t.prototype.update.call(this,e),n=e,i=["title","showTitle"],r=!1,o.each(i,(function(t){if(o.hasKey(n,t))return r=!0,!1})),r&&this.resetTitle(),o.hasKey(e,"items")&&this.renderItems(),o.hasKey(e,"domStyles")&&(this.resetStyles(),this.applyStyles()),this.resetPosition()},e.prototype.show=function(){var t=this.getContainer();t&&!this.destroyed&&(this.set("visible",!0),r.modifyCSS(t,{visibility:"visible"}),this.setCrossHairsVisible(!0))},e.prototype.hide=function(){var t=this.getContainer();t&&!this.destroyed&&(this.set("visible",!1),r.modifyCSS(t,{visibility:"hidden"}),this.setCrossHairsVisible(!1))},e.prototype.getLocation=function(){return{x:this.get("x"),y:this.get("y")}},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetPosition()},e.prototype.setCrossHairsVisible=function(t){var e=t?"":"none",n=this.get("xCrosshairDom"),i=this.get("yCrosshairDom");n&&r.modifyCSS(n,{display:e}),i&&r.modifyCSS(i,{display:e})},e.prototype.initContainer=function(){t.prototype.initContainer.call(this),this.cacheDoms(),this.resetStyles(),this.applyStyles()},e.prototype.removeDom=function(){t.prototype.removeDom.call(this),this.clearCrosshairs()},e.prototype.cacheDoms=function(){var t=this.getContainer(),e=t.getElementsByClassName(c.TITLE_CLASS)[0],n=t.getElementsByClassName(c.LIST_CLASS)[0];this.set("titleDom",e),this.set("listDom",n)},e.prototype.resetPosition=function(){var t,e=this.get("x"),n=this.get("y"),i=this.get("offset"),o=this.getOffset(),a=o.offsetX,s=o.offsetY,c=this.get("position"),l=this.get("region"),f=this.getContainer(),d=this.getBBox(),g=d.width,y=d.height;l&&(t=u.regionToBBox(l));var v=h.getAlignPoint(e,n,i,g,y,c,t);r.modifyCSS(f,{left:p(v.x+a),top:p(v.y+s)}),this.resetCrosshairs()},e.prototype.resetTitle=function(){var t=this.get("title");this.get("showTitle")&&t?this.setTitle(t):this.setTitle("")},e.prototype.setTitle=function(t){var e=this.get("titleDom");e&&(e.innerText=t)},e.prototype.resetCrosshairs=function(){var t=this.get("crosshairsRegion"),e=this.get("crosshairs");if(t&&e){var n=u.regionToBBox(t),i=this.get("xCrosshairDom"),r=this.get("yCrosshairDom");"x"===e?(this.resetCrosshair("x",n),r&&(r.remove(),this.set("yCrosshairDom",null))):"y"===e?(this.resetCrosshair("y",n),i&&(i.remove(),this.set("xCrosshairDom",null))):(this.resetCrosshair("x",n),this.resetCrosshair("y",n)),this.setCrossHairsVisible(this.get("visible"))}else this.clearCrosshairs()},e.prototype.resetCrosshair=function(t,e){var n=this.checkCrosshair(t),i=this.get(t);"x"===t?r.modifyCSS(n,{left:p(i),top:p(e.y),height:p(e.height)}):r.modifyCSS(n,{top:p(i),left:p(e.x),width:p(e.width)})},e.prototype.checkCrosshair=function(t){var e=t+"CrosshairDom",n=t+"CrosshairTpl",i="CROSSHAIR_"+t.toUpperCase(),o=c[i],a=this.get(e),s=this.get("parent");return a||(a=r.createDom(this.get(n)),this.applyStyle(o,a),s.appendChild(a),this.set(e,a)),a},e.prototype.resetStyles=function(){var t=this.get("domStyles"),e=this.get("defaultStyles");t=t?o.deepMix({},e,t):e,this.set("domStyles",t)},e.prototype.applyStyles=function(){var t=this.get("domStyles"),e=this.getContainer();if(this.applyChildrenStyles(e,t),u.hasClass(e,c.CONTAINER_CLASS)){var n=t[c.CONTAINER_CLASS];r.modifyCSS(e,n)}},e.prototype.applyChildrenStyles=function(t,e){o.each(e,(function(e,n){var i=t.getElementsByClassName(n);o.each(i,(function(t){r.modifyCSS(t,e)}))}))},e.prototype.applyStyle=function(t,e){var n=this.get("domStyles");r.modifyCSS(e,n[t])},e.prototype.renderItems=function(){this.clearItemDoms();var t=this.get("items"),e=this.get("itemTpl"),n=this.get("listDom");o.each(t,(function(t){var s=a.default.toCSSGradient(t.color),u=i.__assign(i.__assign({},t),{color:s}),c=o.substitute(e,u),l=r.createDom(c);n.appendChild(l)})),this.applyChildrenStyles(n,this.get("domStyles"))},e.prototype.clearItemDoms=function(){u.clearDom(this.get("listDom"))},e.prototype.clearCrosshairs=function(){var t=this.get("xCrosshairDom"),e=this.get("yCrosshairDom");t&&t.remove(),e&&e.remove(),this.set("xCrosshairDom",null),this.set("yCrosshairDom",null)},e}(s.default);e.default=f},jWDG:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=function(t){e.ARRAY_TYPE=t},e.toRadian=function(t){return t*r},e.equals=function(t,e){return Math.abs(t-e)<=i*Math.max(1,Math.abs(t),Math.abs(e))};var i=e.EPSILON=1e-6;e.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,e.RANDOM=Math.random;var r=Math.PI/180},"kd6+":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("Bu9b"),r=n("W42+"),o=n("Ydjw"),a=function(t,e){if(t===e)return!0;if(!t||!e)return!1;if(o.default(t)||o.default(e))return!1;if(r.default(t)||r.default(e)){if(t.length!==e.length)return!1;for(var n=!0,s=0;s=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,i){e(n,i,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{u(i.next(t))}catch(t){o(t)}}function s(t){try{u(i.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((i=i.apply(t,e||[])).next())}))}function h(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function g(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{(n=r[t](e)).value instanceof v?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function x(t){var e,n;return e={},i("next"),i("throw",(function(t){throw t})),i("return"),e[Symbol.iterator]=function(){return this},e;function i(i,r){e[i]=t[i]?function(e){return(n=!n)?{value:v(t[i](e)),done:"return"===i}:r?r(e):e}:r}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=f(t),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(e){return new Promise((function(i,r){!function(t,e,n,i){Promise.resolve(i).then((function(e){t({value:e,done:n})}),e)}(i,r,(e=t[n](e)).done,e.value)}))}}}function M(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function _(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function w(t){return t&&t.__esModule?t:{default:t}}function O(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function C(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sub=e.mul=void 0,e.create=function(){var t=new i.ARRAY_TYPE(9);return i.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},e.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},e.clone=function(t){var e=new i.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromValues=function(t,e,n,r,o,a,s,u,c){var l=new i.ARRAY_TYPE(9);return l[0]=t,l[1]=e,l[2]=n,l[3]=r,l[4]=o,l[5]=a,l[6]=s,l[7]=u,l[8]=c,l},e.set=function(t,e,n,i,r,o,a,s,u,c){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=c,t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.transpose=function(t,e){if(t===e){var n=e[1],i=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=i,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},e.invert=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=l*a-s*c,p=-l*o+s*u,f=c*o-a*u,d=n*h+i*p+r*f;return d?(d=1/d,t[0]=h*d,t[1]=(-l*i+r*c)*d,t[2]=(s*i-r*a)*d,t[3]=p*d,t[4]=(l*n-r*u)*d,t[5]=(-s*n+r*o)*d,t[6]=f*d,t[7]=(-c*n+i*u)*d,t[8]=(a*n-i*o)*d,t):null},e.adjoint=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8];return t[0]=a*l-s*c,t[1]=r*c-i*l,t[2]=i*s-r*a,t[3]=s*u-o*l,t[4]=n*l-r*u,t[5]=r*o-n*s,t[6]=o*c-a*u,t[7]=i*u-n*c,t[8]=n*a-i*o,t},e.determinant=function(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8];return e*(c*o-a*u)+n*(-c*r+a*s)+i*(u*r-o*s)},e.multiply=r,e.translate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=n[0],f=n[1];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=p*i+f*a+c,t[7]=p*r+f*s+l,t[8]=p*o+f*u+h,t},e.rotate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=Math.sin(n),f=Math.cos(n);return t[0]=f*i+p*a,t[1]=f*r+p*s,t[2]=f*o+p*u,t[3]=f*a-p*i,t[4]=f*s-p*r,t[5]=f*u-p*o,t[6]=c,t[7]=l,t[8]=h,t},e.scale=function(t,e,n){var i=n[0],r=n[1];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},e.fromRotation=function(t,e){var n=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=n,t[2]=0,t[3]=-n,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat2d=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},e.fromQuat=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n+n,s=i+i,u=r+r,c=n*a,l=i*a,h=i*s,p=r*a,f=r*s,d=r*u,g=o*a,y=o*s,v=o*u;return t[0]=1-h-d,t[3]=l-v,t[6]=p+y,t[1]=l+v,t[4]=1-c-d,t[7]=f-g,t[2]=p-y,t[5]=f+g,t[8]=1-c-h,t},e.normalFromMat4=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],p=e[10],f=e[11],d=e[12],g=e[13],y=e[14],v=e[15],m=n*s-i*a,x=n*u-r*a,b=n*c-o*a,M=i*u-r*s,_=i*c-o*s,w=r*c-o*u,O=l*g-h*d,C=l*y-p*d,S=l*v-f*d,A=h*y-p*g,P=h*v-f*g,j=p*v-f*y,k=m*j-x*P+b*A+M*S-_*C+w*O;return k?(k=1/k,t[0]=(s*j-u*P+c*A)*k,t[1]=(u*S-a*j-c*C)*k,t[2]=(a*P-s*S+c*O)*k,t[3]=(r*P-i*j-o*A)*k,t[4]=(n*j-r*S+o*C)*k,t[5]=(i*S-n*P-o*O)*k,t[6]=(g*w-y*_+v*M)*k,t[7]=(y*b-d*w-v*x)*k,t[8]=(d*_-g*b+v*m)*k,t):null},e.projection=function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},e.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},e.subtract=o,e.multiplyScalar=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},e.multiplyScalarAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t[3]=e[3]+n[3]*i,t[4]=e[4]+n[4]*i,t[5]=e[5]+n[5]*i,t[6]=e[6]+n[6]*i,t[7]=e[7]+n[7]*i,t[8]=e[8]+n[8]*i,t},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},e.equals=function(t,e){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],p=e[0],f=e[1],d=e[2],g=e[3],y=e[4],v=e[5],m=e[6],x=e[7],b=e[8];return Math.abs(n-p)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(r-f)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(o-d)<=i.EPSILON*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(a-g)<=i.EPSILON*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(s-y)<=i.EPSILON*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(u-v)<=i.EPSILON*Math.max(1,Math.abs(u),Math.abs(v))&&Math.abs(c-m)<=i.EPSILON*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(l-x)<=i.EPSILON*Math.max(1,Math.abs(l),Math.abs(x))&&Math.abs(h-b)<=i.EPSILON*Math.max(1,Math.abs(h),Math.abs(b))};var i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(23));function r(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=n[0],f=n[1],d=n[2],g=n[3],y=n[4],v=n[5],m=n[6],x=n[7],b=n[8];return t[0]=p*i+f*a+d*c,t[1]=p*r+f*s+d*l,t[2]=p*o+f*u+d*h,t[3]=g*i+y*a+v*c,t[4]=g*r+y*s+v*l,t[5]=g*o+y*u+v*h,t[6]=m*i+x*a+b*c,t[7]=m*r+x*s+b*l,t[8]=m*o+x*u+b*h,t}function o(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}e.mul=r,e.sub=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getPixelRatio=function(){return window?window.devicePixelRatio:1},e.distance=function(t,e,n,i){var r=t-n,o=e-i;return Math.sqrt(r*r+o*o)},e.inBox=function(t,e,n,i,r,o){return r>=t&&r<=t+n&&o>=e&&o<=e+i};var i=null;e.getOffScreenContext=function(){if(!i){var t=document.createElement("canvas");t.width=1,t.height=1,i=t.getContext("2d")}return i},e.intersectRect=function(t,e){return!(e.minX>t.maxX||e.maxXt.maxY||e.maxY0&&(o.isNil(r)||1===r||(t.globalAlpha=r),this.stroke(t)),this.afterDrawPath(t)},e.prototype.createPath=function(t){},e.prototype.afterDrawPath=function(t){},e.prototype.isInShape=function(t,e){var n=this.isStroke(),i=this.isFill(),r=this.getHitLineWidth();return this.isInStrokeOrPath(t,e,n,i,r)},e.prototype.isInStrokeOrPath=function(t,e,n,i,r){return!1},e.prototype.getHitLineWidth=function(){if(!this.isStroke())return 0;var t=this.attrs;return t.lineWidth+t.lineAppendWidth},e}(r.AbstractShape);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.sqrDist=e.dist=e.div=e.mul=e.sub=e.len=void 0,e.create=o,e.clone=function(t){var e=new r.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},e.fromValues=function(t,e){var n=new r.ARRAY_TYPE(2);return n[0]=t,n[1]=e,n},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.set=function(t,e,n){return t[0]=e,t[1]=n,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},e.subtract=a,e.multiply=s,e.divide=u,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},e.scaleAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},e.distance=c,e.squaredDistance=l,e.length=h,e.squaredLength=p,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},e.normalize=function(t,e){var n=e[0],i=e[1],r=n*n+i*i;return r>0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,n){var i=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=i,t},e.lerp=function(t,e,n,i){var r=e[0],o=e[1];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t},e.random=function(t,e){e=e||1;var n=2*r.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.transformMat2=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t},e.transformMat2d=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t},e.transformMat3=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[3]*r+n[6],t[1]=n[1]*i+n[4]*r+n[7],t},e.transformMat4=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[4]*r+n[12],t[1]=n[1]*i+n[5]*r+n[13],t},e.rotate=function(t,e,n,i){var r=e[0]-n[0],o=e[1]-n[1],a=Math.sin(i),s=Math.cos(i);return t[0]=r*s-o*a+n[0],t[1]=r*a+o*s+n[1],t},e.angle=function(t,e){var n=t[0],i=t[1],r=e[0],o=e[1],a=n*n+i*i;a>0&&(a=1/Math.sqrt(a));var s=r*r+o*o;s>0&&(s=1/Math.sqrt(s));var u=(n*r+i*o)*a*s;return u>1?0:u<-1?Math.PI:Math.acos(u)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],i=t[1],o=e[0],a=e[1];return Math.abs(n-o)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-a)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(a))};var i,r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(23));function o(){var t=new r.ARRAY_TYPE(2);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function s(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function u(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function c(t,e){var n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)}function l(t,e){var n=e[0]-t[0],i=e[1]-t[1];return n*n+i*i}function h(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function p(t){var e=t[0],n=t[1];return e*e+n*n}e.len=h,e.sub=a,e.mul=s,e.div=u,e.dist=c,e.sqrDist=l,e.sqrLen=p,e.forEach=(i=o(),function(t,e,n,r,o,a){var s,u=void 0;for(e||(e=2),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,u=n;u(n-t)*(n-t)+(r-e)*(r-e)?i.distance(n,r,o,a):this.pointToLine(t,e,n,r,o,a)},pointToLine:function(t,e,n,i,o,a){var s=[n-t,i-e];if(r.exactEquals(s,[0,0]))return Math.sqrt((o-t)*(o-t)+(a-e)*(a-e));var u=[-s[1],s[0]];r.normalize(u,u);var c=[o-t,a-e];return Math.abs(r.dot(c,u))},tangentAngle:function(t,e,n,i){return Math.atan2(i-e,n-t)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(3);e.Base=i.default;var r=n(78);e.Circle=r.default;var o=n(79);e.Ellipse=o.default;var a=n(80);e.Image=a.default;var s=n(81);e.Line=s.default;var u=n(82);e.Marker=u.default;var c=n(84);e.Path=c.default;var l=n(90);e.Polygon=l.default;var h=n(91);e.Polyline=h.default;var p=n(94);e.Rect=p.default;var f=n(97);e.Text=f.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(20);e.default=function(t){return Array.isArray?Array.isArray(t):i.default(t,"Array")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(18),r=n(32),o=n(57),a=n(2),s=n(16),u={fill:"fillStyle",stroke:"strokeStyle",opacity:"globalAlpha"};function c(t){var e;if(t.destroyed)e=t._cacheCanvasBBox;else{var n=t.get("cacheCanvasBBox"),i=t.getCanvasBBox();e=a.mergeRegion(n,i)}return e}e.applyAttrsToContext=function(t,e){var n=e.attr();for(var o in n){var a=n[o],s=u[o]?u[o]:o;"matrix"===s&&a?t.transform(a[0],a[1],a[3],a[4],a[6],a[7]):"lineDash"===s&&t.setLineDash?i.isArray(a)&&t.setLineDash(a):("strokeStyle"===s||"fillStyle"===s?a=r.parseStyle(t,e,a):"globalAlpha"===s&&(a*=t.globalAlpha),t[s]=a)}},e.drawChildren=function(t,e,n){for(var i=0;i_?M:_,P=M>_?1:M/_,j=M>_?_/M:1;e.translate(x,b),e.rotate(C),e.scale(P,j),e.arc(0,0,A,w,O,1-S),e.scale(1/P,1/j),e.rotate(-C),e.translate(-x,-b)}break;case"Z":e.closePath()}if("Z"===d)c=l;else{var k=f.length;c=[f[k-2],f[k-1]]}}},e.refreshElement=function(t,e){var n=t.get("canvas");n&&("remove"===e&&(t._cacheCanvasBBox=t.get("cacheCanvasBBox")),t.get("hasChanged")||(n.refreshElement(t,e,n),n.get("autoDraw")&&n.draw(),t.set("hasChanged",!0)))},e.getRefreshRegion=c,e.getMergedRegion=function(t){if(!t.length)return null;var e=[],n=[],r=[],o=[];return i.each(t,(function(t){var i=c(t);i&&(e.push(i.minX),n.push(i.minY),r.push(i.maxX),o.push(i.maxY))})),{minX:Math.min.apply(null,e),minY:Math.min.apply(null,n),maxX:Math.max.apply(null,r),maxY:Math.max.apply(null,o)}}},function(t,e,n){"use strict";n.r(e),n.d(e,"version",(function(){return Pn})),n.d(e,"Event",(function(){return nt})),n.d(e,"Base",(function(){return Mt})),n.d(e,"AbstractCanvas",(function(){return Cn})),n.d(e,"AbstractGroup",(function(){return Sn})),n.d(e,"AbstractShape",(function(){return An})),n.d(e,"PathUtil",(function(){return i}));var i={};n.r(i),n.d(i,"catmullRomToBezier",(function(){return P})),n.d(i,"fillPath",(function(){return Q})),n.d(i,"fillPathByDiff",(function(){return K})),n.d(i,"formatPath",(function(){return et})),n.d(i,"intersection",(function(){return W})),n.d(i,"parsePathArray",(function(){return D})),n.d(i,"parsePathString",(function(){return A})),n.d(i,"pathToAbsolute",(function(){return k})),n.d(i,"pathToCurve",(function(){return L})),n.d(i,"rectPath",(function(){return G}));var r={};n.r(r),n.d(r,"easeLinear",(function(){return te})),n.d(r,"easeQuad",(function(){return ie})),n.d(r,"easeQuadIn",(function(){return ee})),n.d(r,"easeQuadOut",(function(){return ne})),n.d(r,"easeQuadInOut",(function(){return ie})),n.d(r,"easeCubic",(function(){return ae})),n.d(r,"easeCubicIn",(function(){return re})),n.d(r,"easeCubicOut",(function(){return oe})),n.d(r,"easeCubicInOut",(function(){return ae})),n.d(r,"easePoly",(function(){return ce})),n.d(r,"easePolyIn",(function(){return se})),n.d(r,"easePolyOut",(function(){return ue})),n.d(r,"easePolyInOut",(function(){return ce})),n.d(r,"easeSin",(function(){return de})),n.d(r,"easeSinIn",(function(){return pe})),n.d(r,"easeSinOut",(function(){return fe})),n.d(r,"easeSinInOut",(function(){return de})),n.d(r,"easeExp",(function(){return ve})),n.d(r,"easeExpIn",(function(){return ge})),n.d(r,"easeExpOut",(function(){return ye})),n.d(r,"easeExpInOut",(function(){return ve})),n.d(r,"easeCircle",(function(){return be})),n.d(r,"easeCircleIn",(function(){return me})),n.d(r,"easeCircleOut",(function(){return xe})),n.d(r,"easeCircleInOut",(function(){return be})),n.d(r,"easeBounce",(function(){return we})),n.d(r,"easeBounceIn",(function(){return _e})),n.d(r,"easeBounceOut",(function(){return we})),n.d(r,"easeBounceInOut",(function(){return Oe})),n.d(r,"easeBack",(function(){return Ae})),n.d(r,"easeBackIn",(function(){return Ce})),n.d(r,"easeBackOut",(function(){return Se})),n.d(r,"easeBackInOut",(function(){return Ae})),n.d(r,"easeElastic",(function(){return ke})),n.d(r,"easeElasticIn",(function(){return je})),n.d(r,"easeElasticOut",(function(){return ke})),n.d(r,"easeElasticInOut",(function(){return Te}));var o=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},a={}.toString,s=function(t,e){return a.call(t)==="[object "+e+"]"},u=function(t){return Array.isArray?Array.isArray(t):s(t,"Array")},c=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},l=function(t,e){if(t)if(u(t))for(var n=0,i=t.length;n2&&(n.push([r].concat(a.splice(0,2))),s="l",r="m"===r?"l":"L"),"o"===s&&1===a.length&&n.push([r,a[0]]),"r"===s)n.push([r].concat(a));else for(;a.length>=e[s]&&(n.push([r].concat(a.splice(0,e[s]))),e[s]););return t})),n},P=function(t,e){for(var n=[],i=0,r=t.length;r-2*!e>i;i+=2){var o=[{x:+t[i-2],y:+t[i-1]},{x:+t[i],y:+t[i+1]},{x:+t[i+2],y:+t[i+3]},{x:+t[i+4],y:+t[i+5]}];e?i?r-4===i?o[3]={x:+t[0],y:+t[1]}:r-2===i&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[r-2],y:+t[r-1]}:r-4===i?o[3]=o[2]:i||(o[0]={x:+t[i],y:+t[i+1]}),n.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return n},j=function(t,e,n,i,r){var o=[];if(null===r&&null===i&&(i=n),t=+t,e=+e,n=+n,i=+i,null!==r){var a=Math.PI/180,s=t+n*Math.cos(-i*a),u=t+n*Math.cos(-r*a);o=[["M",s,e+n*Math.sin(-i*a)],["A",n,n,0,+(r-i>180),0,u,e+n*Math.sin(-r*a)]]}else o=[["M",t,e],["m",0,-i],["a",n,i,0,1,1,0,2*i],["a",n,i,0,1,1,0,-2*i],["z"]];return o},k=function(t){if(!(t=A(t))||!t.length)return[["M",0,0]];var e,n,i=[],r=0,o=0,a=0,s=0,u=0;"M"===t[0][0]&&(a=r=+t[0][1],s=o=+t[0][2],u++,i[0]=["M",r,o]);for(var c=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),l=void 0,h=void 0,p=u,f=t.length;p1&&(n*=M=Math.sqrt(M),i*=M);var _=n*n,w=i*i,O=(o===a?-1:1)*Math.sqrt(Math.abs((_*w-_*b*b-w*x*x)/(_*b*b+w*x*x)));f=O*n*b/i+(t+s)/2,d=O*-i*x/n+(e+u)/2,h=Math.asin(((e-d)/i).toFixed(9)),p=Math.asin(((u-d)/i).toFixed(9)),h=tp&&(h-=2*Math.PI),!a&&p>h&&(p-=2*Math.PI)}var C=p-h;if(Math.abs(C)>g){var S=p,A=s,P=u;p=h+g*(a&&p>h?1:-1),s=f+n*Math.cos(p),u=d+i*Math.sin(p),v=I(s,u,n,i,r,0,a,A,P,[p,S,f,d])}C=p-h;var j=Math.cos(h),k=Math.sin(h),T=Math.cos(p),E=Math.sin(p),L=Math.tan(C/4),B=4/3*n*L,D=4/3*i*L,F=[t,e],R=[t+B*k,e-D*j],N=[s+B*E,u-D*T],Y=[s,u];if(R[0]=2*F[0]-R[0],R[1]=2*F[1]-R[1],c)return[R,N,Y].concat(v);for(var X=[],G=0,z=(v=[R,N,Y].concat(v).join().split(",")).length;G7){t[e].shift();for(var o=t[e];o.length;)s[e]="A",r&&(u[e]="A"),t.splice(e++,0,["C"].concat(o.splice(0,6)));t.splice(e,1),n=Math.max(i.length,r&&r.length||0)}},f=function(t,e,o,a,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),o.bx=0,o.by=0,o.x=t[s][1],o.y=t[s][2],n=Math.max(i.length,r&&r.length||0))};n=Math.max(i.length,r&&r.length||0);for(var d=0;d1?1:u<0?0:u)/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],p=0,f=0;f<12;f++){var d=c*l[f]+c,g=F(d,t,n,r,a),y=F(d,e,i,o,s),v=g*g+y*y;p+=h[f]*Math.sqrt(v)}return c*p},N=function(t,e,n,i,r,o,a,s){for(var u,c,l,h,p=[],f=[[],[]],d=0;d<2;++d)if(0===d?(c=6*t-12*n+6*r,u=-3*t+9*n-9*r+3*a,l=3*n-3*t):(c=6*e-12*i+6*o,u=-3*e+9*i-9*o+3*s,l=3*i-3*e),Math.abs(u)<1e-12){if(Math.abs(c)<1e-12)continue;(h=-l/c)>0&&h<1&&p.push(h)}else{var g=c*c-4*l*u,y=Math.sqrt(g);if(!(g<0)){var v=(-c+y)/(2*u);v>0&&v<1&&p.push(v);var m=(-c-y)/(2*u);m>0&&m<1&&p.push(m)}}for(var x,b=p.length,M=b;b--;)x=1-(h=p[b]),f[0][b]=x*x*x*t+3*x*x*h*n+3*x*h*h*r+h*h*h*a,f[1][b]=x*x*x*e+3*x*x*h*i+3*x*h*h*o+h*h*h*s;return f[0][M]=t,f[1][M]=e,f[0][M+1]=a,f[1][M+1]=s,f[0].length=f[1].length=M+2,{min:{x:Math.min.apply(0,f[0]),y:Math.min.apply(0,f[1])},max:{x:Math.max.apply(0,f[0]),y:Math.max.apply(0,f[1])}}},Y=function(t,e,n,i,r,o,a,s){if(!(Math.max(t,n)Math.max(r,a)||Math.max(e,i)Math.max(o,s))){var u=(t-n)*(o-s)-(e-i)*(r-a);if(u){var c=((t*i-e*n)*(r-a)-(t-n)*(r*s-o*a))/u,l=((t*i-e*n)*(o-s)-(e-i)*(r*s-o*a))/u,h=+c.toFixed(2),p=+l.toFixed(2);if(!(h<+Math.min(t,n).toFixed(2)||h>+Math.max(t,n).toFixed(2)||h<+Math.min(r,a).toFixed(2)||h>+Math.max(r,a).toFixed(2)||p<+Math.min(e,i).toFixed(2)||p>+Math.max(e,i).toFixed(2)||p<+Math.min(o,s).toFixed(2)||p>+Math.max(o,s).toFixed(2)))return{x:c,y:l}}}},X=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},G=function(t,e,n,i,r){if(r)return[["M",+t+ +r,e],["l",n-2*r,0],["a",r,r,0,0,1,r,r],["l",0,i-2*r],["a",r,r,0,0,1,-r,r],["l",2*r-n,0],["a",r,r,0,0,1,-r,-r],["l",0,2*r-i],["a",r,r,0,0,1,r,-r],["z"]];var o=[["M",t,e],["l",n,0],["l",0,i],["l",-n,0],["z"]];return o.parsePathArray=D,o},z=function(t,e,n,i){return null===t&&(t=e=n=i=0),null===e&&(e=t.y,n=t.width,i=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:i,h:i,x2:t+n,y2:e+i,cx:t+n/2,cy:e+i/2,r1:Math.min(n,i)/2,r2:Math.max(n,i)/2,r0:Math.sqrt(n*n+i*i)/2,path:G(t,e,n,i),vb:[t,e,n,i].join(" ")}},q=function(t,e,n,i,r,o,a,s){u(t)||(t=[t,e,n,i,r,o,a,s]);var c=N.apply(null,t);return z(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)},H=function(t,e,n,i,r,o,a,s,u){var c=1-u,l=Math.pow(c,3),h=Math.pow(c,2),p=u*u,f=p*u,d=t+2*u*(n-t)+p*(r-2*n+t),g=e+2*u*(i-e)+p*(o-2*i+e),y=n+2*u*(r-n)+p*(a-2*r+n),v=i+2*u*(o-i)+p*(s-2*o+i);return{x:l*t+3*h*u*n+3*c*u*u*r+f*a,y:l*e+3*h*u*i+3*c*u*u*o+f*s,m:{x:d,y:g},n:{x:y,y:v},start:{x:c*t+u*n,y:c*e+u*i},end:{x:c*r+u*a,y:c*o+u*s},alpha:90-180*Math.atan2(d-y,g-v)/Math.PI}},V=function(t,e,n){if(!function(t,e){return t=z(t),e=z(e),X(e,t.x,t.y)||X(e,t.x2,t.y)||X(e,t.x,t.y2)||X(e,t.x2,t.y2)||X(t,e.x,e.y)||X(t,e.x2,e.y)||X(t,e.x,e.y2)||X(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(q(t),q(e)))return n?0:[];for(var i=~~(R.apply(0,t)/8),r=~~(R.apply(0,e)/8),o=[],a=[],s={},u=n?0:[],c=0;c=0&&x<=1&&b>=0&&b<=1&&(n?u+=1:u.push({x:m.x,y:m.y,t1:x,t2:b}))}}return u},W=function(t,e){return function(t,e,n){var i,r,o,a,s,u,c,l,h,p;t=L(t),e=L(e);for(var f=[],d=0,g=t.length;d=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e.concat(t[t.length-1])}))}(t,e,n));else{var r=[].concat(t);"M"===r[0]&&(r[0]="L");for(var o=0;o<=n-1;o++)i.push(r)}return i}(t[r],t[r+1],i))}),[]);return u.unshift(t[0]),"Z"!==e[i]&&"z"!==e[i]||u.push("Z"),u},Z=function(t,e){if(t.length!==e.length)return!1;var n=!0;return l(t,(function(t,i){if(t!==e[i])return n=!1,!1})),n};function $(t,e,n){var i=null,r=n;return e=0;u--)a=o[u].index,"add"===o[u].type?t.splice(a,0,[].concat(t[a])):t.splice(a,1)}var h=r-(i=t.length);if(i0)){t[i]=e[i];break}n=J(n,t[i-1],1)}t[i]=["Q"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[i]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(i>0)){t[i]=e[i];break}n=J(n,t[i-1],2)}t[i]=["C"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(n.length<2){if(!(i>0)){t[i]=e[i];break}n=J(n,t[i-1],1)}t[i]=["S"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[i]=e[i]}return t},nt=function(){function t(t,e){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}(),it=function(t,e){return(it=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function rt(t,e){function n(){this.constructor=t}it(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ot=n(45),at=n.n(ot),st=(n(11),n(19)),ut=n.n(st),ct=n(12),lt=n.n(ct),ht=n(13),pt=n.n(ht),ft=(n(8),n(21)),dt=n.n(ft),gt=n(14),yt=n.n(gt),vt=n(22),mt=n.n(vt);function xt(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}var bt="undefined"!=typeof window&&void 0!==window.document,Mt=function(t){function e(e){var n=t.call(this)||this;n.destroyed=!1;var i=n.getDefaultCfg();return n.cfg=dt()(i,e),n}return rt(e,t),e.prototype.getDefaultCfg=function(){return{}},e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){this.cfg[t]=e},e.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},e}(at.a),_t=n(1);_t.translate=function(t,e,n){var i=new Array(9);return _t.fromTranslation(i,n),_t.multiply(t,i,e)},_t.rotate=function(t,e,n){var i=new Array(9);return _t.fromRotation(i,n),_t.multiply(t,i,e)},_t.scale=function(t,e,n){var i=new Array(9);return _t.fromScaling(i,n),_t.multiply(t,i,e)},_t.transform=function(t,e){for(var n=[].concat(t),i=0,r=e.length;in?n:t}(n,-1,1))},Ot.direction=function(t,e){return t[0]*e[1]-e[0]*t[1]},Ot.angleTo=function(t,e,n){var i=Ot.angle(t,e),r=Ot.direction(t,e)>=0;return n?r?2*Math.PI-i:i:r?i:2*Math.PI-i},Ot.vertical=function(t,e,n){return n?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t},n(46);var Ct=function(t,e){var n=t?m(t):[1,0,0,0,1,0,0,0,1];return l(e,(function(t){switch(t[0]){case"t":wt.translate(n,n,[t[1],t[2]]);break;case"s":wt.scale(n,n,[t[1],t[2]]);break;case"r":wt.rotate(n,n,t[1]);break;case"m":wt.multiply(n,n,t[1]);break;default:return!1}})),n};function St(t,e){var n=[],i=t[0],r=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],p=e[0],f=e[1],d=e[2],g=e[3],y=e[4],v=e[5],m=e[6],x=e[7],b=e[8];return n[0]=p*i+f*a+d*c,n[1]=p*r+f*s+d*l,n[2]=p*o+f*u+d*h,n[3]=g*i+y*a+v*c,n[4]=g*r+y*s+v*l,n[5]=g*o+y*u+v*h,n[6]=m*i+x*a+b*c,n[7]=m*r+x*s+b*l,n[8]=m*o+x*u+b*h,n}function At(t,e){var n=[],i=e[0],r=e[1];return n[0]=t[0]*i+t[3]*r+t[6],n[1]=t[1]*i+t[4]*r+t[7],n}var Pt=["zIndex","capture","visible","type"],jt=["repeat"];function kt(t,e){var n={},i=e.attrs;for(var r in t)n[r]=i[r];return n}function Tt(t,e){var n={},i=e.attr();return l(t,(function(t,e){-1!==jt.indexOf(e)||b(i[e],t)||(n[e]=t)})),n}function Et(t,e){if(e.onFrame)return t;var n=e.startTime,i=e.delay,r=e.duration,o=Object.prototype.hasOwnProperty;return l(t,(function(t){n+it.delay&&l(e.toAttrs,(function(e,n){o.call(t.toAttrs,n)&&(delete t.toAttrs[n],delete t.fromAttrs[n])}))})),t}var It=function(t){function e(e){var n=t.call(this,e)||this;n.attrs={};var i=n.getDefaultAttrs();return function(t,e,n,i){e&&y(t,e),n&&y(t,n),i&&y(t,i)}(i,e.attrs),n.attrs=i,n.initAttrs(i),n.initAnimate(),n}return rt(e,t),e.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},e.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},e.prototype.onCanvasChange=function(t){},e.prototype.initAttrs=function(t){},e.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},e.prototype.isGroup=function(){return!1},e.prototype.getParent=function(){return this.get("parent")},e.prototype.getCanvas=function(){return this.get("canvas")},e.prototype.attr=function(){for(var t,e=[],n=0;n0?i=Et(i,M):n.addAnimator(this),i.push(M),this.set("animations",i),this.set("_pause",{isPaused:!1})},e.prototype.stopAnimate=function(t){var e=this;void 0===t&&(t=!0);var n=this.get("animations");l(n,(function(n){t&&(n.onFrame?e.attr(n.onFrame(1)):e.attr(n.toAttrs)),n.callback&&n.callback()})),this.set("animating",!1),this.set("animations",[])},e.prototype.pauseAnimate=function(){var t=this.get("timeline"),e=this.get("animations");return l(e,(function(t){t.pauseCallback&&t.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:t.getTime()}),this},e.prototype.resumeAnimate=function(){var t=this.get("timeline").getTime(),e=this.get("animations"),n=this.get("_pause").pauseTime;return l(e,(function(e){e.startTime=e.startTime+(t-n),e._paused=!1,e._pauseTime=null,e.resumeCallback&&e.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",e),this},e.prototype.emitDelegation=function(t,e){for(var n=e.propagationPath,i=this.getEvents(),r=0;r0)}));return a.length>0?(yt()(a,(function(t){var e=t.getBBox();r.push(e.minX,e.maxX),o.push(e.minY,e.maxY)})),t=Math.min.apply(null,r),e=Math.max.apply(null,r),n=Math.min.apply(null,o),i=Math.max.apply(null,o)):(t=0,e=0,n=0,i=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:i,width:e-t,height:i-n}},e.prototype.getCanvasBBox=function(){var t=1/0,e=-1/0,n=1/0,i=-1/0,r=[],o=[],a=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));return a.length>0?(yt()(a,(function(t){var e=t.getCanvasBBox();r.push(e.minX,e.maxX),o.push(e.minY,e.maxY)})),t=Math.min.apply(null,r),e=Math.max.apply(null,r),n=Math.min.apply(null,o),i=Math.max.apply(null,o)):(t=0,e=0,n=0,i=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:i,width:e-t,height:i-n}},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.children=[],e},e.prototype.onAttrChange=function(e,n,i){if(t.prototype.onAttrChange.call(this,e,n,i),"matrix"===e){var r=this.getTotalMatrix();this._applyChildrenMarix(r)}},e.prototype.applyMatrix=function(e){var n=this.getTotalMatrix();t.prototype.applyMatrix.call(this,e);var i=this.getTotalMatrix();i!==n&&this._applyChildrenMarix(i)},e.prototype._applyChildrenMarix=function(t){var e=this.getChildren();yt()(e,(function(e){e.applyMatrix(t)}))},e.prototype.addShape=function(){for(var t=[],e=0;e=0;o--){var a=t[o];if(Bt(a)&&(a.isGroup()?r=a.getShape(e,n,i):a.isHit(e,n)&&(r=a)),r)break}return r},e.prototype.add=function(t){var e=this.getCanvas(),n=this.getChildren(),i=this.get("timeline"),r=t.getParent();r&&function(t,e,n){void 0===n&&(n=!0),n?e.destroy():(e.set("parent",null),e.set("canvas",null)),xt(t.getChildren(),e)}(r,t,!1),t.set("parent",this),e&&function t(e,n){if(e.set("canvas",n),e.isGroup()){var i=e.get("children");i.length&&i.forEach((function(e){t(e,n)}))}}(t,e),i&&function t(e,n){if(e.set("timeline",n),e.isGroup()){var i=e.get("children");i.length&&i.forEach((function(e){t(e,n)}))}}(t,i),n.push(t),function(t){t.isGroup()?(t.isEntityGroup()||t.get("children").length)&&t.onCanvasChange("add"):t.onCanvasChange("add")}(t),this._applyElementMatrix(t)},e.prototype._applyElementMatrix=function(t){var e=this.getTotalMatrix();e&&t.applyMatrix(e)},e.prototype.getChildren=function(){return this.get("children")},e.prototype.sort=function(){var t,e=this.getChildren();yt()(e,(function(t,e){return t._INDEX=e,t})),e.sort((t=function(t,e){return t.get("zIndex")-e.get("zIndex")},function(e,n){var i=t(e,n);return 0===i?e._INDEX-n._INDEX:i})),this.onCanvasChange("sort")},e.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),e=t.length-1;e>=0;e--)t[e].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},e.prototype.destroy=function(){this.get("destroyed")||(this.clear(),t.prototype.destroy.call(this))},e.prototype.getFirst=function(){return this.getChildByIndex(0)},e.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},e.prototype.getChildByIndex=function(t){return this.getChildren()[t]},e.prototype.getCount=function(){return this.getChildren().length},e.prototype.contain=function(t){return this.getChildren().indexOf(t)>-1},e.prototype.removeChild=function(t,e){void 0===e&&(e=!0),this.contain(t)&&t.remove(e)},e.prototype.findAll=function(t){var e=[],n=this.getChildren();return yt()(n,(function(n){t(n)&&e.push(n),n.isGroup()&&(e=e.concat(n.findAll(t)))})),e},e.prototype.find=function(t){var e=null,n=this.getChildren();return yt()(n,(function(n){if(t(n)?e=n:n.isGroup()&&(e=n.find(t)),e)return!1})),e},e.prototype.findById=function(t){return this.find((function(e){return e.get("id")===t}))},e.prototype.findByClassName=function(t){return this.find((function(e){return e.get("className")===t}))},e.prototype.findAllByName=function(t){return this.findAll((function(e){return e.get("name")===t}))},e}(It),Nt=0,Yt=0,Xt=0,Gt=0,zt=0,qt=0,Ht="object"==typeof performance&&performance.now?performance:Date,Vt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Wt(){return zt||(Vt(Ut),zt=Ht.now()+qt)}function Ut(){zt=0}function Qt(){this._call=this._time=this._next=null}function Zt(t,e,n){var i=new Qt;return i.restart(t,e,n),i}function $t(){zt=(Gt=Ht.now())+qt,Nt=Yt=0;try{!function(){Wt(),++Nt;for(var t,e=Dt;e;)(t=zt-e._time)>=0&&e._call.call(null,t),e=e._next;--Nt}()}finally{Nt=0,function(){for(var t,e,n=Dt,i=1/0;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Dt=e);Ft=t,Jt(i)}(),zt=0}}function Kt(){var t=Ht.now(),e=t-Gt;e>1e3&&(qt-=e,Gt=t)}function Jt(t){Nt||(Yt&&(Yt=clearTimeout(Yt)),t-zt>24?(t<1/0&&(Yt=setTimeout($t,t-Ht.now()-qt)),Xt&&(Xt=clearInterval(Xt))):(Xt||(Gt=Ht.now(),Xt=setInterval(Kt,1e3)),Nt=1,Vt($t)))}function te(t){return+t}function ee(t){return t*t}function ne(t){return t*(2-t)}function ie(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function re(t){return t*t*t}function oe(t){return--t*t*t+1}function ae(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Qt.prototype=Zt.prototype={constructor:Qt,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Wt():+n)+(null==e?0:+e),this._next||Ft===this||(Ft?Ft._next=this:Dt=this,Ft=this),this._call=t,this._time=n,Jt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jt())}};var se=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),ue=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),ce=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),le=Math.PI,he=le/2;function pe(t){return 1-Math.cos(t*he)}function fe(t){return Math.sin(t*he)}function de(t){return(1-Math.cos(le*t))/2}function ge(t){return Math.pow(2,10*t-10)}function ye(t){return 1-Math.pow(2,-10*t)}function ve(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function me(t){return 1-Math.sqrt(1-t*t)}function xe(t){return Math.sqrt(1- --t*t)}function be(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Me=7.5625;function _e(t){return 1-we(1-t)}function we(t){return(t=+t)<4/11?Me*t*t:t<8/11?Me*(t-=6/11)*t+.75:t<10/11?Me*(t-=9/11)*t+.9375:Me*(t-=21/22)*t+63/64}function Oe(t){return((t*=2)<=1?1-we(1-t):we(t-1)+1)/2}var Ce=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),Se=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),Ae=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),Pe=2*Math.PI,je=function t(e,n){var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Pe);function r(t){return e*Math.pow(2,10*--t)*Math.sin((i-t)/n)}return r.amplitude=function(e){return t(e,n*Pe)},r.period=function(n){return t(e,n)},r}(1,.3),ke=function t(e,n){var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Pe);function r(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+i)/n)}return r.amplitude=function(e){return t(e,n*Pe)},r.period=function(n){return t(e,n)},r}(1,.3),Te=function t(e,n){var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Pe);function r(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((i-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((i+t)/n))/2}return r.amplitude=function(e){return t(e,n*Pe)},r.period=function(n){return t(e,n)},r}(1,.3),Ee=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function Ie(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Le(){}var Be="\\s*([+-]?\\d+)\\s*",De="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Re=/^#([0-9a-f]{3,8})$/,Ne=new RegExp("^rgb\\("+[Be,Be,Be]+"\\)$"),Ye=new RegExp("^rgb\\("+[Fe,Fe,Fe]+"\\)$"),Xe=new RegExp("^rgba\\("+[Be,Be,Be,De]+"\\)$"),Ge=new RegExp("^rgba\\("+[Fe,Fe,Fe,De]+"\\)$"),ze=new RegExp("^hsl\\("+[De,Fe,Fe]+"\\)$"),qe=new RegExp("^hsla\\("+[De,Fe,Fe,De]+"\\)$"),He={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ve(){return this.rgb().formatHex()}function We(){return this.rgb().formatRgb()}function Ue(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Re.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Qe(e):3===n?new Ke(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Ke(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Ke(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Ne.exec(t))?new Ke(e[1],e[2],e[3],1):(e=Ye.exec(t))?new Ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Xe.exec(t))?Ze(e[1],e[2],e[3],e[4]):(e=Ge.exec(t))?Ze(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ze.exec(t))?nn(e[1],e[2]/100,e[3]/100,1):(e=qe.exec(t))?nn(e[1],e[2]/100,e[3]/100,e[4]):He.hasOwnProperty(t)?Qe(He[t]):"transparent"===t?new Ke(NaN,NaN,NaN,0):null}function Qe(t){return new Ke(t>>16&255,t>>8&255,255&t,1)}function Ze(t,e,n,i){return i<=0&&(t=e=n=NaN),new Ke(t,e,n,i)}function $e(t,e,n,i){return 1===arguments.length?function(t){return t instanceof Le||(t=Ue(t)),t?new Ke((t=t.rgb()).r,t.g,t.b,t.opacity):new Ke}(t):new Ke(t,e,n,null==i?1:i)}function Ke(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function Je(){return"#"+en(this.r)+en(this.g)+en(this.b)}function tn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function en(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function nn(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new on(t,e,n,i)}function rn(t){if(t instanceof on)return new on(t.h,t.s,t.l,t.opacity);if(t instanceof Le||(t=Ue(t)),!t)return new on;if(t instanceof on)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),a=NaN,s=o-r,u=(o+r)/2;return s?(a=e===o?(n-i)/s+6*(n0&&u<1?0:a,new on(a,s,u,t.opacity)}function on(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function an(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function sn(t,e,n,i,r){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*i+a*r)/6}Ee(Le,Ue,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Ve,formatHex:Ve,formatHsl:function(){return rn(this).formatHsl()},formatRgb:We,toString:We}),Ee(Ke,$e,Ie(Le,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Je,formatHex:Je,formatRgb:tn,toString:tn})),Ee(on,(function(t,e,n,i){return 1===arguments.length?rn(t):new on(t,e,n,null==i?1:i)}),Ie(Le,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new on(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new on(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Ke(an(t>=240?t-240:t+120,r,i),an(t,r,i),an(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var un=function(t){return function(){return t}};function cn(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):un(isNaN(t)?e:t)}var ln=function t(e){var n=function(t){return 1==(t=+t)?cn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):un(isNaN(e)?n:e)}}(e);function i(t,e){var i=n((t=$e(t)).r,(e=$e(e)).r),r=n(t.g,e.g),o=n(t.b,e.b),a=cn(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=o(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);function hn(t){return function(e){var n,i,r=e.length,o=new Array(r),a=new Array(r),s=new Array(r);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),r=t[i],o=t[i+1],a=i>0?t[i-1]:2*r-o,s=io&&(r=e.slice(o,r),s[a]?s[a]+=r:s[++a]=r),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:yn(n,i)})),o=xn.lastIndex;return of.length?(p=A(o[l]),f=A(r[l]),f=K(f,p),f=et(f,p),e.fromAttrs.path=f,e.toAttrs.path=p):e.pathFormatted||(p=A(o[l]),f=A(r[l]),f=et(f,p),e.fromAttrs.path=f,e.toAttrs.path=p,e.pathFormatted=!0),i[l]=[];for(var d=0;d0){for(var o=i.animators.length-1;o>=0;o--)if((t=i.animators[o]).destroyed)i.removeAnimator(o);else{if(!t.isAnimatePaused())for(var a=(e=t.get("animations")).length-1;a>=0;a--)n=e[a],wn(t,n,r)&&(e.splice(a,1),n.callback&&n.callback());0===e.length&&i.removeAnimator(o)}i.canvas.get("autoDraw")||i.canvas.draw()}}))},t.prototype.addAnimator=function(t){this.animators.push(t)},t.prototype.removeAnimator=function(t){this.animators.splice(t,1)},t.prototype.isAnimating=function(){return!!this.animators.length},t.prototype.stop=function(){this.timer&&this.timer.stop()},t.prototype.stopAllAnimations=function(t){void 0===t&&(t=!0),this.animators.forEach((function(e){e.stopAnimate(t)})),this.animators=[],this.canvas.draw()},t.prototype.getTime=function(){return this.current},t}(),Cn=function(t){function e(e){var n=t.call(this,e)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}return rt(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.cursor="default",e},e.prototype.initContainer=function(){var t=this.get("container");lt()(t)&&(t=document.getElementById(t),this.set("container",t))},e.prototype.initDom=function(){var t=this.createDom();this.set("el",t),this.get("container").appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},e.prototype.initEvents=function(){},e.prototype.initTimeline=function(){var t=new On(this);this.set("timeline",t)},e.prototype.setDOMSize=function(t,e){var n=this.get("el");bt&&(n.style.width=t+"px",n.style.height=e+"px")},e.prototype.changeSize=function(t,e){this.setDOMSize(t,e),this.set("width",t),this.set("height",e),this.onCanvasChange("changeSize")},e.prototype.getRenderer=function(){return this.get("renderer")},e.prototype.getCursor=function(){return this.get("cursor")},e.prototype.setCursor=function(t){this.set("cursor",t);var e=this.get("el");bt&&e&&(e.style.cursor=t)},e.prototype.getPointByClient=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t-n.left,y:e-n.top}},e.prototype.getClientByPoint=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t+n.left,y:e+n.top}},e.prototype.draw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},e.prototype.clearEvents=function(){},e.prototype.isCanvas=function(){return!0},e.prototype.getParent=function(){return null},e.prototype.destroy=function(){var e=this.get("timeline");this.get("destroyed")||(this.clear(),e&&e.stop(),this.clearEvents(),this.removeDom(),t.prototype.destroy.call(this))},e}(Rt),Sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return rt(e,t),e.prototype.isGroup=function(){return!0},e.prototype.isEntityGroup=function(){return!1},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=this.getChildren(),i=0;i=t&&n.minY<=e&&n.maxY>=e},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e),this.clearCacheBBox()},e.prototype.getBBox=function(){var t=this.get("bbox");return t||(t=this.calculateBBox(),this.set("bbox",t)),t},e.prototype.getCanvasBBox=function(){var t=this.get("canvasBox");return t||(t=this.calculateCanvasBBox(),this.set("canvasBox",t)),t},e.prototype.applyMatrix=function(e){t.prototype.applyMatrix.call(this,e),this.set("canvasBox",null)},e.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),e=this.getTotalMatrix(),n=t.minX,i=t.minY,r=t.maxX,o=t.maxY;if(e){var a=At(e,[t.minX,t.minY]),s=At(e,[t.maxX,t.minY]),u=At(e,[t.minX,t.maxY]),c=At(e,[t.maxX,t.maxY]);n=Math.min(a[0],s[0],u[0],c[0]),r=Math.max(a[0],s[0],u[0],c[0]),i=Math.min(a[1],s[1],u[1],c[1]),o=Math.max(a[1],s[1],u[1],c[1])}var l=this.attrs;if(l.shadowColor){var h=l.shadowBlur,p=void 0===h?0:h,f=l.shadowOffsetX,d=void 0===f?0:f,g=l.shadowOffsetY,y=void 0===g?0:g,v=n-p+d,m=r+p+d,x=i-p+y,b=o+p+y;n=Math.min(n,v),r=Math.max(r,m),i=Math.min(i,x),o=Math.max(o,b)}return{x:n,y:i,minX:n,minY:i,maxX:r,maxY:o,width:r-n,height:o-i}},e.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBox",null)},e.prototype.isClipShape=function(){return this.get("isClipShape")},e.prototype.isInShape=function(t,e){return!1},e.prototype.isOnlyHitBox=function(){return!1},e.prototype.isHit=function(t,e){var n=this.get("startArrowShape"),i=this.get("endArrowShape"),r=[t,e,1],o=(r=this.invertFromMatrix(r))[0],a=r[1],s=this._isInBBox(o,a);if(this.isOnlyHitBox())return s;if(s&&!this.isClipped(o,a)){if(this.isInShape(o,a))return!0;if(n&&n.isHit(o,a))return!0;if(i&&i.isHit(o,a))return!0}return!1},e}(It),Pn=n(49).version},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return null==t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(20);e.default=function(t){return i.default(t,"String")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8),r=n(13);e.default=function(t,e){if(t)if(i.default(t))for(var n=0,o=t.length;n=u-p&&a<=c+p&&s>=l-p&&s<=h+p&&i.default.pointToLine(t,e,n,r,a,s)<=o/2}},function(t,e,n){"use strict";n.r(e),n.d(e,"contains",(function(){return r})),n.d(e,"includes",(function(){return r})),n.d(e,"difference",(function(){return h})),n.d(e,"find",(function(){return m})),n.d(e,"findIndex",(function(){return x})),n.d(e,"firstValue",(function(){return b})),n.d(e,"flatten",(function(){return M})),n.d(e,"flattenDeep",(function(){return w})),n.d(e,"getRange",(function(){return O})),n.d(e,"pull",(function(){return P})),n.d(e,"pullAt",(function(){return k})),n.d(e,"reduce",(function(){return T})),n.d(e,"remove",(function(){return E})),n.d(e,"sortBy",(function(){return L})),n.d(e,"union",(function(){return D})),n.d(e,"uniq",(function(){return B})),n.d(e,"valuesOfKey",(function(){return F})),n.d(e,"head",(function(){return R})),n.d(e,"last",(function(){return N})),n.d(e,"startsWith",(function(){return Y})),n.d(e,"endsWith",(function(){return X})),n.d(e,"filter",(function(){return l})),n.d(e,"every",(function(){return G})),n.d(e,"some",(function(){return z})),n.d(e,"group",(function(){return W})),n.d(e,"groupBy",(function(){return H})),n.d(e,"groupToMap",(function(){return V})),n.d(e,"getWrapBehavior",(function(){return U})),n.d(e,"wrapBehavior",(function(){return Q})),n.d(e,"number2color",(function(){return $})),n.d(e,"parseRadius",(function(){return K})),n.d(e,"clamp",(function(){return J})),n.d(e,"fixedBase",(function(){return tt})),n.d(e,"isDecimal",(function(){return nt})),n.d(e,"isEven",(function(){return it})),n.d(e,"isInteger",(function(){return rt})),n.d(e,"isNegative",(function(){return ot})),n.d(e,"isNumberEqual",(function(){return at})),n.d(e,"isOdd",(function(){return st})),n.d(e,"isPositive",(function(){return ut})),n.d(e,"maxBy",(function(){return ct})),n.d(e,"minBy",(function(){return lt})),n.d(e,"mod",(function(){return ht})),n.d(e,"toDegree",(function(){return ft})),n.d(e,"toInteger",(function(){return dt})),n.d(e,"toRadian",(function(){return yt})),n.d(e,"forIn",(function(){return vt})),n.d(e,"has",(function(){return mt})),n.d(e,"hasKey",(function(){return xt})),n.d(e,"hasValue",(function(){return Mt})),n.d(e,"keys",(function(){return d})),n.d(e,"isMatch",(function(){return g})),n.d(e,"values",(function(){return bt})),n.d(e,"lowerCase",(function(){return wt})),n.d(e,"lowerFirst",(function(){return Ot})),n.d(e,"substitute",(function(){return Ct})),n.d(e,"upperCase",(function(){return St})),n.d(e,"upperFirst",(function(){return At})),n.d(e,"getType",(function(){return jt})),n.d(e,"isArguments",(function(){return kt})),n.d(e,"isArray",(function(){return s})),n.d(e,"isArrayLike",(function(){return i})),n.d(e,"isBoolean",(function(){return Tt})),n.d(e,"isDate",(function(){return Et})),n.d(e,"isError",(function(){return It})),n.d(e,"isFunction",(function(){return p})),n.d(e,"isFinite",(function(){return Lt})),n.d(e,"isNil",(function(){return f})),n.d(e,"isNull",(function(){return Bt})),n.d(e,"isNumber",(function(){return et})),n.d(e,"isObject",(function(){return u})),n.d(e,"isObjectLike",(function(){return y})),n.d(e,"isPlainObject",(function(){return v})),n.d(e,"isPrototype",(function(){return Ft})),n.d(e,"isRegExp",(function(){return Rt})),n.d(e,"isString",(function(){return I})),n.d(e,"isType",(function(){return a})),n.d(e,"isUndefined",(function(){return Nt})),n.d(e,"isElement",(function(){return Yt})),n.d(e,"requestAnimationFrame",(function(){return Xt})),n.d(e,"clearAnimationFrame",(function(){return Gt})),n.d(e,"augment",(function(){return Ht})),n.d(e,"clone",(function(){return Wt})),n.d(e,"debounce",(function(){return Ut})),n.d(e,"memoize",(function(){return Qt})),n.d(e,"deepMix",(function(){return $t})),n.d(e,"each",(function(){return c})),n.d(e,"extend",(function(){return Kt})),n.d(e,"indexOf",(function(){return Jt})),n.d(e,"isEmpty",(function(){return ee})),n.d(e,"isEqual",(function(){return ie})),n.d(e,"isEqualWith",(function(){return re})),n.d(e,"map",(function(){return oe})),n.d(e,"mapValues",(function(){return se})),n.d(e,"mix",(function(){return qt})),n.d(e,"assign",(function(){return qt})),n.d(e,"get",(function(){return ue})),n.d(e,"set",(function(){return ce})),n.d(e,"pick",(function(){return he})),n.d(e,"throttle",(function(){return pe})),n.d(e,"toArray",(function(){return fe})),n.d(e,"toString",(function(){return _t})),n.d(e,"uniqueId",(function(){return ge})),n.d(e,"noop",(function(){return ye})),n.d(e,"identity",(function(){return ve})),n.d(e,"size",(function(){return me})),n.d(e,"Cache",(function(){return xe}));var i=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},r=function(t,e){return!!i(t)&&t.indexOf(e)>-1},o={}.toString,a=function(t,e){return o.call(t)==="[object "+e+"]"},s=function(t){return Array.isArray?Array.isArray(t):a(t,"Array")},u=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},c=function(t,e){if(t)if(s(t))for(var n=0,i=t.length;n-1;)S.call(t,o,1);return t},j=Array.prototype.splice,k=function(t,e){if(!i(t))return[];for(var n=t?e.length:0,r=n-1;n--;){var o=void 0,a=e[n];n!==r&&a===o||(o=a,j.call(t,a,1))}return t},T=function(t,e,n){if(!s(t)&&!v(t))return t;var i=n;return c(t,(function(t,n){i=e(i,t,n)})),i},E=function(t,e){var n=[];if(!i(t))return n;for(var r=-1,o=[],a=t.length;++re[r])return 1;if(t[r]n?n:t},tt=function(t,e){var n=e.toString(),i=n.indexOf(".");if(-1===i)return Math.round(t);var r=n.substr(i+1).length;return r>20&&(r=20),parseFloat(t.toFixed(r))},et=function(t){return a(t,"Number")},nt=function(t){return et(t)&&t%1!=0},it=function(t){return et(t)&&t%2==0},rt=Number.isInteger?Number.isInteger:function(t){return et(t)&&t%1==0},ot=function(t){return et(t)&&t<0};function at(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)0},ct=function(t,e){if(s(t)){var n,i,r=t[0];return n=p(e)?e(t[0]):t[0][e],c(t,(function(t){(i=p(e)?e(t):t[e])>n&&(r=t,n=i)})),r}},lt=function(t,e){if(s(t)){var n,i,r=t[0];return n=p(e)?e(t[0]):t[0][e],c(t,(function(t){(i=p(e)?e(t):t[e])e?(i&&(clearTimeout(i),i=null),s=c,a=t.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(u,l)),a};return c.cancel=function(){clearTimeout(i),s=0,i=r=o=null},c},fe=function(t){return i(t)?Array.prototype.slice.call(t):[]},de={},ge=function(t){return de[t=t||"g"]?de[t]+=1:de[t]=1,t+de[t]},ye=function(){},ve=function(t){return t};function me(t){return f(t)?0:i(t)?t.length:Object.keys(t).length}var xe=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(20);e.default=function(t){return i.default(t,"Function")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={}.toString;e.default=function(t,e){return i.call(t)==="[object "+e+"]"}},function(t,e,n){"use strict";function i(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n,r){return e&&i(t,e),n&&i(t,n),r&&i(t,r),t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(50);e.default=function(t){var e=i.default(t);return e.charAt(0).toUpperCase()+e.substring(1)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=function(t){e.ARRAY_TYPE=t},e.toRadian=function(t){return t*r},e.equals=function(t,e){return Math.abs(t-e)<=i*Math.max(1,Math.abs(t),Math.abs(e))};var i=e.EPSILON=1e-6;e.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,e.RANDOM=Math.random;var r=Math.PI/180},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={}.toString;e.default=function(t,e){return i.call(t)==="[object "+e+"]"}},function(t,e,n){"use strict";function i(t,e){return t&&e?{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}:t||e}Object.defineProperty(e,"__esModule",{value:!0}),e.mergeBBox=i,e.mergeArrowBBox=function(t,e){var n=t.get("startArrowShape"),r=t.get("endArrowShape");return n&&(e=i(e,n.getCanvasBBox())),r&&(e=i(e,r.getCanvasBBox())),e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),r=n(6),o=n(36);function a(t,e,n,i,r){var o=1-r;return o*o*o*t+3*e*r*o*o+3*n*r*r*o+i*r*r*r}function s(t,e,n,i,r){var o=1-r;return 3*(o*o*(e-t)+2*o*r*(n-e)+r*r*(i-n))}function u(t,e,n,r){var o,a,s,u=-3*t+9*e-9*n+3*r,c=6*t-12*e+6*n,l=3*e-3*t,h=[];if(i.isNumberEqual(u,0))i.isNumberEqual(c,0)||(o=-l/c)>=0&&o<=1&&h.push(o);else{var p=c*c-4*u*l;i.isNumberEqual(p,0)?h.push(-c/(2*u)):p>0&&(a=(-c-(s=Math.sqrt(p)))/(2*u),(o=(-c+s)/(2*u))>=0&&o<=1&&h.push(o),a>=0&&a<=1&&h.push(a))}return h}function c(t,e,n,i,o,s,u,c,l){var h=a(t,n,o,u,l),p=a(e,i,s,c,l),f=r.default.pointAt(t,e,n,i,l),d=r.default.pointAt(n,i,o,s,l),g=r.default.pointAt(o,s,u,c,l),y=r.default.pointAt(f.x,f.y,d.x,d.y,l),v=r.default.pointAt(d.x,d.y,g.x,g.y,l);return[[t,e,f.x,f.y,y.x,y.y,h,p],[h,p,v.x,v.y,g.x,g.y,u,c]]}e.default={extrema:u,box:function(t,e,n,r,o,s,c,l){for(var h=[t,c],p=[e,l],f=u(t,n,o,c),d=u(e,r,s,l),g=0;g=0&&s<.5*Math.PI?(i={x:l.minX,y:l.minY},o={x:l.maxX,y:l.maxY}):.5*Math.PI<=s&&s1?e*r+o(e,n)*(r-1):e},e.getLineSpaceing=o,e.getTextWidth=function(t,e){var n=r.getOffScreenContext(),o=0;if(i.isNil(t)||""===t)return o;if(n.save(),n.font=e,i.isString(t)&&t.includes("\n")){var a=t.split("\n");i.each(a,(function(t){var e=n.measureText(t).width;o=0?[o]:[]}function u(t,e,n,i){return 2*(1-i)*(e-t)+2*i*(n-e)}function c(t,e,n,r,o,s,u){var c=a(t,n,o,u),l=a(e,r,s,u),h=i.default.pointAt(t,e,n,r,u),p=i.default.pointAt(n,r,o,s,u);return[[t,e,h.x,h.y,c,l],[c,l,p.x,p.y,o,s]]}e.default={box:function(t,e,n,i,o,u){var c=s(t,n,o)[0],l=s(e,i,u)[0],h=[t,o],p=[e,u];return void 0!==c&&h.push(a(t,n,o,c)),void 0!==l&&p.push(a(e,i,u,l)),r.getBBoxByArray(h,p)},length:function(t,e,n,i,o,a){return function t(e,n,i,o,a,s,u){if(0===u)return(r.distance(e,n,i,o)+r.distance(i,o,a,s)+r.distance(e,n,a,s))/2;var l=c(e,n,i,o,a,s,.5),h=l[0],p=l[1];return h.push(u-1),p.push(u-1),t.apply(null,h)+t.apply(null,p)}(t,e,n,i,o,a,3)},nearestPoint:function(t,e,n,i,r,s,u,c){return o.nearestPoint([t,n,r],[e,i,s],u,c,a)},pointDistance:function(t,e,n,i,o,a,s,u){var c=this.nearestPoint(t,e,n,i,o,a,s,u);return r.distance(c.x,c.y,s,u)},interpolationAt:a,pointAt:function(t,e,n,i,r,o,s){return{x:a(t,n,r,s),y:a(e,i,o,s)}},divide:function(t,e,n,i,r,o,a){return c(t,e,n,i,r,o,a)},tangentAngle:function(t,e,n,i,o,a,s){var c=u(t,n,o,s),l=u(e,i,a,s),h=Math.atan2(l,c);return r.piMod(h)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(5);e.nearestPoint=function(t,e,n,r,o){for(var a,s=.005,u=1/0,c=[n,r],l=0;l<=20;l++){var h=.05*l,p=[o.apply(null,t.concat([h])),o.apply(null,e.concat([h]))];(y=i.distance(c[0],c[1],p[0],p[1]))=0&&y1&&(n*=Math.sqrt(m),o*=Math.sqrt(m));var x=n*n*(v*v)+o*o*(y*y),b=x?Math.sqrt((n*n*(o*o)-x)/x):1;l===h&&(b*=-1),isNaN(b)&&(b=0);var M=o?b*n*v/o:0,_=n?b*-o*y/n:0,w=(p+d)/2+Math.cos(c)*M-Math.sin(c)*_,O=(f+g)/2+Math.sin(c)*M+Math.cos(c)*_,C=[(y-M)/n,(v-_)/o],S=[(-1*y-M)/n,(-1*v-_)/o],A=s([1,0],C),P=s(C,S);return a(C,S)<=-1&&(P=Math.PI),a(C,S)>=1&&(P=0),0===h&&P>0&&(P-=2*Math.PI),1===h&&P<0&&(P+=2*Math.PI),{cx:w,cy:O,rx:u(t,[d,g])?0:n,ry:u(t,[d,g])?0:o,startAngle:A,endAngle:A+P,xRotation:c,arcFlag:l,sweepFlag:h}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(83),r=/[a-z]/;function o(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}e.default=function(t){var e=i.default(t);if(!e||!e.length)return[["M",0,0]];for(var n=!1,a=0;a=0){n=!0;break}}if(!n)return e;var u=[],c=0,l=0,h=0,p=0,f=0,d=e[0];"M"!==d[0]&&"m"!==d[0]||(h=c=+d[1],p=l=+d[2],f++,u[0]=["M",c,l]),a=f;for(var g=e.length;a1&&(n*=Math.sqrt(m),o*=Math.sqrt(m));var x=n*n*(v*v)+o*o*(y*y),b=x?Math.sqrt((n*n*(o*o)-x)/x):1;l===h&&(b*=-1),isNaN(b)&&(b=0);var M=o?b*n*v/o:0,_=n?b*-o*y/n:0,w=(p+d)/2+Math.cos(c)*M-Math.sin(c)*_,O=(f+g)/2+Math.sin(c)*M+Math.cos(c)*_,C=[(y-M)/n,(v-_)/o],S=[(-1*y-M)/n,(-1*v-_)/o],A=s([1,0],C),P=s(C,S);return a(C,S)<=-1&&(P=Math.PI),a(C,S)>=1&&(P=0),0===h&&P>0&&(P-=2*Math.PI),1===h&&P<0&&(P+=2*Math.PI),{cx:w,cy:O,rx:u(t,[d,g])?0:n,ry:u(t,[d,g])?0:o,startAngle:A,endAngle:A+P,xRotation:c,arcFlag:l,sweepFlag:h}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2);e.default=function(t,e,n){var r=i.getOffScreenContext();return t.createPath(r),r.isPointInPath(e,n)}},function(t,e,n){"use strict";function i(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function r(t,e,n){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])&&Math.min(t[0],e[0])<=n[0]&&n[0]<=Math.max(t[0],e[0])&&Math.min(t[1],e[1])<=n[1]&&n[1]<=Math.max(t[1],e[1])}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){var o=!1,a=t.length;if(a<=2)return!1;for(var s=0;s0!=i(c[1]-n)>0&&i(e-(n-u[1])*(u[0]-c[0])/(u[1]-c[1])-u[0])<0&&(o=!o)}return o}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2);e.default=function(t,e,n,r,o,a,s,u){var c=(Math.atan2(u-e,s-t)+2*Math.PI)%(2*Math.PI);if(co)return!1;var l={x:t+n*Math.cos(c),y:e+n*Math.sin(c)};return i.distance(l.x,l.y,s,u)<=a/2}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=function(t){e.ARRAY_TYPE=t},e.toRadian=function(t){return t*r},e.equals=function(t,e){return Math.abs(t-e)<=i*Math.max(1,Math.abs(t),Math.abs(e))};var i=e.EPSILON=1e-6;e.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,e.RANDOM=Math.random;var r=Math.PI/180},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(17);e.default=function(t,e,n,r,o){var a=t.length;if(a<2)return!1;for(var s=0;s1?0:r<-1?Math.PI:Math.acos(r)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.equals=function(t,e){var n=t[0],i=t[1],o=t[2],a=e[0],s=e[1],u=e[2];return Math.abs(n-a)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-s)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-u)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(u))};var i,r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(23));function o(){var t=new r.ARRAY_TYPE(3);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function a(t){var e=t[0],n=t[1],i=t[2];return Math.sqrt(e*e+n*n+i*i)}function s(t,e,n){var i=new r.ARRAY_TYPE(3);return i[0]=t,i[1]=e,i[2]=n,i}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function c(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function l(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function h(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(n*n+i*i+r*r)}function p(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return n*n+i*i+r*r}function f(t){var e=t[0],n=t[1],i=t[2];return e*e+n*n+i*i}function d(t,e){var n=e[0],i=e[1],r=e[2],o=n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function g(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}e.sub=u,e.mul=c,e.div=l,e.dist=h,e.sqrDist=p,e.len=a,e.sqrLen=f,e.forEach=(i=o(),function(t,e,n,r,o,a){var s,u=void 0;for(e||(e=3),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,u=n;u1&&(n*=Math.sqrt(y),r*=Math.sqrt(y));var v=n*n*(g*g)+r*r*(d*d),m=v?Math.sqrt((n*n*(r*r)-v)/v):1;u===c&&(m*=-1),isNaN(m)&&(m=0);var x=r?m*n*g/r:0,b=n?m*-r*d/n:0,M=(l+p)/2+Math.cos(s)*x-Math.sin(s)*b,_=(h+f)/2+Math.sin(s)*x+Math.cos(s)*b,w=[(d-x)/n,(g-b)/r],O=[(-1*d-x)/n,(-1*g-b)/r],C=a([1,0],w),S=a(w,O);return o(w,O)<=-1&&(S=Math.PI),o(w,O)>=1&&(S=0),0===c&&S>0&&(S-=2*Math.PI),1===c&&S<0&&(S+=2*Math.PI),{cx:M,cy:_,rx:i.isSamePoint(t,[p,f])?0:n,ry:i.isSamePoint(t,[p,f])?0:r,startAngle:C,endAngle:C+S,xRotation:s,arcFlag:u,sweepFlag:c}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(59);e.getBBoxMethod=i.getMethod;var r=n(60),o=n(61),a=n(62),s=n(63),u=n(64),c=n(66),l=n(76),h=n(77);i.register("rect",r.default),i.register("image",r.default),i.register("circle",o.default),i.register("marker",o.default),i.register("polyline",a.default),i.register("polygon",s.default),i.register("text",u.default),i.register("path",c.default),i.register("line",l.default),i.register("ellipse",h.default)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=new Map;e.register=function(t,e){i.set(t,e)},e.getMethod=function(t){return i.get(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.attr();return{x:e.x,y:e.y,width:e.width,height:e.height}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.attr(),n=e.x,i=e.y,r=e.r;return{x:n-r,y:i-r,width:2*r,height:2*r}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),r=n(25);e.default=function(t){for(var e=t.attr().points,n=[],o=[],a=0;aMath.PI/2?Math.PI-l:l,h=h>Math.PI/2?Math.PI-h:h,{xExtra:Math.cos(c/2-l)*(e/2*(1/Math.sin(c/2)))-e/2||0,yExtra:Math.cos(h-c/2)*(e/2*(1/Math.sin(c/2)))-e/2||0}}e.default=function(t){var e=t.attr(),n=e.path,s=e.stroke?e.lineWidth:0,l=function(t,e){for(var n=[],a=[],s=[],u=0;u0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,n){var i=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=i,t},e.lerp=function(t,e,n,i){var r=e[0],o=e[1];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t},e.random=function(t,e){e=e||1;var n=2*r.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.transformMat2=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t},e.transformMat2d=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t},e.transformMat3=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[3]*r+n[6],t[1]=n[1]*i+n[4]*r+n[7],t},e.transformMat4=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[4]*r+n[12],t[1]=n[1]*i+n[5]*r+n[13],t},e.rotate=function(t,e,n,i){var r=e[0]-n[0],o=e[1]-n[1],a=Math.sin(i),s=Math.cos(i);return t[0]=r*s-o*a+n[0],t[1]=r*a+o*s+n[1],t},e.angle=function(t,e){var n=t[0],i=t[1],r=e[0],o=e[1],a=n*n+i*i;a>0&&(a=1/Math.sqrt(a));var s=r*r+o*o;s>0&&(s=1/Math.sqrt(s));var u=(n*r+i*o)*a*s;return u>1?0:u<-1?Math.PI:Math.acos(u)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],i=t[1],o=e[0],a=e[1];return Math.abs(n-o)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-a)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(a))};var i,r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(68));function o(){var t=new r.ARRAY_TYPE(2);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function s(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function u(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function c(t,e){var n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)}function l(t,e){var n=e[0]-t[0],i=e[1]-t[1];return n*n+i*i}function h(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function p(t){var e=t[0],n=t[1];return e*e+n*n}e.len=h,e.sub=a,e.mul=s,e.div=u,e.dist=c,e.sqrDist=l,e.sqrLen=p,e.forEach=(i=o(),function(t,e,n,r,o,a){var s,u=void 0;for(e||(e=2),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,u=n;uh&&(h=g)}var y=function(t,e,n){return Math.atan(e/(t*Math.tan(n)))}(n,i,r),v=1/0,m=-1/0,x=[s,u];for(f=2*-Math.PI;f<=2*Math.PI;f+=Math.PI){var b=y+f;sm&&(m=M)}return{x:l,y:v,width:h-l,height:m-v}},length:function(t,e,n,i,r,o,a){},nearestPoint:function(t,e,n,i,o,a,c,l,h){var p=u(l-t,h-e,-o),f=p[0],d=p[1],g=r.default.nearestPoint(0,0,n,i,f,d),y=function(t,e,n,i){return(Math.atan2(i*t,n*e)+2*Math.PI)%(2*Math.PI)}(n,i,g.x,g.y);yc&&(g=s(n,i,c));var v=u(g.x,g.y,o);return{x:v[0]+t,y:v[1]+e}},pointDistance:function(t,e,n,r,o,a,s,u,c){var l=this.nearestPoint(t,e,n,r,u,c);return i.distance(l.x,l.y,u,c)},pointAt:function(t,e,n,i,r,s,u,c){var l=(u-s)*c+s;return{x:o(t,0,n,i,r,l),y:a(0,e,n,i,r,l)}},tangentAngle:function(t,e,n,r,o,a,s,u){var c=(s-a)*u+a,l=function(t,e,n,i,r,o,a,s){return-1*n*Math.cos(r)*Math.sin(s)-i*Math.sin(r)*Math.cos(s)}(0,0,n,r,o,0,0,c),h=function(t,e,n,i,r,o,a,s){return-1*n*Math.sin(r)*Math.sin(s)+i*Math.cos(r)*Math.cos(s)}(0,0,n,r,o,0,0,c);return i.piMod(Math.atan2(h,l))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(5);function r(t,e){var n=Math.abs(t);return e>0?n:-1*n}e.default={box:function(t,e,n,i){return{x:t-n,y:e-i,width:2*n,height:2*i}},length:function(t,e,n,i){return Math.PI*(3*(n+i)-Math.sqrt((3*n+i)*(n+3*i)))},nearestPoint:function(t,e,n,i,o,a){var s=n,u=i;if(0===s||0===u)return{x:t,y:e};for(var c,l,h=o-t,p=a-e,f=Math.abs(h),d=Math.abs(p),g=s*s,y=u*u,v=Math.PI/4,m=0;m<4;m++){c=s*Math.cos(v),l=u*Math.sin(v);var x=(g-y)*Math.pow(Math.cos(v),3)/s,b=(y-g)*Math.pow(Math.sin(v),3)/u,M=c-x,_=l-b,w=f-x,O=d-b,C=Math.hypot(_,M),S=Math.hypot(O,w);v+=C*Math.asin((M*O-_*w)/(C*S))/Math.sqrt(g+y-c*c-l*l),v=Math.min(Math.PI/2,Math.max(0,v))}return{x:t+r(c,h),y:e+r(l,p)}},pointDistance:function(t,e,n,r,o,a){var s=this.nearestPoint(t,e,n,r,o,a);return i.distance(s.x,s.y,o,a)},pointAt:function(t,e,n,i,r){var o=2*Math.PI*r;return{x:t+n*Math.cos(o),y:e+i*Math.sin(o)}},tangentAngle:function(t,e,n,r,o){var a=2*Math.PI*o,s=Math.atan2(r*Math.cos(a),-n*Math.sin(a));return i.piMod(s)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(37),r=n(37),o=n(74);function a(t,e){return{x:e.x+(e.x-t.x),y:e.y+(e.y-t.y)}}e.default=function(t){for(var e=[],n=null,s=null,u=null,c=0,l=(t=o.default(t)).length,h=0;h1){var r=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=r}i.default(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)=c-l&&h<=c+l},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,i=e.y,r=e.r;t.beginPath(),t.arc(n,i,r,0,2*Math.PI,!1),t.closePath()},e}(r.default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0);function r(t,e,n,i){return t/(n*n)+e/(i*i)}var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return i.__assign(i.__assign({},e),{x:0,y:0,rx:0,ry:0})},e.prototype.isInStrokeOrPath=function(t,e,n,i,o){var a=this.attr(),s=o/2,u=a.x,c=a.y,l=a.rx,h=a.ry,p=(t-u)*(t-u),f=(e-c)*(e-c);return i&&n?r(p,f,l+s,h+s)<=1:i?r(p,f,l,h)<=1:!!n&&r(p,f,l-s,h-s)>=1&&r(p,f,l+s,h+s)<=1},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,i=e.y,r=e.rx,o=e.ry;if(t.beginPath(),t.ellipse)t.ellipse(n,i,r,o,0,0,2*Math.PI,!1);else{var a=r>o?r:o,s=r>o?1:r/o,u=r>o?o/r:1;t.save(),t.translate(n,i),t.scale(s,u),t.arc(0,0,a,0,2*Math.PI),t.restore(),t.closePath()}},e}(n(3).default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(3),o=n(2);function a(t){return t instanceof HTMLElement&&o.isString(t.nodeName)&&"CANVAS"===t.nodeName.toUpperCase()}var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return i.__assign(i.__assign({},e),{x:0,y:0,width:0,height:0})},e.prototype.initAttrs=function(t){this._setImage(t.img)},e.prototype.isStroke=function(){return!1},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._afterLoading=function(){if(!0===this.get("toDraw")){var t=this.get("canvas");t?t.draw():this.createPath(this.get("context"))}},e.prototype._setImage=function(t){var e=this,n=this.attrs;if(o.isString(t)){var i=new Image;i.onload=function(){if(e.destroyed)return!1;e.attr("img",i),e.set("loading",!1),e._afterLoading();var t=e.get("callback");t&&t.call(e)},i.src=t,i.crossOrigin="Anonymous",this.set("loading",!0)}else t instanceof Image?(n.width||(n.width=t.width),n.height||(n.height=t.height)):a(t)&&(n.width||(n.width=Number(t.getAttribute("width"))),n.height||(n.height,Number(t.getAttribute("height"))))},e.prototype.onAttrChange=function(e,n,i){t.prototype.onAttrChange.call(this,e,n,i),"img"===e&&this._setImage(n)},e.prototype.createPath=function(t){if(this.get("loading"))return this.set("toDraw",!0),void this.set("context",t);var e=this.attr(),n=e.x,i=e.y,r=e.width,s=e.height,u=e.sx,c=e.sy,l=e.swidth,h=e.sheight,p=e.img;(p instanceof Image||a(p))&&(o.isNil(u)||o.isNil(c)||o.isNil(l)||o.isNil(h)?t.drawImage(p,n,i,r,s):t.drawImage(p,u,c,l,h,n,i,r,s))},e}(r.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(6),o=n(3),a=n(17),s=n(16),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return i.__assign(i.__assign({},e),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},e.prototype.initAttrs=function(t){this.setArrow()},e.prototype.onAttrChange=function(e,n,i){t.prototype.onAttrChange.call(this,e,n,i),this.setArrow()},e.prototype.setArrow=function(){var t=this.attr(),e=t.x1,n=t.y1,i=t.x2,r=t.y2,o=t.startArrow,a=t.endArrow;o&&s.addStartArrow(this,t,i,r,e,n),a&&s.addEndArrow(this,t,e,n,i,r)},e.prototype.isInStrokeOrPath=function(t,e,n,i,r){if(!n||!r)return!1;var o=this.attr(),s=o.x1,u=o.y1,c=o.x2,l=o.y2;return a.default(s,u,c,l,r,t,e)},e.prototype.createPath=function(t){var e=this.attr(),n=e.x1,i=e.y1,r=e.x2,o=e.y2,a=e.startArrow,u=e.endArrow,c={dx:0,dy:0},l={dx:0,dy:0};a&&a.d&&(c=s.getShortenOffset(n,i,r,o,e.startArrow.d)),u&&u.d&&(l=s.getShortenOffset(n,i,r,o,e.endArrow.d)),t.beginPath(),t.moveTo(n+c.dx,i+c.dy),t.lineTo(r-l.dx,o-l.dy)},e.prototype.afterDrawPath=function(t){var e=this.get("startArrowShape"),n=this.get("endArrowShape");e&&e.draw(t),n&&n.draw(t)},e.prototype.getTotalLength=function(){var t=this.attr(),e=t.x1,n=t.y1,i=t.x2,o=t.y2;return r.default.length(e,n,i,o)},e.prototype.getPoint=function(t){var e=this.attr(),n=e.x1,i=e.y1,o=e.x2,a=e.y2;return r.default.pointAt(n,i,o,a,t)},e}(o.default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(18),o=n(38),a=n(3),s=n(2),u=n(9),c={circle:function(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e]]},square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var i=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+i],["L",t,e-i],["L",t+n,e+i],["Z"]]},"triangle-down":function(t,e,n){var i=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-i],["L",t+n,e-i],["L",t,e+i],["Z"]]}},l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.initAttrs=function(t){this._resetParamsCache()},e.prototype._resetParamsCache=function(){this.set("paramsCache",{})},e.prototype.onAttrChange=function(e,n,i){t.prototype.onAttrChange.call(this,e,n,i),-1!==["symbol","x","y","r","radius"].indexOf(e)&&this._resetParamsCache()},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._getR=function(t){return r.isNil(t.r)?t.radius:t.r},e.prototype._getPath=function(){var t,n,i=this.attr(),r=i.x,a=i.y,u=i.symbol||"circle",c=this._getR(i);return s.isFunction(u)?(n=(t=u)(r,a,c),n=o.default(n)):n=(t=e.Symbols[u])(r,a,c),t?n:(console.warn(u+" marker is not supported."),null)},e.prototype.createPath=function(t){var e=this._getPath(),n=this.get("paramsCache");u.drawPath(this,t,{path:e},n)},e.Symbols=c,e}(a.default);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(15),r="\t\n\v\f\r   ᠎              \u2028\u2029",o=new RegExp("([a-z])["+r+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+r+"]*,?["+r+"]*)+)","ig"),a=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+r+"]*,?["+r+"]*","ig");e.default=function(t){if(!t)return null;if(i.default(t))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(t).replace(o,(function(t,i,r){var o=[],s=i.toLowerCase();if(r.replace(a,(function(t,e){e&&o.push(+e)})),"m"===s&&o.length>2&&(n.push([i].concat(o.splice(0,2))),s="l",i="m"===i?"l":"L"),"o"===s&&1===o.length&&n.push([i,o[0]]),"r"===s)n.push([i].concat(o));else for(;o.length>=e[s]&&(n.push([i].concat(o.splice(0,e[s]))),e[s]););return""})),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(26),o=n(18),a=n(3),s=n(38),u=n(85),c=n(9),l=n(40),h=n(41),p=n(87),f=n(16);function d(t,e,n){for(var i=!1,r=0;r=i[0]&&t<=i[1]&&(e=(t-i[0])/(i[1]-i[0]),n=r)}));var s=a[n];if(o.isNil(s)||o.isNil(n))return null;var u=s.length,c=a[n+1];return r.default.pointAt(s[u-2],s[u-1],c[1],c[2],c[3],c[4],c[5],c[6],e)},e.prototype._calculateCurve=function(){var t=this.attr().path;this.set("curve",p.default.pathToCurve(t))},e.prototype._setTcache=function(){var t,e,n,i,a=0,s=0,u=[],c=this.get("curve");c&&(o.each(c,(function(t,e){n=c[e+1],i=t.length,n&&(a+=r.default.length(t[i-2],t[i-1],n[1],n[2],n[3],n[4],n[5],n[6])||0)})),this.set("totalLength",a),0!==a?(o.each(c,(function(o,l){n=c[l+1],i=o.length,n&&((t=[])[0]=s/a,e=r.default.length(o[i-2],o[i-1],n[1],n[2],n[3],n[4],n[5],n[6]),s+=e||0,t[1]=s/a,u.push(t))})),this.set("tCache",u)):this.set("tCache",[]))},e.prototype.getStartTangent=function(){var t,e=this.getSegments();if(e.length>1){var n=e[0].currentPoint,i=e[1].currentPoint,r=e[1].startTangent;t=[],r?(t.push([n[0]-r[0],n[1]-r[1]]),t.push([n[0],n[1]])):(t.push([i[0],i[1]]),t.push([n[0],n[1]]))}return t},e.prototype.getEndTangent=function(){var t,e=this.getSegments(),n=e.length;if(n>1){var i=e[n-2].currentPoint,r=e[n-1].currentPoint,o=e[n-1].endTangent;t=[],o?(t.push([r[0]-o[0],r[1]-o[1]]),t.push([r[0],r[1]])):(t.push([i[0],i[1]]),t.push([r[0],r[1]]))}return t},e}(a.default);e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(39),r=n(39),o=n(86);function a(t,e){return{x:e.x+(e.x-t.x),y:e.y+(e.y-t.y)}}e.default=function(t){for(var e=[],n=null,s=null,u=null,c=0,l=(t=o.default(t)).length,h=0;h1){var r=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=r}i.default(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(10),o=n(35),a=n(26),s=n(2),u=n(17),c=n(42),l=n(88),h=n(89);e.default=i.__assign({hasArc:function(t){for(var e=!1,n=t.length,i=0;i0&&i.push(r),{polygons:n,polylines:i}},isPointInStroke:function(t,e,n,i){for(var r=!1,p=e/2,f=0;fw?_:w,k=_>w?1:_/w,T=_>w?w/_:1;l.translate(P,P,[-b,-M]),l.rotate(P,P,-S),l.scale(P,P,[1/k,1/T]),h.transformMat3(A,A,P),r=c.default(0,0,j,O,C,e,A[0],A[1])}if(r)break}}return r}},r.PathUtil)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sub=e.mul=void 0,e.create=function(){var t=new i.ARRAY_TYPE(9);return i.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},e.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},e.clone=function(t){var e=new i.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromValues=function(t,e,n,r,o,a,s,u,c){var l=new i.ARRAY_TYPE(9);return l[0]=t,l[1]=e,l[2]=n,l[3]=r,l[4]=o,l[5]=a,l[6]=s,l[7]=u,l[8]=c,l},e.set=function(t,e,n,i,r,o,a,s,u,c){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=c,t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.transpose=function(t,e){if(t===e){var n=e[1],i=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=i,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},e.invert=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=l*a-s*c,p=-l*o+s*u,f=c*o-a*u,d=n*h+i*p+r*f;return d?(d=1/d,t[0]=h*d,t[1]=(-l*i+r*c)*d,t[2]=(s*i-r*a)*d,t[3]=p*d,t[4]=(l*n-r*u)*d,t[5]=(-s*n+r*o)*d,t[6]=f*d,t[7]=(-c*n+i*u)*d,t[8]=(a*n-i*o)*d,t):null},e.adjoint=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8];return t[0]=a*l-s*c,t[1]=r*c-i*l,t[2]=i*s-r*a,t[3]=s*u-o*l,t[4]=n*l-r*u,t[5]=r*o-n*s,t[6]=o*c-a*u,t[7]=i*u-n*c,t[8]=n*a-i*o,t},e.determinant=function(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8];return e*(c*o-a*u)+n*(-c*r+a*s)+i*(u*r-o*s)},e.multiply=r,e.translate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=n[0],f=n[1];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=p*i+f*a+c,t[7]=p*r+f*s+l,t[8]=p*o+f*u+h,t},e.rotate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=Math.sin(n),f=Math.cos(n);return t[0]=f*i+p*a,t[1]=f*r+p*s,t[2]=f*o+p*u,t[3]=f*a-p*i,t[4]=f*s-p*r,t[5]=f*u-p*o,t[6]=c,t[7]=l,t[8]=h,t},e.scale=function(t,e,n){var i=n[0],r=n[1];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},e.fromRotation=function(t,e){var n=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=n,t[2]=0,t[3]=-n,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat2d=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},e.fromQuat=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n+n,s=i+i,u=r+r,c=n*a,l=i*a,h=i*s,p=r*a,f=r*s,d=r*u,g=o*a,y=o*s,v=o*u;return t[0]=1-h-d,t[3]=l-v,t[6]=p+y,t[1]=l+v,t[4]=1-c-d,t[7]=f-g,t[2]=p-y,t[5]=f+g,t[8]=1-c-h,t},e.normalFromMat4=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],p=e[10],f=e[11],d=e[12],g=e[13],y=e[14],v=e[15],m=n*s-i*a,x=n*u-r*a,b=n*c-o*a,M=i*u-r*s,_=i*c-o*s,w=r*c-o*u,O=l*g-h*d,C=l*y-p*d,S=l*v-f*d,A=h*y-p*g,P=h*v-f*g,j=p*v-f*y,k=m*j-x*P+b*A+M*S-_*C+w*O;return k?(k=1/k,t[0]=(s*j-u*P+c*A)*k,t[1]=(u*S-a*j-c*C)*k,t[2]=(a*P-s*S+c*O)*k,t[3]=(r*P-i*j-o*A)*k,t[4]=(n*j-r*S+o*C)*k,t[5]=(i*S-n*P-o*O)*k,t[6]=(g*w-y*_+v*M)*k,t[7]=(y*b-d*w-v*x)*k,t[8]=(d*_-g*b+v*m)*k,t):null},e.projection=function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},e.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},e.subtract=o,e.multiplyScalar=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},e.multiplyScalarAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t[3]=e[3]+n[3]*i,t[4]=e[4]+n[4]*i,t[5]=e[5]+n[5]*i,t[6]=e[6]+n[6]*i,t[7]=e[7]+n[7]*i,t[8]=e[8]+n[8]*i,t},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},e.equals=function(t,e){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],p=e[0],f=e[1],d=e[2],g=e[3],y=e[4],v=e[5],m=e[6],x=e[7],b=e[8];return Math.abs(n-p)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(r-f)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(o-d)<=i.EPSILON*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(a-g)<=i.EPSILON*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(s-y)<=i.EPSILON*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(u-v)<=i.EPSILON*Math.max(1,Math.abs(u),Math.abs(v))&&Math.abs(c-m)<=i.EPSILON*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(l-x)<=i.EPSILON*Math.max(1,Math.abs(l),Math.abs(x))&&Math.abs(h-b)<=i.EPSILON*Math.max(1,Math.abs(h),Math.abs(b))};var i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(43));function r(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],p=n[0],f=n[1],d=n[2],g=n[3],y=n[4],v=n[5],m=n[6],x=n[7],b=n[8];return t[0]=p*i+f*a+d*c,t[1]=p*r+f*s+d*l,t[2]=p*o+f*u+d*h,t[3]=g*i+y*a+v*c,t[4]=g*r+y*s+v*l,t[5]=g*o+y*u+v*h,t[6]=m*i+x*a+b*c,t[7]=m*r+x*s+b*l,t[8]=m*o+x*u+b*h,t}function o(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}e.mul=r,e.sub=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.len=e.sqrDist=e.dist=e.div=e.mul=e.sub=void 0,e.create=o,e.clone=function(t){var e=new r.ARRAY_TYPE(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},e.length=a,e.fromValues=s,e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},e.set=function(t,e,n,i){return t[0]=e,t[1]=n,t[2]=i,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t},e.subtract=u,e.multiply=c,e.divide=l,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t},e.scaleAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t},e.distance=h,e.squaredDistance=p,e.squaredLength=f,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},e.normalize=d,e.dot=g,e.cross=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=r*u-o*s,t[1]=o*a-i*u,t[2]=i*s-r*a,t},e.lerp=function(t,e,n,i){var r=e[0],o=e[1],a=e[2];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t},e.hermite=function(t,e,n,i,r,o){var a=o*o,s=a*(2*o-3)+1,u=a*(o-2)+o,c=a*(o-1),l=a*(3-2*o);return t[0]=e[0]*s+n[0]*u+i[0]*c+r[0]*l,t[1]=e[1]*s+n[1]*u+i[1]*c+r[1]*l,t[2]=e[2]*s+n[2]*u+i[2]*c+r[2]*l,t},e.bezier=function(t,e,n,i,r,o){var a=1-o,s=a*a,u=o*o,c=s*a,l=3*o*s,h=3*u*a,p=u*o;return t[0]=e[0]*c+n[0]*l+i[0]*h+r[0]*p,t[1]=e[1]*c+n[1]*l+i[1]*h+r[1]*p,t[2]=e[2]*c+n[2]*l+i[2]*h+r[2]*p,t},e.random=function(t,e){e=e||1;var n=2*r.RANDOM()*Math.PI,i=2*r.RANDOM()-1,o=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(n)*o,t[1]=Math.sin(n)*o,t[2]=i*e,t},e.transformMat4=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[3]*i+n[7]*r+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*i+n[4]*r+n[8]*o+n[12])/a,t[1]=(n[1]*i+n[5]*r+n[9]*o+n[13])/a,t[2]=(n[2]*i+n[6]*r+n[10]*o+n[14])/a,t},e.transformMat3=function(t,e,n){var i=e[0],r=e[1],o=e[2];return t[0]=i*n[0]+r*n[3]+o*n[6],t[1]=i*n[1]+r*n[4]+o*n[7],t[2]=i*n[2]+r*n[5]+o*n[8],t},e.transformQuat=function(t,e,n){var i=n[0],r=n[1],o=n[2],a=n[3],s=e[0],u=e[1],c=e[2],l=r*c-o*u,h=o*s-i*c,p=i*u-r*s,f=r*p-o*h,d=o*l-i*p,g=i*h-r*l,y=2*a;return l*=y,h*=y,p*=y,f*=2,d*=2,g*=2,t[0]=s+l+f,t[1]=u+h+d,t[2]=c+p+g,t},e.rotateX=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0],o[1]=r[1]*Math.cos(i)-r[2]*Math.sin(i),o[2]=r[1]*Math.sin(i)+r[2]*Math.cos(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},e.rotateY=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[2]*Math.sin(i)+r[0]*Math.cos(i),o[1]=r[1],o[2]=r[2]*Math.cos(i)-r[0]*Math.sin(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},e.rotateZ=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0]*Math.cos(i)-r[1]*Math.sin(i),o[1]=r[0]*Math.sin(i)+r[1]*Math.cos(i),o[2]=r[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},e.angle=function(t,e){var n=s(t[0],t[1],t[2]),i=s(e[0],e[1],e[2]);d(n,n),d(i,i);var r=g(n,i);return r>1?0:r<-1?Math.PI:Math.acos(r)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.equals=function(t,e){var n=t[0],i=t[1],o=t[2],a=e[0],s=e[1],u=e[2];return Math.abs(n-a)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-s)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-u)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(u))};var i,r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(43));function o(){var t=new r.ARRAY_TYPE(3);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function a(t){var e=t[0],n=t[1],i=t[2];return Math.sqrt(e*e+n*n+i*i)}function s(t,e,n){var i=new r.ARRAY_TYPE(3);return i[0]=t,i[1]=e,i[2]=n,i}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function c(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function l(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function h(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(n*n+i*i+r*r)}function p(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return n*n+i*i+r*r}function f(t){var e=t[0],n=t[1],i=t[2];return e*e+n*n+i*i}function d(t,e){var n=e[0],i=e[1],r=e[2],o=n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function g(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}e.sub=u,e.mul=c,e.div=l,e.dist=h,e.sqrDist=p,e.len=a,e.sqrLen=f,e.forEach=(i=o(),function(t,e,n,r,o,a){var s,u=void 0;for(e||(e=3),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,u=n;u=i[0]&&t<=i[1]&&(e=(t-i[0])/(i[1]-i[0]),n=r)})),r.default.pointAt(i[n][0],i[n][1],i[n+1][0],i[n+1][1],e)},e.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var e=this.getTotalLength();if(!(e<=0)){var n,i,o=0,s=[];a.each(t,(function(a,u){t[u+1]&&((n=[])[0]=o/e,i=r.default.length(a[0],a[1],t[u+1][0],t[u+1][1]),o+=i,n[1]=o/e,s.push(n))})),this.set("tCache",s)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.attr().points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(s.default);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(93),r=n(5);e.default={box:function(t){for(var e=[],n=[],i=0;i1||e<0||t.length<2)return null;var n=o(t),r=n.segments,a=n.totalLength;if(0===a)return{x:t[0][0],y:t[0][1]};for(var s=0,u=null,c=0;c=s&&e<=s+f){var d=(e-s)/f;u=i.default.pointAt(h[0],h[1],p[0],p[1],d);break}s+=f}return u},e.angleAtSegments=function(t,e){if(e>1||e<0||t.length<2)return 0;for(var n=o(t),i=n.segments,r=n.totalLength,a=0,s=0,u=0;u=a&&e<=a+p){s=Math.atan2(h[1]-l[1],h[0]-l[0]);break}a+=p}return s},e.distanceAtSegment=function(t,e,n){for(var r=1/0,o=0;o0&&(o.isNil(r)||1===r||(t.globalAlpha=i),this.stroke(t)),this.isFill()&&(o.isNil(a)||1===a?this.fill(t):(t.globalAlpha=a,this.fill(t),t.globalAlpha=i)),this.afterDrawPath(t)},e.prototype.fill=function(t){this._drawText(t,!0)},e.prototype.stroke=function(t){this._drawText(t,!1)},e}(r.default);e.default=s},function(t){t.exports=JSON.parse('{"name":"@antv/g-canvas","version":"0.4.2","description":"A canvas library which providing 2d","main":"lib/index.js","module":"esm/index.js","browser":"dist/g.min.js","types":"lib/index.d.ts","files":["package.json","esm","lib","dist","LICENSE","README.md"],"scripts":{"build":"npm run clean && run-p build:*","build:esm":"tsc -p tsconfig.json --target ES5 --module ESNext --outDir esm","build:cjs":"tsc -p tsconfig.json --target ES5 --module commonjs --outDir lib","build:umd":"webpack --config webpack.config.js --mode production","clean":"rm -rf esm lib dist","coverage":"npm run coverage-generator && npm run coverage-viewer","coverage-generator":"torch --coverage --compile --source-pattern src/*.js,src/**/*.js --opts tests/mocha.opts","coverage-viewer":"torch-coverage","test":"torch --renderer --compile --opts tests/mocha.opts","test-live":"torch --compile --interactive --opts tests/mocha.opts","tsc":"tsc --noEmit","typecheck":"tsc --noEmit","dist":"webpack --config webpack.config.js --mode production"},"repository":{"type":"git","url":"git+https://github.com/antvis/g.git"},"keywords":["util","antv","g"],"publishConfig":{"access":"public"},"author":"https://github.com/orgs/antvis/people","license":"ISC","bugs":{"url":"https://github.com/antvis/g/issues"},"devDependencies":{"@antv/torch":"^1.0.0","less":"^3.9.0","npm-run-all":"^4.1.5","webpack":"^4.26.1","webpack-cli":"^3.1.2"},"homepage":"https://github.com/antvis/g#readme","dependencies":{"@antv/g-base":"^0.4.0","@antv/g-math":"^0.1.1","@antv/gl-matrix":"~2.7.1","@antv/path-util":"~2.0.5","@antv/util":"~2.0.0"},"__npminstall_done":false}')},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n(0).__exportStar(n(100),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n(0).__exportStar(n(102),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(10),o=n(104),a=n(7),s=n(27),u=n(9),c=n(2),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.renderer="canvas",e.autoDraw=!0,e.localRefresh=!0,e.refreshElements=[],e},e.prototype.onCanvasChange=function(t){"attr"!==t&&"sort"!==t&&"changeSize"!==t||(this.set("refreshElements",[this]),this.draw())},e.prototype.getShapeBase=function(){return a},e.prototype.getGroupBase=function(){return s.default},e.prototype.getPixelRatio=function(){return this.get("pixelRatio")||c.getPixelRatio()},e.prototype.getViewRange=function(){var t=this.get("el");return{minX:0,minY:0,maxX:t.width,maxY:t.height}},e.prototype.initEvents=function(){var t=new o.default({canvas:this});t.init(),this.set("eventController",t)},e.prototype.createDom=function(){var t=document.createElement("canvas"),e=t.getContext("2d");return this.set("context",e),t},e.prototype.setDOMSize=function(e,n){t.prototype.setDOMSize.call(this,e,n);var i=this.get("context"),r=this.get("el"),o=this.getPixelRatio();r.width=o*e,r.height=o*n,o>1&&i.scale(o,o)},e.prototype.clear=function(){t.prototype.clear.call(this),this._clearFrame();var e=this.get("context"),n=this.get("el");e.clearRect(0,0,n.width,n.height)},e.prototype._getRefreshRegion=function(){var t,e=this.get("refreshElements");return e.length&&e[0]===this?t=this.getViewRange():(t=u.getMergedRegion(e))&&(t.minX=Math.floor(t.minX-.5),t.minY=Math.floor(t.minY-.5),t.maxX=Math.ceil(t.maxX+.5),t.maxY=Math.ceil(t.maxY+.5)),t},e.prototype.refreshElement=function(t){this.get("refreshElements").push(t)},e.prototype._clearFrame=function(){var t=this.get("drawFrame");t&&(c.clearAnimationFrame(t),this.set("drawFrame",null),this.set("refreshElements",[]))},e.prototype.draw=function(){var t=this.get("drawFrame");this.get("autoDraw")&&t||this._startDraw()},e.prototype._drawAll=function(){var t=this.get("context"),e=this.get("el"),n=this.getChildren();t.clearRect(0,0,e.width,e.height),u.applyAttrsToContext(t,this),u.drawChildren(t,n),this.set("refreshElements",[])},e.prototype._drawRegion=function(){var t=this.get("context"),e=this.getChildren(),n=this._getRefreshRegion();n&&(t.clearRect(n.minX,n.minY,n.maxX-n.minX,n.maxY-n.minY),t.save(),t.beginPath(),t.rect(n.minX,n.minY,n.maxX-n.minX,n.maxY-n.minY),t.clip(),u.applyAttrsToContext(t,this),u.drawChildren(t,e,n),t.restore()),this.set("refreshElements",[])},e.prototype._startDraw=function(){var t=this,e=this.get("drawFrame");e||(e=c.requestAnimationFrame((function(){t.get("localRefresh")?t._drawRegion():t._drawAll(),t.set("drawFrame",null)})),this.set("drawFrame",e))},e.prototype.skipDraw=function(){},e.prototype.destroy=function(){this.get("eventController").destroy(),t.prototype.destroy.call(this)},e}(r.AbstractCanvas);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(105),r=n(34),o=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function a(t,e,n){n.name=e,n.target=t,n.currentTarget=t,n.delegateTarget=t,t.emit(e,n)}function s(t,e,n){if(n.bubbles){var i=void 0,r=!1;if("mouseenter"===e||"dragenter"===e?(i=n.fromShape,r=!0):"mouseleave"!==e&&"dragleave"!==e||(r=!0,i=n.toShape),t.isCanvas()&&r)return;if(i&&function(t,e){if(t.isCanvas())return!0;for(var n=e.getParent(),i=!1;n;){if(n===t){i=!0;break}n=n.getParent()}return i}(t,i))return void(n.bubbles=!1);n.name=e,n.currentTarget=t,n.delegateTarget=t,t.emit(e,n)}}var u=function(){function t(t){var e=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(t){var n=t.type;e._triggerEvent(n,t)},this._onDocumentMove=function(t){if(e.canvas.get("el")!==t.target&&(e.dragging||e.currentShape)){var n=e._getPointInfo(t);e.dragging&&e._emitEvent("drag",t,n,e.draggingShape)}},this._onDocumentMouseUp=function(t){if(e.canvas.get("el")!==t.target&&e.dragging){var n=e._getPointInfo(t);e.draggingShape&&e._emitEvent("drop",t,n,null),e._emitEvent("dragend",t,n,e.draggingShape),e._afterDrag(e.draggingShape,n,t)}},this.canvas=t.canvas}return t.prototype.init=function(){this._bindEvents()},t.prototype._bindEvents=function(){var t=this,e=this.canvas.get("el");r.each(o,(function(n){e.addEventListener(n,t._eventCallback)})),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._clearEvents=function(){var t=this,e=this.canvas.get("el");r.each(o,(function(n){e.removeEventListener(n,t._eventCallback)})),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._getEventObj=function(t,e,n,r,o,a){var s=new i.default(t,e);return s.fromShape=o,s.toShape=a,s.x=n.x,s.y=n.y,s.clientX=n.clientX,s.clientY=n.clientY,s.propagationPath.push(r),s},t.prototype._getShape=function(t,e){return this.canvas.getShape(t.x,t.y,e)},t.prototype._getPointInfo=function(t){var e,n,i=this.canvas,r=(n=e=t,e.touches&&(n="touchend"===e.type?e.changedTouches[0]:e.touches[0]),{clientX:n.clientX,clientY:n.clientY}),o=i.getPointByClient(r.clientX,r.clientY);return{x:o.x,y:o.y,clientX:r.clientX,clientY:r.clientY}},t.prototype._triggerEvent=function(t,e){var n=this._getPointInfo(e),i=this._getShape(n,e),r=this["_on"+t],o=!1;if(r)r.call(this,n,i,e);else{var a=this.currentShape;"mouseenter"===t||"dragenter"===t||"mouseover"===t?(this._emitEvent(t,e,n,null,null,i),i&&this._emitEvent(t,e,n,i,null,i),"mouseenter"===t&&this.draggingShape&&this._emitEvent("dragenter",e,n,null)):"mouseleave"===t||"dragleave"===t||"mouseout"===t?(o=!0,a&&this._emitEvent(t,e,n,a,a,null),this._emitEvent(t,e,n,null,a,null),"mouseleave"===t&&this.draggingShape&&this._emitEvent("dragleave",e,n,null)):this._emitEvent(t,e,n,i,null,null)}if(o||(this.currentShape=i),i&&!i.get("destroyed")){var s=this.canvas;s.get("el").style.cursor=i.attr("cursor")||s.get("cursor")}},t.prototype._onmousedown=function(t,e,n){0===n.button&&(this.mousedownShape=e,this.mousedownPoint=t,this.mousedownTimeStamp=n.timeStamp),this._emitEvent("mousedown",n,t,e,null,null)},t.prototype._emitMouseoverEvents=function(t,e,n,i){var r=this.canvas.get("el");n!==i&&(n&&(this._emitEvent("mouseout",t,e,n,n,i),this._emitEvent("mouseleave",t,e,n,n,i),i&&!i.get("destroyed")||(r.style.cursor=this.canvas.get("cursor"))),i&&(this._emitEvent("mouseover",t,e,i,n,i),this._emitEvent("mouseenter",t,e,i,n,i)))},t.prototype._emitDragoverEvents=function(t,e,n,i,r){i?(i!==n&&(n&&this._emitEvent("dragleave",t,e,n,n,i),this._emitEvent("dragenter",t,e,i,n,i)),r||this._emitEvent("dragover",t,e,i)):n&&this._emitEvent("dragleave",t,e,n,n,i),r&&this._emitEvent("dragover",t,e,i)},t.prototype._afterDrag=function(t,e,n){t&&(t.set("capture",!0),this.draggingShape=null),this.dragging=!1;var i=this._getShape(e,n);i!==t&&this._emitMouseoverEvents(n,e,t,i),this.currentShape=i},t.prototype._onmouseup=function(t,e,n){if(0===n.button){var i=this.draggingShape;this.dragging?(i&&this._emitEvent("drop",n,t,e),this._emitEvent("dragend",n,t,i),this._afterDrag(i,t,n)):(this._emitEvent("mouseup",n,t,e),e===this.mousedownShape&&this._emitEvent("click",n,t,e),this.mousedownShape=null,this.mousedownPoint=null)}},t.prototype._ondragover=function(t,e,n){n.preventDefault();var i=this.currentShape;this._emitDragoverEvents(n,t,i,e,!0)},t.prototype._onmousemove=function(t,e,n){var i=this.canvas,r=this.currentShape,o=this.draggingShape;if(this.dragging)o&&this._emitDragoverEvents(n,t,r,e,!1),this._emitEvent("drag",n,t,o);else{var a=this.mousedownPoint;if(a){var s=this.mousedownShape,u=n.timeStamp-this.mousedownTimeStamp,c=a.clientX-t.clientX,l=a.clientY-t.clientY;u>120||c*c+l*l>40?s&&s.get("draggable")?((o=this.mousedownShape).set("capture",!1),this.draggingShape=o,this.dragging=!0,this._emitEvent("dragstart",n,t,o),this.mousedownShape=null,this.mousedownPoint=null):!s&&i.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",n,t,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(n,t,r,e),this._emitEvent("mousemove",n,t,e)):(this._emitMouseoverEvents(n,t,r,e),this._emitEvent("mousemove",n,t,e))}else this._emitMouseoverEvents(n,t,r,e),this._emitEvent("mousemove",n,t,e)}},t.prototype._emitEvent=function(t,e,n,i,r,o){var u=this._getEventObj(t,e,n,i,r,o);if(i){u.shape=i,a(i,t,u);for(var c=i.getParent();c;)c.emitDelegation(t,u),u.propagationStopped||s(c,t,u),u.propagationPath.push(c),c=c.getParent()}else a(this.canvas,t,u)},t.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}();e.default=i}])},knIs:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.len=e.sqrDist=e.dist=e.div=e.mul=e.sub=void 0,e.create=r,e.clone=function(t){var e=new i.ARRAY_TYPE(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},e.length=o,e.fromValues=a,e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},e.set=function(t,e,n,i){return t[0]=e,t[1]=n,t[2]=i,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t},e.subtract=s,e.multiply=u,e.divide=c,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t},e.scaleAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t},e.distance=l,e.squaredDistance=h,e.squaredLength=p,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},e.normalize=f,e.dot=d,e.cross=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=r*u-o*s,t[1]=o*a-i*u,t[2]=i*s-r*a,t},e.lerp=function(t,e,n,i){var r=e[0],o=e[1],a=e[2];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t},e.hermite=function(t,e,n,i,r,o){var a=o*o,s=a*(2*o-3)+1,u=a*(o-2)+o,c=a*(o-1),l=a*(3-2*o);return t[0]=e[0]*s+n[0]*u+i[0]*c+r[0]*l,t[1]=e[1]*s+n[1]*u+i[1]*c+r[1]*l,t[2]=e[2]*s+n[2]*u+i[2]*c+r[2]*l,t},e.bezier=function(t,e,n,i,r,o){var a=1-o,s=a*a,u=o*o,c=s*a,l=3*o*s,h=3*u*a,p=u*o;return t[0]=e[0]*c+n[0]*l+i[0]*h+r[0]*p,t[1]=e[1]*c+n[1]*l+i[1]*h+r[1]*p,t[2]=e[2]*c+n[2]*l+i[2]*h+r[2]*p,t},e.random=function(t,e){e=e||1;var n=2*i.RANDOM()*Math.PI,r=2*i.RANDOM()-1,o=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*o,t[1]=Math.sin(n)*o,t[2]=r*e,t},e.transformMat4=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[3]*i+n[7]*r+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*i+n[4]*r+n[8]*o+n[12])/a,t[1]=(n[1]*i+n[5]*r+n[9]*o+n[13])/a,t[2]=(n[2]*i+n[6]*r+n[10]*o+n[14])/a,t},e.transformMat3=function(t,e,n){var i=e[0],r=e[1],o=e[2];return t[0]=i*n[0]+r*n[3]+o*n[6],t[1]=i*n[1]+r*n[4]+o*n[7],t[2]=i*n[2]+r*n[5]+o*n[8],t},e.transformQuat=function(t,e,n){var i=n[0],r=n[1],o=n[2],a=n[3],s=e[0],u=e[1],c=e[2],l=r*c-o*u,h=o*s-i*c,p=i*u-r*s,f=r*p-o*h,d=o*l-i*p,g=i*h-r*l,y=2*a;return l*=y,h*=y,p*=y,f*=2,d*=2,g*=2,t[0]=s+l+f,t[1]=u+h+d,t[2]=c+p+g,t},e.rotateX=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0],o[1]=r[1]*Math.cos(i)-r[2]*Math.sin(i),o[2]=r[1]*Math.sin(i)+r[2]*Math.cos(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},e.rotateY=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[2]*Math.sin(i)+r[0]*Math.cos(i),o[1]=r[1],o[2]=r[2]*Math.cos(i)-r[0]*Math.sin(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},e.rotateZ=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0]*Math.cos(i)-r[1]*Math.sin(i),o[1]=r[0]*Math.sin(i)+r[1]*Math.cos(i),o[2]=r[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},e.angle=function(t,e){var n=a(t[0],t[1],t[2]),i=a(e[0],e[1],e[2]);f(n,n),f(i,i);var r=d(n,i);return r>1?0:r<-1?Math.PI:Math.acos(r)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.equals=function(t,e){var n=t[0],r=t[1],o=t[2],a=e[0],s=e[1],u=e[2];return Math.abs(n-a)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(o-u)<=i.EPSILON*Math.max(1,Math.abs(o),Math.abs(u))};var i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n("jWDG"));function r(){var t=new i.ARRAY_TYPE(3);return i.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function o(t){var e=t[0],n=t[1],i=t[2];return Math.sqrt(e*e+n*n+i*i)}function a(t,e,n){var r=new i.ARRAY_TYPE(3);return r[0]=t,r[1]=e,r[2]=n,r}function s(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function u(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function c(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function l(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(n*n+i*i+r*r)}function h(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return n*n+i*i+r*r}function p(t){var e=t[0],n=t[1],i=t[2];return e*e+n*n+i*i}function f(t,e){var n=e[0],i=e[1],r=e[2],o=n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function d(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}var g;e.sub=s,e.mul=u,e.div=c,e.dist=l,e.sqrDist=h,e.len=o,e.sqrLen=p,e.forEach=(g=r(),function(t,e,n,i,r,o){var a=void 0,s=void 0;for(e||(e=3),n||(n=0),s=i?Math.min(i*e+n,t.length):t.length,a=n;a=0&&this.layers.splice(e,1)},e.prototype.updateBBox=function(t,e){void 0===e&&(e=!1);var n={x:this.x,y:this.y,width:this.width,height:this.height},i=Object(F.deepMix)({},n,t);this.x=i.x,this.y=i.y,this.width=i.width,this.height=i.height,this.layerBBox=this.getLayerBBox(),this.layerRegion=this.getLayerRegion(),this.render(),e&&this.eachLayer((function(t){t.updateBBoxByParent(),t.render()})),this.canvas.draw()},e.prototype.updateBBoxByParent=function(){var t=this.layerRegion;this.x=this.parent.x+this.parent.width*t.start.x,this.y=this.parent.y+this.parent.height*t.start.y,this.width=this.parent.width*(t.end.x-t.start.x),this.height=this.parent.height*(t.end.y-t.start.y),this.layerBBox=this.getLayerBBox()},e.prototype.getGlobalPosition=function(){for(var t=this.x,e=this.y,n=this.parent;n;)t+=n.x,e+=n.y,n=n.parent;return{x:t,y:e}},e.prototype.getGlobalBBox=function(){var t=this.getGlobalPosition();return new q(t.x,t.y,this.width,this.height)},e.prototype.getOptions=function(t){var e=0,n=0;t.parent&&(e=t.parent.width,n=t.parent.height);var i={x:0,y:0,width:e,height:n};return Object(F.deepMix)({},i,t)},e.prototype.eachLayer=function(t){Object(F.each)(this.layers,t)},e.prototype.parseEvents=function(t){var e=this,n=Object(F.keys)(Y);Object(F.each)(t,(function(t,i){if(Object(F.contains)(n,i)&&Object(F.isFunction)(t)){var r=Y[i]||i,o=t;e.on(r,o),e.eventHandlers.push({name:r,handler:o})}}))},e.prototype.getLayerBBox=function(){return new q(this.x,this.y,this.width,this.height)},e.prototype.getLayerRegion=function(){if(this.parent){var t=this.parent.width,e=this.parent.height,n=this.parent.x,i=this.parent.y;return{start:{x:(this.x-n)/t,y:(this.y-i)/e},end:{x:(this.x+this.width-n)/t,y:(this.y+this.height-i)/e}}}return{start:{x:0,y:0},end:{x:1,y:1}}},e}(D.a),V=n("kfiF"),W=n("bnPk"),U=n("+fYs"),Q=n("yLks"),Z=n("9f2G"),$=n("jCkq"),K=n.n($),J=n("/OH1"),tt=n.n(J),et=n("nkna"),nt=n.n(et),it=n("kzId"),rt=n.n(it);var ot=n("6JdA"),at=[1,0,0,0,1,0,0,0,1];function st(t,e){return e?Object(ot.b)(at,[["t",-t.x,-t.y],["r",e],["t",t.x,t.y]]):null}function ut(t,e){return t.x||t.y?Object(ot.b)(e||at,[["t",t.x,t.y]]):null}function ct(t,e){var n=[];return ot.c.transformMat3(n,e,t),n}function lt(t){var e=0,n=0,i=0,r=0;return Object(F.isNumber)(t)?e=n=i=r=t:Object(F.isArray)(t)&&(e=t[0],i=Object(F.isNil)(t[1])?t[0]:t[1],r=Object(F.isNil)(t[2])?t[0]:t[2],n=Object(F.isNil)(t[3])?i:t[3]),[e,i,r,n]}function ht(t){for(var e=t.childNodes,n=e.length-1;n>=0;n--)t.removeChild(e[n])}function pt(t){var e=t.start,n=t.end,i=Math.min(e.x,n.x),r=Math.min(e.y,n.y),o=Math.max(e.x,n.x),a=Math.max(e.y,n.y);return{x:i,y:r,minX:i,minY:r,maxX:o,maxY:a,width:o-i,height:a-r}}function ft(t,e,n,i){return{x:t,y:e,width:n,height:i,minX:t,minY:e,maxX:t+n,maxY:e+i}}function dt(t,e,n){return(1-n)*t+e*n}function gt(t,e,n){return{x:t.x+Math.cos(n)*e,y:t.y+Math.sin(n)*e}}function yt(t){var e,n,i,r,o,a=t.getClip(),s=a&&a.getBBox();if(t.isGroup()){var u=1/0,c=-1/0,l=1/0,h=-1/0,p=t.getChildren();p.length>0?Object(F.each)(p,(function(t){if(t.get("visible")){if(t.isGroup()&&0===t.get("children").length)return!0;var e=yt(t),n=t.applyToMatrix([e.minX,e.minY,1]),i=t.applyToMatrix([e.minX,e.maxY,1]),r=t.applyToMatrix([e.maxX,e.minY,1]),o=t.applyToMatrix([e.maxX,e.maxY,1]),a=Math.min(n[0],i[0],r[0],o[0]),s=Math.max(n[0],i[0],r[0],o[0]),p=Math.min(n[1],i[1],r[1],o[1]),f=Math.max(n[1],i[1],r[1],o[1]);ac&&(c=s),ph&&(h=f)}})):(u=0,c=0,l=0,h=0),e=ft(u,l,c-u,h-l)}else e=t.getBBox();return s?(n=e,i=s,r=Math.max(n.minX,i.minX),o=Math.max(n.minY,i.minY),ft(r,o,Math.min(n.maxX,i.maxX)-r,Math.min(n.maxY,i.maxY)-o)):e}var vt=n("aFU3"),mt={none:[],point:["x","y"],region:["start","end"],points:["points"],circle:["center","radius","startAngle","endAngle"]},xt=function(t){function e(e){var n=t.call(this,e)||this;return n.initCfg(),n}return Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){return{id:"",name:"",type:"",locationType:"none",offsetX:0,offsetY:0,animate:!1,capture:!0,updateAutoRender:!1,animateOption:{appear:null,update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},events:null,defaultCfg:{},visible:!0}},e.prototype.clear=function(){},e.prototype.update=function(t){var e=this,n=this.get("defaultCfg");Object(F.each)(t,(function(t,i){var r=t;e.get(i)!==t&&(Object(F.isObject)(t)&&n[i]&&(r=Object(F.deepMix)({},n[i],t)),e.set(i,r))})),Object(F.hasKey)(t,"visible")&&(t.visible?this.show():this.hide()),Object(F.hasKey)(t,"capture")&&this.setCapture(t.capture)},e.prototype.getLayoutBBox=function(){return this.getBBox()},e.prototype.getLocationType=function(){return this.get("locationType")},e.prototype.getOffset=function(){return{offsetX:this.get("offsetX"),offsetY:this.get("offsetY")}},e.prototype.setOffset=function(t,e){this.update({offsetX:t,offsetY:e})},e.prototype.setLocation=function(t){var e=Object(L.__assign)({},t);this.update(e)},e.prototype.getLocation=function(){var t=this,e={},n=this.get("locationType"),i=mt[n];return Object(F.each)(i,(function(n){e[n]=t.get(n)})),e},e.prototype.isList=function(){return!1},e.prototype.isSlider=function(){return!1},e.prototype.init=function(){},e.prototype.initCfg=function(){var t=this,e=this.get("defaultCfg");Object(F.each)(e,(function(e,n){var i=t.get(n);if(Object(F.isObject)(i)){var r=Object(F.deepMix)({},e,i);t.set(n,r)}}))},e}(vt.Base),bt=["visible","tip","delegateObject"],Mt=["container","group","shapesMap","isRegister","isUpdating","destroyed"],_t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{container:null,shapesMap:{},group:null,capture:!0,isRegister:!1,isUpdating:!1,isInit:!0})},e.prototype.remove=function(){this.clear(),this.get("group").remove()},e.prototype.clear=function(){this.get("group").clear(),this.set("shapesMap",{}),this.clearOffScreenCache(),this.set("isInit",!0)},e.prototype.getChildComponentById=function(t){var e=this.getElementById(t);return e&&e.get("component")},e.prototype.getElementById=function(t){return this.get("shapesMap")[t]},e.prototype.getElementByLocalId=function(t){var e=this.getElementId(t);return this.getElementById(e)},e.prototype.getElementsByName=function(t){var e=[];return Object(F.each)(this.get("shapesMap"),(function(n){n.get("name")===t&&e.push(n)})),e},e.prototype.getContainer=function(){return this.get("container")},e.prototype.update=function(e){t.prototype.update.call(this,e),this.offScreenRender(),this.get("updateAutoRender")&&this.render()},e.prototype.render=function(){var t=this.get("offScreenGroup");t||(t=this.offScreenRender());var e=this.get("group");this.updateElements(t,e),this.deleteElements(),this.applyOffset(),this.get("eventInitted")||(this.initEvent(),this.set("eventInitted",!0)),this.set("isInit",!1)},e.prototype.show=function(){this.get("group").show(),this.set("visible",!0)},e.prototype.hide=function(){this.get("group").hide(),this.set("visible",!1)},e.prototype.setCapture=function(t){this.get("group").set("capture",t),this.set("capture",t)},e.prototype.destroy=function(){this.removeEvent(),this.remove(),t.prototype.destroy.call(this)},e.prototype.getBBox=function(){return this.get("group").getCanvasBBox()},e.prototype.getLayoutBBox=function(){var t=this.get("group"),e=this.getInnerLayoutBBox(),n=t.getTotalMatrix();return n&&(e=function(t,e){var n=ct(t,[e.minX,e.minY]),i=ct(t,[e.maxX,e.minY]),r=ct(t,[e.minX,e.maxY]),o=ct(t,[e.maxX,e.maxY]),a=Math.min(n[0],i[0],r[0],o[0]),s=Math.max(n[0],i[0],r[0],o[0]),u=Math.min(n[1],i[1],r[1],o[1]),c=Math.max(n[1],i[1],r[1],o[1]);return{x:a,y:u,minX:a,minY:u,maxX:s,maxY:c,width:s-a,height:c-u}}(n,e)),e},e.prototype.on=function(t,e,n){return this.get("group").on(t,e,n),this},e.prototype.off=function(t,e){var n=this.get("group");return n&&n.off(t,e),this},e.prototype.emit=function(t,e){this.get("group").emit(t,e)},e.prototype.init=function(){t.prototype.init.call(this),this.get("group")||this.initGroup(),this.offScreenRender()},e.prototype.getInnerLayoutBBox=function(){return this.get("offScreenBBox")||this.get("group").getBBox()},e.prototype.delegateEmit=function(t,e){var n=this.get("group");e.target=n,n.emit(t,e),function(t,e,n){var i=new rt.a(e,n);i.target=t,i.propagationPath.push(t),t.emitDelegation(e,i);for(var r=t.getParent();r;)r.emitDelegation(e,i),i.propagationPath.push(r),r=r.getParent()}(n,t,e)},e.prototype.createOffScreenGroup=function(){return new(this.get("group").getGroupBase())({delegateObject:this.getDelegateObject()})},e.prototype.applyOffset=function(){var t=this.get("offsetX"),e=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t,y:e})},e.prototype.initGroup=function(){var t=this.get("container");this.set("group",t.addGroup({id:this.get("id"),name:this.get("name"),capture:this.get("capture"),visible:this.get("visible"),isComponent:!0,component:this,delegateObject:this.getDelegateObject()}))},e.prototype.offScreenRender=function(){this.clearOffScreenCache();var t=this.createOffScreenGroup();return this.renderInner(t),this.set("offScreenGroup",t),this.set("offScreenBBox",yt(t)),t},e.prototype.addGroup=function(t,e){this.appendDelegateObject(t,e);var n=t.addGroup(e);return this.get("isRegister")&&this.registerElement(n),n},e.prototype.addShape=function(t,e){this.appendDelegateObject(t,e);var n=t.addShape(e);return this.get("isRegister")&&this.registerElement(n),n},e.prototype.addComponent=function(t,e){var n=e.id,i=e.component,r=Object(L.__rest)(e,["id","component"]),o=new i(Object(L.__assign)(Object(L.__assign)({},r),{id:n,container:t,updateAutoRender:this.get("updateAutoRender")}));return o.init(),o.render(),this.get("isRegister")&&this.registerElement(o.get("group")),o},e.prototype.initEvent=function(){},e.prototype.removeEvent=function(){this.get("group").off()},e.prototype.getElementId=function(t){return this.get("id")+"-"+this.get("name")+"-"+t},e.prototype.registerElement=function(t){var e=t.get("id");this.get("shapesMap")[e]=t},e.prototype.unregisterElement=function(t){var e=t.get("id");delete this.get("shapesMap")[e]},e.prototype.moveElementTo=function(t,e){var n=ut(e);t.attr("matrix",n)},e.prototype.addAnimation=function(t,e,n){var i=e.attr("opacity");Object(F.isNil)(i)&&(i=1),e.attr("opacity",0),e.animate({opacity:i},n)},e.prototype.removeAnimation=function(t,e,n){e.animate({opacity:0},n)},e.prototype.updateAnimation=function(t,e,n,i){e.animate(n,i)},e.prototype.updateElements=function(t,e){var n,i=this,r=this.get("animate"),o=this.get("animateOption"),a=t.getChildren().slice(0);Object(F.each)(a,(function(t){var a=t.get("id"),s=i.getElementById(a),u=t.get("name");if(s)if(t.get("isComponent")){var c=t.get("component"),l=s.get("component"),h=Object(F.pick)(c.cfg,Object(F.difference)(Object(F.keys)(c.cfg),Mt));l.update(h),s.set("update_status","update")}else{var p=i.getReplaceAttrs(s,t);r&&o.update?i.updateAnimation(u,s,p,o.update):s.attr(p),t.isGroup()&&i.updateElements(t,s),Object(F.each)(bt,(function(e){s.set(e,t.get(e))})),function(t,e){if(t.getClip()||e.getClip()){var n=e.getClip();if(n){var i={type:n.get("type"),attrs:n.attr()};t.setClip(i)}else t.setClip(null)}}(s,t),n=s,s.set("update_status","update")}else{e.add(t);var f=e.getChildren();if(f.splice(f.length-1,1),n){var d=f.indexOf(n);f.splice(d+1,0,t)}else f.unshift(t);if(i.registerElement(t),t.set("update_status","add"),t.get("isComponent"))(c=t.get("component")).set("container",e);else t.isGroup()&&i.registerNewGroup(t);if(n=t,r){var g=i.get("isInit")?o.appear:o.enter;g&&i.addAnimation(u,t,g)}}}))},e.prototype.clearUpdateStatus=function(t){var e=t.getChildren();Object(F.each)(e,(function(t){t.set("update_status",null)}))},e.prototype.clearOffScreenCache=function(){var t=this.get("offScreenGroup");t&&t.destroy(),this.set("offScreenGroup",null),this.set("offScreenBBox",null)},e.prototype.getDelegateObject=function(){var t;return(t={})[this.get("name")]=this,t.component=this,t},e.prototype.appendDelegateObject=function(t,e){var n=t.get("delegateObject");e.delegateObject||(e.delegateObject={}),Object(F.mix)(e.delegateObject,n)},e.prototype.getReplaceAttrs=function(t,e){var n=t.attr(),i=e.attr();return Object(F.each)(n,(function(t,e){void 0===i[e]&&(i[e]=void 0)})),i},e.prototype.registerNewGroup=function(t){var e=this,n=t.getChildren();Object(F.each)(n,(function(t){e.registerElement(t),t.set("update_status","add"),t.isGroup()&&e.registerNewGroup(t)}))},e.prototype.deleteElements=function(){var t=this,e=this.get("shapesMap"),n=[];Object(F.each)(e,(function(t,e){!t.get("update_status")||t.destroyed?n.push([e,t]):t.set("update_status",null)}));var i=this.get("animate"),r=this.get("animateOption");Object(F.each)(n,(function(n){var o=n[0],a=n[1];if(!a.destroyed){var s=a.get("name");if(i&&r.leave){var u=Object(F.mix)({callback:function(){t.removeElement(a)}},r.leave);t.removeAnimation(s,a,u)}else t.removeElement(a)}delete e[o]}))},e.prototype.removeElement=function(t){if(t.get("isGroup")){var e=t.get("component");e&&e.destroy()}t.remove()},e}(xt),wt={fontFamily:'\n "-apple-system", BlinkMacSystemFont, "Segoe UI", Roboto,"Helvetica Neue",\n Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",\n SimSun, "sans-serif"',textColor:"#2C3542",activeTextColor:"#333333",uncheckedColor:"#D8D8D8",lineColor:"#416180",regionColor:"#CCD7EB",verticalAxisRotate:-Math.PI/4,horizontalAxisRotate:Math.PI/4};(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{name:"annotation",type:"line",locationType:"region",start:null,end:null,style:{},text:null,defaultCfg:{style:{fill:wt.textColor,fontSize:12,textAlign:"center",textBaseline:"bottom",fontFamily:wt.fontFamily},text:{position:"center",autoRotate:!0,content:null,offsetX:0,offsetY:0,style:{stroke:wt.lineColor,lineWidth:1}}}})},e.prototype.renderInner=function(t){this.renderLine(t),this.get("text")&&this.renderLabel(t)},e.prototype.renderLine=function(t){var e=this.get("start"),n=this.get("end"),i=this.get("style");this.addShape(t,{type:"line",id:this.getElementId("line"),name:"annotation-line",attrs:Object(L.__assign)({x1:e.x,y1:e.y,x2:n.x,y2:n.y},i)})},e.prototype.getLabelPoint=function(t,e,n){var i;return((i="start"===n?0:"center"===n?.5:Object(F.isString)(n)&&-1!==n.indexOf("%")?parseInt(n,10)/100:Object(F.isNumber)(n)?n:1)>1||i<0)&&(i=1),{x:dt(t.x,e.x,i),y:dt(t.y,e.y,i)}},e.prototype.renderLabel=function(t){var e=this.get("text"),n=this.get("start"),i=this.get("end"),r=e.position,o=e.content,a=e.style,s=e.offsetX,u=e.offsetY,c=e.autoRotate,l=this.getLabelPoint(n,i,r),h=Object(L.__assign)({x:l.x+s,y:l.y+u,text:o},a);if(c){var p=[i.x-n.x,i.y-n.y],f=st(l,Math.atan2(p[1],p[0]));h.matrix=f}this.addShape(t,{type:"text",id:this.getElementId("line-text"),name:"annotation-line-text",attrs:h})}})(_t),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{name:"annotation",type:"text",locationType:"point",x:0,y:0,content:"",rotate:null,style:{},defaultCfg:{style:{fill:wt.textColor,fontSize:12,textAlign:"center",textBaseline:"middle",fontFamily:wt.fontFamily}}})},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},e.prototype.renderInner=function(t){this.renderText(t)},e.prototype.renderText=function(t){var e=this.getLocation(),n=e.x,i=e.y,r=this.get("content"),o=this.get("style"),a=this.addShape(t,{type:"text",id:this.getElementId("text"),name:"annotation-text",attrs:Object(L.__assign)({x:n,y:i,text:r},o)});this.applyRotate(a,n,i)},e.prototype.applyRotate=function(t,e,n){var i=this.get("rotate"),r=null;i&&(r=st({x:e,y:n},i)),t.attr("matrix",r)},e.prototype.resetLocation=function(){var t=this.getElementByLocalId("text");if(t){var e=this.getLocation(),n=e.x,i=e.y;t.attr({x:n,y:i}),this.applyRotate(t,n,i)}}}(_t),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{name:"annotation",type:"arc",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:3*Math.PI/2,style:{stroke:"#999",lineWidth:1}})},e.prototype.renderInner=function(t){this.renderArc(t)},e.prototype.getArcPath=function(){var t=this.getLocation(),e=t.center,n=t.radius,i=t.startAngle,r=t.endAngle,o=gt(e,n,i),a=gt(e,n,r),s=r-i>Math.PI?1:0,u=[["M",o.x,o.y]];if(r-i==2*Math.PI){var c=gt(e,n,i+Math.PI);u.push(["A",n,n,0,s,1,c.x,c.y]),u.push(["A",n,n,0,s,1,a.x,a.y])}else u.push(["A",n,n,0,s,1,a.x,a.y]);return u},e.prototype.renderArc=function(t){var e=this.getArcPath(),n=this.get("style");this.addShape(t,{type:"path",id:this.getElementId("arc"),name:"annotation-arc",attrs:Object(L.__assign)({path:e},n)})}}(_t),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{name:"annotation",type:"region",locationType:"region",start:null,end:null,style:{},defaultCfg:{style:{lineWidth:0,fill:wt.regionColor,opacity:.4}}})},e.prototype.renderInner=function(t){this.renderRegion(t)},e.prototype.renderRegion=function(t){var e=this.get("start"),n=this.get("end"),i=this.get("style"),r=pt({start:e,end:n});this.addShape(t,{type:"rect",id:this.getElementId("region"),name:"annotation-region",attrs:Object(L.__assign)({x:r.x,y:r.y,width:r.width,height:r.height},i)})}}(_t),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{name:"annotation",type:"image",locationType:"region",start:null,end:null,src:null,style:{}})},e.prototype.renderInner=function(t){this.renderImage(t)},e.prototype.getImageAttrs=function(){var t=this.get("start"),e=this.get("end"),n=this.get("style"),i=pt({start:t,end:e}),r=this.get("src");return Object(L.__assign)({x:i.x,y:i.y,img:r,width:i.width,height:i.height},n)},e.prototype.renderImage=function(t){this.addShape(t,{type:"image",id:this.getElementId("image"),name:"annotation-image",attrs:this.getImageAttrs()})}}(_t),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{name:"annotation",type:"dataMarker",locationType:"point",x:0,y:0,point:{},line:{},text:{},direction:"upward",autoAdjust:!0,coordinateBBox:null,defaultCfg:{point:{display:!0,style:{r:3,fill:"#FFFFFF",stroke:"#1890FF",lineWidth:2}},line:{display:!0,length:20,style:{stroke:wt.lineColor,lineWidth:1}},text:{content:"",display:!0,style:{fill:wt.textColor,opacity:.65,fontSize:12,textAlign:"start",fontFamily:wt.fontFamily}}}})},e.prototype.renderInner=function(t){Object(F.get)(this.get("line"),"display")&&this.renderLine(t),Object(F.get)(this.get("text"),"display")&&this.renderText(t),Object(F.get)(this.get("point"),"display")&&this.renderPoint(t),this.get("autoAdjust")&&this.autoAdjust(t)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x")+this.get("offsetX"),y:this.get("y")+this.get("offsetY")})},e.prototype.renderPoint=function(t){var e=this.getShapeAttrs().point;this.addShape(t,{type:"circle",id:this.getElementId("point"),name:"annotation-point",attrs:e})},e.prototype.renderLine=function(t){var e=this.getShapeAttrs().line;this.addShape(t,{type:"path",id:this.getElementId("line"),name:"annotation-line",attrs:e})},e.prototype.renderText=function(t){var e=this.getShapeAttrs().text;this.addShape(t,{type:"text",id:this.getElementId("text"),name:"annotation-text",attrs:e})},e.prototype.autoAdjust=function(t){var e=this.get("direction"),n=this.get("x"),i=this.get("y"),r=Object(F.get)(this.get("line"),"length",0),o=this.get("coordinateBBox"),a=t.getBBox(),s=a.minX,u=a.maxX,c=a.minY,l=a.maxY,h=t.findById(this.getElementId("text")),p=t.findById(this.getElementId("line"));if(o&&(h&&(n+s<=o.minX&&h.attr("textAlign","start"),n+u>=o.maxX&&h.attr("textAlign","end")),"upward"===e&&i+c<=o.minY||"upward"!==e&&i+l>=o.maxY)){var f=void 0,d=void 0;"upward"===e&&i+c<=o.minY?(f="top",d=1):(f="bottom",d=-1),h.attr("textBaseline",f),p&&p.attr("path",[["M",0,0],["L",0,r*d]]),h.attr("y",(r+2)*d)}},e.prototype.getShapeAttrs=function(){var t=Object(F.get)(this.get("line"),"display"),e=Object(F.get)(this.get("point"),"style",{}),n=Object(F.get)(this.get("line"),"style",{}),i=Object(F.get)(this.get("text"),"style",{}),r=this.get("direction"),o=t?Object(F.get)(this.get("line"),"length",0):0,a="upward"===r?-1:1;return{point:Object(L.__assign)({x:0,y:0},e),line:Object(L.__assign)({path:[["M",0,0],["L",0,o*a]]},n),text:Object(L.__assign)({x:0,y:(o+2)*a,text:Object(F.get)(this.get("text"),"content",""),textBaseline:"upward"===r?"bottom":"top"},i)}}}(_t),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{name:"annotation",type:"dataRegion",locationType:"points",points:[],lineLength:0,region:{},text:{},defaultCfg:{region:{style:{lineWidth:0,fill:wt.regionColor,opacity:.4}},text:{content:"",style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:wt.textColor,fontFamily:wt.fontFamily}}}})},e.prototype.renderInner=function(t){var e=Object(F.get)(this.get("region"),"style",{}),n=Object(F.get)(this.get("text"),"style",{}),i=this.get("lineLength")||0,r=this.get("points");if(r.length){var o=function(t){var e=t.map((function(t){return t.x})),n=t.map((function(t){return t.y})),i=Math.min.apply(Math,e),r=Math.min.apply(Math,n),o=Math.max.apply(Math,e),a=Math.max.apply(Math,n);return{x:i,y:r,minX:i,minY:r,maxX:o,maxY:a,width:o-i,height:a-r}}(r),a=[];a.push(["M",r[0].x,o.minY-i]),r.forEach((function(t){a.push(["L",t.x,t.y])})),a.push(["L",r[r.length-1].x,r[r.length-1].y-i]),this.addShape(t,{type:"path",id:this.getElementId("region"),name:"annotation-region",attrs:Object(L.__assign)({path:a},e)}),this.addShape(t,{type:"text",id:this.getElementId("text"),name:"annotation-text",attrs:Object(L.__assign)({x:(o.minX+o.maxX)/2,y:o.minY-i,text:Object(F.get)(this.get("text"),"content","")},n)})}}}(_t),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{name:"annotation",type:"regionFilter",locationType:"region",start:null,end:null,color:null,shape:[]})},e.prototype.renderInner=function(t){var e=this,n=this.get("start"),i=this.get("end"),r=this.addGroup(t,{id:this.getElementId("region-filter"),capture:!1});Object(F.each)(this.get("shapes"),(function(t,n){var i=t.get("type"),o=Object(F.clone)(t.attr());e.adjustShapeAttrs(o),e.addShape(r,{id:e.getElementId("shape-"+i+"-"+n),capture:!1,type:i,attrs:o})}));var o=pt({start:n,end:i});r.setClip({type:"rect",attrs:{x:o.minX,y:o.minY,width:o.width,height:o.height}})},e.prototype.adjustShapeAttrs=function(t){var e=this.get("color");t.fill&&(t.fill=t.fillStyle=e),t.stroke=t.strokeStyle=e}}(_t);function Ot(t,e,n){var i=e+"Style",r=null;return Object(F.each)(n,(function(e,n){t[n]&&e[i]&&(r||(r={}),Object(F.mix)(r,e[i]))})),r}var Ct=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{name:"axis",ticks:[],line:{},tickLine:{},subTickLine:null,title:null,label:{},verticalFactor:1,verticalLimitLength:null,overlapOrder:["autoRotate","autoEllipsis","autoHide"],tickStates:{},defaultCfg:{line:{style:{lineWidth:1,stroke:wt.lineColor}},tickLine:{style:{lineWidth:1,stroke:wt.lineColor},alignTick:!0,length:5,displayWithLabel:!0},subTickLine:{style:{lineWidth:1,stroke:wt.lineColor},count:4,length:2},label:{autoRotate:!0,autoHide:!1,autoEllipsis:!1,style:{fontSize:12,fill:wt.textColor,textBaseline:"middle",fontFamily:wt.fontFamily,fontWeight:"normal"},offset:10},title:{autoRotate:!0,spacing:5,position:"center",style:{fontSize:12,fill:wt.textColor,textBaseline:"middle",fontFamily:wt.fontFamily,textAlign:"center"},offset:48},tickStates:{active:{labelStyle:{fontWeight:500},tickLineStyle:{lineWidth:2}},inactive:{labelStyle:{fill:wt.uncheckedColor}}}}})},e.prototype.renderInner=function(t){this.get("line")&&this.drawLine(t),this.drawTicks(t),this.get("title")&&this.drawTitle(t)},e.prototype.isList=function(){return!0},e.prototype.getItems=function(){return this.get("ticks")},e.prototype.setItems=function(t){this.update({ticks:t})},e.prototype.updateItem=function(t,e){Object(F.mix)(t,e),this.clear(),this.render()},e.prototype.clearItems=function(){var t=this.getElementByLocalId("label-group");t&&t.clear()},e.prototype.setItemState=function(t,e,n){t[e]=n,this.updateTickStates(t)},e.prototype.hasState=function(t,e){return!!t[e]},e.prototype.getItemStates=function(t){var e=this.get("tickStates"),n=[];return Object(F.each)(e,(function(e,i){t[i]&&n.push(i)})),n},e.prototype.clearItemsState=function(t){var e=this,n=this.getItemsByState(t);Object(F.each)(n,(function(n){e.setItemState(n,t,!1)}))},e.prototype.getItemsByState=function(t){var e=this,n=this.getItems();return Object(F.filter)(n,(function(n){return e.hasState(n,t)}))},e.prototype.getSidePoint=function(t,e){var n=this.getSideVector(e,t);return{x:t.x+n[0],y:t.y+n[1]}},e.prototype.getTextAnchor=function(t){var e;return Object(F.isNumberEqual)(t[0],0)?e="center":t[0]>0?e="start":t[0]<0&&(e="end"),e},e.prototype.processOverlap=function(t){},e.prototype.drawLine=function(t){var e=this.getLinePath(),n=this.get("line");this.addShape(t,{type:"path",id:this.getElementId("line"),name:"axis-line",attrs:Object(F.mix)({path:e},n.style)})},e.prototype.getTickLineItems=function(t){var e=this,n=[],i=this.get("tickLine"),r=i.alignTick,o=i.length,a=1;return t.length>=2&&(a=t[1].value-t[0].value),Object(F.each)(t,(function(t){var i=t.point;r||(i=e.getTickPoint(t.value-a/2));var s=e.getSidePoint(i,o);n.push({startPoint:i,tickValue:t.value,endPoint:s,tickId:t.id,id:"tickline-"+t.id})})),n},e.prototype.getSubTickLineItems=function(t){var e=[],n=this.get("subTickLine"),i=n.count,r=t.length;if(r>=2)for(var o=0;o0&&t.charCodeAt(e)<128?1:2}function jt(t,e,n,i){var r=e.attr("text"),o=function(t,e){var n=e.getCanvasBBox();return t?n.width:n.height}(t,e),a=function(t){for(var e=0,n=0;n=0?function(t,e,n){var i=t.length,r="";if("tail"===n){for(var o=0,a=0;o1){c=Math.ceil(c);for(var h=0;hn:a=o>Math.abs(r[1].attr("x")-r[0].attr("x"));a&&function(t,e){Object(F.each)(t,(function(t){var n=st({x:t.attr("x"),y:t.attr("y")},e);t.attr("matrix",n)}))}(r,i(n,o));return a}function Ht(){return Vt}function Vt(t,e,n){return qt(t,e,n,(function(){return t?wt.verticalAxisRotate:wt.horizontalAxisRotate}))}function Wt(t,e,n){return qt(t,e,n,(function(e,n){if(!e)return t?wt.verticalAxisRotate:wt.horizontalAxisRotate;if(t)return-Math.acos(e/n);var i=0;return e>n?i=Math.PI/4:(i=Math.asin(e/n))>Math.PI/4&&(i=Math.PI/4),i}))}var Ut=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{type:"line",locationType:"region",start:null,end:null})},e.prototype.getLinePath=function(){var t=this.get("start"),e=this.get("end"),n=[];return n.push(["M",t.x,t.y]),n.push(["L",e.x,e.y]),n},e.prototype.getInnerLayoutBBox=function(){var e=this.get("start"),n=this.get("end"),i=t.prototype.getInnerLayoutBBox.call(this),r=Math.min(e.x,n.x,i.x),o=Math.min(e.y,n.y,i.y),a=Math.max(e.x,n.x,i.maxX),s=Math.max(e.y,n.y,i.maxY);return{x:r,y:o,minX:r,minY:o,maxX:a,maxY:s,width:a-r,height:s-o}},e.prototype.isVertical=function(){var t=this.get("start"),e=this.get("end");return Object(F.isNumberEqual)(t.x,e.x)},e.prototype.isHorizontal=function(){var t=this.get("start"),e=this.get("end");return Object(F.isNumberEqual)(t.y,e.y)},e.prototype.getTickPoint=function(t){var e=this.get("start"),n=this.get("end"),i=n.x-e.x,r=n.y-e.y;return{x:e.x+i*t,y:e.y+r*t}},e.prototype.getSideVector=function(t){var e=this.getAxisVector(),n=ot.c.normalize([],e),i=this.get("verticalFactor"),r=[n[1],-1*n[0]];return ot.c.scale([],r,t*i)},e.prototype.getAxisVector=function(){var t=this.get("start"),e=this.get("end");return[e.x-t.x,e.y-t.y]},e.prototype.processOverlap=function(t){var e=this,n=this.isVertical(),i=this.isHorizontal();if(n||i){var r=this.get("label"),o=this.get("title"),a=this.get("verticalLimitLength"),s=r.offset,u=a,c=0,l=0;o&&(c=o.style.fontSize,l=o.spacing),u&&(u=u-s-l-c);var h=this.get("overlapOrder");if(Object(F.each)(h,(function(n){r[n]&&e.autoProcessOverlap(n,r[n],t,u)})),o){var p=t.getBBox(),f=n?p.width:p.height;o.offset=s+f+l+c/2}}},e.prototype.autoProcessOverlap=function(t,e,n,i){var r=this,o=this.isVertical(),s=!1,u=a[t];if(!0===e?s=u.getDefault()(o,n,i):Object(F.isFunction)(e)?s=e(o,n,i):u[e]&&(s=u[e](o,n,i)),"autoRotate"===t){if(s){var c=n.getChildren(),l=this.get("verticalFactor");Object(F.each)(c,(function(t){if("center"===t.attr("textAlign")){var e=l>0?"end":"start";t.attr("textAlign",e)}}))}}else if("autoHide"===t){var h=n.getChildren().slice(0);Object(F.each)(h,(function(t){t.get("visible")||(r.get("isRegister")&&r.unregisterElement(t),t.remove())}))}},e}(Ct),Qt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{type:"circle",locationType:"circle",center:null,radius:null,startAngle:-Math.PI/2,endAngle:3*Math.PI/2})},e.prototype.getLinePath=function(){var t=this.get("center"),e=t.x,n=t.y,i=this.get("radius"),r=i,o=this.get("startAngle"),a=this.get("endAngle"),s=[];if(Math.abs(a-o)===2*Math.PI)s=[["M",e,n-r],["A",i,r,0,1,1,e,n+r],["A",i,r,0,1,1,e,n-r],["Z"]];else{var u=this.getCirclePoint(o),c=this.getCirclePoint(a),l=Math.abs(a-o)>Math.PI?1:0,h=o>a?0:1;s=[["M",e,n],["L",u.x,u.y],["A",i,r,0,l,h,c.x,c.y],["L",e,n]]}return s},e.prototype.getTickPoint=function(t){var e=this.get("startAngle"),n=e+(this.get("endAngle")-e)*t;return this.getCirclePoint(n)},e.prototype.getSideVector=function(t,e){var n=this.get("center"),i=[e.x-n.x,e.y-n.y],r=this.get("verticalFactor"),o=ot.c.length(i);return ot.c.scale(i,i,r*t/o),i},e.prototype.getAxisVector=function(t){var e=this.get("center"),n=[t.x-e.x,t.y-e.y];return[n[1],-1*n[0]]},e.prototype.getCirclePoint=function(t,e){var n=this.get("center");return e=e||this.get("radius"),{x:n.x+Math.cos(t)*e,y:n.y+Math.sin(t)*e}},e}(Ct),Zt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{name:"crosshair",type:"base",line:{},text:null,textBackground:{},capture:!1,defaultCfg:{line:{style:{lineWidth:1,stroke:wt.lineColor}},text:{position:"start",offset:10,autoRotate:!1,content:null,style:{fill:wt.textColor,textAlign:"center",textBaseline:"middle",fontFamily:wt.fontFamily}},textBackground:{padding:5,style:{stroke:wt.lineColor}}}})},e.prototype.renderInner=function(t){this.get("line")&&this.renderLine(t),this.get("text")&&(this.renderText(t),this.renderBackground(t))},e.prototype.renderText=function(t){var e=this.get("text"),n=e.style,i=e.autoRotate,r=e.content;if(!Object(F.isNil)(r)){var o=this.getTextPoint(),a=null;if(i)a=st(o,this.getRotateAngle());this.addShape(t,{type:"text",name:"crosshair-text",id:this.getElementId("text"),attrs:Object(L.__assign)(Object(L.__assign)(Object(L.__assign)({},o),{text:r,matrix:a}),n)})}},e.prototype.renderLine=function(t){var e=this.getLinePath(),n=this.get("line").style;this.addShape(t,{type:"path",name:"crosshair-line",id:this.getElementId("line"),attrs:Object(L.__assign)({path:e},n)})},e.prototype.renderBackground=function(t){var e=this.getElementId("text"),n=t.findById(e),i=this.get("textBackground");if(i&&n){var r=n.getBBox(),o=lt(i.padding),a=i.style;this.addShape(t,{type:"rect",name:"crosshair-text-background",id:this.getElementId("text-background"),attrs:Object(L.__assign)({x:r.x-o[3],y:r.y-o[0],width:r.width+o[1]+o[3],height:r.height+o[0]+o[2],matrix:n.attr("matrix")},a)}).toBack()}},e}(_t),$t=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{type:"line",locationType:"region",start:null,end:null})},e.prototype.getRotateAngle=function(){var t=this.getLocation(),e=t.start,n=t.end,i=this.get("text").position,r=Math.atan2(n.y-e.y,n.x-e.x);return"start"===i?r-Math.PI/2:r+Math.PI/2},e.prototype.getTextPoint=function(){var t,e,n,i,r=this.getLocation(),o=r.start,a=r.end,s=this.get("text"),u=s.position,c=s.offset/(t=o,n=(e=a).x-t.x,i=e.y-t.y,Math.sqrt(n*n+i*i)),l=0;return"start"===u?l=0-c:"end"===u&&(l=1+c),{x:dt(o.x,a.x,l),y:dt(o.y,a.y,l)}},e.prototype.getLinePath=function(){var t=this.getLocation(),e=t.start,n=t.end;return[["M",e.x,e.y],["L",n.x,n.y]]}}(Zt),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{type:"circle",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:3*Math.PI/2})},e.prototype.getRotateAngle=function(){var t=this.getLocation(),e=t.startAngle,n=t.endAngle;return"start"===this.get("text").position?e+Math.PI/2:n-Math.PI/2},e.prototype.getTextPoint=function(){var t=this.get("text"),e=t.position,n=t.offset,i=this.getLocation(),r=i.center,o=i.radius,a=i.startAngle,s=i.endAngle,u="start"===e?a:s,c=this.getRotateAngle()-Math.PI,l=gt(r,o,u),h=Math.cos(c)*n,p=Math.sin(c)*n;return{x:l.x+h,y:l.y+p}},e.prototype.getLinePath=function(){var t=this.getLocation(),e=t.center,n=t.radius,i=t.startAngle,r=t.endAngle,o=null;if(r-i==2*Math.PI){var a=e.x,s=e.y;o=[["M",a,s-n],["A",n,n,0,1,1,a,s+n],["A",n,n,0,1,1,a,s-n],["Z"]]}else{var u=gt(e,n,i),c=gt(e,n,r),l=Math.abs(r-i)>Math.PI?1:0,h=i>r?0:1;o=[["M",u.x,u.y],["A",n,n,0,l,h,c.x,c.y]]}return o}}(Zt),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{name:"grid",line:{},alternateColor:null,capture:!1,items:[],closed:!1,defaultCfg:{line:{type:"line",style:{lineWidth:1,stroke:wt.lineColor}}}})},e.prototype.getLineType=function(){return(this.get("line")||this.get("defaultCfg").line).type},e.prototype.renderInner=function(t){this.drawGrid(t)},e.prototype.getAlternatePath=function(t,e){var n=this.getGridPath(t),i=e.slice(0).reverse(),r=this.getGridPath(i,!0);return this.get("closed")?n=n.concat(r):(r[0][0]="L",(n=n.concat(r)).push(["Z"])),n},e.prototype.getPathStyle=function(){return this.get("line").style},e.prototype.drawGrid=function(t){var e=this,n=this.get("line"),i=this.get("items"),r=this.get("alternateColor"),o=null;Object(F.each)(i,(function(i,a){var s=i.id||a;if(n){var u=e.getPathStyle(),c=e.getElementId("line-"+s),l=e.getGridPath(i.points);e.addShape(t,{type:"path",name:"grid-line",id:c,attrs:Object(F.mix)({path:l},u)})}if(r&&a>0){var h=e.getElementId("region-"+s),p=a%2==0;if(Object(F.isString)(r))p&&e.drawAlternateRegion(h,t,o.points,i.points,r);else{var f=p?r[1]:r[0];e.drawAlternateRegion(h,t,o.points,i.points,f)}}o=i}))},e.prototype.drawAlternateRegion=function(t,e,n,i,r){var o=this.getAlternatePath(n,i);this.addShape(e,{type:"path",id:t,name:"grid-region",attrs:{path:o,fill:r}})},e}(_t));(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{type:"circle",center:null,closed:!0})},e.prototype.getGridPath=function(t,e){var n,i,r,o,a,s,u=this.getLineType(),c=this.get("closed"),l=[];if(t.length)if("circle"===u){var h=this.get("center"),p=t[0],f=(n=h.x,i=h.y,r=p.x,o=p.y,a=r-n,s=o-i,Math.sqrt(a*a+s*s)),d=e?0:1;c?(l.push(["M",h.x,h.y-f]),l.push(["A",f,f,0,0,d,h.x,h.y+f]),l.push(["A",f,f,0,0,d,h.x,h.y-f]),l.push(["Z"])):Object(F.each)(t,(function(t,e){0===e?l.push(["M",t.x,t.y]):l.push(["A",f,f,0,0,d,t.x,t.y])}))}else Object(F.each)(t,(function(t,e){0===e?l.push(["M",t.x,t.y]):l.push(["L",t.x,t.y])})),c&&l.push(["Z"]);return l}})($t),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{type:"line"})},e.prototype.getGridPath=function(t){var e=[];return Object(F.each)(t,(function(t,n){0===n?e.push(["M",t.x,t.y]):e.push(["L",t.x,t.y])})),e}}($t);var Kt,Jt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{name:"legend",layout:"horizontal",locationType:"point",x:0,y:0,offsetX:0,offsetY:0,title:null,background:null})},e.prototype.getLayoutBBox=function(){var e=t.prototype.getLayoutBBox.call(this),n=this.get("x"),i=this.get("y"),r=this.get("offsetX"),o=this.get("offsetY"),a=this.get("maxWidth"),s=this.get("maxHeight"),u=n+r,c=i+o,l=e.maxX-u,h=e.maxY-c;return a&&(l=Math.min(l,a)),s&&(h=Math.min(h,s)),ft(u,c,l,h)},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},e.prototype.resetLocation=function(){var t=this.get("x"),e=this.get("y"),n=this.get("offsetX"),i=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t+n,y:e+i})},e.prototype.applyOffset=function(){this.resetLocation()},e.prototype.getDrawPoint=function(){return this.get("currentPoint")},e.prototype.setDrawPoint=function(t){return this.set("currentPoint",t)},e.prototype.renderInner=function(t){this.resetDraw(),this.get("title")&&this.drawTitle(t),this.drawLegendContent(t),this.get("background")&&this.drawBackground(t)},e.prototype.drawBackground=function(t){var e=this.get("background"),n=t.getBBox(),i=lt(e.padding),r=Object(L.__assign)({x:0,y:0,width:n.width+i[1]+i[3],height:n.height+i[0]+i[2]},e.style);this.addShape(t,{type:"rect",id:this.getElementId("background"),name:"legend-background",attrs:r}).toBack()},e.prototype.drawTitle=function(t){var e=this.get("currentPoint"),n=this.get("title"),i=n.spacing,r=n.style,o=n.text,a=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"legend-title",attrs:Object(L.__assign)({text:o,x:e.x,y:e.y},r)}).getBBox();this.set("currentPoint",{x:e.x,y:a.maxY+i})},e.prototype.resetDraw=function(){var t=this.get("background"),e={x:0,y:0};if(t){var n=lt(t.padding);e.x=n[3],e.y=n[0]}this.set("currentPoint",e)},e}(_t),te=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.currentPageIndex=1,e.totalPagesCnt=1,e.pageWidth=0,e.pageHeight=0,e.startX=0,e.startY=0,e.onNavigationBack=function(){var t=e.getElementByLocalId("item-group");if(e.currentPageIndex>1){e.currentPageIndex-=1,e.updateNavigation();var n=e.getCurrentNavigationMatrix();e.get("animate")?t.animate({matrix:n},100):t.attr({matrix:n})}},e.onNavigationAfter=function(){var t=e.getElementByLocalId("item-group");if(e.currentPageIndexf&&(f=v),"horizontal"===l?(d&&dv&&(v=e.width)})),m=v,v+=l,s&&(v=Math.min(s,v),m=Math.min(s,m)),this.pageWidth=v,this.pageHeight=u-Math.max(f.height,h);var x=Math.floor(this.pageHeight/h);Object(F.each)(a,(function(t,e){0!==e&&e%x==0&&(g+=1,d.x+=v,d.y=r),n.moveElementTo(t,d),d.y+=h})),this.totalPagesCnt=g,this.moveElementTo(p,{x:i+m/2-f.width/2-f.minX,y:u-f.height-f.minY})}this.pageHeight&&this.pageWidth&&e.getParent().setClip({type:"rect",attrs:{x:this.startX,y:this.startY,width:this.pageWidth,height:this.pageHeight}}),this.totalPagesCnt=g,this.currentPageIndex>this.totalPagesCnt&&(this.currentPageIndex=1),this.updateNavigation(p),e.attr("matrix",this.getCurrentNavigationMatrix())},e.prototype.drawNavigation=function(t,e,n,i){var r={x:0,y:0},o=this.addGroup(t,{id:this.getElementId("navigation-group"),name:"legend-navigation"}),a=this.drawArrow(o,r,"navigation-arrow-left","horizontal"===e?"up":"left",i);a.on("click",this.onNavigationBack);var s=a.getBBox();r.x+=s.width+2;var u=this.addShape(o,{type:"text",id:this.getElementId("navigation-text"),name:"navigation-text",attrs:{x:r.x,y:r.y+i/2,text:n,fontSize:12,fill:"#ccc",textBaseline:"middle"}}).getBBox();return r.x+=u.width+2,this.drawArrow(o,r,"navigation-arrow-right","horizontal"===e?"down":"right",i).on("click",this.onNavigationAfter),o},e.prototype.updateNavigation=function(t){var e=this.currentPageIndex+"/"+this.totalPagesCnt,n=t?t.getChildren()[1]:this.getElementByLocalId("navigation-text"),i=t?t.findById(this.getElementId("navigation-arrow-left")):this.getElementByLocalId("navigation-arrow-left"),r=t?t.findById(this.getElementId("navigation-arrow-right")):this.getElementByLocalId("navigation-arrow-right"),o=n.getBBox();n.attr("text",e);var a=n.getBBox();n.attr("x",n.attr("x")-(a.width-o.width)/2),i.attr("opacity",1===this.currentPageIndex?.45:1),i.attr("cursor",1===this.currentPageIndex?"not-allowed":"pointer"),r.attr("opacity",this.currentPageIndex===this.totalPagesCnt?.45:1),r.attr("cursor",this.currentPageIndex===this.totalPagesCnt?"not-allowed":"pointer")},e.prototype.drawArrow=function(t,e,n,i,r){var o=e.x,a=e.y,s={right:90*Math.PI/180,left:270*Math.PI/180,up:0,down:180*Math.PI/180},u=this.addShape(t,{type:"path",id:this.getElementId(n),name:n,attrs:{path:[["M",o+r/2,a],["L",o,a+r],["L",o+r,a+r],["Z"]],fill:"#000",cursor:"pointer"}});return u.attr("matrix",st({x:o+r/2,y:a+r/2},s[i])),u},e.prototype.getCurrentNavigationMatrix=function(){var t=this.currentPageIndex,e=this.pageWidth,n=this.pageHeight;return ut("horizontal"===this.get("layout")?{x:0,y:n*(1-t)}:{x:e*(1-t),y:0})},e.prototype.applyItemStates=function(t,e){if(this.getItemStates(t).length>0){var n=e.getChildren(),i=this.get("itemStates");Object(F.each)(n,(function(e){var n=e.get("name").split("-")[2],r=Ot(t,n,i);r&&(e.attr(r),"marker"!==n||e.get("isStroke")&&e.get("isFill")||(e.get("isStroke")&&e.attr("fill",null),e.get("isFill")&&e.attr("stroke",null)))}))}},e}(Jt),ee=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{type:"continue",min:0,max:100,value:null,colors:[],track:{},rail:{},label:{},handler:{},slidable:!0,tip:null,step:null,maxWidth:null,maxHeight:null,defaultCfg:{label:{align:"rail",spacing:5,formatter:null,style:{fontSize:12,fill:wt.textColor,textBaseline:"middle",fontFamily:wt.fontFamily}},handler:{size:10,style:{fill:"#fff",stroke:"#333"}},track:{},rail:{type:"color",size:20,defaultLength:100,style:{fill:"#DCDEE2"}},title:{spacing:5,style:{fill:wt.textColor,fontSize:12,textAlign:"start",textBaseline:"top"}}}})},e.prototype.isSlider=function(){return!0},e.prototype.getValue=function(){return this.getCurrentValue()},e.prototype.getRange=function(){return{min:this.get("min"),max:this.get("max")}},e.prototype.setRange=function(t,e){this.update({min:t,max:e})},e.prototype.setValue=function(t){var e=this.getValue();this.set("value",t);var n=this.get("group");this.resetTrackClip(),this.get("slidable")&&this.resetHandlers(n),this.delegateEmit("valuechanged",{originValue:e,value:t})},e.prototype.initEvent=function(){var t=this.get("group");this.bindSliderEvent(t),this.bindRailEvent(t),this.bindTrackEvent(t)},e.prototype.drawLegendContent=function(t){this.drawRail(t),this.drawLabels(t),this.fixedElements(t),this.resetTrack(t),this.resetTrackClip(t),this.get("slidable")&&this.resetHandlers(t)},e.prototype.bindSliderEvent=function(t){this.bindHandlersEvent(t)},e.prototype.bindHandlersEvent=function(t){var e=this;t.on("legend-handler-min:drag",(function(t){var n=e.getValueByCanvasPoint(t.x,t.y),i=e.getCurrentValue()[1];in&&(i=n),e.setValue([i,n])}))},e.prototype.bindRailEvent=function(t){},e.prototype.bindTrackEvent=function(t){var e=this,n=null;t.on("legend-track:dragstart",(function(t){n={x:t.x,y:t.y}})),t.on("legend-track:drag",(function(t){if(n){var i=e.getValueByCanvasPoint(n.x,n.y),r=e.getValueByCanvasPoint(t.x,t.y),o=e.getCurrentValue(),a=o[1]-o[0],s=e.getRange(),u=r-i;u<0?o[0]+u>s.min?e.setValue([o[0]+u,o[1]+u]):e.setValue([s.min,s.min+a]):u>0&&(u>0&&o[1]+ur&&(u=r),u0&&this.changeRailLength(i,r,n[r]-c)}},e.prototype.changeRailLength=function(t,e,n){var i,r=t.getBBox();i="height"===e?this.getRailPath(r.x,r.y,r.width,n):this.getRailPath(r.x,r.y,n,r.height),t.attr("path",i)},e.prototype.changeRailPosition=function(t,e,n){var i=t.getBBox(),r=this.getRailPath(e,n,i.width,i.height);t.attr("path",r)},e.prototype.fixedHorizontal=function(t,e,n,i){var r=this.get("label"),o=r.align,a=r.spacing,s=n.getBBox(),u=t.getBBox(),c=e.getBBox(),l=s.height;this.fitRailLength(u,c,s,n),s=n.getBBox(),"rail"===o?(t.attr({x:i.x,y:i.y+l/2}),this.changeRailPosition(n,i.x+u.width+a,i.y),e.attr({x:i.x+u.width+s.width+2*a,y:i.y+l/2})):"top"===o?(t.attr({x:i.x,y:i.y}),e.attr({x:i.x+s.width,y:i.y}),this.changeRailPosition(n,i.x,i.y+u.height+a)):(this.changeRailPosition(n,i.x,i.y),t.attr({x:i.x,y:i.y+s.height+a}),e.attr({x:i.x+s.width,y:i.y+s.height+a}))},e.prototype.fixedVertail=function(t,e,n,i){var r=this.get("label"),o=r.align,a=r.spacing,s=n.getBBox(),u=t.getBBox(),c=e.getBBox();if(this.fitRailLength(u,c,s,n),s=n.getBBox(),"rail"===o)t.attr({x:i.x,y:i.y}),this.changeRailPosition(n,i.x,i.y+u.height+a),e.attr({x:i.x,y:i.y+u.height+s.height+2*a});else if("right"===o)t.attr({x:i.x+s.width+a,y:i.y}),this.changeRailPosition(n,i.x,i.y),e.attr({x:i.x+s.width+a,y:i.y+s.height});else{var l=Math.max(u.width,c.width);t.attr({x:i.x,y:i.y}),this.changeRailPosition(n,i.x+l+a,i.y),e.attr({x:i.x,y:i.y+s.height})}},e}(Jt),ne=n("fIp6"),ie=n("6UX8"),re=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{container:null,containerTpl:"
            ",updateAutoRender:!0,parent:null})},e.prototype.getContainer=function(){return this.get("container")},e.prototype.show=function(){this.get("container").style.display="",this.set("visible",!0)},e.prototype.hide=function(){this.get("container").style.display="none",this.set("visible",!1)},e.prototype.setCapture=function(t){var e=t?"auto":"none";this.getContainer().style.pointerEvents=e,this.set("capture",t)},e.prototype.getBBox=function(){var t=this.getContainer();return ft(parseFloat(t.style.left)||0,parseFloat(t.style.top)||0,t.clientWidth,t.clientHeight)},e.prototype.clear=function(){ht(this.get("container"))},e.prototype.destroy=function(){this.removeEvent(),this.removeDom(),t.prototype.destroy.call(this)},e.prototype.init=function(){t.prototype.init.call(this),this.initContainer(),this.initEvent(),this.initCapture(),this.initVisible()},e.prototype.initCapture=function(){this.setCapture(this.get("capture"))},e.prototype.initVisible=function(){this.get("visible")?this.show():this.hide()},e.prototype.initContainer=function(){var t=this.get("container");if(Object(F.isNil)(t)){t=this.createDom();var e=this.get("parent");Object(F.isString)(e)&&(e=document.getElementById(e),this.set("parent",e)),e.appendChild(t),this.set("container",t)}else Object(F.isString)(t)&&(t=document.getElementById(t),this.set("container",t));this.get("parent")||this.set("parent",t.parentNode)},e.prototype.createDom=function(){var t=this.get("containerTpl");return Object(ne.createDom)(t)},e.prototype.initEvent=function(){},e.prototype.removeDom=function(){var t=this.get("container");t&&t.parentNode.removeChild(t)},e.prototype.removeEvent=function(){},e}(xt),oe="g2-tooltip",ae="g2-tooltip-title",se="g2-tooltip-list",ue="g2-tooltip-list-item",ce="g2-tooltip-marker",le="g2-tooltip-value",he="g2-tooltip-name",pe="g2-tooltip-crosshair-x",fe="g2-tooltip-crosshair-y",de=((Kt={})[""+oe]={position:"absolute",visibility:"visible",zIndex:8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxShadow:"0px 0px 10px #aeaeae",borderRadius:"3px",color:"rgb(87, 87, 87)",fontSize:"12px",fontFamily:wt.fontFamily,lineHeight:"20px",padding:"10px 10px 6px 10px"},Kt[""+ae]={marginBottom:"4px"},Kt[""+se]={margin:0,listStyleType:"none",padding:0},Kt[""+ue]={listStyleType:"none",marginBottom:"4px"},Kt[""+ce]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},Kt[""+le]={display:"inline-block",float:"right",marginLeft:"30px"},Kt[""+pe]={position:"absolute",width:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},Kt[""+fe]={position:"absolute",height:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},Kt);function ge(t){return t+"px"}var ye=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(L.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{name:"tooltip",type:"html",x:0,y:0,items:[],containerTpl:'
              ',itemTpl:'
            • \n \n {name}:\n {value}\n
            • ',xCrosshairTpl:'
              ',yCrosshairTpl:'
              ',title:null,showTitle:!0,region:null,crosshairsRegion:null,crosshairs:null,offset:10,position:"right",domStyles:null,defaultStyles:de})},e.prototype.render=function(){this.resetTitle(),this.renderItems(),this.resetPosition()},e.prototype.clear=function(){this.clearCrosshairs(),this.setTitle(""),this.clearItemDoms()},e.prototype.update=function(e){var n,i,r;t.prototype.update.call(this,e),n=e,i=["title","showTitle"],r=!1,Object(F.each)(i,(function(t){if(Object(F.hasKey)(n,t))return r=!0,!1})),r&&this.resetTitle(),Object(F.hasKey)(e,"items")&&this.renderItems(),Object(F.hasKey)(e,"domStyles")&&(this.resetStyles(),this.applyStyles()),this.resetPosition()},e.prototype.show=function(){var t=this.getContainer();t&&!this.destroyed&&(this.set("visible",!0),Object(ne.modifyCSS)(t,{visibility:"visible"}),this.setCrossHairsVisible(!0))},e.prototype.hide=function(){var t=this.getContainer();t&&!this.destroyed&&(this.set("visible",!1),Object(ne.modifyCSS)(t,{visibility:"hidden"}),this.setCrossHairsVisible(!1))},e.prototype.getLocation=function(){return{x:this.get("x"),y:this.get("y")}},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetPosition()},e.prototype.setCrossHairsVisible=function(t){var e=t?"":"none",n=this.get("xCrosshairDom"),i=this.get("yCrosshairDom");n&&Object(ne.modifyCSS)(n,{display:e}),i&&Object(ne.modifyCSS)(i,{display:e})},e.prototype.initContainer=function(){t.prototype.initContainer.call(this),this.cacheDoms(),this.resetStyles(),this.applyStyles()},e.prototype.removeDom=function(){t.prototype.removeDom.call(this),this.clearCrosshairs()},e.prototype.cacheDoms=function(){var t=this.getContainer(),e=t.getElementsByClassName(ae)[0],n=t.getElementsByClassName(se)[0];this.set("titleDom",e),this.set("listDom",n)},e.prototype.resetPosition=function(){var t,e=this.get("x"),n=this.get("y"),i=this.get("offset"),r=this.getOffset(),o=r.offsetX,a=r.offsetY,s=this.get("position"),u=this.get("region"),c=this.getContainer(),l=this.getBBox(),h=l.width,p=l.height;u&&(t=pt(u));var f=function(t,e,n,i,r,o,a){var s=function(t,e,n,i,r,o){var a=t,s=e;switch(o){case"left":a=t-i-n,s=e-r/2;break;case"right":a=t+n,s=e-r/2;break;case"top":a=t-i/2,s=e-r-n;break;case"bottom":a=t-i/2,s=e+n;break;default:a=t+n,s=e-r-n}return{x:a,y:s}}(t,e,n,i,r,o);if(a){var u=function(t,e,n,i,r){return{left:tr.x+r.width,top:er.y+r.height}}(s.x,s.y,i,r,a);"auto"===o?(u.right&&(s.x=t-i-n),u.top&&(s.y=e+n)):"top"===o||"bottom"===o?(u.left&&(s.x=a.x),u.right&&(s.x=a.x+a.width-i),"top"===o&&u.top&&(s.y=e+n),"bottom"===o&&u.bottom&&(s.y=e-r-n)):(u.top&&(s.y=a.y),u.bottom&&(s.y=a.y+a.height-r),"left"===o&&u.left&&(s.x=t+n),"right"===o&&u.right&&(s.x=t-i-n))}return s}(e,n,i,h,p,s,t);Object(ne.modifyCSS)(c,{left:ge(f.x+o),top:ge(f.y+a)}),this.resetCrosshairs()},e.prototype.resetTitle=function(){var t=this.get("title");this.get("showTitle")&&t?this.setTitle(t):this.setTitle("")},e.prototype.setTitle=function(t){var e=this.get("titleDom");e&&(e.innerText=t)},e.prototype.resetCrosshairs=function(){var t=this.get("crosshairsRegion"),e=this.get("crosshairs");if(t&&e){var n=pt(t),i=this.get("xCrosshairDom"),r=this.get("yCrosshairDom");"x"===e?(this.resetCrosshair("x",n),r&&(r.remove(),this.set("yCrosshairDom",null))):"y"===e?(this.resetCrosshair("y",n),i&&(i.remove(),this.set("xCrosshairDom",null))):(this.resetCrosshair("x",n),this.resetCrosshair("y",n)),this.setCrossHairsVisible(this.get("visible"))}else this.clearCrosshairs()},e.prototype.resetCrosshair=function(t,e){var n=this.checkCrosshair(t),i=this.get(t);"x"===t?Object(ne.modifyCSS)(n,{left:ge(i),top:ge(e.y),height:ge(e.height)}):Object(ne.modifyCSS)(n,{top:ge(i),left:ge(e.x),width:ge(e.width)})},e.prototype.checkCrosshair=function(t){var e=t+"CrosshairDom",n=t+"CrosshairTpl",i="CROSSHAIR_"+t.toUpperCase(),r=c[i],o=this.get(e),a=this.get("parent");return o||(o=Object(ne.createDom)(this.get(n)),this.applyStyle(r,o),a.appendChild(o),this.set(e,o)),o},e.prototype.resetStyles=function(){var t=this.get("domStyles"),e=this.get("defaultStyles");t=t?Object(F.deepMix)({},e,t):e,this.set("domStyles",t)},e.prototype.applyStyles=function(){var t,e=this.get("domStyles"),n=this.getContainer();if(this.applyChildrenStyles(n,e),t=oe,n.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))){var i=e[oe];Object(ne.modifyCSS)(n,i)}},e.prototype.applyChildrenStyles=function(t,e){Object(F.each)(e,(function(e,n){var i=t.getElementsByClassName(n);Object(F.each)(i,(function(t){Object(ne.modifyCSS)(t,e)}))}))},e.prototype.applyStyle=function(t,e){var n=this.get("domStyles");Object(ne.modifyCSS)(e,n[t])},e.prototype.renderItems=function(){this.clearItemDoms();var t=this.get("items"),e=this.get("itemTpl"),n=this.get("listDom");Object(F.each)(t,(function(t){var i=ie.default.toCSSGradient(t.color),r=Object(L.__assign)(Object(L.__assign)({},t),{color:i}),o=Object(F.substitute)(e,r),a=Object(ne.createDom)(o);n.appendChild(a)})),this.applyChildrenStyles(n,this.get("domStyles"))},e.prototype.clearItemDoms=function(){ht(this.get("listDom"))},e.prototype.clearCrosshairs=function(){var t=this.get("xCrosshairDom"),e=this.get("yCrosshairDom");t&&t.remove(),e&&e.remove(),this.set("xCrosshairDom",null),this.set("yCrosshairDom",null)},e}(re),ve={opacity:0},me={stroke:"#C5C5C5",strokeOpacity:.85},xe={fill:"#CACED4",opacity:.85};n("cvtA"),n("Afl5"),n("Ydjw");n("kd6+");var be="\t\n\v\f\r   ᠎              \u2028\u2029";new RegExp("([a-z])["+be+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+be+"]*,?["+be+"]*)+)","ig"),new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+be+"]*,?["+be+"]*","ig");n("3wFy"),n("N1Pg");var Me={};function _e(t,e){Me[t]=e}var we=function(){function t(t){this.type="base",this.isCategory=!1,this.isLinear=!1,this.isContinuous=!1,this.isIdentity=!1,this.values=[],this.range=[0,1],this.ticks=[],this.__cfg__=t,this.initCfg(),this.init()}return t.prototype.translate=function(t){return t},t.prototype.change=function(t){Object(F.assign)(this.__cfg__,t),this.init()},t.prototype.clone=function(){return this.constructor(this.__cfg__)},t.prototype.getTicks=function(){var t=this;return Object(F.map)(this.ticks,(function(e,n){return Object(F.isObject)(e)?e:{text:t.getText(e,n),tickValue:e,value:t.scale(e)}}))},t.prototype.getText=function(t,e){var n=this.formatter,i=n?n(t,e):t;return Object(F.isNil)(i)||!Object(F.isFunction)(i.toString)?"":i.toString()},t.prototype.getConfig=function(t){return this.__cfg__[t]},t.prototype.init=function(){Object(F.assign)(this,this.__cfg__),this.setDomain(),Object(F.isEmpty)(this.getConfig("ticks"))&&(this.ticks=this.calculateTicks())},t.prototype.initCfg=function(){},t.prototype.setDomain=function(){},t.prototype.calculateTicks=function(){var t=this.tickMethod,e=[];if(Object(F.isString)(t)){var n=Me[t];if(!n)throw new Error("There is no method to to calculate ticks!");e=n(this)}else Object(F.isFunction)(t)&&(e=t(this));return e},t.prototype.rangeMin=function(){return Object(F.head)(this.range)},t.prototype.rangeMax=function(){return Object(F.last)(this.range)},t.prototype.calcPercent=function(t,e,n){return Object(F.isNumber)(t)?(t-e)/(n-e):NaN},t.prototype.calcValue=function(t,e,n){return e+t*(n-e)},t}(),Oe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cat",e.isCategory=!0,e}return Object(L.__extends)(e,t),e.prototype.translate=function(t){var e=Object(F.indexOf)(this.values,t);return-1===e?Object(F.isNumber)(t)?t:NaN:e},e.prototype.scale=function(t){var e=this.translate(t),n=this.calcPercent(e,this.min,this.max);return this.calcValue(n,this.rangeMin(),this.rangeMax())},e.prototype.invert=function(t){var e=this.max-this.min,n=this.calcPercent(t,this.rangeMin(),this.rangeMax()),i=Math.round(e*n)+this.min;return ithis.max?NaN:this.values[i]},e.prototype.getText=function(e){for(var n=[],i=1;i1?t-1:t}},e}(we),Ce={},Se=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Ae="[^\\s]+",Pe=/\[([^]*?)\]/gm,je=function(){};function ke(t,e){for(var n=[],i=0,r=t.length;i3?0:(t-t%10!=10)*t%10]}};var Fe={D:function(t){return t.getDate()},DD:function(t){return Ee(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return t.getDay()},dd:function(t){return Ee(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return t.getMonth()+1},MM:function(t){return Ee(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return Ee(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return Ee(t.getFullYear(),4)},h:function(t){return t.getHours()%12||12},hh:function(t){return Ee(t.getHours()%12||12)},H:function(t){return t.getHours()},HH:function(t){return Ee(t.getHours())},m:function(t){return t.getMinutes()},mm:function(t){return Ee(t.getMinutes())},s:function(t){return t.getSeconds()},ss:function(t){return Ee(t.getSeconds())},S:function(t){return Math.round(t.getMilliseconds()/100)},SS:function(t){return Ee(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return Ee(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+Ee(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)}},Re={D:["\\d\\d?",function(t,e){t.day=e}],Do:["\\d\\d?"+Ae,function(t,e){t.day=parseInt(e,10)}],M:["\\d\\d?",function(t,e){t.month=e-1}],YY:["\\d\\d?",function(t,e){var n=+(""+(new Date).getFullYear()).substr(0,2);t.year=""+(e>68?n-1:n)+e}],h:["\\d\\d?",function(t,e){t.hour=e}],m:["\\d\\d?",function(t,e){t.minute=e}],s:["\\d\\d?",function(t,e){t.second=e}],YYYY:["\\d{4}",function(t,e){t.year=e}],S:["\\d",function(t,e){t.millisecond=100*e}],SS:["\\d{2}",function(t,e){t.millisecond=10*e}],SSS:["\\d{3}",function(t,e){t.millisecond=e}],d:["\\d\\d?",je],ddd:[Ae,je],MMM:[Ae,Te("monthNamesShort")],MMMM:[Ae,Te("monthNames")],a:[Ae,function(t,e,n){var i=e.toLowerCase();i===n.amPm[0]?t.isPm=!1:i===n.amPm[1]&&(t.isPm=!0)}],ZZ:["[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z",function(t,e){var n,i=(e+"").match(/([+-]|\d\d)/gi);i&&(n=60*i[1]+parseInt(i[2],10),t.timezoneOffset="+"===i[0]?n:-n)}]};Re.dd=Re.d,Re.dddd=Re.ddd,Re.DD=Re.D,Re.mm=Re.m,Re.hh=Re.H=Re.HH=Re.h,Re.MM=Re.M,Re.ss=Re.s,Re.A=Re.a,Ce.masks={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},Ce.format=function(t,e,n){var i=n||Ce.i18n;if("number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date in fecha.format");e=Ce.masks[e]||e||Ce.masks.default;var r=[];return(e=(e=e.replace(Pe,(function(t,e){return r.push(e),"@@@"}))).replace(Se,(function(e){return e in Fe?Fe[e](t,i):e.slice(1,e.length-1)}))).replace(/@@@/g,(function(){return r.shift()}))},Ce.parse=function(t,e,n){var i=n||Ce.i18n;if("string"!=typeof e)throw new Error("Invalid format in fecha.parse");if(e=Ce.masks[e]||e,t.length>1e3)return null;var r={},o=[],a=[];e=e.replace(Pe,(function(t,e){return a.push(e),"@@@"}));var s,u=(s=e,s.replace(/[|\\{()[^$+*?.-]/g,"\\$&")).replace(Se,(function(t){if(Re[t]){var e=Re[t];return o.push(e[1]),"("+e[0]+")"}return t}));u=u.replace(/@@@/g,(function(){return a.shift()}));var c=t.match(new RegExp(u,"i"));if(!c)return null;for(var l=1;l>>1;t(e[s])>n?a=s:o=s+1}return o}},Xe="format";function Ge(t,e){return(h[Xe]||Ne[Xe])(t,e)}function ze(t){return Object(F.isString)(t)&&(t=t.indexOf("T")>0?new Date(t).getTime():new Date(t.replace(/-/gi,"/")).getTime()),Object(F.isDate)(t)&&(t=t.getTime()),t}var qe=1e3,He=60*qe,Ve=60*He,We=24*Ve,Ue=31*We,Qe=365*We,Ze=[["HH:mm:ss",qe],["HH:mm:ss",10*qe],["HH:mm:ss",30*qe],["HH:mm",He],["HH:mm",10*He],["HH:mm",30*He],["HH",Ve],["HH",6*Ve],["HH",12*Ve],["YYYY-MM-DD",We],["YYYY-MM-DD",4*We],["YYYY-WW",7*We],["YYYY-MM",Ue],["YYYY-MM",4*Ue],["YYYY-MM",6*Ue],["YYYY",380*We]];var $e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(L.__extends)(e,t),e.prototype.translate=function(t){t=ze(t);var e=this.values.indexOf(t);return-1===e&&(e=Object(F.isNumber)(t)&&t-1){var i=this.values[n],r=this.formatter;return i=r?r(i,e):Ge(i,this.mask)}return t},e.prototype.initCfg=function(){this.tickMethod="time-cat",this.mask="YYYY-MM-DD",this.tickCount=7},e.prototype.setDomain=function(){var e=this.values;Object(F.each)(e,(function(t,n){e[n]=ze(t)})),e.sort((function(t,e){return t-e})),t.prototype.setDomain.call(this)},e}(Oe),Ke=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isContinuous=!0,e}return Object(L.__extends)(e,t),e.prototype.scale=function(t){if(Object(F.isNil)(t))return NaN;var e=this.rangeMin(),n=this.rangeMax();return this.max===this.min?e:e+this.getScalePercent(t)*(n-e)},e.prototype.init=function(){t.prototype.init.call(this);var e=this.ticks,n=Object(F.head)(e),i=Object(F.last)(e);nthis.max&&(this.max=i),Object(F.isNil)(this.minLimit)||(this.min=n),Object(F.isNil)(this.maxLimit)||(this.max=i)},e.prototype.setDomain=function(){var t=Object(F.getRange)(this.values),e=t.min,n=t.max;Object(F.isNil)(this.min)&&(this.min=e),Object(F.isNil)(this.max)&&(this.max=n),this.min>this.max&&(this.min=e,this.max=n)},e.prototype.calculateTicks=function(){var e=this,n=t.prototype.calculateTicks.call(this);return this.nice||(n=Object(F.filter)(n,(function(t){return t>=e.min&&t<=e.max}))),n},e.prototype.getScalePercent=function(t){var e=this.max,n=this.min;return(t-n)/(e-n)},e.prototype.getInvertPercent=function(t){return(t-this.rangeMin())/(this.rangeMax()-this.rangeMin())},e}(we),Je=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="linear",e.isLinear=!0,e}return Object(L.__extends)(e,t),e.prototype.invert=function(t){var e=this.getInvertPercent(t);return this.min+e*(this.max-this.min)},e.prototype.initCfg=function(){this.tickMethod="wilkinson-extended",this.nice=!1},e}(Ke);function tn(t,e){var n=Math.E;return e>=0?Math.pow(n,Math.log(e)/t):-1*Math.pow(n,Math.log(-e)/t)}function en(t,e){return 1===t?1:Math.log(e)/Math.log(t)}function nn(t,e,n){Object(F.isNil)(n)&&(n=Math.max.apply(null,t));var i=n;return Object(F.each)(t,(function(t){t>0&&t1&&(i=1),i}var rn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e}return Object(L.__extends)(e,t),e.prototype.invert=function(t){var e,n=this.base,i=en(n,this.max),r=this.rangeMin(),o=this.rangeMax()-r,a=this.positiveMin;if(a){if(0===t)return 0;var s=1/(i-(e=en(n,a/n)))*o;if(t=0?1:-1;return Math.pow(o,n)*a},e.prototype.initCfg=function(){this.tickMethod="pow",this.exponent=2,this.tickCount=5,this.nice=!0},e.prototype.getScalePercent=function(t){var e=this.max,n=this.min;if(e===n)return 0;var i=this.exponent;return(tn(i,t)-tn(i,n))/(tn(i,e)-tn(i,n))},e}(Ke),an=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="time",e}return Object(L.__extends)(e,t),e.prototype.getText=function(t,e){var n=this.translate(t),i=this.formatter;return i?i(n,e):Ge(n,this.mask)},e.prototype.scale=function(e){var n=e;return(Object(F.isString)(n)||Object(F.isDate)(n))&&(n=this.translate(n)),t.prototype.scale.call(this,n)},e.prototype.translate=function(t){return ze(t)},e.prototype.initCfg=function(){this.tickMethod="time-pretty",this.mask="YYYY-MM-DD",this.tickCount=7,this.nice=!1},e.prototype.setDomain=function(){var t=this.values,e=this.getConfig("min"),n=this.getConfig("max");if(Object(F.isNil)(e)&&Object(F.isNumber)(e)||(this.min=this.translate(this.min)),Object(F.isNil)(n)&&Object(F.isNumber)(n)||(this.max=this.translate(this.max)),t&&t.length){var i=[],r=1/0,o=r,a=0;Object(F.each)(t,(function(t){var e=ze(t);if(isNaN(e))throw new TypeError("Invalid Time: "+t+" in time scale!");r>e?(o=r,r=e):o>e&&(o=e),a1&&(this.minTickInterval=o-r),Object(F.isNil)(e)&&(this.min=r),Object(F.isNil)(n)&&(this.max=a)}},e}(Je),sn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="quantize",e}return Object(L.__extends)(e,t),e.prototype.invert=function(t){var e=this.ticks,n=e.length,i=this.getInvertPercent(t),r=Math.floor(i*(n-1));if(r>=n-1)return Object(F.last)(e);if(r<0)return Object(F.head)(e);var o=e[r],a=r/(n-1);return o+(i-a)/((r+1)/(n-1)-a)*(e[r+1]-o)},e.prototype.initCfg=function(){this.tickMethod="r-pretty",this.tickCount=5,this.nice=!0},e.prototype.calculateTicks=function(){var e=t.prototype.calculateTicks.call(this);return this.nice||(Object(F.last)(e)!==this.max&&e.push(this.max),Object(F.head)(e)!==this.min&&e.unshift(this.min)),e},e.prototype.getScalePercent=function(t){var e=this.ticks;if(tObject(F.last)(e))return 1;var n=0;return Object(F.each)(e,(function(e,i){if(!(t>=e))return!1;n=i})),n/(e.length-1)},e}(Ke),un=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="quantile",e}return Object(L.__extends)(e,t),e.prototype.initCfg=function(){this.tickMethod="quantile",this.tickCount=5,this.nice=!0},e}(sn),cn={};function ln(t){return cn[t]}function hn(t,e){if(ln(t))throw new Error("type '"+t+"' existed.");cn[t]=e}var pn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="identity",e.isIdentity=!0,e}return Object(L.__extends)(e,t),e.prototype.calculateTicks=function(){return this.values},e.prototype.scale=function(t){return this.values[0]!==t&&Object(F.isNumber)(t)?t:this.range[0]},e.prototype.invert=function(t){var e=this.range;return te[1]?NaN:this.values[0]},e}(we),fn=[1,5,2,2.5,4,3],dn=100*Number.EPSILON;function gn(t,e,n,i,r,o){var a=Object(F.size)(e),s=Object(F.indexOf)(e,t),u=0,c=function(t,e){return(t%e+e)%e}(i,o);return(c=0&&(u=1),1-s/(a-1)-n+u}function yn(t,e,n){var i=Object(F.size)(e);return 1-Object(F.indexOf)(e,t)/(i-1)-n+1}function vn(t,e,n,i,r,o){var a=(t-1)/(o-r),s=(e-1)/(Math.max(o,i)-Math.min(n,r));return 2-Math.max(a/s,s/a)}function mn(t,e){return t>=e?2-(t-1)/(e-1):1}function xn(t,e,n,i){var r=e-t;return 1-.5*(Math.pow(e-i,2)+Math.pow(t-n,2))/Math.pow(.1*r,2)}function bn(t,e,n){var i=e-t;if(n>i){var r=(n-i)/2;return 1-Math.pow(r,2)/Math.pow(.1*i,2)}return 1}function Mn(t,e,n,i,r,o){if(void 0===n&&(n=5),void 0===i&&(i=!0),void 0===r&&(r=fn),void 0===o&&(o=[.25,.2,.5,.05]),t===e||1===n)return{min:t,max:e,ticks:[t]};for(var a={score:-2,lmin:0,lmax:0,lstep:0},s=1;s<1/0;){for(var u=0,c=r;ux)g+=1;else{for(var b=m;b<=x;b+=1){var M=b*(y/s),_=M+y*(p-1),w=y,O=gn(l,r,s,M,_,w),C=xn(t,e,M,_),S=vn(p,n,t,e,M,_),A=o[0]*O+o[1]*C+o[2]*S+1*o[3];A>a.score&&(!i||M<=t&&_>=e)&&(a.lmin=M,a.lmax=_,a.lstep=w,a.score=A)}g+=1}}p+=1}}s+=1}for(var P=Number.isInteger(a.lstep)?0:Math.ceil(Math.abs(Math.log10(a.lstep))),j=[],k=a.lmin;k<=a.lmax;k+=a.lstep)j.push(k);var T=P?Object(F.map)(j,(function(t){return Number.parseFloat(t.toFixed(P))})):j;return{min:Math.min(t,Object(F.head)(T)),max:Math.max(e,Object(F.last)(T)),ticks:T}}function _n(t){var e=t.values,n=t.tickInterval,i=t.tickCount,r=e;if(Object(F.isNumber)(n))return Object(F.filter)(r,(function(t,e){return e%n==0}));var o=t.min,a=t.max;if(Object(F.isNil)(o)&&(o=0),Object(F.isNil)(a)&&(a=e.length-1),Object(F.isNumber)(i)&&i=o&&t<=a})).map((function(t){return e[t]}))}return e.slice(o,a+1)}var wn=Math.sqrt(50),On=Math.sqrt(10),Cn=Math.sqrt(2),Sn=function(){function t(){this._domain=[0,1]}return t.prototype.domain=function(t){return t?(this._domain=Array.from(t,Number),this):this._domain.slice()},t.prototype.nice=function(t){var e,n;void 0===t&&(t=5);var i,r=this._domain.slice(),o=0,a=this._domain.length-1,s=this._domain[o],u=this._domain[a];return u0?i=An(s=Math.floor(s/i)*i,u=Math.ceil(u/i)*i,t):i<0&&(i=An(s=Math.ceil(s*i)/i,u=Math.floor(u*i)/i,t)),i>0?(r[o]=Math.floor(s/i)*i,r[a]=Math.ceil(u/i)*i,this.domain(r)):i<0&&(r[o]=Math.ceil(s*i)/i,r[a]=Math.floor(u*i)/i,this.domain(r)),this},t.prototype.ticks=function(t){return void 0===t&&(t=5),function(t,e,n){var i,r,o,a,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];(i=e0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(r=Math.ceil(e-t+1));++s=0?(o>=wn?10:o>=On?5:o>=Cn?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=wn?10:o>=On?5:o>=Cn?2:1)}function Pn(t,e,n){return("ceil"===n?Math.ceil(t/e):"floor"===n?Math.floor(t/e):Math.round(t/e))*e}function jn(t,e,n){var i=Pn(t,n,"floor"),r=Pn(e,n,"ceil");i=Object(F.fixedBase)(i,n),r=Object(F.fixedBase)(r,n);for(var o=[],a=i;a<=r;a+=n){var s=Object(F.fixedBase)(a,n);o.push(s)}return{min:i,max:r,ticks:o}}function kn(t,e,n){var i,r=t.minLimit,o=t.maxLimit,a=t.min,s=t.max,u=t.tickCount,c=void 0===u?5:u,l=Object(F.isNil)(r)?Object(F.isNil)(e)?a:e:r,h=Object(F.isNil)(o)?Object(F.isNil)(n)?s:n:o;if(l>h&&(h=(i=[l,h])[0],l=i[1]),c<=2)return[l,h];for(var p=(h-l)/(c-1),f=[],d=0;di;i+=2){var o=[{x:+t[i-2],y:+t[i-1]},{x:+t[i],y:+t[i+1]},{x:+t[i+2],y:+t[i+3]},{x:+t[i+4],y:+t[i+5]}];e?i?r-4===i?o[3]={x:+t[0],y:+t[1]}:r-2===i&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[r-2],y:+t[r-1]}:r-4===i?o[3]=o[2]:i||(o[0]={x:+t[i],y:+t[i+1]}),n.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return n}(e,!1),i=Object(F.head)(t),r=i[0],o=i[1];return n.unshift(["M",r,o]),n}(a):Fn(a)}_e("cat",_n),_e("time-cat",(function(t){var e=_n(t),n=Object(F.last)(t.values);return n!==Object(F.last)(e)&&e.push(n),e})),_e("wilkinson-extended",(function(t){var e=t.min,n=t.max,i=t.tickCount,r=t.nice,o=t.tickInterval,a=t.minLimit,s=t.maxLimit,u=Mn(e,n,i,r).ticks;return Object(F.isNil)(a)&&Object(F.isNil)(s)?o?jn(e,n,o).ticks:u:kn(t,Object(F.head)(u),Object(F.last)(u))})),_e("r-pretty",(function(t){var e=t.min,n=t.max,i=t.tickCount,r=t.tickInterval,o=t.minLimit,a=t.maxLimit,s=Tn(e,n,i).ticks;return Object(F.isNil)(o)&&Object(F.isNil)(a)?r?jn(e,n,r).ticks:s:kn(t,Object(F.head)(s),Object(F.last)(s))})),_e("time",(function(t){var e=t.min,n=t.max,i=t.minTickInterval,r=t.tickInterval,o=t.tickCount;if(r)o=Math.ceil((n-e)/r);else{var a=(n-e)/(r=function(t,e,n){var i=(e-t)/n,r=Ye((function(t){return t[1]}))(Ze,i)-1,o=Ze[r];return r<0?o=Ze[0]:r>=Ze.length&&(o=Object(F.last)(Ze)),o}(e,n,o)[1])/o;a>1&&(r*=Math.ceil(a)),i&&rQe)for(var u=In(n),c=Math.ceil(r/Qe),l=s;l<=u+c;l+=c)a.push(Ln(l));else if(r>Ue){var h=Math.ceil(r/Ue),p=Bn(e),f=function(t,e){var n=In(t),i=In(e),r=Bn(t);return 12*(i-n)+(Bn(e)-r)%12}(e,n);for(l=0;l<=f+h;l+=h)a.push(Dn(s,l+p))}else if(r>We){var d=(x=new Date(e)).getFullYear(),g=x.getMonth(),y=x.getDate(),v=Math.ceil(r/We),m=function(t,e){return Math.ceil((e-t)/We)}(e,n);for(l=0;lVe){d=(x=new Date(e)).getFullYear(),g=x.getMonth(),v=x.getDate();var x,b=x.getHours(),M=Math.ceil(r/Ve),_=function(t,e){return Math.ceil((e-t)/Ve)}(e,n);for(l=0;l<=_+M;l+=M)a.push(new Date(d,g,v,b+l).getTime())}else if(r>He){var w=function(t,e){return Math.ceil((e-t)/6e4)}(e,n),O=Math.ceil(r/He);for(l=0;l<=w+O;l+=O)a.push(e+l*He)}else{var C=r;C0)e=Math.floor(en(n,r));else{var u=nn(a,n,o);e=Math.floor(en(n,u))}for(var c=s-e,l=Math.ceil(c/i),h=[],p=e;p=0?1:-1;return Math.pow(t,e)*n}))})),_e("quantile",(function(t){var e=t.tickCount,n=t.values;if(!n||!n.length)return[];for(var i=n.slice().sort((function(t,e){return t-e})),r=[],o=0;ol&&(c=(i=[l,c])[0],l=i[1],e=(r=[n,e])[0],n=r[1],h=!0);var p=e.getBBox(),f=n.getBBox(),d=p.width>c-2?{x:c+u/2+2,textAlign:"left"}:{x:c-u/2-2,textAlign:"right"},g=f.width>s-l-2?{x:l-u/2-2,textAlign:"right"}:{x:l+u/2+2,textAlign:"left"};return h?[g,d]:[d,g]},e.prototype.draw=function(){var t=this.get("container"),e=t&&t.get("canvas");e&&e.draw()},e.prototype.getContainerDOM=function(){var t=this.get("container"),e=t&&t.get("canvas");return e&&e.get("container")},e}(_t),Un={default:{trackColor:"rgba(0,0,0,0)",thumbColor:"rgba(0,0,0,0.15)",size:8,lineCap:"round"},hover:{thumbColor:"rgba(0,0,0,0.2)"}},Qn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.clearEvents=F.noop,e.onStartEvent=function(t){return function(n){e.isMobile=t,n.originalEvent.preventDefault();var i=t?Object(F.get)(n.originalEvent,"touches.0.clientX"):n.clientX,r=t?Object(F.get)(n.originalEvent,"touches.0.clientY"):n.clientY;e.startPos=e.cfg.isHorizontal?i:r,e.bindLaterEvent()}},e.bindLaterEvent=function(){var t=e.getContainerDOM(),n=[];n=e.isMobile?[Object(ne.addEventListener)(t,"touchmove",e.onMouseMove),Object(ne.addEventListener)(t,"touchend",e.onMouseUp),Object(ne.addEventListener)(t,"touchcancel",e.onMouseUp)]:[Object(ne.addEventListener)(t,"mousemove",e.onMouseMove),Object(ne.addEventListener)(t,"mouseup",e.onMouseUp),Object(ne.addEventListener)(t,"mouseleave",e.onMouseUp)],e.clearEvents=function(){n.forEach((function(t){t.remove()}))}},e.onMouseMove=function(t){var n=e.cfg,i=n.isHorizontal,r=n.thumbOffset;t.preventDefault();var o=e.isMobile?Object(F.get)(t,"touches.0.clientX"):t.clientX,a=e.isMobile?Object(F.get)(t,"touches.0.clientY"):t.clientY,s=i?o:a,u=s-e.startPos;e.startPos=s,e.updateThumbOffset(r+u)},e.onMouseUp=function(t){t.preventDefault(),e.clearEvents()},e.onTrackClick=function(t){var n=e.cfg,i=n.isHorizontal,r=n.x,o=n.y,a=n.thumbLen,s=e.getContainerDOM().getBoundingClientRect(),u=t.clientX,c=t.clientY,l=i?u-s.left-r-a/2:c-s.top-o-a/2,h=e.validateRange(l);e.updateThumbOffset(h)},e.onThumbMouseOver=function(){var t=e.cfg.theme.hover.thumbColor;e.getElementByLocalId("thumb").attr("stroke",t),e.draw()},e.onThumbMouseOut=function(){var t=e.cfg.theme.default.thumbColor;e.getElementByLocalId("thumb").attr("stroke",t),e.draw()},e}return Object(L.__extends)(e,t),e.prototype.setRange=function(t,e){this.set("minLimit",t),this.set("maxLimit",e)},e.prototype.getRange=function(){return{min:this.get("minLimit"),max:this.get("maxLimit")}},e.prototype.setValue=function(t){var e=this.getValue();this.update({thumbOffset:this.get("trackLen")-this.get("thumbLen")*Object(F.clamp)(t,0,1)}),this.delegateEmit("valuechange",{originalValue:e,value:this.getValue()})},e.prototype.getValue=function(){return Object(F.clamp)(this.get("thumbOffset")/(this.get("trackLen")-this.get("thumbLen")),0,1)},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(L.__assign)(Object(L.__assign)({},e),{name:"scrollbar",isHorizontal:!0,minThumbLen:20,thumbOffset:0,theme:Un})},e.prototype.renderInner=function(t){this.renderTrackShape(t),this.renderThumbShape(t)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.renderTrackShape=function(t){var e=this.cfg,n=e.trackLen,i=e.theme,r=(void 0===i?{default:{}}:i).default,o=r.lineCap,a=r.trackColor,s=r.size,u=this.get("isHorizontal")?{x1:0+s/2,y1:s/2,x2:n-s/2,y2:s/2,lineWidth:s,stroke:a,lineCap:o}:{x1:s/2,y1:0+s/2,x2:s/2,y2:n-s/2,lineWidth:s,stroke:a,lineCap:o};return this.addShape(t,{id:this.getElementId("track"),name:"track",type:"line",attrs:u})},e.prototype.renderThumbShape=function(t){var e=this.cfg,n=e.thumbOffset,i=e.thumbLen,r=e.theme,o=(void 0===r?{default:{}}:r).default,a=o.size,s=o.lineCap,u=o.thumbColor,c=this.get("isHorizontal")?{x1:n+a/2,y1:a/2,x2:n+i-a/2,y2:a/2,lineWidth:a,stroke:u,lineCap:s,cursor:"default"}:{x1:a/2,y1:n+a/2,x2:a/2,y2:n+i-a/2,lineWidth:a,stroke:u,lineCap:s,cursor:"default"};return this.addShape(t,{id:this.getElementId("thumb"),name:"thumb",type:"line",attrs:c})},e.prototype.bindEvents=function(){var t=this.get("group");t.on("mousedown",this.onStartEvent(!1)),t.on("mouseup",this.onMouseUp),t.on("touchstart",this.onStartEvent(!0)),t.on("touchend",this.onMouseUp),t.findById(this.getElementId("track")).on("click",this.onTrackClick);var e=t.findById(this.getElementId("thumb"));e.on("mouseover",this.onThumbMouseOver),e.on("mouseout",this.onThumbMouseOut)},e.prototype.getContainerDOM=function(){var t=this.get("container"),e=t&&t.get("canvas");return e&&e.get("container")},e.prototype.validateRange=function(t){var e=this.cfg,n=e.thumbLen,i=e.trackLen,r=t;return t+n>i?r=i-n:t+n0&&!(e>=t[n-1]);)n-=1;return n}var Jn=function(){function t(t){this.position="top",this.destroyed=!1,Object(F.assign)(this,t),this.init()}return t.prototype.getBBox=function(){var t=this;if(this.shape){var e=this.shape.getBBox();if(0===this.index)return q.fromBBoxObject(e);var n=this.plot.theme.description.padding;return Object(F.isArray)(n)&&Object(F.each)(n,(function(e,i){"function"==typeof n[i]&&(n[i]=n[i](t.plot.options.legend.position))})),new q(e.maxX,e.minY,e.width,e.height+n[2])}return null},t.prototype.clear=function(){this.shape&&this.shape.attr("text","")},t.prototype.destroy=function(){this.shape&&this.shape.remove(),this.destroyed=!0},t.prototype.init=function(){var t=this.textWrapper();this.shape=this.container.addShape("text",{attrs:Object(F.mix)({x:this.leftMargin,y:this.topMargin,text:t},this.style)}),this.shape.name=this.name},t.prototype.getPosition=function(){return"left"===this.alignTo?{x:this.leftMargin,y:this.topMargin}:"middle"===this.alignTo?{x:this.leftMargin+this.wrapperWidth/2,y:this.topMargin}:{x:this.rightMargin,y:this.topMargin}},t.prototype.getTextAlign=function(){return"left"===this.alignTo?"left":"middle"===this.alignTo?"center":"right"},t.prototype.textWrapper=function(){var t=this.wrapperWidth,e=this.style,n=this.text,i=this.container.addShape("text",{attrs:Object(L.__assign)({text:"",x:0,y:0},e)}),r=n.split("\n").map((function(e){for(var n="",r=e.split(""),o=[],a=0;at){if(0===a)break;o.push(a),n=""}}return $n(r,o)}));return i.remove(),r.join("\n")},t}(),ti=function(){for(var t=[],e=0;et.y!=u>t.y&&t.x<=(s-o)*(t.y-a)/(u-a)+o&&(n=!n)}return n}function ui(t){return t*t}function ci(t,e){return Math.sqrt(ui(t.x-e.x)+ui(t.y-e.y))}function li(t,e){return Math.sqrt(ui(t.x-e.x)+ui(t.y-e.y))}function hi(t,e,n){var i=ci(e,n);if(0===i)return ci(t,e);var r=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/i;r=Math.max(0,Math.min(1,r));var o=ci(t,{x:e.x+r*(n.x-e.x),y:e.y+r*(n.y-e.y)});return Math.sqrt(o)}function pi(t,e){var n=1/0;Object(F.each)(e,(function(e){var i=Math.sqrt(ci(e,t));n>i&&(n=i)}));for(var i=0,r=e.length-1;ic&&(n=c)}return n}function fi(t,e){if(function(t,e){for(var n=0,i=t;ni&&(n=i)})),Object(F.each)(e,(function(e){var n=pi(e,t);i>n&&(i=n)})),Math.min(n,i)}var di=2;function gi(t){return t.length<5?t:function t(e,n){for(var i,r=-1/0,o=0,a=e.length-1,s=1;sr&&(r=l,o=s)}if(r>n){var h=t(e.slice(0,o+1),n),p=t(e.slice(o,e.length),n);i=h.concat(p)}else i=[e[0],e[e.length-1]];return i}(t,di)}function yi(t){var e=Object(F.clone)(t);e.sort((function(t,e){return t-e}));var n=Math.floor(e.length/2);return e.length%2?e[n]:(e[n-1]+e[n])/2}function vi(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}var mi,xi,bi=function(){function t(t){Object(F.assign)(this,t),this._init()}return t.prototype._init=function(){this.plot.options;var t=this.getDefaultStyle(),e={type:"line",top:!0,start:this.cfg.start,end:this.cfg.end};if(e.style=Object(F.deepMix)({},t.line.style,this.cfg.lineStyle),e.text=Object(F.deepMix)({},t.text,this.cfg.text),this.cfg.type){var n=this._getState(this.cfg.type),i=100*(1-this.getYScale().scale(n))+"%",r=["0%",i],o=["100%",i];this.config=Object(F.mix)({start:r,end:o},e)}else{var a=this.cfg,s=a.start,u=a.end;this.config=Object(F.clone)(e);var c=this.getXScale(),l=this.getYScale(),h=Object(F.clone)(s),p=Object(F.clone)(u);Object(F.each)(s,(function(t,e){Object(F.contains)(Object(F.toArray)(s[e]),"%")&&!Object(F.isNumber)(s[e])||(h[e]=0===e?100*c.scale(s[0])+"%":100*(1-l.scale(s[1]))+"%")})),Object(F.each)(u,(function(t,e){Object(F.contains)(Object(F.toArray)(u[e]),"%")&&!Object(F.isNumber)(u[e])||(p[e]=0===e?100*c.scale(u[0])+"%":100*(1-l.scale(u[1]))+"%")})),this.config.start=h,this.config.end=p}},t.prototype.getYScale=function(){var t=this._getState("min"),e=this._getState("max");return new(ln("linear"))(Object(F.mix)({},{min:"column"===this.plot.type?0:t,max:e,nice:!0,values:this.values},this.plot.config.scales[this.plot.options.yField]))},t.prototype.getXScale=function(){var t=this.extractXValue();if(Object(F.isString)(t[0]))return new(ln("cat"))(Object(F.mix)({},{values:t},this.plot.config.scales[this.plot.options.xField]));var e=Math.min.apply(Math,t),n=Math.max.apply(Math,t);return new(ln("linear"))(Object(F.mix)({},{min:e,max:n,nice:!0,values:t},this.plot.config.scales[this.plot.options.xField]))},t.prototype._getState=function(t){return this.values=this._extractValues(),"median"===t?yi(this.values):"mean"===t?(e=this.values,n=0,Object(F.each)(e,(function(t){n+=t})),n/e.length):"max"===t?Math.max.apply(Math,this.values):"min"===t?Math.min.apply(Math,this.values):void 0;var e,n},t.prototype._extractValues=function(){var t=this.plot.options,e=t.yField,n=[],i=this.plot.processData(t.data);return Object(F.each)(i,(function(t){Object(F.isArray)(t[e])?n.push.apply(n,t[e]):n.push(t[e])})),n},t.prototype.extractXValue=function(){var t=this.plot.options,e=t.xField,n=[],i=this.plot.processData(t.data);return Object(F.each)(i,(function(t){Object(F.isArray)(t[e])?n.push.apply(n,t[e]):n.push(t[e])})),n},t.prototype.getDefaultStyle=function(){return this.getDefaultTextAlign(),{line:{style:{lineWidth:2,stroke:"#333333",opacity:.7,lineDash:[0,0]}},text:{offsetY:-5,style:{fontSize:14,stroke:"white",lineWidth:2,textAlign:this.getDefaultTextAlign()}}}},t.prototype.getDefaultTextAlign=function(){var t=this.cfg.text;if(t){if(!t.position||"start"===t.position)return"left";if("center"===t.position)return"center";if("end"===t.position)return"right"}},t}(),Mi=function(){function t(t){this.config={};var e=t.plot,n=Object(L.__rest)(t,["plot"]);this.plot=e,this.originConfig=n,this.init(t)}return t.prototype.getConfig=function(){return this.config},t.prototype.init=function(t){var e=this;Object(F.assign)(this.config,t),this.config.callback=function(t){for(var n=[],i=1;i=n&&l<=i&&"top"===o&&(n=l),c>=n&&c<=i&&"bottom"===o&&(i=c),u>t&&u<=e&&"left"===o&&(t=u),s>=t&&u<=e&&"right"===o&&(e=s)})),new q(t,n,e-t,i-n)},t.prototype._getInnerAutoPadding=function(){var t,e=this.plot.options,n=this.plot.view,i=Object(F.clone)(n.viewBBox),r=(i.minX,i.maxX),o=(i.minY,i.maxY),a=this.plot.config.theme.bleeding;Object(F.isArray)(a)&&Object(F.each)(a,(function(t,n){"function"==typeof a[n]&&(a[n]=a[n](e))})),this.plot.config.theme.legend.margin=a,this.bleeding=Object(F.clone)(a),t=Object(F.has)(this.plot.options,"radius")?[new q(0,i.minY,i.width,i.height)]:[new q(0,0,i.width,i.height)],this._getAxis(n,t);var s=this._mergeBBox(t);this._getLegend(n,t,i,this.plot.options),this._mergeBBox(t);var u=this.innerPaddingComponents;Object(F.each)(u,(function(e){var n=e.getBBox();t.push(n)}));var c=[0-(s=this._mergeBBox(t)).minY+this.bleeding[0],s.maxX-r+this.bleeding[1],s.maxY-o+this.bleeding[2],0-s.minX+this.bleeding[3]],l=this._getPanel(n,s);return c[0]+=l[0],c[1]+=l[1],c[2]+=l[2],c[3]+=l[3],c},t.prototype._getAxis=function(t,e){var n=function(t){return t.backgroundGroup.findAll((function(t){if(t.get("name"))return"axis"===t.get("name").split("-")[0]}))}(t);n.length>0&&Object(F.each)(n,(function(t){var n=t.getBBox();e.push(n)}))},t.prototype._getLegend=function(t,e,n,i){var r=function(t){return t.foregroundGroup.findAll((function(t){if(t.get("name"))return"legend-item-group"===t.get("name")}))}(t)[0];if(r){var o=r.getBBox();if(i.legend){var a=i.legend.position.split("-")[0];"top"===a?e.push(new q(o.minX,-o.height,o.width,o.height)):"bottom"===a?e.push(new q(o.minX,o.height+n.height,o.width,o.height)):"left"===a?e.push(new q(o.minX-o.width,o.minY,o.width,o.height)):e.push(new q(n.maxX,o.minY,o.width,o.height))}}},t.prototype._getPanel=function(t,e){var n=[],i=t.geometries;Object(F.each)(i,(function(t){t.labelsContainer&&n.push(t.labelsContainer)}));var r=1/0,o=-1/0,a=1/0,s=-1/0;Object(F.each)(n,(function(t){t.get("children").forEach((function(t){if("group"!==t.type||0!==t.get("children").length){var e=t.getBBox();e.minXo&&(o=e.maxX),e.minYs&&(s=e.maxY)}}))}));var u=t.coordinateBBox,c=Math.max(o-parseFloat(u.maxX),0);c>0&&(c*=u.width/(u.width+c));var l=Math.max(parseFloat(u.minX)-r,0);l>0&&(l*=u.width/(u.width+l));var h=Math.max(parseFloat(u.minY)-a,0);h>0&&(h*=u.height/(u.height+h));var p=Math.max(s-parseFloat(u.maxY),0);p>0&&(p*=u.height/(u.height+p));return[h,c,p,l]},t.prototype._mergeBBox=function(t){var e=1/0,n=-1/0,i=1/0,r=-1/0;return Object(F.each)(t,(function(t){var o=t;e=Math.min(o.minX,e),n=Math.max(o.maxX,n),i=Math.min(o.minY,i),r=Math.max(o.maxY,r)})),{minX:e,maxX:n,minY:i,maxY:r}},t.prototype._adjustLegend=function(t,e,n){var i=t.get("position").split("-"),r=t.get("container"),o=r.getBBox(),a=e.viewBBox,s=a.width,u=(a.height,a.maxX,a.minX,a.maxY),c=a.minY;"right"===i[0]&&r.move(s,c),"left"===i[0]&&r.move(n.minX-o.width,c),"top"===i[0]&&r.move(0,n.minY-o.height),"bottom"===i[0]&&r.move(0,Math.max(u,n.maxY))},t.prototype._getLegendInnerPadding=function(t){var e=this.plot.theme.legend.innerPadding,n=t.get("position").split("-");return"top"===n[0]?[e[0],0,0,0]:"bottom"===n[0]?[0,0,e[2],0]:"left"===n[0]?[0,0,0,e[3]]:"right"===n[0]?[0,e[1],0,0]:void 0},t.prototype._mergeBleeding=function(t){var e=this.bleeding;if(t.length===e.length)for(var n=0;n=0&&t.splice(n,1),Object(L.__spreadArrays)(t,[e])}),[]);return Object(F.deepMix)({},n,i,e,{interactions:r})},e.prototype.beforeInit=function(){t.prototype.beforeInit.call(this)},e.prototype.init=function(){var e=this;t.prototype.init.call(this),this.theme=this.themeController.getTheme(this.options,this.type),this.config={data:this.processData(this.options.data),scales:{},legends:{},tooltip:{showTitle:!0},axes:{},coordinate:{type:"cartesian"},geometries:[],annotations:[],interactions:[],theme:this.theme,panelRange:{},animate:!0,views:[]},this.paddingController.clear(),this.drawTitle(),this.drawDescription(),this.interaction(),this.coord(),this.scale(),this.axis(),this.tooltip(),this.legend(),this.addGeometry(),this.annotation(),this.animation(),this.viewRange=this.getViewRange();var n=this.viewRangeToRegion(this.viewRange);this.view=new U.View({parent:null,canvas:this.canvas,backgroundGroup:this.container.addGroup(),middleGroup:this.container.addGroup(),foregroundGroup:this.container.addGroup(),padding:this.paddingController.getPadding(),theme:this.theme,options:this.config,region:n}),this.applyInteractions(),this.view.on("afterrender",(function(){e.afterRender()}))},e.prototype.afterInit=function(){t.prototype.afterInit.call(this),this.view&&!this.view.destroyed&&"auto"!==this.options.padding&&this.parseEvents()},e.prototype.afterRender=function(){if(this.view&&!this.view.destroyed){var t=this.options,e=t.padding?t.padding:this.config.theme.padding;t.defaultState&&"auto"!==e&&this.stateController.defaultStates(t.defaultState),"auto"===e&&this.paddingController.processAutoPadding()}},e.prototype.render=function(){t.prototype.render.call(this);var e=this.options.data;Object(F.isEmpty)(e)||this.view.render()},e.prototype.destroy=function(){this.doDestroy(),t.prototype.destroy.call(this)},e.prototype.updateConfig=function(t){this.doDestroy(),!t.padding&&this.initialOptions.padding&&"auto"===this.initialOptions.padding&&(t.padding="auto"),this.options=Object(F.deepMix)({},this.options,t),this.processOptions(this.options)},e.prototype.changeData=function(t){this.options.data=this.processData(t),this.view.changeData(this.options.data),this.view.render()},e.prototype.getPlot=function(){return this.view},e.prototype.getTheme=function(){return this.theme?this.theme:this.themeController.getTheme(this.options,this.type)},e.prototype.getResponsiveTheme=function(){return this.themeController.getResponsiveTheme(this.type)},e.prototype.getPlotTheme=function(){return this.themeController.getPlotTheme(this.options,this.type)},e.prototype.getInteractions=function(){return this.interactions},e.prototype.bindStateManager=function(t,e){this.stateController.bindStateManager(t,e)},e.prototype.setActive=function(t,e){this.stateController.setState({type:"active",condition:t,style:e})},e.prototype.setSelected=function(t,e){this.stateController.setState({type:"selected",condition:t,style:e})},e.prototype.setDisable=function(t,e){this.stateController.setState({type:"disable",condition:t,style:e})},e.prototype.setDefault=function(t,e){this.stateController.setState({type:"default",condition:t,style:e})},e.prototype.getData=function(t,e){return this.processData((this.options.data||[]).slice(t,e))},e.prototype.processData=function(t){return t},e.prototype.scale=function(){var t=Object(F.mapValues)(this.config.scales,(function(t){var e=t.type;return e?{type:e}:{}})),e=Object(F.deepMix)({},this.config.scales,this.options.meta||{},t);this.setConfig("scales",e)},e.prototype.axis=function(){var t=Ni("axis",{plot:this,dim:"x"}),e=Ni("axis",{plot:this,dim:"y"}),n={};n[this.options.xField]=t,n[this.options.yField]=e,this.setConfig("axes",n)},e.prototype.tooltip=function(){!1!==this.options.tooltip.visible?(this.setConfig("tooltip",Object(F.deepMix)({},Object(F.get)(this.options,"tooltip"))),Object(F.deepMix)(this.config.theme.tooltip,this.options.tooltip.style)):this.setConfig("tooltip",!1)},e.prototype.getLegendPosition=function(t){var e=t.split("-");return e&&e.length>1&&"center"===e[1]?e[0]:t},e.prototype.legend=function(){if(!1!==this.options.legend.visible){var t=Object(F.get)(this.options,"legend.flipPage"),e=Object(F.get)(this.options,"legend.clickable");this.setConfig("legends",{position:this.getLegendPosition(Object(F.get)(this.options,"legend.position")),formatter:Object(F.get)(this.options,"legend.formatter"),offsetX:Object(F.get)(this.options,"legend.offsetX"),offsetY:Object(F.get)(this.options,"legend.offsetY"),clickable:!!Object(F.isUndefined)(e)||e,flipPage:t,marker:Object(F.get)(this.options,"legend.marker")})}else this.setConfig("legends",!1)},e.prototype.annotation=function(){var t=this,e=[];"cartesian"===this.config.coordinate.type&&this.options.guideLine&&Object(F.each)(this.options.guideLine,(function(n){var i=Ni("guideLine",{plot:t,cfg:n});e.push(i)})),this.setConfig("annotations",e)},e.prototype.interaction=function(){var t=this,e=this.options.interactions,n=void 0===e?[]:e;Object(F.each)(n,(function(e){var n=e.type;if("slider"===n||"scrollbar"===n){t.options.xAxis=Object(F.deepMix)({},t.options.xAxis,{label:{autoHide:!0,autoRotate:!1}})}t.setConfig("interaction",e)}))},e.prototype.animation=function(){!1!==this.options.animation&&"auto"!==this.options.padding||this.setConfig("animate",!1)},e.prototype.applyInteractions=function(){var t=this,e=this.options.interactions,n=void 0===e?[]:e;this.interactions&&this.interactions.forEach((function(t){t.destroy()})),this.interactions=[],n.forEach((function(e){var n=Ui.getInteraction(e.type,t.type);if(n){var i=new n({view:t.view},t,n.getInteractionRange(t.layerBBox,e.cfg),e.cfg);t.interactions.push(i)}}))},e.prototype.setConfig=function(t,e){"geometry"!==t?"interaction"!==t?!1!==e?Object(F.assign)(this.config[t],e):this.config[t]=!1:this.config.interactions.push(e):this.config.geometries.push(e)},e.prototype.parseEvents=function(e){var n=this,i=this.options;if(i.events){t.prototype.parseEvents.call(this,i.events);var r=e?e.EVENT_MAP:R;Object(F.each)(i.events,(function(t,e){if(Object(F.isFunction)(t)){var i=r[e]||e;X(n,i,t)}}))}},e.prototype.drawTitle=function(){var t=this.options,e=this.layerBBox;if(this.title&&(this.title.destroy(),this.title=null),Zn(t.title)){var n=this.width,i=this.config.theme,r=new Jn({leftMargin:e.minX+i.title.padding[3],rightMargin:e.maxX-i.title.padding[1],topMargin:e.minY+i.title.padding[0],text:t.title.text,style:Object(F.mix)(i.title,t.title.style),wrapperWidth:n-i.title.padding[3]-i.title.padding[1],container:this.container.addGroup(),theme:i,index:Zn(t.description)?0:1,plot:this,alignTo:t.title.alignTo,name:"title"});this.title=r,this.paddingController.registerPadding(r,"outer")}},e.prototype.drawDescription=function(){var t=this.options,e=this.layerBBox;if(this.description&&(this.description.destroy(),this.description=null),Zn(t.description)){var n=this.width,i=this.config.theme,r=0;if(this.title){var o=this.title.getBBox();r+=o.minY+o.height,r+=i.description.padding[0]}else r+=e.minY+i.title.padding[0];var a=new Jn({leftMargin:e.minX+i.description.padding[3],topMargin:r,rightMargin:e.maxX-i.title.padding[1],text:t.description.text,style:Object(F.mix)(i.description,t.description.style),wrapperWidth:n-i.description.padding[3]-i.description.padding[1],container:this.container.addGroup(),theme:i,index:1,plot:this,alignTo:t.description.alignTo,name:"description"});this.description=a,this.paddingController.registerPadding(a,"outer")}},e.prototype.doDestroy=function(){this.doDestroyInteractions(),this.view.destroyed||this.view.destroy()},e.prototype.doDestroyInteractions=function(){this.interactions&&this.interactions.forEach((function(t){t.destroy()})),this.interactions=[]},e.prototype.getViewRange=function(){var t=this,e=this.options.interactions,n=void 0===e?[]:e,i=this.layerBBox;return n.forEach((function(e){var n=Ui.getInteraction(e.type,t.type),r=n&&n.getInteractionRange(i,e.cfg),o="";r&&(r.maxY===i.maxY&&r.minY>i.minY?o="bottom":r.maxX===i.maxX&&r.minX>i.minX?o="right":r.minX===i.minX&&r.maxX>i.maxX?o="left":r.minY===i.minY&&r.maxY>i.maxY&&(o="top"),t.paddingController.registerPadding({getBBox:function(){return r},position:o},"outer"))})),this.paddingController.processOuterPadding()},e.prototype.viewRangeToRegion=function(t){var e=this.width,n=this.height,i={x:0,y:0},r={x:1,y:1};return i.x=t.minX/e,i.y=t.minY/n,r.x=t.maxX/e,r.y=t.maxY/n,{start:i,end:r}},e}(H),pr=n("bdgK"),fr=function(){function t(t){var e=this;this.onResize=Object(F.debounce)((function(){if(!e.plot.destroyed){var t=e.getCanvasSize(),n=t.width,i=t.height;e.width!==n&&(e.width=n,e.height=i,e.plot.updateConfig({width:n,height:i}),e.plot.render())}}),300);var n=t.containerDOM,i=t.plot;this.containerDOM=n,this.plot=i,this.init()}return t.prototype.getCanvasSize=function(){var t=er(),e=this.plot.width?this.plot.width:t.width,n=this.plot.height?this.plot.height:t.height;return this.plot.forceFit&&(e=this.containerDOM.offsetWidth?this.containerDOM.offsetWidth:e,n=this.containerDOM.offsetHeight?this.containerDOM.offsetHeight:n),{width:e,height:n}},t.prototype.getCanvasDOM=function(){return this.canvas.get("container")},t.prototype.updateCanvasSize=function(){var t=this.getCanvasSize(),e=t.width,n=t.height;this.width=e,this.height=n,this.canvas.changeSize(e,n)},t.prototype.updateCanvasTheme=function(){var t=this.plot.theme,e=lr.getGlobalTheme(t),n=Object(F.get)(e,"backgroundStyle.fill");n&&this.updateCanvasStyle({backgroundColor:n})},t.prototype.updateCanvasStyle=function(t){Object(ne.modifyCSS)(this.getCanvasDOM(),t)},t.prototype.destroy=function(){this.resizeObserver&&(this.resizeObserver.unobserve(this.containerDOM),this.resizeObserver.disconnect(),this.containerDOM=null),this.canvas.destroy()},t.prototype.bindForceFit=function(){this.plot.forceFit&&(this.resizeObserver=new pr.default(this.onResize),this.resizeObserver.observe(this.containerDOM))},t.prototype.init=function(){this.initGCanvas(),this.bindForceFit(),this.updateCanvasStyle({position:"relative"})},t.prototype.initGCanvas=function(){var t=this.plot,e=t.renderer,n=void 0===e?"canvas":e,i=t.pixelRatio,r=this.getCanvasSize(),o=r.width,a=r.height,s="canvas"===n?V.Canvas:W.Canvas;this.canvas=new s({container:this.containerDOM,width:o,height:a,pixelRatio:i}),this.width=o,this.height=a,this.updateCanvasTheme()},t}();var dr=function(){function t(t){this.plot=t.plot,this.canvas=t.canvas,this.pixelRatio=this.canvas.get("pixelRatio"),this.eventHandlers=[]}return t.prototype.bindEvents=function(){this.addEvent(this.canvas,"mousedown",Object(F.wrapBehavior)(this,"onEvents")),this.addEvent(this.canvas,"mousemove",Object(F.wrapBehavior)(this,"onMove")),this.addEvent(this.canvas,"mouseup",Object(F.wrapBehavior)(this,"onEvents")),this.addEvent(this.canvas,"click",Object(F.wrapBehavior)(this,"onEvents")),this.addEvent(this.canvas,"dblclick",Object(F.wrapBehavior)(this,"onEvents")),this.addEvent(this.canvas,"contextmenu",Object(F.wrapBehavior)(this,"onEvents")),this.addEvent(this.canvas,"wheel",Object(F.wrapBehavior)(this,"onEvents"))},t.prototype.clearEvents=function(){var t=this.eventHandlers;Object(F.each)(t,(function(t){t.target.off(t.type,t.handler)}))},t.prototype.addEvent=function(t,e,n){t.on(e,n),this.eventHandlers.push({target:t,type:e,handler:n})},t.prototype.onEvents=function(t){var e=this.getEventObj(t),n=t.target;!this.isShapeInView(n)&&n.name&&this.plot.emit(n.name+":"+t.type,t),this.plot.emit(""+t.type,e);var i=this.plot.getLayers();i.length>0&&this.onLayerEvent(i,e,t.type)},t.prototype.onMove=function(t){var e,n,i=t.target,r=this.getEventObj(t);!this.isShapeInView(i)&&i.name&&(this.plot.emit(i.name+":"+t.type,r),!this.lastShape||(e=i,n=this.lastShape,e&&n&&e===n)||(this.lastShape&&this.plot.emit(this.lastShape.name+":mouseleave",r),this.plot.emit(i.name+":mouseenter",r)),this.lastShape=i),this.plot.emit("mousemove",r);var o=this.plot.getLayers();o.length>0&&this.onLayerEvent(o,r,"mousemove")},t.prototype.isShapeInView=function(t){for(var e=["frontgroundGroup","backgroundGroup","panelGroup"],n=t.get("parent");n;){var i=n.get("name");if(i&&Object(F.contains)(e,i))return!0;n=n.get("parent")}return!1},t.prototype.getEventObj=function(t){return{x:t.x/this.pixelRatio,y:t.y/this.pixelRatio,target:t.target,event:t.event}},t.prototype.onLayerEvent=function(t,e,n){var i=this;Object(F.each)(t,(function(t){var r=t.getGlobalBBox();if(function(t,e){return t.x>=e.minX&&t.x<=e.maxX&&t.y>=e.minY&&t.y<=e.maxY}({x:e.x,y:e.y},r)){t.emit(""+n,e);var o=t.layers;o.length>0&&i.onLayerEvent(o,e,n)}}))},t}(),gr={};function yr(t,e){gr[t.toLowerCase()]=e}function vr(t){return gr[t.toLowerCase()]}var mr=function(t){function e(e,n){var i=t.call(this)||this;return i.containerDOM="string"==typeof e?document.getElementById(e):e,i.forceFit=Object(F.isNil)(n.forceFit)?Object(F.isNil)(n.width)&&Object(F.isNil)(n.height):n.forceFit,i.renderer=n.renderer||"canvas",i.pixelRatio=n.pixelRatio||null,i.width=n.width,i.height=n.height,i.theme=n.theme,i.canvasController=new fr({containerDOM:i.containerDOM,plot:i}),i.width=i.canvasController.width,i.height=i.canvasController.height,i.canvas=i.canvasController.canvas,i.layers=[],i.destroyed=!1,i.createLayers(n),i.eventController=new dr({plot:i,canvas:i.canvasController.canvas}),i.eventController.bindEvents(),i.parseEvents(n),i}return Object(L.__extends)(e,t),e.prototype.destroy=function(){this.eachLayer((function(t){t.destroy()})),this.canvasController.destroy(),this.eventController.clearEvents(),this.layers=[],this.destroyed=!0},e.prototype.repaint=function(){this.canvasController.canvas.draw()},e.prototype.updateConfig=function(t,e){if(void 0===e&&(e=!1),e)this.eachLayer((function(e){e instanceof hr&&e.updateConfig(t)}));else{var n=this.layers[0];n instanceof H&&n.updateConfig(t)}t.width&&(this.width=t.width),t.height&&(this.height=t.height),t.theme&&(this.theme=t.theme),this.canvasController.updateCanvasSize(),this.canvasController.updateCanvasTheme()},e.prototype.changeData=function(t,e){if(void 0===e&&(e=!1),e)this.eachLayer((function(e){e instanceof hr&&e.changeData(t)}));else{var n=this.layers[0];n instanceof hr&&n.changeData(t)}},e.prototype.getPlotTheme=function(){return this.layers[0].getPlotTheme()},e.prototype.getData=function(){return this.layers[0].getData()},e.prototype.bindStateManager=function(t,e){this.eachLayer((function(n){n instanceof hr&&n.bindStateManager(t,e)}))},e.prototype.setActive=function(t,e){this.eachLayer((function(n){n instanceof hr&&n.setActive(t,e)}))},e.prototype.setSelected=function(t,e){this.eachLayer((function(n){n instanceof hr&&n.setSelected(t,e)}))},e.prototype.setDisable=function(t,e){this.eachLayer((function(n){n instanceof hr&&n.setDisable(t,e)}))},e.prototype.setDefault=function(t,e){this.eachLayer((function(n){n instanceof hr&&n.setDefault(t,e)}))},e.prototype.getView=function(){return this.layers[0].view},e.prototype.getLayer=function(t){return void 0===t&&(t=0),this.layers[t]},e.prototype.getCanvas=function(){return this.canvasController.canvas},e.prototype.getLayers=function(){return this.layers},e.prototype.render=function(){this.eachLayer((function(t){return t.render()}))},e.prototype.eachLayer=function(t){Object(F.each)(this.layers,t)},e.prototype.addLayer=function(t){Object(F.findIndex)(this.layers,(function(e){return e===t}))<0&&this.layers.push(t)},e.prototype.createLayers=function(t){if(t.layers);else if(t.type){var e=new(vr(t.type))(Object(F.deepMix)({},t,{canvas:this.canvasController.canvas,x:0,y:0,width:this.width,height:this.height}));this.addLayer(e)}},e.prototype.parseEvents=function(t){var e=this,n=Object(F.keys)(N);t.events&&Object(F.each)(t.events,(function(t,i){if(Object(F.contains)(n,i)&&Object(F.isFunction)(t)){var r=N[i]||i,o=t;e.on(r,o)}}))},e}(D.a),xr=function(){function t(t){Object(F.assign)(this,t),this.init()}return t.prototype.init=function(){this.config={type:this.type,position:{fields:this.positionFields}}},t}(),br=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(L.__extends)(e,t),e.prototype.init=function(){var t=this.plot.options;this.config={type:"area",position:{fields:[t.xField,t.yField]},connectNulls:t.connectNulls||!1},t.smooth&&(this.config.shape={values:["smooth"]}),(this._getColorMappingField()||t.color)&&this.parseColor(),(t.areaStyle||t.area&&t.area.style)&&this.parseStyle()},e.prototype.parseColor=function(){var t=this.plot.options,e={},n=this._getColorMappingField();if(n&&(e.fields=n),Object(F.has)(t,"color")){var i=t.color;Object(F.isString)(i)?e.values=[i]:Object(F.isFunction)(i)?e.callback=i:e.values=i}this.config.color=e},e.prototype.parseStyle=function(){var t=this.plot.options,e=t.areaStyle?t.areaStyle:t.area.style,n={};Object(F.isFunction)(e)&&t.seriesField?(n.fields=[t.seriesField],n.callback=e):n.cfg=e,this.config.style=n},e.prototype._getColorMappingField=function(){for(var t=this.plot.options,e=0,n=["stackField","seriesField"];e0&&(this.config.color=e)},e.prototype.parseSize=function(){var t=this.plot.options,e={};e.values=[t.point.size],this.config.size=e},e.prototype.parseShape=function(t){var e={values:[t]};this.config.shape=e},e.prototype.parseStyle=function(){var t=this.plot.options,e=t.point&&t.point.style,n={fields:null,callback:null,cfg:null},i=this._getColorMappingField(t);Object(F.isFunction)(e)&&i?(n.fields=[i],n.callback=e):n.cfg=e,this.config.style=n},e.prototype._parseColorByField=function(t,e,n){if(e.fields=[n],t.point.color){for(var i=function(t,e){var n=[];return Object(F.each)(e,(function(e){var i=e[t];n.push(i)})),Object(F.uniq)(n)}(n,t.data).length,r=[],o=0;o=s.x&&o<=u.x){var c=(u.y-s.y)/(u.x-s.x);return[o,s.y+c*(o-s.x)]}}}Object(U.registerAnimation)("clipingWithData",(function(t,e,n){var i=t.get("element").geometry,r=t.get("index"),o=i.coordinate,a=i.scales[Lr.options.yField],s=Object(F.clone)(t.get("origin"));!function(t,e){var n=e.start,i=e.end,r=(e.width,e.height);t.setClip({type:"rect",attrs:{x:n.x,y:i.y,width:0,height:r}})}(t,o);var u,c=t.get("clipShape"),l=t.get("parent");e.seriesField&&(u=l.addShape("text",{attrs:{x:o.start.x+12,y:0,text:s[0]._origin[e.seriesField],fill:t.attr("stroke"),fontSize:12,textAlign:"start",textBaseline:"middle"}}));var h=u?16:0,p=l.addShape("text",{attrs:{x:o.start.x+12,y:h,text:"test"+r,fill:t.attr("stroke"),fontSize:12,textAlign:"start",textBaseline:"middle"}});e.callback=function(){t&&!t.get("destroyed")&&(t.setClip(null),c.remove(),p.animate({opacity:0},300,(function(){p.remove()})),u&&p.animate({opacity:0},300,(function(){p.remove()})))};var f=e.delay;Object(F.isFunction)(f)&&(f=e.delay(r));var d=e.easing;Object(F.isFunction)(d)&&(d=e.easing(r)),c.animate({width:o.getWidth()},e.duration,d,e.callback,f),e.onFrame=function(t){var e=Nr(t,s,o,0);if(e){p.attr("x",e[0]+12),p.attr("y",e[1]+h);var n=function(t,e,n){var i=(e-n.start.y)/(n.end.y-n.start.y);return t.invert(i).toFixed(2)}(a,e[1],o);a.formatter&&(n=a.formatter(n)),p.attr("text",n)}},p.animate(e.onFrame,{duration:e.duration,easing:d,callback:e.callback,delay:f}),u&&u.animate({onFrame:function(t){var e=Nr(t,s,o,0);e&&(u.attr("x",e[0]+12),u.attr("y",e[1]))}},e.duration,d,e.callback,f)}));var Yr=function(){function t(t){this.type="shape",this.shapes=t.shapes,this.nodes=[],this._parserNodes(),this.origion_nodes=Object(F.deepMix)([],this.nodes)}return t.prototype.measure=function(t){return Object(F.deepMix)({},function(t){var e,n=t.getBBox(),i=n.minX,r=n.minY,o=n.maxX-n.minX,a=n.maxY-n.minY,s=t.attr("matrix"),u=ai({x:0,y:0},e=s?[s[0],s[1],0,s[3],s[4],0,0,0,1]:[1,0,0,0,1,0,0,0,1]);u.x+=i,u.y+=r;var c=ai({x:o,y:0},e);c.x+=i,c.y+=r;var l=ai({x:0,y:a},e);l.x+=i,l.y+=r;var h=ai({x:o,y:a},e);h.x+=i,h.y+=r;var p=[u,c,l,h];p.sort((function(t,e){return t.y-e.y}));var f=p[0].y,d=p[p.length-1].y,g=[p[0],p[1]],y=[p[2],p[3]],v=g[0].x=n.value}},elementDistVertical:{type:"chain",usage:"compare",expression:function(t,e,n){void 0===n&&(n={value:5});var i=Math.abs(t.bottom-e.top);return Math.round(i)>=n.value}},elementCollision:{type:"group",usage:"compare",expression:function(t,e){var n=fi([t.topLeft,t.topRight,t.bottomRight,t.bottomLeft],[e.topLeft,e.topRight,e.bottomRight,e.bottomLeft]);return Math.round(n)>=2}},elementWidth:{type:"padding",usage:"compare",expression:function(t,e,n){return void 0===n&&(n={ratio:.15}),t.width=t[0]&&i=e)){var i=Math.floor(Math.log10(t));return Math.abs(i-n)}var r=t%e;if(r>0){var o=Math.floor(Math.log10(r));return Math.abs(o-n)}return 0}(function(t){if(t.length>=2){var e=parseFloat(t[0].shape.get("origin").text),n=parseFloat(t[1].shape.get("origin").text);return Math.abs(e-n)}return 0}(r),c)},o).num;t.attr("text",s+u)}}}function to(t,e){var n,i;if("auto"===t.unit){var r=Math.floor(Math.log(e)/Math.log(1e3));i=["k","m","b","t"][r-1],n=(e/Math.pow(1e3,r)).toFixed(t.decimal)}else if(t.unit){var o=Kr[t.unit];i=t.unit,n=(e/o.number).toFixed(t.decimal)}return{num:n,unitname:i}}function eo(t,e,n){var i=[];Object(F.each)(t,(function(t){"start"===t?i.push(0===e):"end"===t?i.push(e===n.length-1):Object(F.isNumber)(t)&&i.push(e===t)}));for(var r=0,o=i;r0;n--){var i=e[n];if(!i.shape.get("blank"))return i}}(n,r),u=s.centerX-a.centerX,c=s.centerY-a.centerY;Math.sqrt(u*u+c*c)90&&t<=180)return 180-t;if(t>180&&t<270)return t-180;return 360-t}(s);var u=Math.abs(t.centerX-e.centerX),c=Math.abs(t.centerY-e.centerY);s>45?n="x":s<45&&(n="y");return{dir:n,distX:u,distY:c}}(r[n],r[n+1]),a=o.dir,s=(o.distX,o.distY,t.get("startPoint"));"x"===a&&t.attr("y",s.y+20)}},nodeJitterUpward:function(t,e,n,i){var r=i.nodes.nodes;if(0!==n){var o=r[n],a=r[n-1];if(zr(o,a)){var s=i.plot.plot.get("elements")[0],u=a.top-o.height/2;if(u-10>i.region.top){var c=o.shape.get("origin"),l=function(t,e){var n;return Object(F.each)(e,(function(e){var i=e;i.get("id")===t&&(n=i)})),n}(s.getShapeId(c),s.getShapes()).get("box"),h=l.left+l.width/2,p=l.top,f=s.get("labelController").labelsContainer.addShape("path",{attrs:{path:[["M",h,p],["L",o.shape.attr("x"),u]],stroke:"#ccc",lineWidth:1}}),d={x:t.attr("x"),y:t.attr("y")};o.shape.attr("y",u-10),r[n]=i.nodes.measure(o.shape),r[n].line=f,r[n].origin_position=d}}}},clearOverlapping:function(t,e,n,i){var r=i.nodes.nodes,o=r[n],a=[];if(!o.shape.get("blank"))for(var s=0;s0&&(a.push(o),a.sort((function(t,e){return e.top-t.top})),Object(F.each)(a,(function(t,e){if(e>0){var n=t.shape;Gr(n),n.set("blank",!0)}})))}};var oo=function(){function t(t){this.iterationTime=10,this.iterationIndex=0,this.rulesLocker=[],this.constraintIndex=0,Object(F.assign)(this,t),this.currentConstraint=this.constraints[0],this.rules&&(this.iterationTime=this.rules[this.currentConstraint.name].length),this._start(),this._run(),this._end()}return t.prototype._start=function(){this.onStart&&this.onStart(this.nodes)},t.prototype._iteration=function(){var t;"shape"===(t=(this.nodes.type,this.nodes)).type&&t.measureNodes(),this.rules&&this._applyRules(),"shape"===t.type&&t.measureNodes(),this.onIteration&&this.onIteration(this.nodes)},t.prototype._end=function(){this.onEnd&&this.onEnd(this.nodes)},t.prototype._run=function(){for(var t=this._constraintsTest();!(t||this.iterationIndex>this.iterationTime-1);)this._iteration(),t=this._constraintsTest(),this.iterationIndex++;this.constraintIndex0?Object(F.isNil)(e.min)&&(e.min=0):o<0&&Object(F.isNil)(e.max)&&(e.max=0),t.prototype.scale.call(this)},e.prototype.coord=function(){},e.prototype.addGeometry=function(){this.addLine(),this.addPoint()},e.prototype.addLine=function(){var t=this.options;this.line=Fr("line","main",{plot:this}),t.label&&this.label(),t.tooltip&&(t.tooltip.fields||t.tooltip.formatter)&&this.geometryTooltip(),this.setConfig("geometry",this.line)},e.prototype.addPoint=function(){var t=this.options;t.point&&(t.point=Object(F.deepMix)({visible:!1},t.point)),t.point&&t.point.visible&&(this.point=Fr("point","guide",{plot:this}),this.setConfig("geometry",this.point))},e.prototype.label=function(){var t=this.options,e=t.label;!1===e.visible||this.singleLineLabelCheck()?this.line.label=!1:"point"===e.type&&(this.line.label=Ni("label",Object(L.__assign)({plot:this,top:!0,labelType:e.type,fields:[t.yField]},e)))},e.prototype.geometryTooltip=function(){this.line.tooltip={};var t=this.options.tooltip;t.fields&&(this.line.tooltip.fields=t.fields),t.formatter&&(this.line.tooltip.callback=t.formatter,t.fields||(this.line.tooltip.fields=[this.options.xField,this.options.yField],this.options.seriesField&&this.line.tooltip.fields.push(this.options.seriesField)))},e.prototype.animation=function(){t.prototype.animation.call(this);var e,n=this.options;!1===n.animation?(this.line.animate=!1,this.point&&(this.point.animate=!1)):Object(F.has)(n,"animation")&&"clipingWithData"===n.animation.type&&"auto"!==n.padding&&(e={options:this.options,view:this.view},Lr=e,this.line.animate={appear:{animation:"clipingWithData",easing:"easeLinear",duration:1e4,options:{test:!0},yField:n.yField,seriesField:n.seriesField,plot:this}},n.point&&n.point.visible&&(this.point.animate=!1))},e.prototype.applyInteractions=function(){t.prototype.applyInteractions.call(this),this.interactions.push(new go({view:this.view})),this.interactions.push(new yo({view:this.view}))},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,p)},e.prototype.applyResponsive=function(t){var e=this,n=ho[t];Object(F.each)(n,(function(t){t.method(e)}))},e.prototype.singleLineLabelCheck=function(){return!this.options.seriesField&&this.options.label.type&&"line"===this.options.label.type},e}(hr),xo=mo;yr("line",mo);var bo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="line",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=xo.getDefaultOptions,e}(mr);function Mo(t,e,n,i,r){var o=i-e,a=t.children,s=t.value;a.sort((function(t,e){return e.value-t.value}));var u=o/s,c=e;Object(F.each)(a,(function(t){t.y0=n,t.y1=r,t.x0=c,c+=t.value*u,t.x1=t.x0+t.value*u}))}function _o(t,e,n,i,r){var o=r-n,a=t.children,s=t.value;a.sort((function(t,e){return e.value-t.value}));var u=o/s,c=n;Object(F.each)(a,(function(t){t.x0=e,t.x1=i,t.y0=c,c+=t.value*u,t.y1=t.y0+t.value*u}))}var wo=(1+Math.sqrt(5))/2;function Oo(t,e,n,i,r){var o=t.children,a=t.value;o.sort((function(t,e){return e.value-t.value}));for(var s,u,c,l,h,p,f,d,g=[],y=0,v=0;yu&&(u=d),h=(s+=d)*s*l,(p=Math.max(u/h,h/c))>f){s-=d;break}f=p}var b={value:s,dice:m=u){var h=s.substr(0,s.length-1);if(h.length>0)return h+"..."}}return a.remove(),r.remove(),s}var zo=function(){function t(t){this.destroyed=!1,this.view=t.view,this.plot=t.plot;var e=this.getDefaultOptions();this.options=Object(F.deepMix)(e,t,{}),this.init()}return t.prototype.init=function(){var t=this;this.container=this.getGeometry().labelsContainer,this.view.on("beforerender",(function(){t.clear(),t.plot.canvas.draw()}))},t.prototype.render=function(){var t=this,e=this.getGeometry().elements;Object(F.each)(e,(function(e){var n=e.shape,i=n.get("origin").data,r=function(t,e){return!t.children||t.depth>=e}(i,t.plot.options.maxLevel);if(i.showLabel){var o=Object(F.clone)(t.options.style),a=t.getPosition(n,r),s=t.options.formatter,u=s?s(i.name):i.name,c=t.getTextBaseLine(r),l=t.container.addShape("text",{attrs:Object(F.deepMix)({},o,{x:a.x,y:a.y,text:u,fill:"black",textAlign:"center",textBaseline:c,fontWeight:r?300:600}),name:"label"});t.adjustLabel(l,n,r)}}))},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.hide=function(){this.container.set("visible",!1),this.plot.canvas.draw()},t.prototype.show=function(){this.container.set("visible",!0),this.plot.canvas.draw()},t.prototype.destory=function(){this.container&&this.container.remove(),this.destroyed=!0},t.prototype.getBBox=function(){},t.prototype.getPosition=function(t,e){var n=t.getBBox(),i=0,r=0;return e?(i=n.minX+n.width/2,r=n.minY+n.height/2):(i=n.x+n.width/2,r=n.y+4),{x:i,y:r}},t.prototype.getTextBaseLine=function(t){return t?"middle":"top"},t.prototype.adjustLabel=function(t,e,n){n?this.adjustLeafLabel(t,e):this.adjustParentLabel(t,e)},t.prototype.adjustLeafLabel=function(t,e){var n=e.getBBox(),i=t.getBBox(),r=Object(F.clone)(t.attr("text")),o=Math.max(t.attr("fontSize")-2,8),a=n.x+n.width/2,s=n.y+n.height/2;t.attr({x:a,y:s,textAlign:"center",textBaseline:"middle",lineHeight:o,fontSize:o});var u=n.width-8;if(i.width>n.width&&i.height>n.height)t.attr("text","");else if(un.width){var c=function(t,e,n){var i=t.attr("fontSize"),r=t.attr("text"),o=n.addShape("text",{attrs:{text:"",x:0,y:0,fontSize:i}}),a=r.split("\n").map((function(t){for(var n="",i=t.split(""),r=[],a=0;ae){if(0===a)break;r.push(a),n=""}}return $n(i,r)}));return o.remove(),a.join("\n")}(t,u,this.container);if(t.attr({lineHeight:t.attr("fontSize"),text:c}),t.getBBox().height>n.height){var l=Go(r,o,u,this.container);t.attr("text",l)}}},t.prototype.adjustParentLabel=function(t,e){var n=e.getBBox().width-8;if(t.getBBox().width>n){var i=Go(t.attr("text"),t.attr("fontSize"),n,this.container);t.attr("text",i)}},t.prototype.getDefaultOptions=function(){var t=this.plot.theme.label.style;return{offsetX:0,offsetY:0,style:Object(F.clone)(t)}},t.prototype.getGeometry=function(){return Object(F.find)(this.view.geometries,(function(t){return"polygon"===t.type}))},t}(),qo=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="treemap",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{maxLevel:2,padding:[0,0,0,0],tooltip:{visible:!1,showTitle:!1,showCrosshairs:!1,showMarkers:!1,shared:!1},legend:{visible:!1},xAxis:{visible:!1},yAxis:{visible:!1},xField:"x",yField:"y",label:{visible:!0,adjustPosition:!0,style:{stroke:"rgba(0,0,0,0)",lineWidth:0,fontSize:12}},meta:{x:{nice:!1},y:{nice:!1}},interactions:[{type:"tooltip"}]})},e.prototype.beforeInit=function(){var e=this;t.prototype.beforeInit.call(this);var n=this.options.interactions;n&&Object(F.each)(n,(function(t){"drilldown"===t.type&&(e.isDrilldown=!0,e.options.maxLevel=1)}));var i=this.options.data,r=this.getTreemapData(i);this.rootData=r},e.prototype.afterRender=function(){(t.prototype.afterRender.call(this),this.options.label&&this.options.label.visible)&&new zo(Object(L.__assign)({view:this.view,plot:this},this.options.label)).render()},e.prototype.geometryParser=function(t,e){return"polygon"},e.prototype.getTreemapData=function(t,e){var n=this.getViewRange(),i=Oo(t,n.x,n.y,n.width,n.height);this.recursive(i,1);var r=[];return this.getAllNodes(i,r,e),r.sort((function(t,e){return t.depth-e.depth})),this.options.xField="x",this.options.yField="y",r},e.prototype.processData=function(){return this.rootData},e.prototype.coord=function(){},e.prototype.addGeometry=function(){var t=this,e=this.options,n=e.data,i=e.colorField,r=e.color,o=this.getTreemapData(n);this.rootData=o;var a=this.isNested(o);this.rect={type:"polygon",position:{fields:["x","y"]},color:{fields:[i],values:r},style:{fields:["depth"],callback:function(e){var n=t.adjustStyleByDepth(e,a);return Object(F.deepMix)({},n,t.options.rectStyle)}},tooltip:{fields:["name","value"]}},this.options.tooltip&&this.options.tooltip.formatter&&(this.rect.tooltip.callback=this.options.tooltip.formatter),this.setConfig("geometry",this.rect)},e.prototype.applyInteractions=function(){var t=this,e=this.options.interactions,n=this.view.interactions;Object(F.each)(e,(function(e){var i=Yo[e.type];if(i){var r=new i(Object(F.deepMix)({},{view:t.view,plot:t,startEvent:"polygon:click"},e.cfg,i.getInteractionRange(t.layerBBox,e.cfg)));n[e.type]=r}}))},e.prototype.animation=function(){t.prototype.animation.call(this),this.isDrilldown&&(this.rect.animate=!1)},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,f)},e.prototype.recursive=function(t,e){var n=this,i=this.options.colorField;Object(F.each)(t,(function(t){Object(F.each)(t.children,(function(r){if(r.depth=e,e>1&&(r.parent=t),Object(F.hasKey)(r,i)||(r[i]=t[i]),r.showLabel=!0,!n.isLeaf(r)){var o=Math.abs(r.y1-r.y0),a=n.getLabelHeight(),s=o/2>a?a:4;r.showLabel=4!==s;var u=Oo(r,r.x0+4,r.y0+s,r.x1-4,r.y1-4);n.fillColorField(u,i,r[i]),n.recursive(u,r.depth+1)}}))}))},e.prototype.getAllNodes=function(t,e,n){var i=this,r=n||this.options.maxLevel,o=this.getViewRange();Object(F.each)(t,(function(t){Object(F.hasKey)(t,"x0")&&t.depth<=r&&e.push(Object(L.__assign)(Object(L.__assign)({},t),{x:[t.x0,t.x1,t.x1,t.x0],y:[o.height-t.y1,o.height-t.y1,o.height-t.y0,o.height-t.y0]})),Object(F.hasKey)(t,"children")&&i.getAllNodes(t.children,e)}))},e.prototype.fillColorField=function(t,e,n){Object(F.each)(t,(function(t){Object(F.hasKey)(t,e)||(t[e]=n)}))},e.prototype.getLabelHeight=function(){var t=this.options.label,e=this.getPlotTheme().label.style.fontSize,n=0;if(t&&t.visible){var i=t.style;n=i&&i.fontSize?i.fontSize:e}return n+8},e.prototype.isLeaf=function(t){return!t.children||0===t.children.length},e.prototype.isNested=function(t){if(1===this.options.maxLevel)return!1;for(var e=!1,n=0;n0&&r._drawTag(n,i,t,e),i=e,n=t})):s.forEach((function(n,o){i=a[o],o++>0&&r._drawTag(n,i,t,e),e=i,t=n}))},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.destory=function(){this.container&&this.container.remove()},t.prototype._drawTag=function(t,e,n,i){var r=this.transpose,o=this.view.geometries[0].coordinate,a=Uo(t,o)[r?3:0],s=Uo(n,o)[r?0:3];this._drawTagArrow(a,s),this._drawTagValue(a,e,s,i)},t.prototype._drawTagArrow=function(t,e){var n,i=this.spacing,r=this.size,o=this.offset,a=this.animation,s=this.transpose,u=this.arrow.headSize,c=e.y-t.y,l=e.x-t.x;s?(l-u)/2l){var p=h/u.length,f=Math.max(1,Math.ceil(l/p)-1),d=u.slice(0,f)+"...";c.attr("text",d)}}!1!==a&&this._fadeInTagShape(c)},t.prototype._fadeInTagShape=function(t){var e=this.animation,n=t.attr("opacity");t.attr("opacity",0);var i=Object(F.get)(e,"appear",Z.DEFAULT_ANIMATE_CFG.appear).duration;t.animate({opacity:n},i)},t}();var Zo={preRender:[],afterRender:[{name:"responsiveAxis",method:function(t){var e=t.getResponsiveTheme(),n=t.canvas;new uo({plot:t,responsiveTheme:e,dim:"x"}),new uo({plot:t,responsiveTheme:e,dim:"y"}),n.draw()}}]};function $o(t){var e=[];return e.push(parseInt(t.substr(1,2),16)),e.push(parseInt(t.substr(3,2),16)),e.push(parseInt(t.substr(5,2),16)),e}function Ko(t,e){var n;return Object(F.each)(t,(function(t){var i=t;e>=i.from&&e0?r:o)+l*f:n="right"===p?o+l*f:r+u/2+l;return{x:n,y:a+s/2+h}},t.prototype.getTextColor=function(t){if(this.options.adjustColor&&"right"!==this.options.position){var e=t.attr("fill"),n=t.attr("opacity")?t.attr("opacity"):1,i=$o(e);return Ko([{from:0,to:85,color:"white"},{from:85,to:170,color:"#F6F6F6"},{from:170,to:255,color:"black"}],Math.round(.299*i[0]+.587*i[1]+.114*i[2])/n)}return this.options.style.fill},t.prototype.getTextAlign=function(t){var e=this.options.position;return t<0?{right:"right",left:"right",middle:"center"}[e]:{right:"left",left:"left",middle:"center"}[e]},t.prototype.getValue=function(t){return t.get("origin").data[this.plot.options.xField]},t.prototype.adjustLabel=function(t,e){if(this.options.adjustPosition&&"right"!==this.options.position){var n=t.getBBox(),i=e.getBBox();if(i.width<=n.width){var r=i.maxX+this.options.offsetX;t.attr("x",r),t.attr("fill",this.options.style.fill)}}},t.prototype.getDefaultOptions=function(){var t=this.plot.theme.label.style;return{offsetX:8,offsetY:0,style:Object(F.clone)(t),adjustPosition:!0}},t.prototype.getShapeBbox=function(t){var e=this,n=[];return Object(F.each)(t.get("origin").points,(function(t){n.push(e.coord.convertPoint(t))})),new q(n[0].x,n[2].y,Math.abs(n[1].x-n[0].x),Math.abs(n[0].y-n[2].y))},t.prototype.getGeometry=function(){var t,e=this.view.geometries;return Object(F.each)(e,(function(e){"interval"===e.type&&(t=e)})),t},t}();Object(F.assign)(R,{onBarClick:"interval:click",onBarDblclick:"interval:dblclick",onBarMousemove:"interval:mousemove",onBarMouseenter:"interval:mouseenter",onBarMouseleave:"interval:mouseleave",onBarMousedown:"interval:mousedown",onBarMouseup:"interval:mouseup",onBarContextmenu:"interval:contextmenu"});ir("bar",{columnStyle:{normal:{},active:function(t){return{opacity:.5*(t.opacity||1)}},disable:function(t){return{opacity:.5*(t.opacity||1)}},selected:{lineWidth:1,stroke:"black"}}});var ta={bar:"interval"},ea={interval:"bar"},na=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bar",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{xAxis:{visible:!0,line:{visible:!1},title:{visible:!0},label:{visible:!1},tickLine:{visible:!1},grid:{visible:!1}},yAxis:{visible:!0,autoRotateTitle:!0,nice:!0,grid:{visible:!1},line:{visible:!1},tickLine:{visible:!1},label:{visible:!0,autoRotate:!1,autoHide:!0},title:{visible:!1,offset:12}},tooltip:{visible:!0,shared:!0,showCrosshairs:!1,showMarkers:!1},label:{visible:!0,position:"left",adjustColor:!0},legend:{visible:!1,position:"top-left"},interactions:[{type:"tooltip"},{type:"active-region"},{type:"legend-active"},{type:"legend-filter"}],conversionTag:{visible:!1}})},e.prototype.beforeInit=function(){t.prototype.beforeInit.call(this);var e=this.options;e.responsive&&"auto"!==e.padding&&this.applyResponsive("preRender")},e.prototype.afterRender=function(){var e=this.options;this.renderLabel(),e.responsive&&"auto"!==e.padding&&this.applyResponsive("afterRender"),e.conversionTag.visible&&(this.conversionTag=new Qo(Object(L.__assign)({view:this.view,field:e.xField,animation:!1!==e.animation},e.conversionTag))),t.prototype.afterRender.call(this)},e.prototype.geometryParser=function(t,e){return"g2"===t?ta[e]:ea[e]},e.prototype.processData=function(t){var e=t?t.slice().reverse():t,n=this.options.yField,i=[];return Object(F.each)(e,(function(t){var e=Object(F.clone)(t);e[n]=e[n].toString(),i.push(e)})),i},e.prototype.scale=function(){var e=this.options,n={};n[e.yField]={type:"cat"},Object(F.has)(e,"yAxis")&&Rr(n[e.yField],e.yAxis),n[e.xField]={},Object(F.has)(e,"xAxis")&&Rr(n[e.xField],e.xAxis),this.setConfig("scales",n),t.prototype.scale.call(this)},e.prototype.coord=function(){this.setConfig("coordinate",{actions:[["transpose"]]})},e.prototype.axis=function(){var t=Ni("axis",{plot:this,dim:"x"}),e=Ni("axis",{plot:this,dim:"y"});t&&(t.position="left"),e&&(e.position="bottom");var n={};n[this.options.xField]=t,n[this.options.yField]=e,this.setConfig("axes",n)},e.prototype.adjustBar=function(t){},e.prototype.addGeometry=function(){var t=this.options,e=Fr("interval","main",{positionFields:[t.yField,t.xField],plot:this});t.conversionTag.visible&&this.setConfig("theme",Object(F.deepMix)({},this.getTheme(),{columnWidthRatio:1/3})),this.adjustBar(e),this.bar=e,t.tooltip&&(t.tooltip.fields||t.tooltip.formatter)&&this.geometryTooltip(),this.setConfig("geometry",e)},e.prototype.animation=function(){t.prototype.animation.call(this),!1===this.options.animation&&(this.bar.animate=!1)},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,d)},e.prototype.renderLabel=function(){var t=this.config.scales[this.options.yField];this.options.label&&this.options.label.visible&&new Jo(Object(L.__assign)({view:this.view,plot:this,formatter:t.formatter},this.options.label)).render()},e.prototype.geometryTooltip=function(){this.bar.tooltip={};var t=this.options.tooltip;t.fields&&(this.bar.tooltip.fields=t.fields),t.formatter&&(this.bar.tooltip.callback=t.formatter,t.fields||(this.bar.tooltip.fields=[this.options.xField,this.options.yField],this.options.colorField&&this.bar.tooltip.fields.push(this.options.colorField)))},e.prototype.applyResponsive=function(t){var e=this,n=Zo[t];Object(F.each)(n,(function(t){t.method(e)}))},e.prototype.getLabelOptionsByPosition=function(t){return"middle"===t?{offset:0}:"left"===t?{offset:7,style:{stroke:null,lineWidth:0}}:"right"===t?{offset:4}:void 0},e}(hr),ia=na;yr("bar",na);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="bar",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=ia.getDefaultOptions}(mr);var ra=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(L.__extends)(e,t),e.prototype.getDefaultOptions=function(){var t=this.plot.theme.label.style;return{offsetX:8,offsetY:0,style:Object(F.clone)(t),adjustPosition:!0}},e.prototype.adjustLabel=function(t,e){if(this.options.adjustPosition){var n=t.getBBox();this.getShapeBbox(e).width<=n.width&&t.attr("text","")}},e}(Jo),oa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stackedBar",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{xAxis:{visible:!0,autoRotateTitle:!1,grid:{visible:!0},line:{visible:!1},tickLine:{visible:!0},label:{visible:!0,autoRotate:!0,autoHide:!0},title:{visible:!0,offset:12}},yAxis:{visible:!0,autoRotateTitle:!0,grid:{visible:!1},line:{visible:!1},tickLine:{visible:!1},label:{visible:!0,autoRotate:!0,autoHide:!0},title:{visible:!1,offset:12}},legend:{visible:!0,position:"top-left",offsetY:0}})},e.prototype.adjustBar=function(t){t.adjust=[{type:"stack"}]},e.prototype.renderLabel=function(){var t=this.config.scales[this.options.yField];this.options.label&&this.options.label.visible&&new ra(Object(L.__assign)({view:this.view,plot:this,formatter:t.formatter},this.options.label)).render()},e.prototype.geometryTooltip=function(){this.bar.tooltip={};var t=this.options.tooltip;t.fields&&(this.bar.tooltip.fields=t.fields),t.formatter&&(this.bar.tooltip.callback=t.formatter,t.fields||(this.bar.tooltip.fields=[this.options.xField,this.options.yField,this.options.stackField]))},e}(ia),aa=oa;yr("stackedBar",oa);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="stackedBar",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=aa.getDefaultOptions}(mr);var sa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="groupedBar",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{xAxis:{visible:!0,grid:{visible:!0}},yAxis:{visible:!0,title:{visible:!1}},label:{visible:!0,position:"right",offset:8,adjustColor:!0},legend:{visible:!0,position:"right-top",offsetY:0}})},e.prototype.afterRender=function(){t.prototype.afterRender.call(this);var e=Object(F.valuesOfKey)(this.options.data,this.options.groupField);this.view.on("tooltip:change",(function(t){for(var n=t.items,i=Object(F.clone)(n),r=0;r=1||r===t.length-1&&a===n.length-1)&&(i[o]=1-e),e+=i[o]}))}))})),o},la=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="percentStackedBar",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{xAxis:{visible:!0,tickLine:{visible:!1},grid:{visible:!1},title:{visible:!0,formatter:function(t){return t+" (%)"}},label:{visible:!1,formatter:function(t){return t.replace(/%/gi,"")}}}})},e.prototype.processData=function(e){var n=this.options,i=n.xField,r=n.yField,o=t.prototype.processData.call(this,e);return ca(o,r,[i])},e.prototype.scale=function(){var e={},n=this.options.xField;e[n]={tickCount:6,alias:n+" (%)",min:0,max:1,formatter:function(t){return(100*t).toFixed(1)+"%"}},this.options.meta=e,t.prototype.scale.call(this)},e}(aa),ha=la;yr("percentStackedBar",la);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="percentStackedBar",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=ha.getDefaultOptions}(mr);var pa,fa=function(){function t(t){this.destroyed=!1,this.view=t.view,this.plot=t.plot;var e=this.getDefaultOptions();this.options=Object(F.deepMix)(e,t,{}),this.options.leftStyle||(this.options.leftStyle=this.options.style),this.options.rightStyle||(this.options.rightStyle=this.options.style),this.init()}return t.prototype.init=function(){var t=this;this.container=this.getGeometry().labelsContainer,this.view.on("beforerender",(function(){t.clear(),t.plot.canvas.draw()}))},t.prototype.render=function(){var t=this,e=this.getGeometry(),n=e.elements,i=e.coordinate;this.coord=i,Object(F.each)(n,(function(e){var n=e.shape,i=t.getPosition(n),r=t.getValue(n),o=t.getTextAlign(),a=[];Object(F.each)(i,(function(e,i){var s=0===i?t.options.leftStyle:t.options.rightStyle,u=t.getTextColor(n,i);"inner"===t.options.position&&t.options.adjustColor&&"black"!==u&&(s.stroke=null);var c=t.options.formatter,l=c?c(r[i]):r[i],h=t.container.addShape("text",{attrs:Object(F.deepMix)({},s,{x:e.x,y:e.y,text:l,fill:u,textAlign:o[i],textBaseline:"middle"}),name:"label"});a.push(h),t.doAnimation(h)})),n.set("labelShapes",a),t.adjustPosition(a[0],a[1],n)})),this.plot.canvas.draw()},t.prototype.hide=function(){this.container.set("visible",!1),this.plot.canvas.draw()},t.prototype.show=function(){this.container.set("visible",!0),this.plot.canvas.draw()},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.destory=function(){this.container&&this.container.remove(),this.destroyed=!0},t.prototype.getBBox=function(){},t.prototype.getShapeBbox=function(t){var e=this,n=[];return Object(F.each)(t.get("origin").points,(function(t){n.push(e.coord.convertPoint(t))})),new q(n[0].x,n[1].y,Math.abs(n[2].x-n[0].x),Math.abs(n[0].y-n[1].y))},t.prototype.getDefaultOptions=function(){var t=this.plot.theme.label.style;return{position:"outer",offsetX:8,offsetY:0,style:Object(F.clone)(t),adjustColor:!0,adjustPosition:!0}},t.prototype.getPosition=function(t){var e,n,i=this.getShapeBbox(t),r=i.minX,o=i.maxX,a=i.minY,s=i.height,u=(i.width,this.options),c=u.offsetX,l=a+s/2+u.offsetY;return"outer"===this.options.position?(e=r-c,n=o+c):(e=r+c,n=o-c),[{x:e,y:l},{x:n,y:l}]},t.prototype.getValue=function(t){var e=this.plot.options.xField;return t.get("origin").data[e]},t.prototype.getTextAlign=function(){return"outer"===this.options.position?["right","left"]:["left","right"]},t.prototype.getTextColor=function(t,e){if(this.options.adjustColor&&"inner"===this.options.position){var n=t.attr("fill"),i=t.attr("opacity")?t.attr("opacity"):1,r=$o(n);return function(t,e){var n;return Object(F.each)(t,(function(t){var i=t;e>=i.from&&e2||h>a)&&(c=r-this.options.offsetX,t.attr("fill",this.options.leftStyle.fill),t.attr("textAlign","right"),u[0]=t.getBBox(),l=o+this.options.offsetX,e.attr("fill",this.options.rightStyle.fill),e.attr("textAlign","left"),u[1]=e.getBBox())}u[0].minXi.x&&(i=e),e.x>t&&e.xe)break}return n}var Sa={lineLabel:{Ctr:wa},areaLabel:{Ctr:function(){function t(t){this.destroyed=!1,this.scaleFactor=[],this.view=t.view,this.plot=t.plot;var e=this.getDefaultOptions();this.options=Object(F.deepMix)(e,t,{}),this.init()}return t.prototype.init=function(){var t=this;this.container=this.getGeometry().labelsContainer,this.view.on("beforerender",(function(){t.clear(),t.plot.canvas.draw()}))},t.prototype.render=function(){var t=this,e=this.plot.options.stackField,n=this.getGeometry().dataArray,i=[];Object(F.each)(n,(function(e,n){var r=t.drawLabel(e,n);r&&(i.push(Object(F.deepMix)({},e[0],r)),t.scaleFactor.push(r.scaleFactor))}));var r=[];Object(F.each)(i,(function(n,i){var o=t.options,a=o.style,s=o.offsetX,u=o.offsetY,c=t.getFontSize(i),l=t.options.formatter,h=l?l(n._origin[e]):n._origin[e],p=t.container.addShape("text",{attrs:Object(F.deepMix)({},{x:n.x+s,y:n.y+u,text:h,fill:n.color,fontSize:c,textAlign:"center",textBaseline:"top"},a),name:"label"});r.push(p)})),this.plot.canvas.draw()},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.hide=function(){this.container.set("visible",!1),this.plot.canvas.draw()},t.prototype.show=function(){this.container.set("visible",!0),this.plot.canvas.draw()},t.prototype.destory=function(){this.container&&this.container.remove(),this.destroyed=!0},t.prototype.getBBox=function(){},t.prototype.getDefaultOptions=function(){var t=this.plot.theme,e=Object(F.clone)(t.label.style);return e.stroke=null,delete e.fill,{offsetX:0,offsetY:0,style:e,autoScale:!0}},t.prototype.drawLabel=function(t,e){var n=function(t){var e=-1/0,n=1/0,i=-1/0;return Object(F.each)(t,(function(t){n=Math.min(t.x,n),i=Math.max(t.x,i);var r=Math.abs(t.y[0]-t.y[1]);e=Math.max(e,r)})),{xRange:[n,i],maxHeight:e}}(t),i=n.xRange,r=n.maxHeight,o=i[1]-i[0],a=this.getInterpolatedPoints(i[0],o,t),s=this.getLabelBbox(e),u={xRange:i,aspect:s.width/s.height,data:a,justTest:!0},c=this.bisection(12,r,this.testFit,u,.01,100);if(null!==c){u.justTest=!1;var l=this.testFit(u);return l.x=l.x,l.y=l.y0+(l.y1-l.y0)/2,l.scaleFactor=c/s.height*.2,l}},t.prototype.getInterpolatedPoints=function(t,e,n){for(var i=[],r=t;re[1])break;for(var c=Ca(r,u),l=-1/0,h=null,p=1/0,f=a;fl&&(l=d,h=g),p-l=i)return!!o||{x:s,y0:l,y1:h,width:n,height:i}}return!1},t.prototype.getLabelBbox=function(t){var e=Object(F.clone)(this.plot.theme.label.textStyle);e.fontSize=12;var n=this.container.addShape("text",{attrs:Object(L.__assign)({text:t,x:0,y:0},e)}),i=n.getBBox();return n.remove(),i},t.prototype.getGeometry=function(){return Object(F.find)(this.view.geometries,(function(t){return"area"===t.type}))},t.prototype.getFontSize=function(t){return this.options.autoScale?12*this.scaleFactor[t]:12},t}()}};var Aa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.plotComponents=[],e.type="stackedArea",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{label:{visible:!1,type:"area"}})},e.prototype.beforeInit=function(){var e=Object(F.get)(this.options,["label","visible"]),n=Object(F.get)(this.options,["label","type"]),i=this.options;e&&("line"===n&&(i.lineLabel=this.options.label),"area"===n&&(i.areaLabel=this.options.label)),t.prototype.beforeInit.call(this)},e.prototype.label=function(){var t=this.options,e=t.label;if(!1===e.visible)return this.line&&(this.line.label=!1),this.point&&(this.point.label=!1),void(this.area.label=!1);"point"===e.type&&(this.area.label=Ni("label",{fields:[t.yField],plot:this}))},e.prototype.adjustArea=function(t){t.adjust=[{type:"stack"}]},e.prototype.adjustLine=function(t){t.adjust=[{type:"stack"}]},e.prototype.adjustPoint=function(t){t.adjust=[{type:"stack"}]},e.prototype.afterRender=function(){this.renderPlotComponents(),this.options.responsive=!1,t.prototype.afterRender.call(this)},e.prototype.geometryTooltip=function(){this.area.tooltip={};var t=this.options.tooltip;t.fields&&(this.area.tooltip.fields=t.fields),t.formatter&&(this.area.tooltip.callback=t.formatter,t.fields||(this.area.tooltip.fields=[this.options.xField,this.options.yField,this.options.stackField]))},e.prototype.renderPlotComponents=function(){var t=this;Object(F.each)(["areaLabel","lineLabel"],(function(e){var n=Object(L.__assign)({view:t.view,plot:t},t.options[e]),i=function(t,e,n){if(t.options[e]&&t.options[e].visible){var i=Sa[e],r=new i.Ctr(n);return i.padding&&t.paddingController.registerPadding(r,i.padding),r}}(t,e,n);i&&(i.render(),t.plotComponents.push(i))}))},e}(Ma),Pa=Aa;yr("stackedArea",Aa);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="stackedArea",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=Pa.getDefaultOptions}(mr);var ja=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="percentStackedArea",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{yAxis:{visible:!0,label:{visible:!0,formatter:function(t){return t.replace(/%/gi,"")}}}})},e.prototype.processData=function(t){var e=this.options,n=e.xField,i=e.yField;return ca(t,n,[i])},e.prototype.scale=function(){var e={},n=this.options.yField;e[this.options.yField]={tickCount:6,alias:n+" (%)",min:0,max:1,formatter:function(t){return(100*t).toFixed(1)+"%"}},this.options.meta=Object(F.deepMix)({},e,this.options.meta),t.prototype.scale.call(this)},e}(Pa),ka=ja;yr("percentStackedArea",ja);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="percentStackedArea",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=ka.getDefaultOptions}(mr);var Ta=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(L.__extends)(e,t),e.prototype.getType=function(){return!this.plot.column.label||this.plot.column.label.position&&"top"!==this.plot.column.label.position?"inner":"top"},e}(co);var Ea={preRender:[],afterRender:[{name:"responsiveAxis",method:function(t){var e=t.getResponsiveTheme(),n=t.canvas;new uo({plot:t,responsiveTheme:e,dim:"x"}),new uo({plot:t,responsiveTheme:e,dim:"y"}),n.draw()}},{name:"responsiveLabel",method:function(t){var e=t.getResponsiveTheme();new Ta({plot:t,responsiveTheme:e})}}]};sr("column",{label:{top:{constraints:[{name:"elementCollision"}],rules:{elementCollision:[{name:"nodeJitterUpward"},{name:"nodesResamplingByState",option:{keep:["min","max","median"]}},{name:"textHide"}]}}}});var Ia=function(){function t(t){this.destroyed=!1,this.view=t.view,this.plot=t.plot;var e=this.getDefaultOptions();this.options=Object(F.deepMix)(e,t,{}),this.init()}return t.prototype.init=function(){var t=this;this.container=this.getGeometry().labelsContainer,this.view.on("beforerender",(function(){t.clear(),t.plot.canvas.draw()}))},t.prototype.render=function(){var t=this,e=this.getGeometry(),n=e.elements,i=e.coordinate;this.coord=i,Object(F.each)(n,(function(e){var n=e.shape,i=Object(F.clone)(t.options.style),r=t.getValue(n),o=t.getPosition(n,r),a=t.getTextAlign(r),s=t.getTextBaseLine(r),u=t.getTextColor(n);"top"!==t.options.position&&t.options.adjustColor&&"black"!==u&&(i.stroke=null);var c=t.options.formatter,l=c?c(r):r,h=t.container.addShape("text",{attrs:Object(F.deepMix)({},i,{x:o.x,y:o.y,text:l,fill:u,textAlign:a,textBaseline:s}),name:"label"});t.adjustLabel(h,n)}))},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.hide=function(){this.container.set("visible",!1),this.plot.canvas.draw()},t.prototype.show=function(){this.container.set("visible",!0),this.plot.canvas.draw()},t.prototype.destroy=function(){this.container&&this.container.remove(),this.destroyed=!0},t.prototype.getBBox=function(){},t.prototype.getPosition=function(t,e){var n,i=this.getShapeBbox(t),r=i.minX,o=(i.maxX,i.minY),a=i.maxY,s=i.height,u=i.width,c=this.options,l=c.offsetX,h=c.offsetY,p=c.position,f=e>0?-1:1;"top"===p?n=(e>0?o:a)+(h+8)*f:n="bottom"===p?a+(h+8)*f:o+s/2+h;return{x:r+u/2+l,y:n}},t.prototype.getTextColor=function(t){if(this.options.adjustColor&&"top"!==this.options.position){var e=t.attr("fill"),n=t.attr("opacity")?t.attr("opacity"):1,i=$o(e);return Ko([{from:0,to:85,color:"white"},{from:85,to:170,color:"#F6F6F6"},{from:170,to:255,color:"black"}],Math.round(.299*i[0]+.587*i[1]+.114*i[2])/n)}return this.options.style.fill},t.prototype.getTextAlign=function(t){return"center"},t.prototype.getTextBaseLine=function(t){return"middle"===this.options.position?"middle":"bottom"},t.prototype.getValue=function(t){return t.get("origin").data[this.plot.options.yField]},t.prototype.adjustLabel=function(t,e){if(this.options.adjustPosition&&"top"!==this.options.position){var n=t.getBBox(),i=e.getBBox();if(i.height<=n.height){var r=i.minY+this.options.offsetY-8;t.attr("y",r),t.attr("textBaseline","bottom"),t.attr("fill",this.options.style.fill)}}},t.prototype.getDefaultOptions=function(){var t=this.plot.theme.label.style;return{offsetX:0,offsetY:0,style:Object(F.clone)(t),adjustPosition:!0}},t.prototype.getShapeBbox=function(t){var e=this,n=[];return Object(F.each)(t.get("origin").points,(function(t){n.push(e.coord.convertPoint(t))})),new q(n[0].x,n[1].y,Math.abs(n[2].x-n[0].x),Math.abs(n[0].y-n[1].y))},t.prototype.getGeometry=function(){var t,e=this.view.geometries;return Object(F.each)(e,(function(e){"interval"===e.type&&(t=e)})),t},t}(),La=z({Column:"interval"});Object(F.assign)(R,La);ir("column",{columnStyle:{normal:{},active:function(t){return{opacity:.5*(t.opacity||1)}},disable:function(t){var e=t.opacity||1;return{opacity:.5*e,fillOpacity:.5*e}},selected:{lineWidth:1,stroke:"black"}}});var Ba={column:"interval"},Da={interval:"column"},Fa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="column",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{xAxis:{visible:!0,tickLine:{visible:!1},title:{visible:!0}},yAxis:{nice:!0,title:{visible:!0},label:{visible:!0},grid:{visible:!0}},tooltip:{visible:!0,shared:!0,showCrosshairs:!1,showMarkers:!1},label:{visible:!1,position:"top",adjustColor:!0},legend:{visible:!0,position:"top-left"},interactions:[{type:"tooltip"},{type:"active-region"},{type:"legend-active"},{type:"legend-filter"}],conversionTag:{visible:!1}})},e.prototype.beforeInit=function(){t.prototype.beforeInit.call(this),this.options.responsive&&"auto"!==this.options.padding&&this.applyResponsive("preRender")},e.prototype.afterRender=function(){var e=this.options;this.renderLabel(),this.options.responsive&&"auto"!==this.options.padding&&this.applyResponsive("afterRender"),e.conversionTag.visible&&(this.conversionTag=new Qo(Object(L.__assign)({view:this.view,field:e.yField,transpose:!0,animation:!1!==e.animation},e.conversionTag))),t.prototype.afterRender.call(this)},e.prototype.geometryParser=function(t,e){return"g2"===t?Ba[e]:Da[e]},e.prototype.processData=function(t){var e=this.options.xField,n=[];return Object(F.each)(t,(function(t){var i=Object(F.clone)(t);i[e]=i[e].toString(),n.push(i)})),n},e.prototype.scale=function(){var e=this.options,n={};n[e.xField]={type:"cat"},Object(F.has)(e,"xAxis")&&Rr(n[e.xField],e.xAxis),n[e.yField]={},Object(F.has)(e,"yAxis")&&Rr(n[e.yField],e.yAxis),this.setConfig("scales",n),t.prototype.scale.call(this)},e.prototype.coord=function(){},e.prototype.adjustColumn=function(t){},e.prototype.addGeometry=function(){var t=this.options,e=Fr("interval","main",{positionFields:[t.xField,t.yField],plot:this});t.conversionTag.visible&&this.setConfig("theme",Object(F.deepMix)({},this.getTheme(),{columnWidthRatio:1/3})),this.adjustColumn(e),this.column=e,t.tooltip&&(t.tooltip.fields||t.tooltip.formatter)&&this.geometryTooltip(),this.setConfig("geometry",e)},e.prototype.geometryTooltip=function(){this.column.tooltip={};var t=this.options.tooltip;t.fields&&(this.column.tooltip.fields=t.fields),t.formatter&&(this.column.tooltip.callback=t.formatter,t.fields||(this.column.tooltip.fields=[this.options.xField,this.options.yField],this.options.colorField&&this.column.tooltip.fields.push(this.options.colorField)))},e.prototype.animation=function(){t.prototype.animation.call(this),!1===this.options.animation&&(this.column.animate=!1)},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,y)},e.prototype.renderLabel=function(){var t=this.config.scales[this.options.yField];this.options.label&&this.options.label.visible&&new Ia(Object(L.__assign)({view:this.view,plot:this,formatter:t.formatter},this.options.label)).render()},e.prototype.applyResponsive=function(t){var e=this,n=Ea[t];Object(F.each)(n,(function(t){t.method(e)}))},e}(hr),Ra=Fa;yr("column",Fa);var Na=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="column",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=Ra.getDefaultOptions,e}(mr),Ya=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="groupedColumn",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{yAxis:{title:{visible:!0}}})},e.prototype.getResponsiveTheme=function(){return this.themeController.getResponsiveTheme("column")},e.prototype.addGeometry=function(){t.prototype.addGeometry.call(this)},e.prototype.adjustColumn=function(t){t.adjust=[{type:"dodge",marginRatio:.1}]},e.prototype.geometryTooltip=function(){this.column.tooltip={};var t=this.options.tooltip;t.fields&&(this.column.tooltip.fields=t.fields),t.formatter&&(this.column.tooltip.callback=t.formatter,t.fields||(this.column.tooltip.fields=[this.options.xField,this.options.yField,this.options.groupField]))},e}(Ra),Xa=Ya;yr("groupedColumn",Ya);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="groupedColumn",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=Xa.getDefaultOptions}(mr);function Ga(t,e){var n=[],i=t.get("origin").points;return Object(F.each)(i,(function(t){n.push(e.convertPoint(t))})),n}var za=function(){function t(t){this.areas=[],this.lines=[],this._areaStyle={},this._lineStyle={},Object(F.assign)(this,t),this._init()}return t.prototype.draw=function(){var t=this,e=this._getGroupedShapes();Object(F.each)(e,(function(e,n){e.length>0&&t._drawConnection(e,n)})),this.triggerOn?this._addInteraction():this.animation&&this._initialAnimation()},t.prototype.clear=function(){this.container&&this.container.clear(),this.areas=[],this.lines=[]},t.prototype.destory=function(){this.container&&this.container.remove()},t.prototype.setState=function(t,e){"active"===t&&this._onActive(e),"disabled"===t&&this._onDisabled(e),"selected"===t&&this._onSelected(e)},t.prototype._init=function(){var t=this,e=this.view.backgroundGroup;this.container=e.addGroup(),this.draw(),this.view.on("beforerender",(function(){t.clear()}))},t.prototype._getGroupedShapes=function(){var t=this,e=this.view.getScaleByField(this.field).values,n=this.view.geometries[0].getShapes(),i={};return Object(F.each)(e,(function(t){i[t]=[]})),Object(F.each)(n,(function(e){var n=e.get("origin").data[t.field];i[n].push(e)})),i},t.prototype._drawConnection=function(t,e){var n=t[0].attr("fill");this._areaStyle[e]=this._getShapeStyle(n,"area"),this._lineStyle[e]=this._getShapeStyle(n,"line");for(var i=this.view.geometries[0].coordinate,r=0;r=i.from&&e2||f>u)&&(p=r-this.options.offsetY,e.attr("fill",this.options.topStyle.fill),e.attr("textBaseline","bottom"),h=o+this.options.offsetY,t.attr("fill",this.options.bottomStyle.fill),t.attr("textBaseline","top"),l[0]=t.getBBox(),l[1]=e.getBBox())}l[0].maxY>c.maxY-8&&(h=c.maxY-4,t.attr("textBaseline","bottom")),t.attr("y",h),e.attr("y",p),this.plot.canvas.draw()},t.prototype.getGeometry=function(){return Object(F.find)(this.view.geometries,(function(t){return"interval"===t.type}))},t}();function Qa(t,e){var n=t.getBBox(),i=n.minY+n.height/2;t.setClip({type:"rect",attrs:{x:n.minX,y:i,width:n.width,height:0}}),t.get("clipShape").animate({height:n.height,y:n.minY},e.duration,e.easing,(function(){t.setClip(null)}),e.delay)}function Za(t,e){var n=function(t){var e,n=t.id;return Object(F.each)(Wa,(function(t){t.id===n&&(e=t)})),e}(t).attr("path"),i=Object(F.clone)(t.attr("path"));t.attr("path",n),t.animate({path:i},e.duration,e.easing,e.callback,100)}Qa.animationName="clipInFromCenterVertical",Za.animationName="updateFromCenterVertical",Object(U.registerAnimation)("clipInFromCenterVertical",Qa),Object(U.registerAnimation)("updateFromCenterVertical",Za);var $a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="rangeColumn",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)(t.getDefaultOptions.call(this),{label:{visible:!0,position:"outer"}},{})},e.prototype.afterRender=function(){this.renderLabel();var e=[],n=this.view.geometries;Object(F.each)(n,(function(t){var n=t.elements;Object(F.each)(n,(function(t){e.push(t.shape)}))})),Wa=e,t.prototype.afterRender.call(this)},e.prototype.extractLabel=function(){},e.prototype.animation=function(){t.prototype.animation.call(this),this.column.animate={appear:{animation:"clipInFromCenterVertical",duration:600},update:{animation:"updateFromCenterVertical",duration:600}}},e.prototype.renderLabel=function(){this.options.label&&this.options.label.visible&&new Ua(Object(L.__assign)({view:this.view,plot:this},this.options.label)).render()},e}(Ra),Ka=$a;yr("rangeColumn",$a);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="rangeColumn",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=Ka.getDefaultOptions}(mr);var Ja=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="percentStackedColumn",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{label:{visible:!0,position:"middle",offset:0},yAxis:{visible:!0,tick:{visible:!1},grid:{visible:!1},title:{visible:!0},label:{visible:!1}}})},e.prototype.processData=function(t){var e=this.options,n=e.xField,i=e.yField;return ca(t||[],n,[i])},e.prototype.scale=function(){var e={},n=this.options.yField;e[n]={tickCount:6,alias:n+" (%)",min:0,max:1,formatter:function(t){return(100*t).toFixed(1)+"%"}},this.options.meta=e,t.prototype.scale.call(this)},e}(Va),ts=Ja;yr("percentStackedColumn",Ja);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="percentStackedColumn",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=ts.getDefaultOptions}(mr);var es=z({Pie:"interval"});function ns(t,e,n){return{x:t.x+n*Math.cos(e),y:t.y+n*Math.sin(e)}}function is(t,e,n){return void 0===n&&(n=0),Math.max(0,Math.min(t.x+t.width+n,e.x+e.width+n)-Math.max(t.x-n,e.x-n))*Math.max(0,Math.min(t.y+t.height+n,e.y+e.height+n)-Math.max(t.y-n,e.y-n))}Object(F.assign)(R,es);var rs=function(t,e,n){return void 0===n&&(n=Math.pow(Number.EPSILON,.5)),[t,e].includes(1/0)?Math.abs(t)===Math.abs(e):Math.abs(t-e)e.maxX?i=e.maxX-n.minX:n.minXu&&s>u);)if(c.push(a),u-=s,!(r=r.substr(16)))return c.join("");for(;a=r.substr(0,1),!((s=as(a,n))+o>u);)if(c.push(a),u-=s,!(r=r.substr(1)))return c.join("");return c.join("")+"..."}(t,i,r)}));t.attr("text",o.join("\n"))}},t.prototype.drawLines=function(){var t=this;if(this.options.line.visible){var e=this.container.get("children"),n=this.getCoordinate().center;e.forEach((function(e,i){var r=e.get("children")[0],o=t.arcPoints[i],a=o.x4?4:0,u=t.getLinePath(r,o,s),c=t.options.line;e.addShape("path",{attrs:Object(L.__assign)({path:u,stroke:o.color},c)}),r.attr("x",r.attr("x")+(a?-s:s))}))}},t.prototype.getLinePath=function(t,e,n){var i=!!this.options.line&&this.options.line.smooth,r=e.angle,o=this.getCoordinate(),a=o.center,s=ns(a,r,o.radius+n);n<4&&(s=e);var u=e.xi.x?"left":"right";return{x:h.x,y:h.y,color:s,name:p,origin:u,angle:l,textAlign:f}}));this.arcPoints=s},t}();function us(t){var e=180*t/Math.PI;return e<-90||e>180&&e<270?e+=180:e<180&&e>90&&(e=90-e),e/180*Math.PI}var cs={inner:function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(L.__extends)(e,t),e.prototype.adjustOption=function(e){t.prototype.adjustOption.call(this,e),e.offset>0&&(e.offset=0)},e.prototype.adjustItem=function(t){t.textAlign="middle"},e.prototype.drawLines=function(){},e.prototype.layout=function(t,e){var n=this;t.forEach((function(i,r){r>0&&Object(F.each)(t.slice(0,r),(function(t){n.resolveCollision(i,t,e[r])}))}))},e.prototype.getDefaultOptions=function(){var t=this.plot.theme.label.style;return{offsetX:0,offsetY:0,offset:"-30%",style:Object(L.__assign)(Object(L.__assign)({},t),{textAlign:"center",textBaseline:"middle"})}},e.prototype.resolveCollision=function(t,e,n){var i=this.getCoordinate().center,r=n.angle,o=t.getBBox(),a=e.getBBox(),s={x:(o.minX+o.maxX)/2,y:(o.minY+o.maxY)/2},u=Object(F.clone)(s),c=Object(F.clone)(s);if(e.get("id")!==t.get("id")){var l=function(t,e,n){void 0===n&&(n=0);var i=Math.max(0,Math.min(t.x+t.width+n,e.x+e.width+n)-Math.max(t.x-n,e.x-n)),r=Math.max(0,Math.min(t.y+t.height+n,e.y+e.height+n)-Math.max(t.y-n,e.y-n));return i&&t.x0?f:a.maxY-o.minY,c.y=s.y+f,c.x=s.x+f/Math.tan(r)}var d=li(s,u)r.x})),o].forEach((function(t,e){i._antiCollision(t,!e,n)})),this.adjustOverlap(t,n)},e.prototype.adjustOverlap=function(t,e){var n=this;if(!this.options.allowOverlap){for(var i=1;i=0;a--){var s=t[a],u=s.getBBox(),c=r.getBBox();if(s.get("parent").get("visible")&&(o=is(u,c),!rs(o,0))){r.get("parent").set("visible",!1);break}}t.forEach((function(t){return n.checkInPanel(t,e)}))}},e.prototype.checkInPanel=function(t,e){var n=t.getBBox();e.y<=n.y&&e.y+e.height>=n.y+n.height||t.get("parent").set("visible",!1)},e.prototype._antiCollision=function(t,e,n){var i=this,r=this.getLabelHeight(t),o=this.getCoordinate(),a=o.center,s=o.radius,u=this.options.offset,c=s+u,l=Math.min(n.height,Math.max(2*c+2*r,t.length*r)),h=Math.floor(l/r);this.options.allowOverlap||t.slice(h).forEach((function(t){t.get("parent").set("visible",!1)})),t.splice(h,t.length-h),t.sort((function(t,e){return t.getBBox().y-e.getBBox().y}));for(var p,f=!0,d=a.y+l/2,g=a.y-l/2,y=t.map((function(t){var e=t.getBBox();return e.maxY>d&&(d=Math.min(n.maxY,e.maxY)),e.minY0){var m=y[p-1],x=y[p];if(m.pos+m.size>x.pos){m.size+=x.size,m.targets=m.targets.concat(x.targets);var b=Object(F.last)(m.targets);m.pos+m.size>b&&(m.pos=b-m.size),y.splice(p,1),f=!0}else m.targets.splice(-1,1,x.pos)}p=0,y.forEach((function(e){var n=r/2;e.targets.forEach((function(){t[p].attr("y",e.pos+n),n+=r,p++}))}));var M=[],_=[];t.forEach((function(t,e){var n=i.arcPoints[e];n.angle>=0&&n.angle<=Math.PI?_.push(t):M.push(t)})),[M,_].forEach((function(r,o){if(r.length){var l=o?Object(F.last)(r).getBBox().maxY-a.y:a.y-Object(F.head)(r).getBBox().minY;l=Math.max(c,l);var h=u>4?4:0,p=Math.max.apply(0,Object(F.map)(t,(function(t){return t.getBBox().width})))+u+h,f=Math.max(c,Math.min((l+c)/2,a.x-(n.minX+p))),d=f*f,g=l*l;r.forEach((function(t,n){var r=i.arcPoints[n],o=t.getBBox(),u=(o.minX,o.width,o.minY+o.height/2),c=Math.pow(u-a.y,2),l=ns(a,r.angle,s),p=(e?1:-1)*h*2;if(c>g)console.warn("异常(一般不会出现)",t.attr("text")),t.attr("x",l.x+p);else{var f=a.x+(e?1:-1)*Math.sqrt((1-c/g)*d);(a.x===l.x&&u===l.y||a.y===l.y&&f===l.x)&&(f=l.x),t.attr("x",f+p)}}))}}))},e.prototype.getLabelHeight=function(t){return this.options.labelHeight?this.options.labelHeight:Object(F.head)(t)?Object(F.head)(t).getBBox().height:14},e}(ss),"outer-center":function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(L.__extends)(e,t),e.prototype.adjustOption=function(e){t.prototype.adjustOption.call(this,e),e.offset<0&&(e.offset=0)},e.prototype.getDefaultOptions=function(){var t=this.plot.theme.label.style;return{offsetX:0,offsetY:0,offset:12,style:Object(L.__assign)(Object(L.__assign)({},t),{textBaseline:"middle"})}},e.prototype.adjustItem=function(t){var e=this.options.offset;"left"===t.textAlign?t.x+=e>4?4:e/2:"right"===t.textAlign&&(t.x-=e>4?4:e/2)},e.prototype.layout=function(t,e,n){this.adjustOverlap(t,n)},e.prototype.adjustOverlap=function(t,e){var n=this;if(!this.options.allowOverlap){for(var i=1;i=0;a--){var s=t[a],u=s.getBBox(),c=r.getBBox();if(s.get("parent").get("visible")&&(o=is(u,c),!rs(o,0))){r.get("parent").set("visible",!1);break}}t.forEach((function(t){return n.checkInPanel(t,e)}))}},e.prototype.checkInPanel=function(t,e){var n=t.getBBox();e.y<=n.y&&e.y+e.height>=n.y+n.height||t.get("parent").set("visible",!1)},e}(ss)};function ls(t){if(cs[t])return cs[t];console.warn("this label "+t+" is not registered")}function hs(t,e,n){return{x:t.x+n*Math.cos(e),y:t.y+n*Math.sin(e)}}var ps=function(){function t(t){this.destroyed=!1,this.view=t.view,this.options=Object(F.deepMix)({},this.getDefaultOptions(),t),this._adjustOptions(this.options),this.init()}return t.prototype.init=function(){var t=this;this.container=this.view.geometries[0].labelsContainer,this.view.on("beforerender",(function(){t.clear()}))},t.prototype.render=function(){var t=this;if(this.view&&!this.view.destroyed){var e=Object(F.clone)(this.view.getData());this.halves=[[],[]];var n=[],i=this.view.geometries[0].elements;Object(F.each)(i,(function(t){n.push(t.shape)})),this.coord=this.view.geometries[0].coordinate;var r=this.options.fields[0],o=this.view.getScalesByDim("y")[r],a=this.coord.getCenter(),s=this.coord.startAngle,u=this.coord.polarRadius,c=this.view.coordinateBBox,l=c.width,h=c.height;this.width=l,this.height=h;for(var p=s,f=function(t){var i=e[t],s=o.scale(i[r]),c=p+2*Math.PI*s,l=p+(c-p)/2;p=c;var h=hs(a,l,u+0),f=hs(a,l,u+15),g="#CCC";if(2===d.options.fields.length){var y=d.options.fields[1],v=d.view.geometries[0].scales[y].scale(i[y]),m=Math.floor(v*(n.length-1));g=n[m].attr("fill")}var x={_anchor:h,_inflection:f,_data:i,x:f.x,y:f.y,r:u+15,fill:g,textGroup:null,_side:null},b=[];if(Object(F.each)(d.options.fields,(function(t){b.push(i[t])})),d.options.formatter){var M=d.options.formatter(i[r],{_origin:i,color:g},t);Object(F.isString)(M)&&(M=[M]),b=M}var _=d.container.addGroup(),w={x:0,y:0,fontSize:d.options.text.fontSize,lineHeight:d.options.text.fontSize,fontWeight:d.options.text.fontWeight,fill:d.options.text.fill},O=i[r];d.options.formatter&&(O=b[0]);var C=Object(F.clone)(w);(2===b.length&&(C.fontWeight=700),_.addShape("text",{attrs:Object(F.mix)({textBaseline:2===b.length?"top":"middle",text:O},C),data:i,offsetY:2===b.length?2:0,name:"label"}).name="label",2===b.length)&&(_.addShape("text",{attrs:Object(F.mix)({textBaseline:"bottom",text:b[1]},w),data:i,offsetY:-2,name:"label"}).name="label");x.textGroup=_,h.xy&&e.splice(y,e.length-y),e.sort((function(t,e){return t.y-e.y})),t._antiCollision(e)})),this.view.canvas.draw()}},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.hide=function(){this.container.set("visible",!1),this.view.canvas.draw()},t.prototype.show=function(){this.container.set("visible",!0),this.view.canvas.draw()},t.prototype.destory=function(){this.container&&this.container.remove(),this.destroyed=!0},t.prototype.getDefaultOptions=function(){return{text:{fill:"rgba(0, 0, 0, 0.65)",fontSize:12},line:{lineWidth:.5,stroke:"rgba(0, 0, 0, 0.45)"},lineHeight:32,sidePadding:20}},t.prototype._antiCollision=function(t){var e,n=this,i=this.coord,r=i.getHeight(),o=i.center,a=i.getRadius(),s=o.y-a-15-this.options.lineHeight,u=!0,c=r,l=0,h=Number.MIN_VALUE,p=0,f=t.map((function(t){var e=t.y;e>l&&(l=e),e=p&&(p=i),{size:n.options.lineHeight,targets:[e-s]}}));l-s>c&&(c=l-s);for(;u;)for(f.forEach((function(t){var e=(Math.min.apply(h,t.targets)+Math.max.apply(h,t.targets))/2;t.pos=Math.min(Math.max(h,e-t.size/2),c-t.size)})),u=!1,e=f.length;e--;)if(e>0){var d=f[e-1],g=f[e];d.pos+d.size>g.pos&&(d.size+=g.size,d.targets=d.targets.concat(g.targets),d.pos+d.size>c&&(d.pos=c-d.size),f.splice(e,1),u=!0)}e=0,f.forEach((function(i){var r=s;i.targets.forEach((function(){t[e].y=i.pos+r+n.options.lineHeight/2,r+=n.options.lineHeight,e++}))}));var y=[];t.forEach((function(t){var e=n._drawLabel(t);n._drawLabelLine(t,p,e),y.push(e)}))},t.prototype._drawLabel=function(t){var e=this.coord,n=e.getCenter(),i=e.getRadius(),r=(this.width,t.y),o=t.textGroup,a=o.get("children"),s="left"===t._side?1:-1,u={textAlign:"left"===t._side?"right":"left",x:"left"===t._side?n.x-i-this.options.sidePadding:n.x+i+this.options.sidePadding};return this.options.offsetX&&(u.x+=this.options.offsetX*s),a.forEach((function(t){var e=t.get("offsetY"),n=r+e;t.attr(u),t.attr("y",n)})),o},t.prototype._drawLabelLine=function(t,e,n){var i=[t._anchor.x,t._anchor.y],r=[t._inflection.x,t._inflection.y],o=(t.fill,t.y),a=t.textGroup;if(a){var s=["left"===t._side?a.getBBox().maxX+4:a.getBBox().minX-4,o],u=[i,r,s];if(r[1]!==o)if(r[1]c[0])&&(u=[i,f,s])}else u=[i,[r[0],o],s];for(var d=[],g=0;gi&&(i=r),r=e[0]})));for(var c=this.scales[s],l=0;l0&&(t.view.changeData(s),t.view.scale(n,{min:t.colorScale.min,max:t.colorScale.max,nice:t.colorScale.nice}),t.view.render())}}))},t.prototype.getFilteredData=function(){var t=[];return Object(F.each)(this.dataSlides,(function(e){"active"==e.mode&&t.push.apply(t,e.data)})),t},t.prototype.getDataSlide=function(t){var e=[],n=this.options.plot.options,i=n.colorField,r=n.data;return Object(F.each)(r,(function(n){var r=n[i];r>=t.from&&ri.width||n.height>i.height)&&t.attr("text","")},t}(),As={label:{Ctr:Ss},legend:{Ctr:function(){function t(t){this.destroyed=!1,this.dataSlides={},this.interactiveEvents={};var e=this.getDefaultOptions();this.options=Object(F.deepMix)({},e,t),this.view=this.options.view,this.afterRender=!0,this.init()}return t.prototype.init=function(){var t=this;this.layout=this.getLayout(),this.width=this.options.width?this.options.width:this.getDefaultWidth(),this.height=this.options.height?this.options.height:this.getDefaultHeight();var e=this.options.plot.container;this.container&&this.container.remove(),this.container=e.addGroup(),this.view.on("beforerender",(function(){t.clear(),t.options.plot.canvas.draw()}))},t.prototype.render=function(){var t=this.view.geometries[0].scales,e=this.options.plot.options.colorField;this.colorScale=t[e];var n=this.colorScale,i=n.min,r=n.max,o=this.options.plot.options.color;"horizontal"===this.layout?this.renderHorizontal(i,r,o):this.renderVertical(i,r,o),this.legendLayout(),this.addInteraction()},t.prototype.hide=function(){this.container.set("visible",!1),this.options.plot.canvas.draw()},t.prototype.show=function(){this.container.set("visible",!0),this.options.plot.canvas.draw()},t.prototype.clear=function(){if(this.container){this.container.get("children");this.container.clear()}},t.prototype.destroy=function(){this.container&&this.container.remove(),this.offEvent(),this.destroyed=!0},t.prototype.getBBox=function(){var t=this.container.getBBox();return new q(this.x,this.y,t.width,t.height)},t.prototype.renderVertical=function(t,e,n){var i=this,r=(e-t)/(n.length-1),o=1/(n.length-1),a=this.height/(n.length-1),s="l(90)";Object(F.each)(n,(function(t,e){s+=o*e+":"+t+" "})),this.container.addShape("rect",{attrs:{x:0,y:0,width:this.width,height:this.height,fill:s},name:"legend"}),Object(F.each)(n,(function(t,e){var n=a*e;i.container.addShape("path",{attrs:Object(L.__assign)({path:[["M",0,n],["L",i.width,n]]},i.options.ticklineStyle)});var o=Math.round(r*e);i.container.addShape("text",{attrs:Object(L.__assign)({text:o,textAlign:"left",textBaseline:"middle",x:i.width+4,y:n},i.options.text.style),name:"legend-label"})}));var u=[["M",-10,-7],["L",0,0],["L",-10,7],["Z"]];this.anchor=this.container.addShape("path",{attrs:Object(L.__assign)({path:u},this.options.anchorStyle)}),this.anchor.set("visible",!1)},t.prototype.renderHorizontal=function(t,e,n){var i=this,r=(e-t)/(n.length-1),o=1/(n.length-1),a=this.width/(n.length-1),s="l(0)";Object(F.each)(n,(function(t,e){s+=o*e+":"+t+" "})),this.container.addShape("rect",{attrs:{x:0,y:0,width:this.width,height:this.height,fill:s},name:"legend"}),Object(F.each)(n,(function(t,e){var n=a*e;i.container.addShape("path",{attrs:Object(L.__assign)({path:[["M",n,0],["L",n,i.height]]},i.options.ticklineStyle),name:"legend-label"});var o=Math.round(r*e);i.container.addShape("text",{attrs:Object(L.__assign)({text:o,textAlign:"center",textBaseline:"top",x:n,y:i.height+4},i.options.text.style)})}));var u=[["M",0,0],["L",-7,-10],["L",7,-10],["Z"]];this.anchor=this.container.addShape("path",{attrs:Object(L.__assign)({path:u},this.options.anchorStyle)}),this.anchor.set("visible",!1)},t.prototype.getLayout=function(){var t=this.options.position.split("-");return this.position=t[0],"left"===t[0]||"right"===t[0]?"vertical":"horizontal"},t.prototype.getDefaultWidth=function(){return"horizontal"===this.layout?this.view.coordinateBBox.width:10},t.prototype.getDefaultHeight=function(){return"vertical"===this.layout?this.view.coordinateBBox.height:10},t.prototype.legendLayout=function(){var t=this,e=this.view.coordinateBBox,n=this.options.plot.getPlotTheme().bleeding;Object(F.isArray)(n)&&Object(F.each)(n,(function(e,i){"function"==typeof n[i]&&(n[i]=n[i](t.options.plot.options))}));var i=this.container.getBBox(),r=0,o=0,a=this.options.position.split("-"),s=this.options.plot.width,u=this.options.plot.height;"left"===a[0]?r=n[3]:"right"===a[0]?r=s-n[1]-i.width:"center"===a[1]?r=this.width===e.width?e.x:(s-i.width)/2:"left"===a[1]?r=n[3]:"right"===a[1]&&(r=this.options.plot.width-n[1]-i.width),"bottom"===a[0]?o=u-n[2]-i.height:"top"===a[0]?o=this.getTopPosition(n):"center"===a[1]?o=this.height===e.height?e.y:(u-i.height)/2:"top"===a[1]?o=n[0]:"bottom"===a[1]&&(o=u-n[2]-i.height),this.x=r,this.y=o,this.container.translate(r,o)},t.prototype.getDefaultOptions=function(){return{text:{style:{fontSize:12,fill:"rgba(0, 0, 0, 0.45)"}},ticklineStyle:{lineWidth:1,stroke:"rgba(0, 0, 0, 0.8)"},anchorStyle:{fill:"rgba(0,0,0,0.5)"},triggerOn:"mousemove"}},t.prototype.addInteraction=function(){var t=this,e=("rect"===this.options.plot.options.shapeType?"polygon":"point")+":"+this.options.triggerOn,n=(this.options.triggerOn,this.options.plot.options.colorField),i=this.colorScale,r=i.min,o=i.max,a=function(e){var i=(e.data.data[n]-r)/(o-r);t.moveAnchor(i)};this.view.on(e,a),this.interactiveEvents[e]={target:this.view,handler:a};var s=function(e){t.anchor.set("visible",!1)};this.options.plot.canvas.on("mouseleave",s),this.interactiveEvents.mouseleave={target:this.options.plot.canvas,handler:s}},t.prototype.moveAnchor=function(t){if(this.anchor.set("visible",!0),"vertical"===this.layout){var e=this.height*t;(n=[1,0,0,0,1,0,0,0,1])[7]=e,this.anchor.stopAnimate(),this.anchor.animate({matrix:n},400,"easeLinear")}else{var n;e=this.width*t;(n=[1,0,0,0,1,0,0,0,1])[6]=e,this.anchor.stopAnimate(),this.anchor.animate({matrix:n},400,"easeLinear")}},t.prototype.getTopPosition=function(t){return this.options.plot.description?this.options.plot.description.getBBox().maxY+10:this.options.plot.title?this.options.plot.title.getBBox().maxY+10:t[0]},t.prototype.offEvent=function(){Object(F.each)(this.interactiveEvents,(function(t,e){var n=t.target,i=t.handler;n.off(e,i)}))},t}(),padding:"outer"}};var Ps=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="heatmap",e.gridSize=[],e.plotComponents=[],e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{shapeType:"rect",legend:{visible:!0,position:"right-center"},tooltip:{shared:!1,showCrosshairs:!1,showMarkers:!1},xAxis:{visible:!0,gridAlign:"center",grid:{visible:!0},tickLine:{visible:!0},line:{visible:!1},label:{visible:!0,autoHide:!0,autoRotate:!0}},yAxis:{visible:!0,gridAlign:"center",grid:{visible:!0,align:"center"},tickLine:{visible:!0},label:{autoHide:!0,autoRotate:!1}},color:["#9ae3d5","#66cdbb","#e7a744","#f1e066","#f27664","#e7c1a2"],label:{visible:!0,adjustColor:!0,adjustPosition:!0,offset:0,style:{stroke:"rgba(255,255,255,0)",lineWidth:0}},interactions:[{type:"tooltip"}]})},e.prototype.afterRender=function(){this.renderPlotComponents(),t.prototype.afterRender.call(this)},e.prototype.changeShape=function(t){if(this.options.shapeType!==t)if(this.options.shapeType=t,"rect"===t){var e=this.getShapes();this.circleToRect(e)}else if("circle"===t){e=this.getShapes();this.rectToCircle(e)}},e.prototype.mappingSize=function(t){if(!this.options.sizeField||this.options.sizeField!==t){this.options.sizeField=t;var e=Object(F.valuesOfKey)(this.options.data,t),n=Math.min.apply(Math,e),i=Math.max.apply(Math,e),r=new(ln("linear"))({min:n,max:i}),o=this.getShapes();"rect"===this.options.shapeType?this.rectSizeMapping(o,r,t):"circle"===this.options.shapeType&&this.circleSizeMapping(o,r,t)}},e.prototype.disableMappingSize=function(){var t=this.getShapes();"rect"===this.options.shapeType?this.rectDisableSizeMapping(t):"circle"===this.options.shapeType&&this.circleDisableSizeMapping(t)},e.prototype.destroy=function(){Object(F.each)(this.plotComponents,(function(t){t.destroy()})),t.prototype.destroy.call(this)},e.prototype.geometryParser=function(){return""},e.prototype.coord=function(){},e.prototype.legend=function(){this.setConfig("legends",!1)},e.prototype.addGeometry=function(){var t;(this.gridSize=this.getGridSize(),"rect"===this.options.shapeType)?t=this.addRect():t=this.addCircle();this.options.tooltip&&(this.options.tooltip.fields||this.options.tooltip.formatter)&&this.geometryTooltip(t),this.setConfig("geometry",t)},e.prototype.addRect=function(){var t=[.3,.9];this.options.shapeSize&&(t[0]=this.options.shapeSize[0]/this.gridSize[0],t[1]=this.options.shapeSize[1]/this.gridSize[1]);var e={type:"polygon",position:{fields:[this.options.xField,this.options.yField]},color:{fields:[this.options.colorField],values:this.options.color},shape:{values:["rect"]},label:!1};return this.options.sizeField?e.size={fields:[this.options.sizeField],values:t}:e.size={values:[1]},e},e.prototype.addCircle=function(){var t=[.3,.9];this.options.shapeSize?t=this.options.shapeSize:(t[0]=this.gridSize[0]*t[0]*.5,t[1]=this.gridSize[1]*t[1]*.5);var e={type:"point",position:{fields:[this.options.xField,this.options.yField]},color:{fields:[this.options.colorField],values:this.options.color},shape:{values:["curvePoint"]},label:!1};return this.options.sizeField?e.size={fields:[this.options.sizeField],values:t}:e.size={values:[.5*Math.min(this.gridSize[0],this.gridSize[1])*.9]},e},e.prototype.geometryTooltip=function(t){t.tooltip={};var e=this.options.tooltip;e.fields&&(t.tooltip.fields=e.fields),e.formatter&&(t.tooltip.callback=e.formatter,e.fields||(t.tooltip.fields=[this.options.xField,this.options.yField],this.options.colorField&&t.tooltip.fields.push(this.options.colorField)))},e.prototype.getGridSize=function(){if("auto"===this.options.padding)return[0,0];var t=this.getViewRange(),e=this.options,n=e.padding,i=e.xField,r=e.yField,o=e.data,a=t.width-n[1]-n[3],s=t.height-n[0]-n[2];return[a/Object(F.valuesOfKey)(o,i).length,s/Object(F.valuesOfKey)(o,r).length]},e.prototype.circleToRect=function(t){var e=this,n=this.gridSize;Object(F.each)(t,(function(t){var i=t.get("origin"),r=i.x,o=i.y,a=i.size,s=2*a/Math.min(n[0],n[1]);e.options.sizeField||(s=1);var u=Cs(r,o,a),c=ws(r,o,n[0],n[1],s);t.stopAnimate(),t.attr("path",u),t.animate({path:c},500,"easeLinear")}))},e.prototype.rectToCircle=function(t){var e=this;Object(F.each)(t,(function(t){var n=t.get("coord"),i=t.get("origin").points,r=[];Object(F.each)(i,(function(t){r.push(n.convertPoint(t))}));var o=t.getBBox(),a=o.width,s=o.height,u=o.minX+a/2,c=o.minY+s/2,l=e.options.sizeField?1:.9,h=Cs(u,c,Math.min(a,s)/2*l),p=Os(u,c,Math.min(a,s)/2*l);t.stopAnimate(),t.animate({path:h},500,"easeLinear",(function(){t.attr("path",p)}))}))},e.prototype.rectSizeMapping=function(t,e,n){Object(F.each)(t,(function(t){var i=t.get("origin").data,r=.3+.6*e.scale(i[n]);t.get("origin").size=r;var o=t.getBBox(),a=o.width,s=o.height,u=ws(o.minX+a/2,o.minY+s/2,a,s,r);t.stopAnimate(),t.animate({path:u},500,"easeLinear")}))},e.prototype.circleSizeMapping=function(t,e,n){Object(F.each)(t,(function(t){var i=t.get("origin").data,r=.3+.6*e.scale(i[n]),o=t.get("origin"),a=o.x,s=o.y,u=o.size,c=Os(a,s,u*r);t.get("origin").size=u*r,t.stopAnimate(),t.animate({path:c},500,"easeLinear")}))},e.prototype.circleDisableSizeMapping=function(t){var e=this;this.options.sizeField=null,Object(F.each)(t,(function(t){var n=t.get("origin"),i=n.x,r=n.y,o=.9*Math.min(e.gridSize[0],e.gridSize[1]);t.get("origin").size=o/2;var a=Os(i,r,o/2);t.stopAnimate(),t.animate({path:a},500,"easeLinear")}))},e.prototype.rectDisableSizeMapping=function(t){var e=this;this.options.sizeField=null,Object(F.each)(t,(function(t){var n=t.getBBox(),i=n.width,r=n.height,o=ws(n.minX+i/2,n.minY+r/2,e.gridSize[0],e.gridSize[1],1);t.get("origin").size=1,t.stopAnimate(),t.animate({path:o},500,"easeLinear")}))},e.prototype.getShapes=function(){var t=this.view.geometries[0].elements,e=[];return Object(F.each)(t,(function(t){e.push(t.shape)})),e},e.prototype.renderPlotComponents=function(){var t=this;Object(F.each)(this.plotComponents,(function(t){t.destroy()})),this.plotComponents=[];Object(F.each)(["label","legend"],(function(e){var n=Object(L.__assign)({view:t.view,plot:t},t.options[e]),i=function(t,e,n){if(t.options[e]&&t.options[e].visible){var i=As[e],r=new i.Ctr(n);return i.padding&&t.paddingController.registerPadding(r,i.padding),r}}(t,e,n);i&&(i.render(),t.plotComponents.push(i))}))},e}(hr),js=Ps;yr("heatmap",Ps);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="heatmap",t.prototype.createLayers.call(this,n)},e.prototype.changeShape=function(t){this.layers[0].changeShape(t)},e.prototype.mappingSize=function(t){this.layers[0].mappingSize(t)},e.prototype.disableMappingSize=function(){this.layers[0].disableMappingSize()},e.getDefaultOptions=js.getDefaultOptions}(mr);var ks=function(t){function e(e){var n=Object(F.deepMix)({},e,{itemTpl:'
              \n \n {name}{value}
              '},e);return t.call(this,n)||this}return Object(L.__extends)(e,t),e}(K.a);window.setImmediate||(window.setImmediate=window.msSetImmediate||window.webkitSetImmediate||window.mozSetImmediate||window.oSetImmediate||function(){if(!window.postMessage||!window.addEventListener)return null;var t=[void 0],e="zero-timeout-message";return window.addEventListener("message",(function(n){if("string"==typeof n.data&&n.data.substr(0,e.length)===e){n.stopImmediatePropagation();var i=parseInt(n.data.substr(e.length),36);t[i]&&(t[i](),t[i]=void 0)}}),!0),window.clearImmediate=function(e){t[e]&&(t[e]=void 0)},function(n){var i=t.length;return t.push(n),window.postMessage(e+i.toString(36),"*"),i}}()||function(t){window.setTimeout(t,0)}),window.clearImmediate||(window.clearImmediate=window.msClearImmediate||window.webkitClearImmediate||window.mozClearImmediate||window.oClearImmediate||function(t){window.clearTimeout(t)});var Ts=function(){var t=document.createElement("canvas");if(!t||!t.getContext)return!1;var e=t.getContext("2d");return!!e.getImageData&&(!!e.fillText&&(!!Array.prototype.some&&!!Array.prototype.push))}(),Es=function(){if(Ts){for(var t,e,n=document.createElement("canvas").getContext("2d"),i=20;i;){if(n.font=i.toString(10)+"px sans-serif",n.measureText("W").width===t&&n.measureText("m").width===e)return i+1;t=n.measureText("W").width,e=n.measureText("m").width,i--}return 0}}(),Is=function(t){for(var e,n,i=t.length;i;e=Math.floor(Math.random()*i),n=t[--i],t[i]=t[e],t[e]=n);return t},Ls=function(t,e){if(Ts){Array.isArray(t)||(t=[t]),t.forEach((function(e,n){if("string"==typeof e){if(t[n]=document.getElementById(e),!t[n])throw"The element id specified is not found."}else if(!e.tagName&&!e.appendChild)throw"You must pass valid HTML elements, or ID of the element."}));var n={data:[],fontFamily:'"Trebuchet MS", "Heiti TC", "微軟正黑體", "Arial Unicode MS", "Droid Fallback Sans", sans-serif',fontWeight:"normal",color:"random-dark",animatable:!0,minFontSize:Es,maxFontSize:60,clearCanvas:!0,backgroundColor:"#fff",gridSize:8,drawOutOfBound:!1,origin:null,drawMask:!1,maskColor:"rgba(255,0,0,0.3)",maskGapWidth:.3,wait:0,abortThreshold:0,abort:function(){},minRotation:-Math.PI/2,maxRotation:Math.PI/2,rotateRatio:.5,rotationSteps:1,shuffle:!0,shape:"circle",ellipticity:1,active:!0,animatable:!0,selected:-1,shadowColor:"#333",shadowBlur:10,classes:null,onWordCloudHover:null,onWordCloudClick:null},i=[];if(e)for(var r in e)if("wordStyle"===r)for(var o in e[r])o in n&&(n[o]=e[r][o]);else r in n&&(n[r]=e[r]);if(n.minFontSizen.maxFontSize)console.error("minSize cant bigger than maxSize");else{for(var a=0,s=0;s=0?1/(Math.cos(2*Math.PI/10-e)+3.07768*Math.sin(2*Math.PI/10-e)):1/(Math.cos(e)+3.07768*Math.sin(e))}}n.gridSize=Math.max(Math.floor(n.gridSize),4);var c,l,h,p,f,d,g,y=n.gridSize,v=y-n.maskGapWidth,m=Math.abs(n.maxRotation-n.minRotation),x=Math.min(n.maxRotation,n.minRotation),b=n.rotationSteps;switch(n.color){case"random-dark":g=function(){return Y(10,50)};break;case"random-light":g=function(){return Y(50,90)};break;default:"function"==typeof n.color&&(g=n.color)}var M=null;"function"==typeof n.classes&&(M=n.classes);var _,w=!1,O=[],C=function(t){var e,n,i=t.currentTarget,r=i.getBoundingClientRect();t.touches?(e=t.touches[0].clientX,n=t.touches[0].clientY):(e=t.clientX,n=t.clientY);var o=e-r.left,a=n-r.top,s=Math.floor(o*(i.width/r.width||1)/y),u=Math.floor(a*(i.height/r.height||1)/y);return O&&O[s]&&O[s][u]},S=function(t,e,n,i){i(t?t.id:-1)},A=function(t){var e=C(t);if(_!==e){if(!e)return n.onWordCloudHover(void 0,void 0,t,N),void(n.active&&S(void 0,0,0,N));n.onWordCloudHover(e.item,e.dimension,t,N),n.active&&S(e.item,e.dimension,0,N),_=e}},P=function(t){var e=C(t);e&&(n.onWordCloudClick(e.item,e.dimension,t),t.preventDefault())},j=[],k=function(t){if(j[t])return j[t];var e=8*t,i=e,r=[];for(0===t&&r.push([p[0],p[1],0]);i--;){var o=1;"circle"!==n.shape&&(o=n.shape(i/e*2*Math.PI)),r.push([p[0]+t*o*Math.cos(-i/e*2*Math.PI),p[1]+t*o*Math.sin(-i/e*2*Math.PI)*n.ellipticity,i/e*2*Math.PI])}return j[t]=r,r},T=function(){return n.abortThreshold>0&&(new Date).getTime()-d>n.abortThreshold},E=function(t,e,i){var r=function(t){return Math.min(Math.max(n.minFontSize,n.maxFontSize*t/a),n.maxFontSize)}(e);if(r<=0)return!1;var o=1;rP[1]&&(P[1]=A),wP[2]&&(P[2]=w);break t}0}}return{mu:o,occupied:S,bounds:P,gw:b,gh:x,fillTextOffsetX:v,fillTextOffsetY:m,fillTextWidth:c,fillTextHeight:l,fontSize:r}},I=function(e,r,o,a,s,u,c,l,h,p,f){var d=o.fontSize,v=n.color,m=n.classes;if(f){var x=R(p);v=x?x.color:n.color}else v=g?g(a,s,d,u,c):n.color,m=M?M(a,s,d,u,c):n.classes;var b=o.bounds;b[3],b[0],b[1],b[3],b[2],b[0],t.forEach((function(t){if(t.getContext){var g=t.getContext("2d"),x=o.mu;g.save();var b=n.fontWeight+" "+(d*x).toString(10)+"px "+n.fontFamily;g.scale(1/x,1/x),g.font=b,g.fillStyle=v;var M=(e+o.gw/2)*y*x,_=(r+o.gh/2)*y*x;g.translate(M,_),0!==l&&g.rotate(-l),g.textBaseline="middle",n.selected===p&&(g.shadowColor=n.shadowColor,g.shadowBlur=n.shadowBlur),g.fillText(a,o.fillTextOffsetX*x,(o.fillTextOffsetY+.5*d)*x),f||i.push({gx:e,gy:r,info:o,word:a,weight:s,distance:u,theta:c,rotateDeg:l,attributes:h,id:p,color:v}),g.restore()}else{var w=document.createElement("span"),O="";O="rotate("+-l/Math.PI*180+"deg) ",1!==o.mu&&(O+="translateX(-"+o.fillTextWidth/4+"px) scale("+1/o.mu+")");var C={position:"absolute",display:"block",font:n.fontWeight+" "+d*o.mu+"px "+n.fontFamily,left:(e+o.gw/2)*y+o.fillTextOffsetX+"px",top:(r+o.gh/2)*y+o.fillTextOffsetY+"px",width:o.fillTextWidth+"px",height:o.fillTextHeight+"px",lineHeight:d+"px",whiteSpace:"nowrap",transform:O,webkitTransform:O,msTransform:O,transformOrigin:"50% 40%",webkitTransformOrigin:"50% 40%",msTransformOrigin:"50% 40%"};for(var S in v&&(C.color=v),w.textContent=a,C)w.style[S]=C[S];if(h)for(var A in h)w.setAttribute(A,h[A]);m&&(w.className+=m),t.appendChild(w)}}))},L=function(e,n,i,r,o){if(!(e>=l||n>=h||e<0||n<0)){if(c[e][n]=!1,i)t[0].getContext("2d").fillRect(e*y,n*y,v,v);w&&(O[e][n]={item:o,dimension:r})}},B=function(e,i,r,o,a,s,u,p){var f=Math.floor(e[0]-i.gw/2),d=Math.floor(e[1]-i.gh/2);i.gw,i.gh;return!!function(t,e,i,r,o){for(var a=o.length;a--;){var s=t+o[a][0],u=e+o[a][1];if(s>=l||u>=h||s<0||u<0){if(!n.drawOutOfBound)return!1}else if(!c[s][u])return!1}return!0}(f,d,0,0,i.occupied)&&(I(f,d,i,r,o,a,e[2],s,u,p,!1),function(e,i,r,o,a){var s,u,c=a.occupied,p=n.drawMask;if(p&&((s=t[0].getContext("2d")).save(),s.fillStyle=n.maskColor),w){var f=a.bounds;u={x:(e+f[3])*y,y:(i+f[0])*y,w:(f[1]-f[3]+1)*y,h:(f[2]-f[0]+1)*y}}for(var d=c.length;d--;){var g=e+c[d][0],v=i+c[d][1];if(!(g>=l||v>=h||g<0||v<0)){var m=R(a.item.id);m&&(a.item.color=m.color),L(g,v,p,u,a.item)}}p&&s.restore()}(f,d,0,0,i),{gx:f,gy:d,rot:s,info:i})},D=function(t){var e,i,r,o;Array.isArray(t)?(e=t[0],i=t[1]):(e=t.word,i=t.weight,r=t.attributes,o=t.id);var a=0===n.rotateRatio?0:Math.random()>n.rotateRatio?0:0===m?x:b>0?x+Math.floor(Math.random()*b)*m/b:x+Math.random()*m,s=E(e,i,a);if(s&&(s.item=t),!s)return!1;if(T())return!1;if(!n.drawOutOfBound){var u=s.bounds;if(u[1]-u[3]+1>l||u[2]-u[0]+1>h)return!1}for(var c=f+1;c--;){var p=k(f-c);n.shuffle&&(p=[].concat(p),Is(p));for(var d=0;d=n.data.length)return S(E),F("wordcloudstop",!1),void j("wordcloudstart",k);d=(new Date).getTime();var e=D(n.data[g]),i=!F("wordclouddrawn",!0,{item:n.data[g],drawn:e});if(T()||i)return S(E),n.abort(),F("wordcloudabort",!1),F("wordcloudstop",!1),void j("wordcloudstart",k);g++,E=C(t,n.wait)}),n.wait)}else for(var L=0;L128?(s.data[u]=o[0],s.data[u+1]=o[1],s.data[u+2]=o[2],s.data[u+3]=o[3]):(s.data[u]=o[0],s.data[u+1]=o[1],s.data[u+2]=o[2],s.data[u+3]=254);i.putImageData(s,0,0),this._targetCanvas.getContext("2d").drawImage(n,0,0),this.options=Object(F.deepMix)({},this.options,{clearCanvas:!1}),this._start()},e.prototype._scaleMaskImageCanvas=function(t){var e=document.createElement("canvas");e.width=this.canvas.get("width"),e.height=this.canvas.get("height");var n=e.getContext("2d");return n.imageSmoothingEnabled=!0,n.drawImage(t,0,0,t.width,t.height,0,0,e.width,e.height),{maskImageCanvas:e,maskImageContext:n}},e.prototype._transformWhite2BlackPixels=function(t){var e=document.createElement("canvas");e.width=t.width,e.height=t.height;var n=e.getContext("2d");n.drawImage(t,0,0,t.width,t.height);for(var i=n.getImageData(0,0,e.width,e.height),r=0;r750?(i.data[r]=255,i.data[r+1]=255,i.data[r+2]=255,i.data[r+3]=0):(i.data[r]=0,i.data[r+1]=0,i.data[r+2]=0,i.data[r+3]=255)}return n.putImageData(i,0,0),e},e}(H);!function(t){function e(e,n){return n.renderer="canvas",t.call(this,e,n)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="wordCloud",n.container=this.containerDOM,t.prototype.createLayers.call(this,n)}}(mr);yr("wordCloud",Ds);var Fs=z({Rose:"interval"});Object(F.assign)(R,Fs);var Rs={rose:"interval"},Ns={rose:"column"},Ys=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="rose",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{width:400,height:400,title:{visible:!1},description:{visible:!1},forceFit:!0,padding:"auto",radius:.8,innerRadius:0,label:{visible:!0,type:"inner",autoRotate:!0,adjustColor:!1},legend:{visible:!0,position:"right"},tooltip:{visible:!0,shared:!1,showCrosshairs:!1,showMarkers:!1},columnStyle:{stroke:"white",lineWidth:1},xAxis:{visible:!1,line:{visible:!1},tickLine:{visible:!1},grid:{visible:!0,alignTick:!1,style:{lineWidth:.5}},label:{offset:5,autoRotate:!0}},yAxis:{visible:!1}})},e.prototype.getOptions=function(e){var n=t.prototype.getOptions.call(this,e),i=e.sectorStyle,r=e.categoryField,o=e.radiusField;return Object(F.deepMix)({},n,{columnStyle:i,xField:r,yField:o})},e.prototype.geometryParser=function(t,e){return"g2"===t?Rs[e]:Ns[e]},e.prototype.scale=function(){var t=this.options,e={};e[t.radiusField]={},e[t.categoryField]={type:"cat"},this.setConfig("scales",e)},e.prototype.coord=function(){var t=this.options,e={type:"polar",cfg:{radius:t.radius,innerRadius:t.innerRadius||0}};this.setConfig("coordinate",e)},e.prototype.addGeometry=function(){var t=this.options,e=Fr("interval","main",{plot:this,positionFields:[t.categoryField,t.radiusField],widthRatio:{rose:1}});e.label=this.extractLabel(),e.adjust=this.adjustRoseAdjust(),this.rose=e,t.tooltip&&(t.tooltip.fields||t.tooltip.formatter)&&this.geometryTooltip(),this.setConfig("geometry",e)},e.prototype.adjustRoseAdjust=function(){},e.prototype.geometryTooltip=function(){this.rose.tooltip={};var t=this.options.tooltip;t.fields&&(this.rose.tooltip.fields=t.fields),t.formatter&&(this.rose.tooltip.callback=t.formatter,t.fields||(this.rose.tooltip.fields=[this.options.radiusField,this.options.categoryField,this.options.colorField]))},e.prototype.animation=function(){t.prototype.animation.call(this),!1===this.options.animation&&(this.rose.animate=!1)},e.prototype.annotation=function(){},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,x)},e.prototype.extractLabel=function(){var t=this.options;if(!t.label||!t.label.visible)return!1;var e=Object(F.deepMix)({},t.label);this.adjustLabelOptions(e);var n=[t.categoryField,t.radiusField];return Ni("label",Object(L.__assign)({plot:this,labelType:"polar",fields:n},e))},e.prototype.adjustLabelOptions=function(t){var e=this.options.radiusField;if(t){var n=t.offset,i=t.type,r=t.content;"inner"===i?t.offset=n<0?n:-10:"outer"===i&&(t.offset=n>=0?n:10),r||(t.content=function(t,n){return""+n._origin[e]})}},e}(hr),Xs=Ys;yr("rose",Ys);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="rose",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=Xs.getDefaultOptions}(mr);var Gs={preRender:[],afterRender:[{name:"responsiveAxis",method:function(t){var e=t.getResponsiveTheme(),n=t.canvas;new uo({plot:t,responsiveTheme:e,dim:"x"}),new uo({plot:t,responsiveTheme:e,dim:"y"}),n.draw()}}]};ir("bar",{columnStyle:{normal:{},active:function(t){return{opacity:.5*(t.opacity||1)}},disable:function(t){return{opacity:.5*(t.opacity||1)}},selected:{lineWidth:1,stroke:"black"}}});var zs=n("fggK");function qs(t,e,n){return(1-n)*t+n*e}function Hs(t,e){var n=e||{},i=n.duration,r=void 0===i?200:i,o=n.delay,a=n.easing,s=n.callback,u=n.reverse,c=t.getBBox(),l=u?c.maxX:c.minX,h=(c.minY+c.maxY)/2,p=t.setClip({type:"rect",attrs:{x:c.x,y:c.y,width:c.width,height:c.height}});p.setMatrix(Object(ot.b)(p.getMatrix(),[["t",-l,-h],["s",0,1],["t",l,h]]));var f={fillOpacity:t.attr("fillOpacity"),strokeOpacity:t.attr("strokeOpacity"),opacity:t.attr("opacity")};t.attr({fillOpacity:0,strokeOpacity:0,opacity:0}),p.animate({matrix:[1,0,0,0,1,0,0,0,1]},{duration:200,easing:a,callback:function(){t.setClip(null),p.remove()},delay:o}),t.animate(f,{duration:r,easing:a,delay:o}),s&&setTimeout((function(){return s(t)}),r+o)}function Vs(t,e){var n=e||{},i=n.duration,r=void 0===i?200:i,o=n.delay,a=n.easing,s=n.callback,u=n.reverse,c=t.getBBox(),l=(c.minX+c.maxX)/2,h=u?c.maxY:c.minY,p=t.setClip({type:"rect",attrs:{x:c.x,y:c.y,width:c.width,height:c.height}});p.setMatrix(Object(ot.b)(p.getMatrix(),[["t",-l,-h],["s",1,0],["t",l,h]]));var f={fillOpacity:t.attr("fillOpacity"),strokeOpacity:t.attr("strokeOpacity"),opacity:t.attr("opacity")};t.attr({fillOpacity:0,strokeOpacity:0,opacity:0}),p.animate({matrix:[1,0,0,0,1,0,0,0,1]},{duration:200,easing:a,callback:function(){t.setClip(null),p.remove()},delay:o}),t.animate(f,{duration:r,easing:a,delay:o}),s&&setTimeout((function(){return s(t)}),r+o)}function Ws(t,e,n){return(1-n)*t+n*e}Object(U.registerShape)("interval","funnel-basic-rect",{getPoints:function(t){return t.size=1.8*t.size,function(t,e){void 0===e&&(e=!1);var n,i,r,o,a=t.x,s=t.y,u=t.y0,c=t.size;Object(F.isArray)(s)?(n=s[0],i=s[1]):(n=u,i=s),Object(F.isArray)(a)?(r=a[0],o=a[1]):(r=a-c/2,o=a+c/2);var l=[{x:r,y:n},{x:r,y:i}];return e?l.push({x:o,y:(i+n)/2}):l.push({x:o,y:i},{x:o,y:n}),l}(t)},draw:function(t,e){var n,i=Object(zs.getStyle)(t,!1,!0),r=Object(F.get)(t,"data.__compare__"),o=this.parsePath(function(t,e){var n=[],i=t.points,r=t.nextPoints;if(e){var o=e.yValues,a=e.yValuesMax,s=e.yValuesNext,u=(i[0].y+i[1].y)/2,c=o[0]+o[1],l=o.map((function(t){return t/c/.5})),h=.9*(a[0]/(a[0]+a[1])-.5);if(Object(F.isNil)(r))n.push(["M",i[0].x,h+(i[0].y-u)*l[0]+u],["L",i[1].x,h+u],["L",i[2].x,h+u],["L",i[3].x,h+(i[3].y-u)*l[0]+u],["Z"]),n.push(["M",i[0].x,h+.002+u],["L",i[1].x,h+.002+(i[1].y-u)*l[1]+u],["L",i[2].x,h+.002+(i[2].y-u)*l[1]+u],["L",i[3].x,h+.002+u],["Z"]);else{var p=s[0]+s[1],f=s.map((function(t){return t/p/.5}));n.push(["M",i[0].x,h+(i[0].y-u)*l[0]+u-.001],["L",i[1].x,h+u-.001],["L",r[1].x,h+u-.001],["L",r[0].x,h+(r[3].y-u)*f[0]+u-.001],["Z"]),n.push(["M",i[0].x,h+u+.001],["L",i[1].x,h+(i[1].y-u)*l[1]+u+.001],["L",r[1].x,h+(r[2].y-u)*f[1]+u+.001],["L",r[0].x,h+u+.001],["Z"])}}else Object(F.isNil)(r)?n.push(["M",i[0].x,i[0].y],["L",i[1].x,i[1].y],["L",i[2].x,i[2].y],["L",i[3].x,i[3].y],["Z"]):n.push(["M",i[0].x,i[0].y],["L",i[1].x,i[1].y],["L",r[1].x,r[1].y],["L",r[0].x,r[0].y],["Z"]);return n}(t,r));return e.addShape("path",((n={name:"interval",attrs:Object(L.__assign)(Object(L.__assign)({},i),{path:o})}).__compare__=r,n))},getMarker:function(t){return{symbol:"square",style:{r:4,fill:t.color}}}}),Object(U.registerShape)("interval","funnel-dynamic-rect",{draw:function(t,e){var n=Object(zs.getStyle)(t,!1,!0),i=Object(F.get)(t,"data.__custom__"),r=this.parsePath(function(t,e){var n=e.reverse,i=e.ratioUpper,r=e.ratioLower,o=[],a=t[0],s=(t[1].x+t[2].x)/2;if(n){var u=r;r=i,i=u}var c=(a.x-s)*qs(.6,1.2,r)+s;o.push(["M",c,a.y]);for(var l=1,h=t.length;l'),Object(ne.modifyCSS)(i,tt.a[n]);var a=i;if(t){n=nt.a.TITLE_CLASS,i=Object(ne.createDom)('
              '),Object(ne.modifyCSS)(i,tt.a[n]),a.appendChild(i);var s=i;n=nt.a.MARKER_CLASS,i=Object(ne.createDom)(''),Object(ne.modifyCSS)(i,tt.a[n]),Object(ne.modifyCSS)(i,{width:"10px",height:"10px"}),s.appendChild(i),o=i,i=Object(ne.createDom)(""+t+""),s.appendChild(i)}if(e){n=nt.a.LIST_CLASS,i=Object(ne.createDom)('
                '),Object(ne.modifyCSS)(i,tt.a[n]),a.appendChild(i);var u=i;e.reduce((function(t,e){r||(r=e.color);var n=Object(F.get)(e,"point._origin.__compare__.compareValues");return Object(F.get)(e,"point._origin.__compare__.yValues").forEach((function(e,i){return t.push([n[i],e])})),t}),[]).forEach((function(t,e){var r=t[0],o=t[1];n=nt.a.LIST_ITEM_CLASS,i=Object(ne.createDom)('
              • '+r+""),Object(ne.modifyCSS)(i,tt.a[n]),a.appendChild(i),n=nt.a.VALUE_CLASS,i=Object(ne.createDom)(''+o+""),Object(ne.modifyCSS)(i,tt.a[n]),a.appendChild(i)}))}return r&&o&&Object(ne.modifyCSS)(o,{backgroundColor:r}),a}}),t.prototype.tooltip.call(this)},e.prototype.addGeometry=function(){var t=this.options,e=Fr("interval","main",{positionFields:[t.dynamicHeight?"_":t.xField,t.yField],plot:this});this.adjustFunnel(e),this.funnel=e,this.setConfig("geometry",e)},e.prototype.animation=function(){var e=this;t.prototype.animation.call(this);var n=this.options;if(!1===n.animation)this.funnel.animate=!1;else{var i=this.getData(),r=Object(F.get)(n,"animation.appear.duration"),o=r/(i.length||1);this._animationAppearTimeoutHandler&&(clearTimeout(this._animationAppearTimeoutHandler),delete this._animationAppearTimeoutHandler),this._animationAppearTimeoutHandler=setTimeout((function(){e.fadeInPercentages(o),n.compareField&&e.fadeInCompareTexts(o),delete e._animationAppearTimeoutHandler}),r),this.funnel.animate=Object(F.deepMix)({},n.animation,{appear:{animation:n.transpose?"funnelScaleInX":"funnelScaleInY",duration:o,delay:function(t){return Object(F.findIndex)(i,(function(e){return Object(F.isEqual)(e,t)}))*o},callback:function(t){e.fadeInLabels(t,.5*o)}},enter:{animation:"fade-in"}})}},e.prototype.afterRender=function(){var e=this.options;if(e.responsive&&"auto"!==e.padding&&this.applyResponsive("afterRender"),this.resetLabels(),this.resetPercentages(),e.compareField&&this.resetCompareTexts(),"auto"==e.padding){var n=this._findPercentageContainer();n&&this.paddingController.registerPadding(n,"inner",!0);var i=this._findCompareTextContainer();i&&this.paddingController.registerPadding(i,"inner",!0)}(t.prototype.afterRender.call(this),!1===e.animation&&(this.fadeInLabels(),this.fadeInPercentages(),e.compareField&&this.fadeInCompareTexts()),this._legendsListenerAttached)||(this._legendsListenerAttached=!0,this.view.getController("legend").container.on("mousedown",this._onLegendContainerMouseDown))},e.prototype.updateConfig=function(e){e=this.adjustProps(e),t.prototype.updateConfig.call(this,e),this._legendsListenerAttached=!1},e.prototype.changeData=function(e){var n=this.options;if(!1!==n.animation&&(this._shouldResetPercentages=!1,this._shouldResetLabels=!1),n.dynamicHeight){var i=this._findCheckedDataInNewData(e);this._genCustomFieldForDynamicHeight(i)}if(n.compareField){e=this._reduceDataForCompare(e);i=this._findCheckedDataInNewData(e);this._updateDataForCompare(i)}t.prototype.changeData.call(this,e),this.refreshPercentages(),this.refreshLabels(),n.compareField&&this.fadeInCompareTexts()},e.prototype.geometryParser=function(t,e){return"g2"===t?Us[e]:Qs[e]},e.prototype.applyResponsive=function(t){var e=this,n=Gs[t];Object(F.each)(n,(function(t){t.method(e)}))},e.prototype.adjustProps=function(t){return t.compareField&&(t.dynamicHeight=!1),t.dynamicHeight&&(Object(F.set)(t,"meta."+t.yField+".nice",!1),Object(F.set)(t,"tooltip.shared",!1)),t},e.prototype.resetPercentages=function(){var t=this;if(this._shouldResetPercentages){var e=this.options,n=e.percentage||{},i=n.offsetX,r=n.offsetY,o=n.spacing,a=n.line,s=void 0===a?{}:a,u=n.text,c=void 0===u?{}:u,l=n.value,h=void 0===l?{}:l,p=Date.now(),f=this._findPercentageContainer(!0);this._eachShape((function(n,a,u,l){if(a>0){var d=n.getBBox(),g=d.minX,y=d.maxX,v=d.maxY,m=d.minY,x=e.transpose?g:y,b=e.transpose&&e.compareField?v:m,M=t._findPercentageMembersInContainerByIndex(f,a,!0),_=M.line,w=M.text,O=M.value,C=[function(t,n,a,f,d){a&&(a.attr(Object(F.deepMix)({},s.style,{x1:t,y1:n,x2:e.transpose?t+i:t-i,y2:e.transpose?n-r:n+r,opacity:0})),a.set("adjustTimestamp",p));var g=0,y=0,v=function(){f&&(f.attr(Object(F.deepMix)({},c.style,{x:e.transpose?t+i:t-i-o-y-o,y:e.transpose?n-r-o:n+r,opacity:0,text:c.content,textAlign:e.transpose?"left":"right",textBaseline:e.transpose?"bottom":"middle"})),f.set("adjustTimestamp",p),g=f.getBBox().width)},m=function(){d&&(d.attr(Object(F.deepMix)({},h.style,{x:e.transpose?t+i+g+o:t-i-o,y:e.transpose?n-r-o:n+r,opacity:0,text:Object(F.isFunction)(h.formatter)?e.compareField?h.formatter(Object(F.get)(l,"__compare__.yValues.0"),Object(F.get)(u,"__compare__.yValues.0")):h.formatter(l[e.yField],u[e.yField]):"",textAlign:e.transpose?"left":"right",textBaseline:e.transpose?"bottom":"middle"})),d.set("adjustTimestamp",p),y=d.getBBox().width)};e.transpose?(v(),m()):(m(),v())},function(t,n,a,f,d){a&&(a.attr(Object(F.deepMix)({},s.style,{x1:t,y1:n,x2:t+i,y2:e.transpose?e.compareField?n+r:n-r:n+r,opacity:0})),a.set("adjustTimestamp",p));var g=0;f&&(f.attr(Object(F.deepMix)({},c.style,{x:e.transpose?t+i:t+i+o,y:e.transpose?e.compareField?n+r+o:n-r-o:n+r,opacity:0,text:c.content,textAlign:"left",textBaseline:e.transpose?e.compareField?"top":"bottom":"middle"})),f.set("adjustTimestamp",p),g=f.getBBox().width),d&&(d.attr(Object(F.deepMix)({},h.style,{x:e.transpose?t+i+g+o:t+i+o+g+o,y:e.transpose?e.compareField?n+r+o:n-r-o:n+r,opacity:0,text:Object(F.isFunction)(h.formatter)?e.compareField?h.formatter(Object(F.get)(l,"__compare__.yValues.1"),Object(F.get)(u,"__compare__.yValues.1")):h.formatter(l[e.yField],u[e.yField]):"",textAlign:"left",textBaseline:e.transpose?e.compareField?"top":"bottom":"middle"})),d.set("adjustTimestamp",p))}];if(e.compareField){var S=[g,m];[[S[0],S[1]],[x,b]].forEach((function(t,e){var n=t[0],i=t[1];return C[e](n,i,_&&_[e],w&&w[e],O&&O[e])}))}else C[1](x,b,_,w,O)}l=u,a++})),f.get("children").forEach((function(t){t.get("adjustTimestamp")!=p&&(t.attr({opacity:0}),f.set(t.get("id"),null),setTimeout((function(){return t.remove()}),0))}))}},e.prototype.fadeInPercentages=function(t,e){var n=this,i=this.options,r=this._findPercentageContainer(),o=function(e){var i={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0};n._eachShape((function(o,a){var s=n._findPercentageMembersInContainerByIndex(r,a),u={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0},c=function(t){if(t&&"text"==t.get("type")){var e=t.getBBox(),n=e.minX,i=e.maxX,r=e.minY,o=e.maxY;nu.maxX&&(u.maxX=i),ru.maxY&&(u.maxY=o)}};if(Object(F.each)(s,(function(t){return Object(F.isArray)(t)?c(t[e]):c(t)})),u.minX>i.maxX||u.maxXi.maxY||u.maxY=s.minX&&u.maxX<=s.maxX&&u.minY>=s.minY&&u.maxY<=s.maxY){var c={opacity:1};e?a.animate(c,e):a.attr(c)}}}})),e&&n&&setTimeout(n,e)},e.prototype.fadeOutLabels=function(t,e,n){var i=this,r=this._getGeometry().labelsContainer;this._eachShape((function(n,o){if(!t||t==n){var a=i._findLabelInContainerByIndex(r,o);if(a){var s={opacity:0};e?a.animate(s,e):a.attr(s)}}})),e&&n&&setTimeout(n,e)},e.prototype.refreshLabels=function(t){var e=this;if(!1!==this.options.animation){var n=this._calcRefreshFadeDurations(),i=n.fadeOutDuration,r=n.fadeInDuration;this._shouldResetLabels=!1,this.fadeOutLabels(null,i,(function(){e._shouldResetLabels=!0,e.resetLabels(),e.fadeInLabels(null,r,t)}))}},e.prototype._findLabelInContainerByIndex=function(t,e,n){var i,r;if(void 0===n&&(n=!1),!1===(null===(i=this.options.label)||void 0===i?void 0:i.visible))return r;var o="_label-"+e;return!(r=t.get(o))&&n&&(r=t.addShape({id:o,type:"text",attrs:{}}),t.set(o,r)),r},e.prototype.resetCompareTexts=function(){if(this._shouldResetCompareTexts){var t,e,n=this.options;if(this._eachShape((function(n,i,r){0==i&&(t=n.get("parent").getBBox(),e=Object(F.get)(r,"__compare__"))})),t&&e&&!1!==Object(F.get)(n,"compareText.visible")){var i=this._findCompareTextContainer(!0),r=e.yValuesMax,o=e.compareValues,a=t.minX,s=t.maxX,u=t.minY,c=t.maxY,l=i.get("children");[0,1].forEach((function(t){var e=l[t];e||(e=i.addShape({type:"text"})),e.attr(Object(F.deepMix)({},Object(F.get)(n,"compareText.style"),{text:n.transpose?o[t]:t?" "+o[t]:o[t]+" ",x:n.transpose?a+Object(F.get)(n,"compareText.offsetX"):Ws(a,s,r[0]/(r[0]+r[1])),y:n.transpose?Ws(u,c,r[0]/(r[0]+r[1]))+(t?8:-8):u+Object(F.get)(n,"compareText.offsetY"),opacity:0,textAlign:n.transpose?"right":t?"left":"right",textBaseline:n.transpose&&t?"top":"bottom"}))}))}}},e.prototype.fadeInCompareTexts=function(t,e){var n=this._findCompareTextContainer();if(n){var i=n.get("children");[0,1].forEach((function(e){var n=i[e];if(n){var r={opacity:1};t?n.animate(r,t):n.attr(r)}}))}t&&e&&setTimeout(e,t)},e.prototype.fadeOutCompareTexts=function(t,e){var n=this._findCompareTextContainer();if(n){var i=n.get("children");[0,1].forEach((function(e){var n=i[e];if(n){var r={opacity:0};t?n.animate(r,t):n.attr(r)}}))}t&&e&&setTimeout(e,t)},e.prototype.refreshCompareTexts=function(t){var e=this;if(!1!==this.options.animation){var n=this._calcRefreshFadeDurations(),i=n.fadeInDuration,r=n.fadeOutDuration;this._shouldResetCompareTexts=!1,this.fadeOutCompareTexts(r,(function(){e._shouldResetCompareTexts=!0,e.resetCompareTexts(),e.fadeInCompareTexts(i,t)}))}},e.prototype._findCompareTextContainer=function(t){void 0===t&&(t=!1);var e=this.view.middleGroup,n=e.get("compareTextContainer");return!n&&t&&(n=e.addGroup(),e.set("compareTextContainer",n)),n},e.prototype._eachShape=function(t){var e,n,i=this._findCheckedData(this.getData()),r=i.length,o=0;null===(e=this._getGeometry())||void 0===e||e.elements.forEach((function(e){var a=e.shape,s=i[o];oe[t]&&(e[t]=n[t])}))})),t.forEach((function(n,i){Object(F.set)(n,"__compare__.yValuesMax",e),Object(F.set)(n,"__compare__.yValuesNext",Object(F.get)(t,i+1+".__compare__.yValues"))}))},e}(hr),$s=Zs;yr("funnel",Zs);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="funnel",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=$s.getDefaultOptions}(mr);var Ks=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stackedRose",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{xAxis:{visible:!0,line:{visible:!1},tickLine:{visible:!1},grid:{visible:!0,alignTick:!1,style:{lineWidth:.5}},label:{offset:5,autoRotate:!0}},yAxis:{visible:!1}})},e.prototype.adjustRoseAdjust=function(){return[{type:"stack"}]},e.prototype.geometryTooltip=function(){this.rose.tooltip={};var t=this.options.tooltip;t.fields&&(this.rose.tooltip.fields=t.fields),t.formatter&&(this.rose.tooltip.callback=t.formatter,t.fields||(this.rose.tooltip.fields=[this.options.radiusField,this.options.categoryField,this.options.stackField]))},e}(Xs),Js=Ks;yr("stackedRose",Ks);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="stackedRose",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=Js.getDefaultOptions}(mr);var tu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="groupedRose",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{xAxis:{visible:!0,line:{visible:!1},tickLine:{visible:!1},grid:{visible:!0,alignTick:!1,style:{lineWidth:.5}},label:{offset:5,autoRotate:!0}},yAxis:{visible:!1}})},e.prototype.adjustRoseAdjust=function(){return[{type:"dodge",marginRatio:1}]},e.prototype.geometryTooltip=function(){this.rose.tooltip={};var t=this.options.tooltip;t.fields&&(this.rose.tooltip.fields=t.fields),t.formatter&&(this.rose.tooltip.callback=t.formatter,t.fields||(this.rose.tooltip.fields=[this.options.radiusField,this.options.categoryField,this.options.groupField]))},e}(Xs),eu=tu;yr("groupedRose",tu);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="groupedRose",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=eu.getDefaultOptions}(mr);var nu=z({Area:"area",Line:"line",Point:"point"});Object(F.assign)(R,nu);ir("radar",{areaStyle:{normal:{},active:function(t){return{opacity:t.opacity||1}},disable:function(t){return{opacity:.5*(t.opacity||1)}},selected:{lineWidth:1,stroke:"#333333"}},lineStyle:{normal:{},active:function(t){return{opacity:t.opacity||1}},disable:function(t){return{opacity:.5*(t.opacity||1)}},selected:function(t){return{lineWidth:(t.lineWidth||1)+2}}},pointStyle:{normal:{},active:function(t){var e=t.fill||t.fillStyle,n=t.size||t.radius;return{radius:n+1,shadowBlur:n,shadowColor:e,stroke:e,strokeOpacity:1,lineWidth:1}},disable:function(t){return{opacity:.5*(t.opacity||t.fillOpacity||1)}},selected:function(t){var e=t.fill||t.fillStyle,n=t.size||t.radius;return{radius:n+2,shadowBlur:n,shadowColor:e,stroke:e,strokeOpacity:1,lineWidth:2}}}});var iu={area:"area",line:"line",point:"point"},ru=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{width:400,height:400,title:{visible:!1},description:{visible:!1},forceFit:!0,padding:"auto",radius:.8,smooth:!1,line:{visible:!0,size:2,style:{opacity:1}},area:{visible:!0,style:{opacity:.25}},point:{visible:!1,size:4,shape:"point",style:{opacity:1}},angleAxis:{visible:!0,autoRotateTitle:!0,line:{visible:!1},tickLine:{visible:!1},grid:{visible:!0,line:{style:{lineDash:[0,0]}}},label:{visible:!0,offset:16,autoRotate:!0,autoHide:!0},title:{visible:!1}},radiusAxis:{min:0,visible:!0,nice:!0,autoRotateTitle:!0,line:{visible:!0},tickLine:{visible:!0},gridType:"line",grid:{visible:!0,line:{style:{lineDash:[0,0]}}},label:{visible:!0,autoHide:!0,autoRotate:!0},title:{visible:!1}},label:{visible:!1,type:"point"},legend:{visible:!0,position:"left-top"},tooltip:{visible:!0,shared:!0,showCrosshairs:!1}})},e.prototype.init=function(){var e=this.options;e.xField=e.angleField,e.yField=e.radiusField,t.prototype.init.call(this)},e.prototype.geometryParser=function(t,e){return iu[e]},e.prototype.scale=function(){var e=this.options,n={};n[e.angleField]={},Object(F.has)(e,"angleAxis")&&Rr(n[e.angleField],e.angleAxis),n[e.radiusField]={},Object(F.has)(e,"radiusAxis")&&Rr(n[e.radiusField],e.radiusAxis),this.setConfig("scales",n),t.prototype.scale.call(this)},e.prototype.coord=function(){var t={type:"polar",cfg:{radius:this.options.radius}};this.setConfig("coordinate",t)},e.prototype.axis=function(){var t=this.options,e=Ni("axis",{plot:this,dim:"angle"}),n=Ni("axis",{plot:this,dim:"radius"}),i={};i[t.angleField]=e,i[t.radiusField]=n,this.setConfig("axes",i)},e.prototype.addGeometry=function(){var t=this.options;if(t.area.visible){var e=Fr("area","main",{plot:this});this.setConfig("geometry",e),this.area=e}if(t.line&&t.line.visible){var n=Fr("line","guide",{plot:this});this.setConfig("geometry",n),this.line=n}if(t.point&&t.point.visible){var i=Fr("point","guide",{plot:this});this.setConfig("geometry",i),this.point=i}t.label&&this.label(),t.tooltip&&(t.tooltip.fields||t.tooltip.formatter)&&this.geometryTooltip()},e.prototype.geometryTooltip=function(){var t=this.line?this.line:this.area;t.tooltip={};var e=this.options.tooltip;e.fields&&(t.tooltip.fields=e.fields),e.formatter&&(t.tooltip.callback=e.formatter,e.fields||(t.tooltip.fields=[this.options.angleField,this.options.radiusField]),this.options.seriesField&&t.tooltip.fields.push(this.options.seriesField))},e.prototype.label=function(){var t=this.options;if(!1===t.label.visible)return this.point&&(this.point.label=!1),this.line&&(this.line.label=!1),void(this.area&&(this.area.label=!1));var e=Ni("label",Object(L.__assign)({fields:[t.radiusField],cfg:{type:"polar",autoRotate:!1},plot:this},t.label));this.point?this.point.label=e:this.line?this.line.label=e:this.area&&(this.area.label=e)},e.prototype.annotation=function(){},e.prototype.animation=function(){t.prototype.animation.call(this),!1===this.options.animation&&(this.area&&(this.area.animate=!1),this.line&&(this.line.animate=!1),this.point&&(this.point.animate=!1))},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,b)},e}(hr),ou=ru;yr("radar",ru);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="radar",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=ou.getDefaultOptions}(mr);var au=z({Liquid:"intervl",Statistic:"annotation-text"});Object(F.assign)(R,au);var su=er(),uu=function(t,e){e.color&&!t.fill&&(t.fill=e.color),Object(F.isNumber)(e.opacity)&&(t.opacity=t.fillOpacity=e.opacity)},cu=function(t,e){e.color&&!t.stroke&&(t.stroke=e.color),Object(F.isNumber)(e.opacity)&&(t.opacity=t.strokeOpacity=e.opacity)},lu={lerp:function(t,e,n){return(1-n)*t+n*e}},hu=function(t){var e={fill:"#fff",stroke:su.color,fillOpacity:0,lineWidth:2},n=Object(F.mix)({},e,t.style);return cu(n,t),n};function pu(t,e,n,i){return 0===e?[[t+.5*n/Math.PI/2,i/2],[t+.5*n/Math.PI,i],[t+n/4,i]]:1===e?[[t+.5*n/Math.PI/2*(Math.PI-2),i],[t+.5*n/Math.PI/2*(Math.PI-1),i/2],[t+n/4,0]]:2===e?[[t+.5*n/Math.PI/2,-i/2],[t+.5*n/Math.PI,-i],[t+n/4,-i]]:[[t+.5*n/Math.PI/2*(Math.PI-2),-i],[t+.5*n/Math.PI/2*(Math.PI-1),-i/2],[t+n/4,0]]}function fu(t,e,n,i,r,o,a){for(var s=2*Math.ceil(2*t/n*4),u=[],c=i;c<2*-Math.PI;)c+=2*Math.PI;for(;c>0;)c-=2*Math.PI;var l=o-t+(c=c/Math.PI/2*n)-2*t;u.push(["M",l,e]);for(var h=0,p=0;p.55){var o=$o(this.options.color);return Math.round(.299*o[0]+.587*o[1]+.114*o[2])/.8<156?{fill:"#f6f6f6",shadowColor:"black"}:e}return e},e.prototype.updateConfig=function(e){t.prototype.updateConfig.call(this,e),this.shouldFadeInAnnotation=!0},e.prototype.getViewRange=function(){var e=t.prototype.getViewRange.call(this),n=this.options.liquidStyle,i=n.lineWidth?n.lineWidth:2,r=e.minX,o=e.minY,a=e.width,s=e.height,u=Math.min(a,s)-2*i;return new q(r+a/2-u/2,o+s/2-u/2,u,u)},e}(hr),mu=vu;yr("liquid",vu);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="liquid",t.prototype.createLayers.call(this,n)},e.prototype.changeValue=function(t,e){if(void 0===e&&(e=!1),e)this.eachLayer((function(e){e instanceof mu&&e.changeValue(t)}));else{var n=this.layers[0];n instanceof mu&&n.changeValue(t)}},e.getDefaultOptions=mu.getDefaultOptions}(mr);var xu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="histogram",e}return Object(L.__extends)(e,t),e.prototype.init=function(){this.options.xField="range",this.options.yField="count",t.prototype.init.call(this)},e.prototype.processData=function(t){var e=this,n=this.options,i=n.binField,r=n.binWidth,o=n.binNumber,a=Object(F.clone)(t);Object(F.sortBy)(a,i);var s=Object(F.valuesOfKey)(a,i),u=Object(F.getRange)(s),c=u.max-u.min,l=r;if(!r&&o&&(l=c/o),!r&&!o){var h=vi(s);l=c/h}var p={};Object(F.each)(a,(function(t){var n=t[i],r=e.getBin(n,l),o=r[0]+"-"+r[1];Object(F.hasKey)(p,o)||(p[o]={name:o,range:r,count:0,data:[]}),p[o].data.push(t),p[o].count+=1}));var f=[];return Object(F.each)(p,(function(t){f.push(t)})),f},e.prototype.scale=function(){t.prototype.scale.call(this);var e=this.config.scales.range;e.nice=!1,e.type="linear"},e.prototype.getBin=function(t,e){var n=Math.floor(t/e);return[e*n,e*(n+1)]},e}(Ra),bu=xu;yr("histogram",xu);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="histogram",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=bu.getDefaultOptions}(mr);var Mu={epanechnikov:function(t){return Math.abs(t)<=1?.75*(1-t*t):0},gaussian:function(t){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*Math.pow(t,2))},uniform:function(t){return Math.abs(t)<=1?.5:0},triangle:function(t){return Math.abs(t)<=1?1-Math.abs(t):0},quartic:function(t){var e=1-t*t;return Math.abs(t)<=1?.9375*e*e:0},triweight:function(t){var e=1-t*t;return Math.abs(t)<=1?.9375*Math.pow(e,3):0},cosinus:function(t){var e=Math.PI/4*Math.cos(.5*Math.PI*t);return Math.abs(t)<=1?e:0}},_u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="density",e}return Object(L.__extends)(e,t),e.prototype.init=function(){var e=this.options.xAxis?Object(F.clone)(this.options.xAxis):{};this.options.xField="value",this.options.yField="density",this.options.xAxis=Object(F.deepMix)({},e,{type:"linear"}),this.options.smooth=!0,t.prototype.init.call(this)},e.prototype.processData=function(t){var e=this,n=this.options,i=n.binField,r=n.binWidth,o=n.binNumber,a=n.kernel,s=Mu[a||"epanechnikov"],u=Object(F.clone)(t);Object(F.sortBy)(u,i);var c=Object(F.valuesOfKey)(u,i),l=Object(F.getRange)(c),h=l.max-l.min,p=o,f=r;!o&&r&&(p=Math.floor(h/r)),!r&&o&&(f=h/o),o||r||(p=vi(c),f=h/o);var d=new(ln("linear"))({min:l.min,max:l.max,tickCount:p,nice:!1}).getTicks(),g=[];return Object(F.each)(d,(function(t){var n=e.kernelDensityEstimator(f,s,t,c);g.push({value:t.text,density:n})})),g},e.prototype.kernelDensityEstimator=function(t,e,n,i){var r=0;return Object(F.each)(i,(function(i){var o=(n.tickValue-i)/t;r+=e(o)})),0===i.length?0:r/i.length},e}(Ma),wu=_u;yr("density",_u);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="density",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=wu.getDefaultOptions}(mr);var Ou=function(){function t(t){this.type="coordinate",this.isRect=!1,this.isHelix=!1,this.isPolar=!1,this.isReflectX=!1,this.isReflectY=!1;var e=t.start,n=t.end,i=t.matrix,r=void 0===i?[1,0,0,0,1,0,0,0,1]:i,o=t.isTransposed,a=void 0!==o&&o;this.start=e,this.end=n,this.matrix=r,this.originalMatrix=Object(L.__spreadArrays)(r),this.isTransposed=a}return t.prototype.initial=function(){this.center={x:(this.start.x+this.end.x)/2,y:(this.start.y+this.end.y)/2},this.width=Math.abs(this.end.x-this.start.x),this.height=Math.abs(this.end.y-this.start.y)},t.prototype.update=function(t){F.assign(this,t),this.initial()},t.prototype.convertDim=function(t,e){var n,i=this[e],r=i.start,o=i.end;return this.isReflect(e)&&(r=(n=[o,r])[0],o=n[1]),r+t*(o-r)},t.prototype.invertDim=function(t,e){var n,i=this[e],r=i.start,o=i.end;return this.isReflect(e)&&(r=(n=[o,r])[0],o=n[1]),(t-r)/(o-r)},t.prototype.applyMatrix=function(t,e,n){void 0===n&&(n=0);var i=this.matrix,r=[t,e,n];return ot.d.transformMat3(r,r,i),r},t.prototype.invertMatrix=function(t,e,n){void 0===n&&(n=0);var i=this.matrix,r=ot.a.invert([],i),o=[t,e,n];return ot.d.transformMat3(o,o,r),o},t.prototype.convert=function(t){var e=this.convertPoint(t),n=e.x,i=e.y,r=this.applyMatrix(n,i,1);return{x:r[0],y:r[1]}},t.prototype.invert=function(t){var e=this.invertMatrix(t.x,t.y,1);return this.invertPoint({x:e[0],y:e[1]})},t.prototype.rotate=function(t){var e=this.matrix,n=this.center;return ot.a.translate(e,e,[-n.x,-n.y]),ot.a.rotate(e,e,t),ot.a.translate(e,e,[n.x,n.y]),this},t.prototype.reflect=function(t){return"x"===t?this.isReflectX=!this.isReflectX:this.isReflectY=!this.isReflectY,this},t.prototype.scale=function(t,e){var n=this.matrix,i=this.center;return ot.a.translate(n,n,[-i.x,-i.y]),ot.a.scale(n,n,[t,e]),ot.a.translate(n,n,[i.x,i.y]),this},t.prototype.translate=function(t,e){var n=this.matrix;return ot.a.translate(n,n,[t,e]),this},t.prototype.transpose=function(){return this.isTransposed=!this.isTransposed,this},t.prototype.getCenter=function(){return this.center},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.getRadius=function(){return this.radius},t.prototype.isReflect=function(t){return"x"===t?this.isReflectX:this.isReflectY},t.prototype.resetMatrix=function(t){this.matrix=t||Object(L.__spreadArrays)(this.originalMatrix)},t}(),Cu=function(t){function e(e){var n=t.call(this,e)||this;return n.isRect=!0,n.type="cartesian",n.initial(),n}return Object(L.__extends)(e,t),e.prototype.initial=function(){t.prototype.initial.call(this);var e=this.start,n=this.end;this.x={start:e.x,end:n.x},this.y={start:e.y,end:n.y}},e.prototype.convertPoint=function(t){var e,n=t.x,i=t.y;return this.isTransposed&&(n=(e=[i,n])[0],i=e[1]),{x:this.convertDim(n,"x"),y:this.convertDim(i,"y")}},e.prototype.invertPoint=function(t){var e,n=this.invertDim(t.x,"x"),i=this.invertDim(t.y,"y");return this.isTransposed&&(n=(e=[i,n])[0],i=e[1]),{x:n,y:i}},e}(Ou),Su=function(t){function e(e){var n=t.call(this,e)||this;n.isHelix=!0,n.type="helix";var i=e.startAngle,r=void 0===i?1.25*Math.PI:i,o=e.endAngle,a=void 0===o?7.25*Math.PI:o,s=e.innerRadius,u=void 0===s?0:s,c=e.radius;return n.startAngle=r,n.endAngle=a,n.innerRadius=u,n.radius=c,n.initial(),n}return Object(L.__extends)(e,t),e.prototype.initial=function(){t.prototype.initial.call(this);var e=(this.endAngle-this.startAngle)/(2*Math.PI)+1,n=Math.min(this.width,this.height)/2;this.radius&&this.radius>=0&&this.radius<=1&&(n*=this.radius),this.d=Math.floor(n*(1-this.innerRadius)/e),this.a=this.d/(2*Math.PI),this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*n,end:this.innerRadius*n+.99*this.d}},e.prototype.convertPoint=function(t){var e,n=t.x,i=t.y;this.isTransposed&&(n=(e=[i,n])[0],i=e[1]);var r=this.convertDim(n,"x"),o=this.a*r,a=this.convertDim(i,"y");return{x:this.center.x+Math.cos(r)*(o+a),y:this.center.y+Math.sin(r)*(o+a)}},e.prototype.invertPoint=function(t){var e,n=this.d+this.y.start,i=ot.c.subtract([],[t.x,t.y],[this.center.x,this.center.y]),r=ot.c.angleTo(i,[1,0],!0),o=r*this.a;ot.c.length(i)this.width/i?(e=this.width/i,this.circleCenter={x:this.center.x-(.5-o)*this.width,y:this.center.y-(.5-a)*e*r}):(e=this.height/r,this.circleCenter={x:this.center.x-(.5-o)*e*i,y:this.center.y-(.5-a)*this.height}),this.polarRadius=this.radius,this.radius?this.radius>0&&this.radius<=1?this.polarRadius=e*this.radius:(this.radius<=0||this.radius>e)&&(this.polarRadius=e):this.polarRadius=e,this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*this.polarRadius,end:this.polarRadius}},e.prototype.getRadius=function(){return this.polarRadius},e.prototype.convertPoint=function(t){var e,n=this.getCenter(),i=t.x,r=t.y;return this.isTransposed&&(i=(e=[r,i])[0],r=e[1]),i=this.convertDim(i,"x"),r=this.convertDim(r,"y"),{x:n.x+Math.cos(i)*r,y:n.y+Math.sin(i)*r}},e.prototype.invertPoint=function(t){var e=this.getCenter(),n=[t.x-e.x,t.y-e.y],i=[1,0,0,0,1,0,0,0,1];ot.a.rotate(i,i,this.startAngle);var r=[1,0,0];ot.d.transformMat3(r,r,i),r=[r[0],r[1]];var o=ot.c.angleTo(r,n,this.endAngle0?s:-s;var u=this.invertDim(a,"y"),c={x:0,y:0};return c.x=this.isTransposed?u:s,c.y=this.isTransposed?s:u,c},e.prototype.getCenter=function(){return this.circleCenter},e.prototype.getOneBox=function(){var t=this.startAngle,e=this.endAngle;if(Math.abs(e-t)>=2*Math.PI)return{minX:-1,maxX:1,minY:-1,maxY:1};for(var n=[0,Math.cos(t),Math.cos(e)],i=[0,Math.sin(t),Math.sin(e)],r=Math.min(t,e);r'),this.container.appendChild(this.wrapperNode),Object(ne.modifyCSS)(this.wrapperNode,{position:"absolute"});var t=Object(ne.createDom)(this.html);this.wrapperNode.appendChild(t),this.setDomPosition(this.x,this.y)}},t.prototype.updateHtml=function(t){this.wrapperNode.innerHTML=t},t.prototype.updatePosition=function(t,e){this.setDomPosition(t,e)},t.prototype.destory=function(){this.container.removeChild(this.wrapperNode)},t.prototype.getDefaultOptions=function(){return{x:0,y:0,html:"",container:null,alignX:"middle",alignY:"middle"}},t.prototype.setDomPosition=function(t,e){var n=t,i=e,r=Object(ne.getOuterWidth)(this.wrapperNode),o=Object(ne.getOuterHeight)(this.wrapperNode);"middle"===this.options.alignX&&(n=t-r/2),"middle"===this.options.alignY&&(i=e-o/2),Object(ne.modifyCSS)(this.wrapperNode,{top:Math.round(i)+"px",left:Math.round(n)+"px"})},t}(),Bu="color:#4d4d4d;font-size:14px;text-align:center;line-height:2;font-family:'-apple-system',BlinkMacSystemFont,'SegoeUI',Roboto,'HelveticaNeue',Helvetica,'PingFangSC','HiraginoSansGB','MicrosoftYaHei',SimSun,'sans-serif';pointer-events:none;",Du="font-weight:300;",Fu="font-size:32px;font-weight:bold;color:#4D4D4D";var Ru=function(t){function e(e){var n=t.call(this,e)||this;return n.view=e.view,n.plot=e.plot,n.statisticClass=e.statisticClass,n.adjustOptions(),n}return Object(L.__extends)(e,t),e.prototype.triggerOn=function(){var t=this,e=this.options.triggerOn;this.view.on("interval:"+e,Object(F.debounce)((function(e){var n=t.parseStatisticData(e.data.data),i=t.getStatisticHtmlString(n);t.updateHtml(i)}),150));var n=this.options.triggerOff?this.options.triggerOff:"mouseleave";this.view.on("interval:"+n,Object(F.debounce)((function(e){var n=t.getTotalValue(),i=t.parseStatisticData(n),r=t.getStatisticHtmlString(i);t.updateHtml(r)}),150))},e.prototype.adjustOptions=function(){var t,e;if(this.options.content)t=this.options.content;else{var n=this.getTotalValue();t=this.parseStatisticData(n)}e=this.options.htmlContent?this.options.htmlContent(t):this.getStatisticTemplate(t),this.html=e;var i=this.view.coordinateBBox,r=i.minX,o=i.minY,a=i.width,s=i.height;this.x=r+a/2,this.y=o+s/2},e.prototype.getTotalValue=function(){var t,e=0,n=this.plot.options,i=n.angleField,r=n.colorField,o=this.options.totalLabel;return Object(F.each)(this.plot.options.data,(function(t){"number"==typeof t[i]&&(e+=t[i])})),(t={})[i]=e,t[r]=o,t},e.prototype.parseStatisticData=function(t){var e=this.plot.options,n=e.angleField,i=e.colorField;return i?{name:t[i],value:t[n]}:t[n]},e.prototype.getStatisticTemplate=function(t){var e,n=this.getStatisticSize();if(Object(F.isString)(t))e=function(t,e,n){return'

                '+e+"
                "),e},e}(Lu),Nu={ring:"interval"},Yu={interval:"ring"},Xu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{radius:.6,innerRadius:.64,statistic:{visible:!0,totalLabel:"总计",triggerOn:"mouseenter",triggerOff:"mouseleave"}})},e.prototype.beforeInit=function(){t.prototype.beforeInit.call(this),e.centralId++,this.statisticClass="statisticClassId"+e.centralId,this.adjustLabelDefaultOptions(),this.options.statistic&&this.options.statistic.triggerOn&&(this.options.tooltip.visible=!1),this.options.responsive&&"auto"!==this.options.padding&&this.applyResponsive("preRender")},e.prototype.afterRender=function(){var t=this.options,e=this.canvas.get("container");if(this.statistic&&e.removeChild(this.statistic.wrapperNode),this.options.statistic&&this.options.statistic.visible){var n=this.canvas.get("container");Object(ne.modifyCSS)(n,{position:"relative"}),this.statistic=new Ru(Object(L.__assign)({container:n,view:this.view,plot:this,statisticClass:this.statisticClass},this.options.statistic)),this.statistic.render(),this.options.statistic.triggerOn&&this.statistic.triggerOn()}t.label&&t.label.visible&&new(ls(t.label.type))(this,t.label).render()},e.prototype.destroy=function(){this.statistic&&this.statistic.destroy(),t.prototype.destroy.call(this)},e.prototype.geometryParser=function(t,e){return"g2"===t?Nu[e]:Yu[e]},e.prototype.coord=function(){var t=this.options,e={type:"theta",cfg:{radius:t.radius,innerRadius:t.innerRadius}};this.setConfig("coordinate",e)},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,_)},e.prototype.applyResponsive=function(t){var e=this,n=Eu[t];Object(F.each)(n,(function(t){t.method(e)}))},e.prototype.adjustLabelDefaultOptions=function(){var t=this.options.label;if(t&&"inner"===t.type){var e=t.style||{};e.textAlign||(e.textAlign="center"),t.style=e,t.offset||(t.offset=(this.options.innerRadius-1)/2*100+"%")}},e.centralId=0,e}(ys),Gu=Xu;yr("donut",Xu);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="donut",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=Gu.getDefaultOptions}(mr);Object(U.registerShape)("interval","waterfall",{draw:function(t,e){var n=function(t,e,n){var i=t.style,r=t.defaultStyle,o=t.color,a=Object(L.__assign)(Object(L.__assign)({},r),i);return o&&(e&&(a.stroke=o),n&&(a.fill=o)),a}(t,!1,!0),i=this.parsePath(function(t){var e=[],n=t[0];e.push(["M",n.x,n.y]);for(var i=1,r=t.length;i0?"+"+u:u,o[Uu]&&(u=s[0]-s[1]);var c=u;if(t.formatter){var l=n[r].attr("fill");c=t.formatter(""+u,{_origin:e[r],color:l},r)}var h=t.container.addShape("text",{attrs:Object(L.__assign)({text:c,textBaseline:"middle",textAlign:"center",x:(a.minX+a.maxX)/2,y:(a.minY+a.maxY)/2},t.textAttrs),name:"dill-label"});h.getBBox().height>a.height&&h.set("visible",!1)}})),this.view.getCanvas().draw()}},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype._init=function(){var t=this;this.view.on(Q.VIEW_LIFE_CIRCLE.BEFORE_RENDER,(function(){t.clear()})),this.view.on(Q.VIEW_LIFE_CIRCLE.AFTER_RENDER,(function(){t.draw()}))},t}(),Hu={waterfall:"interval"},Vu={interval:"waterfall"},Wu="$$value$$",Uu="$$total$$",Qu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="watarfall",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{legend:{visible:!1,position:"bottom"},label:{visible:!0,adjustPosition:!0},diffLabel:{visible:!0},leaderLine:{visible:!0},showTotal:{visible:!0,label:"总计值"},waterfallStyle:{lineWidth:0},tooltip:{visible:!0,shared:!0,showCrosshairs:!1,showMarkers:!1}})},e.prototype.getOptions=function(e){var n=t.prototype.getOptions.call(this,e);return this.adjustLegendOptions(n),this.adjustMeta(n),n},e.prototype.afterInit=function(){t.prototype.afterInit.call(this);var e=this.options;e.diffLabel&&e.diffLabel.visible?this.diffLabel=new qu({view:this.view,fields:[e.xField,e.yField,Wu],formatter:e.diffLabel.formatter,style:e.diffLabel.style}):this.diffLabel&&(this.diffLabel.clear(),this.diffLabel=null)},e.prototype.afterRender=function(){t.prototype.afterRender.call(this);var e=this.options;this.view.on("tooltip:change",(function(t){for(var n=t.items,i=0;i0){var a=n[e-1][Wu];o=Object(F.isArray)(a)?[a[1],t[r]+a[1]]:[a,t[r]+a]}n.push(Object(L.__assign)(Object(L.__assign)({},t),((i={})[Wu]=o,i.$$index$$=e,i)))})),this.options.showTotal&&this.options.showTotal.visible){var o=Object(F.map)(t,(function(t){return t[r]})),a=Object(F.reduce)(o,(function(t,e){return t+e}),0);n.push(((e={})[i]=this.options.showTotal.label,e[r]=null,e[Wu]=[a,0],e.$$index$$=n.length,e[Uu]=!0,e))}return n},e.prototype.scale=function(){var t=this.options,e={};e[t.xField]={type:"cat"},Object(F.has)(t,"xAxis")&&Rr(e[t.xField],t.xAxis),e[Wu]={},Object(F.has)(t,"yAxis")&&Rr(e[Wu],t.yAxis),this.setConfig("scales",e)},e.prototype.axis=function(){var t=Ni("axis",{plot:this,dim:"x"}),e=Ni("axis",{plot:this,dim:"y"}),n={fields:{}};n.fields[this.options.xField]=t,n.fields[Wu]=e,this.setConfig("axes",n)},e.prototype.coord=function(){},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,w)},e.prototype.geometryTooltip=function(){this.waterfall.tooltip={};var t=this.options.tooltip;t.fields&&(this.waterfall.tooltip.fields=t.fields),t.formatter&&(this.waterfall.tooltip.callback=t.formatter,t.fields||(this.waterfall.tooltip.fields=[this.options.xField,Wu]))},e.prototype._parseStyle=function(){var t=this.options.waterfallStyle,e=this.options.leaderLine,n={};return Object(F.isFunction)(t)?n.callback=function(){for(var n=[],i=0;i=0?r:o):(Object(F.isArray)(i)?i[1]-i[0]:i)>=0?r:o}}return i},e.prototype.adjustLegendOptions=function(t){var e=t.legend;e&&(e.visible=!1)},e.prototype.adjustMeta=function(t){var e=t.meta;if(e){var n=e?e[t.yField]:{};n.alias=n.alias||t.yField,t.meta[Wu]=n}},e}(hr),Zu=Qu;yr("waterfall",Qu);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="waterfall",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=Zu.getDefaultOptions}(mr);var $u=function(){function t(t){this.quadrantGroups=[],this.regionData=[],this.lineData=[],this.options=t,this.view=this.options.view,this.init()}return t.prototype.init=function(){var t,e=this.options,n=e.xBaseline,i=e.yBaseline,r=this.view.getCoordinate(),o=this.view.getScaleByField(this.options.plotOptions.xField),a=this.view.getScaleByField(this.options.plotOptions.yField);if(n>o.min&&na.min&&i1){var p={name:"top-right",bbox:new q(t[1].minX,t[1].minY,t[1].width,t[1].height*(1-s)),index:2};this.regionData.push(p);var f={name:"bottom-right",bbox:new q(t[1].minX,t[1].minY+t[1].height*(1-s),t[1].width,t[1].height*s),index:3};this.regionData.push(f)}}else if(2===t.length)if(i<=a.min){var d={name:"top-left",bbox:t[0],index:0};this.regionData.push(d);p={name:"top-right",bbox:t[1],index:2};this.regionData.push(p)}else{var g={name:"bottom-left",bbox:t[0],index:1};this.regionData.push(g);f={name:"bottom-right",bbox:t[1],index:3};this.regionData.push(f)}else if(n<=o.min)if(i<=a.min){p={name:"top-right",bbox:t[0],index:2};this.regionData.push(p)}else{f={name:"bottom-right",bbox:t[0],index:3};this.regionData.push(f)}else if(i<=a.min){d={name:"top-left",bbox:t[0],index:0};this.regionData.push(d)}else{g={name:"bottom-left",bbox:t[0],index:1};this.regionData.push(g)}this.container=this.view.backgroundGroup.addGroup()},t.prototype.render=function(){var t=this;if(this.regionData.length>0){var e=this.getDefaultStyle(),n=this.getRegionStyle(this.regionData);Object(F.each)(this.regionData,(function(i){var r=i.index,o=t.container.addGroup(),a=o.addShape("rect",{attrs:Object(L.__assign)({x:i.bbox.minX,y:i.bbox.minY,width:i.bbox.width,height:i.bbox.height},n[r]),name:"quadrant"});if(t.options.label&&t.options.label.text){var s=Object(F.deepMix)({},e.label,t.options.label),u=t.getLabelConfig(i,s);o.addShape("text",{attrs:Object(L.__assign)({},u),name:"quadrant-label"})}a.set("data",i),t.quadrantGroups.push(o)}));var i=Object(F.deepMix)({},e.line,this.options.lineStyle);Object(F.each)(this.lineData,(function(e){t.container.addShape("path",{attrs:Object(L.__assign)({path:[["M",e.start.x,e.start.y],["L",e.end.x,e.end.y]]},i),name:"quadrant-line"})})),this.view.canvas.draw()}},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.destroy=function(){this.container&&this.container.remove()},t.prototype.getDefaultStyle=function(){return{line:{stroke:"#9ba29a",lineWidth:1},regionStyle:[{fill:"#000000",opacity:.05},{fill:"#ffffff",opacity:0},{fill:"#ffffff",opacity:0},{fill:"#000000",opacity:.05}],label:{position:"outter-inner",offset:10,style:{fontSize:14,fill:"#ccc"}}}},t.prototype.getRegionStyle=function(t){var e=this.getDefaultStyle().regionStyle;if(this.options.regionStyle){var n=this.options.regionStyle;Object(F.isArray)(n)?e=e.map((function(t,e){return n.length>e&&n[e]?n[e]:t})):Object(F.isFunction)(n)&&Object(F.each)(t,(function(t,i){e[i]=n(t)}))}return e},t.prototype.getLabelConfig=function(t,e){var n=t.index,i=0,r=0,o={},a=e.text;Object(F.isFunction)(a)?a=a(t):Object(F.isArray)(a)&&(a=a[n]);var s=e.position.split("-"),u=t.name.split("-");return"left"===u[1]?("inner"===s[0]&&(i=t.bbox.maxX-e.offset,o.textAlign="right"),"outter"===s[0]&&(i=t.bbox.minX+e.offset,o.textAlign="left")):"right"===u[1]&&("inner"===s[0]&&(i=t.bbox.minX+e.offset,o.textAlign="left"),"outter"===s[0]&&(i=t.bbox.maxX-e.offset,o.textAlign="right")),"top"===u[0]?("inner"===s[1]&&(r=t.bbox.maxY-e.offset,o.textBaseline="bottom"),"outter"===s[1]&&(r=t.bbox.minY+e.offset,o.textBaseline="top")):"bottom"===u[0]&&("inner"===s[1]&&(r=t.bbox.minY+e.offset,o.textBaseline="top"),"outter"===s[1]&&(r=t.bbox.maxY-e.offset,o.textBaseline="bottom")),(o=Object(F.deepMix)({},e.style,o)).lineHeight=o.fontSize,Object(L.__assign)({x:i,y:r,text:a},o)},t}();function Ku(t,e,n,i,r){const o=t.length;let a=0,s=0;for(let u=0;ui&&(t.splice(o+1,0,c),n=!0)}var r;return n}}function ec(t,e,n,i){let r=0;for(let o=0,a=t.length;ot[0],n=t=>t[1];function i(i){let r=0,o=0,a=0,s=0,u=0,c=t?+t[0]:1/0,l=t?+t[1]:-1/0;ec(i,e,n,(e,n)=>{++r,o+=e,a+=n,s+=e*n,u+=e*e,t||(el&&(l=e))});const h=(r*s-o*a)/(r*u-o*o),p=(a-h*o)/r,f=t=>h*t+p,d=[[c,f(c)],[l,f(l)]];return d.a=h,d.b=p,d.predict=f,d.rSquared=Ku(i,e,n,a,f),d}return i.domain=function(e){return arguments.length?(t=e,i):t},i.x=function(t){return arguments.length?(e=t,i):e},i.y=function(t){return arguments.length?(n=t,i):n},i};function ic(t){t.sort((t,e)=>t-e);var e=t.length/2;return e%1==0?(t[e-1]+t[e])/2:t[Math.floor(e)]}function rc(t){return(t=1-t*t*t)*t*t}function oc(t,e,n){let i=t[e],r=n[0],o=n[1]+1;if(!(o>=t.length))for(;e>r&&t[o]-i<=i-t[r];)n[0]=++r,n[1]=o,++o}var ac=function(){let t,e=t=>t[0],n=t=>t[1];function i(i){let r=i.length,o=0,a=0,s=0,u=0,c=0,l=0,h=0,p=0,f=t?+t[0]:1/0,d=t?+t[1]:-1/0;for(let g=0;gd&&(d=y)))}r=o;const g=u-Math.pow(a,2)/r,y=h-a*s/r,v=c-u*a/r,m=p-u*s/r,x=l-Math.pow(u,2)/r,b=(m*g-y*v)/(g*x-Math.pow(v,2)),M=(y*x-m*v)/(g*x-Math.pow(v,2)),_=s/r-M*(a/r)-b*(u/r),w=t=>b*Math.pow(t,2)+M*t+_,O=tc(f,d,w);return O.a=b,O.b=M,O.c=_,O.predict=w,O.rSquared=Ku(i,e,n,s,w),O}return i.domain=function(e){return arguments.length?(t=e,i):t},i.x=function(t){return arguments.length?(e=t,i):e},i.y=function(t){return arguments.length?(n=t,i):n},i};var sc={exp:function(){let t,e=t=>t[0],n=t=>t[1];function i(i){let r=0,o=0,a=0,s=0,u=0,c=t?+t[0]:1/0,l=t?+t[1]:-1/0;ec(i,e,n,(e,n)=>{r+=n,o+=e*e*n,a+=n*Math.log(n),s+=e*n*Math.log(n),u+=e*n,t||(el&&(l=e))});const h=r*o-u*u,p=Math.exp((o*a-u*s)/h),f=(r*s-u*a)/h,d=t=>p*Math.exp(f*t),g=tc(c,l,d);return g.a=p,g.b=f,g.predict=d,g.rSquared=Ku(i,e,n,r,d),g}return i.domain=function(e){return arguments.length?(t=e,i):t},i.x=function(t){return arguments.length?(e=t,i):e},i.y=function(t){return arguments.length?(n=t,i):n},i},linear:nc,loess:function(){let t=t=>t[0],e=t=>t[1],n=.3,i=2,r=1e-12;function o(o){const a=o.length,s=Math.max(2,~~(n*a)),u=[],c=[],l=[],h=[],p=[];var f,d;f=o=o.slice(),d=t,f.sort((t,e)=>d(t)-d(e));for(let n=0,i=0;nu[o]-n?i:o;let s=0,f=0,d=0,g=0,y=0,v=1/Math.abs(u[a]-n||1);for(let t=i;t<=o;++t){const e=u[t],i=c[t],r=rc(Math.abs(n-e)*v)*p[t],o=e*r;s+=r,f+=o,d+=e*o,g+=i*r,y+=i*o}const m=f/s,x=g/s,b=y/s,M=d/s,_=Math.sqrt(Math.abs(M-m*m))=1?r:(e=1-t*t)*e}return function(t,e){const n=t.length,i=[];for(let r,o=0,a=0,s=[];ot[0],n=t=>t[1];function i(i){let r=0,o=0,a=0,s=0,u=0,c=t?+t[0]:1/0,l=t?+t[1]:-1/0;ec(i,e,n,(e,n)=>{++r,o+=Math.log(e),a+=n*Math.log(e),s+=n,u+=Math.pow(Math.log(e),2),t||(el&&(l=e))});const h=(r*a-s*o)/(r*u-o*o),p=(s-h*o)/r,f=t=>h*Math.log(t)+p,d=tc(c,l,f);return d.a=h,d.b=p,d.predict=f,d.rSquared=Ku(i,e,n,s,f),d}return i.domain=function(e){return arguments.length?(t=e,i):t},i.x=function(t){return arguments.length?(e=t,i):e},i.y=function(t){return arguments.length?(n=t,i):n},i},poly:function(){let t,e=t=>t[0],n=t=>t[1],i=3;function r(r){if(1===i){const i=nc().x(e).y(n).domain(t)(r);return i.coefficients=[i.b,i.a],delete i.a,delete i.b,i}if(2===i){const i=ac().x(e).y(n).domain(t)(r);return i.coefficients=[i.c,i.b,i.a],delete i.a,delete i.b,delete i.c,i}let o=[],a=0,s=t?+t[0]:1/0,u=t?+t[1]:-1/0,c=r.length;for(let i=0;iu&&(u=l)))}c=o.length;const l=[],h=[],p=i+1;let f=0,d=0;for(let t=0;tMath.abs(t[e][i])&&(i=r);for(let r=e;r=e;r--)t[r][i]-=t[r][e]*t[e][i]/t[e][e]}for(let e=n-1;e>=0;e--){let r=0;for(let o=e+1;og.reduce((e,n,i)=>e+n*Math.pow(t,i),0),v=tc(s,u,y);return v.coefficients=g,v.predict=y,v.rSquared=Ku(r,e,n,a,y),v}return r.domain=function(e){return arguments.length?(t=e,r):t},r.x=function(t){return arguments.length?(e=t,r):e},r.y=function(t){return arguments.length?(n=t,r):n},r.order=function(t){return arguments.length?(i=t,r):i},r},pow:function(){let t,e=t=>t[0],n=t=>t[1];function i(i){let r=0,o=0,a=0,s=0,u=0,c=0,l=t?+t[0]:1/0,h=t?+t[1]:-1/0;ec(i,e,n,(e,n)=>{r++,o+=Math.log(e),a+=Math.log(n)*Math.log(e),s+=Math.log(n),u+=Math.pow(Math.log(e),2),c+=n,t||(eh&&(h=e))});const p=(r*a-o*s)/(r*u-Math.pow(o,2)),f=Math.exp((s-p*o)/r),d=t=>f*Math.pow(t,p),g=tc(l,h,d);return g.a=f,g.b=p,g.predict=d,g.rSquared=Ku(i,e,n,c,d),g}return i.domain=function(e){return arguments.length?(t=e,i):t},i.x=function(t){return arguments.length?(e=t,i):e},i.y=function(t){return arguments.length?(n=t,i):n},i},quad:ac};var uc=function(){function t(t){this.options=Object(F.deepMix)({},{type:"linear",style:{stroke:"#9ba29a",lineWidth:2,opacity:.5,lineJoin:"round",lineCap:"round"},showConfidence:!1,confidenceStyle:{fill:"#ccc",opacity:.1}},t),this.view=this.options.view,this.init()}return t.prototype.init=function(){var t=this.options.plotOptions,e=t.xField,n=t.yField,i=t.data,r=sc[this.options.type]().x((function(t){return t[e]})).y((function(t){return t[n]}));this.data=this.processData(r(i)),this.container=this.view.backgroundGroup.addGroup()},t.prototype.render=function(){var t=this.view.getScaleByField(this.options.plotOptions.xField),e=this.view.getScaleByField(this.options.plotOptions.yField),n=this.view.getCoordinate(),i=this.data.trendlineData,r=ln("linear"),o=this.adjustScale(t,i,"x"),a=new r({min:o.min,max:o.max}),s=this.adjustScale(e,i,"y"),u=new r({min:s.min,max:s.max});if(this.options.showConfidence){var c=this.getConfidencePath(a,u,n);this.container.addShape("path",{attrs:Object(L.__assign)({path:c},this.options.confidenceStyle),name:"confidence"})}var l=wr(this.getTrendlinePoints(a,u,n),!1,[[0,0],[1,1]]);this.shape=this.container.addShape("path",{attrs:Object(L.__assign)({path:l},this.options.style),name:"trendline"})},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.destroy=function(){this.container&&this.container.destroy()},t.prototype.processData=function(t){var e=[],n=[];return Object(F.each)(t,(function(i){e.push({x:i[0],y:i[1]});var r,o,a=(r=t.rSquared,o=i[1],1.96*Math.sqrt(r*(1-r)/o));n.push({x:i[0],y0:i[1]-a,y1:i[1]+a})})),{trendlineData:e,confidenceData:n}},t.prototype.getTrendlinePoints=function(t,e,n){var i=[];return Object(F.each)(this.data.trendlineData,(function(r){var o=t.scale(r.x),a=e.scale(r.y),s=n.start.x+n.width*o,u=n.start.y-n.height*a;i.push({x:s,y:u})})),i},t.prototype.getConfidencePath=function(t,e,n){var i=[],r=[],o=[];Object(F.each)(this.data.confidenceData,(function(o){var a=t.scale(o.x),s=e.scale(o.y0),u=e.scale(o.y1),c=n.start.x+n.width*a,l=n.start.y-n.height*s,h=n.start.y-n.height*u;i.push({x:c,y:l}),r.push({x:c,y:h})}));for(var a=0;a0;c--){u=r[c];isNaN(u.x)||isNaN(u.y)||o.push(["L",u.x,u.y])}return o},t.prototype.adjustScale=function(t,e,n){var i=t.min,r=t.max,o=this.options.plotOptions,a=o.data,s=o.xField,u=o.yField,c="x"===n?s:u,l=Object(F.minBy)(a,c)[c],h=Object(F.maxBy)(a,c)[c],p=(i-l)/(h-l),f=(r-h)/(h-l),d=Object(F.minBy)(e,n)[n],g=Object(F.maxBy)(e,n)[n];return{min:d+p*(g-d),max:g+f*(g-d)}},t}(),cc=z({Point:"point",Trendline:"trendline",Confidence:"confidence",Quadrant:"quadrant",QuadrantLabel:"quadrant-label",QuadrantLine:"quadrant-line"});Object(F.assign)(R,cc);ir("scatter",{pointStyle:{normal:{},active:function(t){return{stroke:t.stroke||"#000"}},selected:function(t){return{stroke:t.stroke||"#000",lineWidth:t.lineWidth||2}},inactive:function(t){return{fillOpacity:t.fillOpacity||t.opacity||.3}}}});var lc={scatter:"point"},hc={point:"point"},pc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{pointSize:4,pointStyle:{lineWidth:1,strokeOpacity:1,fillOpacity:.95,stroke:"#fff"},xAxis:{nice:!0,grid:{visible:!0},line:{visible:!0}},yAxis:{nice:!0,grid:{visible:!0},line:{visible:!0}},tooltip:{visible:!0,shared:null,showMarkers:!1,showCrosshairs:!1},label:{visible:!1},shape:"circle"})},e.prototype.afterRender=function(){t.prototype.afterRender.call(this),this.quadrant&&this.quadrant.destroy(),this.trendline&&this.trendline.destroy(),this.options.quadrant&&this.options.quadrant.visible&&(this.quadrant=new $u(Object(L.__assign)({view:this.view,plotOptions:this.options},this.options.quadrant)),this.quadrant.render()),this.options.trendline&&this.options.trendline.visible&&(this.trendline=new uc(Object(L.__assign)({view:this.view,plotOptions:this.options},this.options.trendline)),this.trendline.render())},e.prototype.destroy=function(){this.quadrant&&(this.quadrant.destroy(),this.quadrant=null),this.trendline&&(this.trendline.destroy(),this.trendline=null),t.prototype.destroy.call(this)},e.prototype.isValidLinearValue=function(t){return!Object(F.isNil)(t)&&!Number.isNaN(Number(t))},e.prototype.processData=function(t){var e=this,n=this.options,i=n.xField,r=n.yField,o=Object(F.get)(this.options,["xAxis","type"],"linear"),a=Object(F.get)(this.options,["yAxis","type"],"linear");return o&&a?t.filter((function(t){return!("linear"===o&&!e.isValidLinearValue(t[i]))&&!("linear"===a&&!e.isValidLinearValue(t[r]))})).map((function(t){var e;return Object(L.__assign)(Object(L.__assign)({},t),((e={})[i]="linear"===o?Number(t[i]):String(t[i]),e[r]="linear"===a?Number(t[r]):String(t[r]),e))})):t},e.prototype.geometryParser=function(t,e){return"g2"===t?lc[e]:hc[e]},e.prototype.scale=function(){var e=this.options,n={};n[e.xField]={},Object(F.has)(e,"xAxis")&&Rr(n[e.xField],e.xAxis),n[e.yField]={},Object(F.has)(e,"yAxis")&&Rr(n[e.yField],e.yAxis),this.setConfig("scales",n),t.prototype.scale.call(this)},e.prototype.coord=function(){},e.prototype.annotation=function(){},e.prototype.addGeometry=function(){var t=Fr("point","circle",{plot:this});this.points=t,this.options.tooltip&&this.options.tooltip.visible&&(this.points.tooltip=this.extractTooltip(),this.setConfig("tooltip",Object(L.__assign)({showTitle:!1},this.options.tooltip))),this.options.label&&this.label(),this.setConfig("geometry",t)},e.prototype.label=function(){var t=this.options;if(!1!==t.label.visible){var e=Ni("label",Object(L.__assign)(Object(L.__assign)({fields:[t.yField]},t.label),{plot:this}));this.points&&(this.points.label=e)}else this.points&&(this.points.label=!1)},e.prototype.animation=function(){t.prototype.animation.call(this),!1===this.options.animation&&(this.points.animate=!1)},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,e||O)},e.prototype.extractTooltip=function(){this.points.tooltip={};var t=this.options.tooltip;t.fields?this.points.tooltip.fields=t.fields:this.points.tooltip.fields=[this.options.xField,this.options.yField],t.formatter&&(this.points.tooltip.callback=t.formatter,this.options.colorField&&this.points.tooltip.fields.push(this.options.colorField))},e}(hr),fc=pc;yr("scatter",pc);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="scatter",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=fc.getDefaultOptions}(mr);var dc=n("PXQu");Object(U.registerShape)("point","bubble-point",{draw:function(t,e){var n=Object(dc.drawPoints)(this,t,e,"circle",!1);if(!t.style.stroke){var i=n.attr("fill");n.attr("stroke",i)}return n},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}});ir("bubble",{pointStyle:{normal:{},active:function(t){return{stroke:t.stroke||"#000",fillOpacity:t.fillOpacity||t.opacity||.95}},selected:function(t){return{stroke:t.stroke||"#000",lineWidth:t.lineWidth||2}},inactive:function(t){return{fillOpacity:t.fillOpacity||t.opacity||.3}}}});var gc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bubble",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{pointSize:[2,32],pointStyle:{stroke:null,strokeOpacity:1,fillOpacity:.5},label:{position:"middle",style:{stroke:"#fff",lineWidth:1}},shape:"bubble-point"})},e.prototype.legend=function(){var e;t.prototype.legend.call(this),this.setConfig("legends",((e={})[this.options.sizeField]=!1,e))},e.prototype.parseEvents=function(){t.prototype.parseEvents.call(this,O)},e.prototype.extractTooltip=function(){this.points.tooltip={};var t=this.options.tooltip;t.fields?this.points.tooltip.fields=t.fields:this.points.tooltip.fields=[this.options.xField,this.options.yField,this.options.sizeField],t.formatter&&(this.points.tooltip.callback=t.formatter,this.options.colorField&&this.points.tooltip.fields.push(this.options.colorField))},e}(fc),yc=gc;yr("bubble",gc);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="bubble",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=yc.getDefaultOptions}(mr);var vc=z({Bullet:"interval",BulletTarget:"bullet-target"});Object(F.assign)(R,vc);var mc=function(){function t(t,e){this.view=t,this.cfg=e,this._init()}return t.prototype.draw=function(){if(this.view&&!this.view.destroyed){this.container=this.view.middleGroup.addGroup(),this.container.set("name","rectGroups"),this.container.setZIndex(-100);for(var t=this.getGeometry(),e=Object(F.map)(null==t?void 0:t.elements,(function(t){return t.shape})),n=0;n0&&u!==o-1&&this.container.addShape("path",{attrs:Object(L.__assign)({path:[["M",c,t.minY],["L",c,t.maxY]]},h)}).set("zIndex",-1)}}},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.destroy=function(){this.container&&this.container.remove()},t.prototype._init=function(){var t=this;this.view.on("beforerender",(function(){t.clear()})),this.view.on("afterrender",(function(){t.draw()}))},t.prototype.getGeometry=function(){return Object(F.find)(this.view.geometries,(function(t){return"interval"===t.type}))},t}(),xc=function(){function t(t,e){this.view=t,this.cfg=e,this._init()}return t.prototype.draw=function(){if(this.view&&!this.view.destroyed){this.container=this.view.foregroundGroup.addGroup(),this.container.set("name","targetGroups");for(var t=Object(F.map)(this.getGeometry().elements,(function(t){return t.shape})),e=0;eo&&(o=(e=[r,o])[0],r=e[1]),[r,o]}var Lc=z({Rect:"polygon"});Object(F.assign)(R,Lc);var Bc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="calendar",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){var e;return Object(F.deepMix)({},t.getDefaultOptions.call(this),{xAxis:{line:{visible:!1},grid:{visible:!1},tickLine:{visible:!1},label:{visible:!0,autoRotate:!1,autoHide:!1}},yAxis:{line:{visible:!1},grid:{visible:!1},tickLine:{visible:!1},label:{visible:!0,autoRotate:!1,autoHide:!1}},legend:{visible:!1},meta:(e={},e[Oc]={type:"cat",alias:"Day",values:[0,1,2,3,4,5,6]},e[Cc]={type:"cat",alias:"Month"},e),tooltip:{visible:!0,showTitle:!0,showCrosshairs:!1,showMarkers:!1,title:"date"}})},e.prototype.processData=function(t){var e=this.options.dateField,n=this.options.dateRange;Object(F.isNil)(n)&&(n=function(t){var e=Object(L.__spreadArrays)(t).sort((function(t,e){return t.getTime()-e.getTime()}));return[Ne.format(Object(F.head)(e),Ac),Ne.format(Object(F.last)(e),Ac)]}(Object(F.map)(t,(function(t){return Ne.parse(""+t[e],Ac)}))));return function(t,e,n){for(var i=[],r=Ic(e),o=r[0],a=r[1],s=new Date(o),u=function(){var e,r=Ne.format(s,Ac),o=Object(F.find)(t,(function(t){return t[n]===r}));i.push(Object(L.__assign)(((e={})[Oc]=s.getDay(),e[Cc]=""+Tc(s),e[n]=r,e[Sc]=new Date(s),e),o)),Ec(s,kc)};s<=a;)u();return i}(t,n,e)},e.prototype.addGeometry=function(){var t=this.options,e=t.valueField,n=t.colors,i=t.tooltip,r={type:"polygon",position:{fields:[Cc,Oc]},shape:{values:["calendar-polygon"]},color:{fields:[e],values:n},label:this.extractLabel()};i&&(i.fields||i.formatter)&&this.geometryTooltip(r),this.setConfig("geometry",r)},e.prototype.geometryTooltip=function(t){t.tooltip={};var e=this.options.tooltip;e.fields&&(t.tooltip.fields=e.fields),e.formatter&&(t.tooltip.callback=e.formatter,e.fields||(t.tooltip.fields=[Cc,Oc]))},e.prototype.extractLabel=function(){var t=this.options.label;if(t&&!1===t.visible)return!1;var e=this.options.valueField;return Ni("label",Object(L.__assign)({plot:this,fields:[e],position:"top",offset:0},t))},e.prototype.coord=function(){this.setConfig("coordinate",{type:"rect",cfg:{},actions:[["reflect","y"]]})},e.prototype.geometryParser=function(t,e){return""},e.prototype.axis=function(){var t=Ni("axis",{plot:this,dim:"x"}),e=Ni("axis",{plot:this,dim:"y"}),n={};n[Cc]=t,n[Oc]=e,this.setConfig("axes",n)},e.prototype.scale=function(){t.prototype.scale.call(this);var e=function(t){var e=Ic(t),n=e[0],i=e[1],r=new Map;function o(t){var e=t.getMonth(),n=Tc(t);r.has(e)||r.set(e,[]),r.get(e).push(n)}for(var a=new Date(n);a<=i;)o(a),Ec(a,7*kc);i=u){var l=this.getPath(u,c);this.drawRing(l,r[s])}}},drawBottomRing:function(){var t=this.getAngleRange(),e=t.starAngle,n=t.endAngle,i=this.gauge.ringStyle.background,r=this.getPath(e,n);this.drawRing(r,i)},drawCurrentRing:function(t){var e=this.getAngleRange().starAngle,n=this.gauge.ringStyle.color,i=this.getPath(e,t);this.drawRing(i,n)},drawInSideAxis:function(){for(var t=this.gauge.ringStyle.axis.amount,e=this.gauge.options,n=e.min,i=e.max,r=this.getAngleRange(),o={min:n,max:i,starAngle:r.starAngle,endAngle:r.endAngle},a=(i-n)/t,s=0;s=v?u:c;this.drawRing(m,x)}},getAngleRange:function(){var t=90-.5*(360-this.gauge.ringStyle.angle);return{starAngle:(180-t)*Math.PI/180,endAngle:(360+t)*Math.PI/180}},valueToAngle:function(t,e){var n=e.min,i=e.max,r=e.starAngle,o=e.endAngle;if(t===i)return o;if(t===n)return r;var a=(t-n)/(i-n);i===n&&(a=1);var s=a*(o-r)+r;return s=Math.max(s,r),s=Math.min(s,o)},drawRing:function(t,e){this.gauge.group.addShape("path",{attrs:{path:t,fill:e}})},drawRect:function(t,e){var n=this.gauge.ringStyle.axis,i=Object(L.__assign)(Object(L.__assign)({},n),e),r=i.offset,o=i.length,a=i.thickness,s=i.color,u=this.gauge.center,c=this.gauge.ringRadius+r,l=c*Math.cos(t)+u.x,h=c*Math.sin(t)+u.y,p=(c+o)*Math.cos(t)+u.x,f=(c+o)*Math.sin(t)+u.y;this.gauge.group.addShape("line",{attrs:{x1:l,y1:h,x2:p,y2:f,stroke:s,lineWidth:a}})},getPath:function(t,e){var n,i=this.gauge,r=this.gauge.type,o=Object(F.get)(i,"options.height"),a=Object(F.get)(i,"options.width"),s=this.gauge.center,u=this.gauge.ringRadius,c=this.gauge.ringStyle,l=c.thickness,h=c.minThickness,p=c.minThickCanvsSize,f=(c.miniThickness,c.bigThickness,Math.min(a,o));n="fan"===r&&fMath.PI?1:0;return[["M",d,g],["A",u,u,0,_,1,m,x],["L",b,M],["A",u-n,u-n,0,_,0,y,v],["Z"]]},drawPoniter:function(t){var e=this.getAngleRange(),n=e.starAngle,i=e.endAngle,r=this.gauge.pointerStyle,o=r.color,a=r.circleColorTop,s=r.circleColorBottom,u=r.radius,c=r.thickness,l=c,h=c/2.5,p=this.gauge.group,f=t.points[0],d=this.parsePoint({x:0,y:0}),g=f.x*(i-n)+n,y={x:this.gauge.ringRadius*u*Math.cos(g)+this.gauge.center.x,y:this.gauge.ringRadius*u*Math.sin(g)+this.gauge.center.y};p.addShape("circle",{attrs:{x:d.x,y:d.y,r:2.2*l,fill:s}});var v={x:d.x-y.x,y:d.y-y.y},m=Math.sqrt(v.x*v.x+v.y*v.y);v.x*=1/m,v.y*=1/m;var x=-Math.PI/2,b=Math.cos(x)*v.x-Math.sin(x)*v.y,M=Math.sin(x)*v.x+Math.cos(x)*v.y,_=Math.PI/2,w=Math.cos(_)*v.x-Math.sin(_)*v.y,O=Math.sin(_)*v.x+Math.cos(_)*v.y,C=[["M",y.x+b*h,y.y+M*h],["L",d.x+b*l,d.y+M*l],["L",d.x+w*l,d.y+O*l],["L",y.x+w*h,y.y+O*h],["Z"]];p.addShape("path",{attrs:{path:C,fill:o,stroke:o}}),p.addShape("circle",{attrs:{x:y.x,y:y.y,r:h,fill:o}}),p.addShape("circle",{attrs:{x:d.x,y:d.y,r:l,fill:o}}),p.addShape("circle",{attrs:{x:d.x,y:d.y,r:h/1.2,fill:a}})}})},t}(),Nc={color:"#CFCFCF",circleColorTop:"#2E364B",circleColorBottom:"#EEEEEE",thickness:4.5},Yc=function(t,e,n){var i=Nc,r={color:Object(F.get)(n,[0],"#F6445A"),thickness:24,radius:1,angle:240,textPosition:"100%"};switch(t){case"standard":return{ringStyle:Object(L.__assign)(Object(L.__assign)({},r),{background:"#f0f0f0",axis:{amount:21,offset:-35,length:5,thickness:2,color:"#999"}}),pointerStyle:Object(L.__assign)(Object(L.__assign)({},i),{radius:.5})};case"meter":return{ringStyle:Object(L.__assign)(Object(L.__assign)({},r),{background:"#f0f0f0",axis:{amount:25,offset:-35,length:2,thickness:1,color:"#999"}}),pointerStyle:Object(L.__assign)(Object(L.__assign)({},i),{radius:.5})};case"fan":return{ringStyle:{color:Object(F.get)(n,[0],"#F6445A"),background:"#f0f0f0",thickness:70,radius:1,angle:120,textPosition:"125%",bottomRatio:3.5,axis:{amount:10,offset:5,length:3,thickness:3,color:"#999"}},pointerStyle:Object(L.__assign)(Object(L.__assign)({},i),{radius:.6})}}},Xc=z({Range:"point",Statistic:"annotation-text"});Object(F.assign)(R,Xc);var Gc=function(t){function e(e){var n=t.call(this,e)||this;return n.type="gauge",n}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),Fc)},e.prototype.init=function(){var e=this.options,n=e.value,i=(e.range||[]).map((function(t){return+t})).sort((function(t,e){return t-e})),r=this.options,o=r.min,a=void 0===o?i[0]:o,s=r.max,u=void 0===s?i[i.length-1]:s,c=r.format,l=void 0===c?function(t){return""+t}:c,h=l(n),p=this.getStyleMix();this.options.styleMix=p,this.options.data=[{value:n||0}],this.options.valueText=h,this.options.min=a,this.options.max=u,this.options.format=l,this.initG2Shape(),t.prototype.init.call(this)},e.prototype.getStyleMix=function(){var t=this.options,e=t.gaugeStyle,n=void 0===e?{}:e,i=t.statistic,r=void 0===i?{}:i,o=this.width,a=this.height,s=Math.max(o,a)/20,u=Object.assign({},this.theme,{stripWidth:s,tickLabelSize:s/2});return r.size||(r.size=1.2*s),Object(F.deepMix)({},u,n,{statistic:r})},e.prototype.initG2Shape=function(){this.gaugeShape=new Rc(Object(F.uniqueId)()),this.gaugeShape.setOption(this.type,this.options,this.getCustomStyle().pointerStyle,this.getCustomStyle().ringStyle),this.gaugeShape.render()},e.prototype.getCustomStyle=function(){var t=this.options,e=t.color,n=(t.theme,er()),i=e||n.colors;return Yc("standard",0,i)},e.prototype.geometryParser=function(t,e){throw new Error("Method not implemented.")},e.prototype.scale=function(){var e=this.options,n=e.min,i=e.max,r=e.format,o=e.styleMix,a={value:{}};Rr(a.value,{min:n,max:i,minLimit:n,maxLimit:i,nice:!0,formatter:r,tickInterval:o.tickInterval}),this.setConfig("scales",a),t.prototype.scale.call(this)},e.prototype.coord=function(){var t={type:"polar",cfg:{radius:1,startAngle:this.options.startAngle*Math.PI,endAngle:this.options.endAngle*Math.PI}};this.setConfig("coordinate",t)},e.prototype.axis=function(){var t=this.options,e=t.styleMix,n=(t.style,this.getCustomStyle().ringStyle.thickness),i="number"==typeof e.tickLabelPos?-e.tickLabelPos:"outer"===e.tickLabelPos?.8:-.8,r={};r.value={line:null,grid:null,label:{offset:i*(e.stripWidth+e.tickLabelSize+n),textStyle:{fontSize:e.tickLabelSize,fill:e.tickLabelColor,textAlign:"center",textBaseline:"middle"}},tickLine:null,subTickCount:e.subTickCount,subTickLine:{length:i*(e.stripWidth+1),stroke:e.tickLineColor,lineWidth:1,lineDash:[0,e.stripWidth/2,Math.abs(i*(e.stripWidth+1))]},labelAutoRotate:!0},r[1]=!1,this.setConfig("axes",r)},e.prototype.addGeometry=function(){var t={type:"point",position:{fields:["value","1"]},shape:{values:["gauge"]},color:{values:[this.options.styleMix.pointerColor||this.theme.defaultColor]}};this.setConfig("geometry",t)},e.prototype.annotation=function(){var t=this.options,e=t.statistic,n=(t.style,[]);if(e&&e.visible){var i=this.renderStatistic();n.push(i)}this.setConfig("annotations",n)},e.prototype.renderStatistic=function(){var t=this.options,e=t.statistic,n=t.styleMix;return{type:"text",content:e.text,top:!0,position:n.statistic.position,style:{fill:n.statistic.color,fontSize:n.statistic.size,textAlign:"center",textBaseline:"middle"}}},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,A)},e}(hr),zc=Gc;yr("gauge",Gc);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="gauge",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=zc.getDefaultOptions}(mr);var qc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="fanGauge",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{legend:{visible:!0,position:"right-top"},label:{visible:!1,position:"middle",offset:0,adjustColor:!0},connectedArea:{visible:!1,triggerOn:"mouseenter"}})},e.prototype.getCustomStyle=function(){var t=this.options,e=(t.theme,t.styleMix.colors||er().colors);return Yc("fan",0,e)},e.prototype.axis=function(){this.setConfig("axes",{value:!1,1:!1})},e.prototype.annotation=function(){var t=this.options,e=t.statistic,n=(t.style,[]);if(e&&e.visible){var i=this.renderStatistic();n.push(i)}var r=this.renderSideText(),o=n.concat(r);this.setConfig("annotations",o)},e.prototype.renderSideText=function(){var t=this.options,e=t.max,n=t.min,i=t.styleMix,r=t.format,o=(t.style,this.getCustomStyle().ringStyle);return[n,e].map((function(t,e){return{type:"text",top:!0,position:["50%","50%"],content:r(t),style:{fill:i.labelColor,fontSize:i.tickLabelSize,textAlign:"center"},offsetX:e?o.thickness:-o.thickness,offsetY:12}}))},e}(zc),Hc=qc;yr("fanGauge",qc);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="fanGauge",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=Hc.getDefaultOptions}(mr);var Vc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meterGauge",e}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{})},e.prototype.getCustomStyle=function(){var t=this.options,e=(t.theme,t.styleMix.colors||er().colors);return Yc("meter",0,e)},e}(zc),Wc=Vc;yr("meterGauge",Vc);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="meterGauge",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=Wc.getDefaultOptions}(mr);var Uc=n("2W6z"),Qc=n.n(Uc),Zc=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="donut",t.prototype.createLayers.call(this,n),Qc()(!1,'Please use "Donut" instead of "Ring" which was not recommended.')},e.getDefaultOptions=Gu.getDefaultOptions}(mr),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="groupedColumn",t.prototype.createLayers.call(this,n),Qc()(!1,'Please use "GroupedColumn" instead of "GroupColumn" which was not recommended.')},e.getDefaultOptions=Xa.getDefaultOptions}(mr),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="groupedBar",t.prototype.createLayers.call(this,n),Qc()(!1,'Please use "GroupedBar" instead of "GroupBar" which was not recommended.')},e.getDefaultOptions=ua.getDefaultOptions}(mr),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="percentStackedArea",t.prototype.createLayers.call(this,n),Qc()(!1,'Please use "PercentStackedArea" instead of "PercentageStackArea" which was not recommended.')},e.getDefaultOptions=ka.getDefaultOptions}(mr),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="percentStackedBar",t.prototype.createLayers.call(this,n),Qc()(!1,'Please use "PercentStackedBar" instead of "PercentageStackBar" which was not recommended.')},e.getDefaultOptions=ha.getDefaultOptions}(mr),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="percentStackedColumn",t.prototype.createLayers.call(this,n),Qc()(!1,'Please use "PercentStackedColumn" instead of "PercentageStackColumn" which was not recommended.')},e.getDefaultOptions=ts.getDefaultOptions}(mr),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="stackedArea",t.prototype.createLayers.call(this,n),Qc()(!1,'Please use "StackedArea" instead of "StackArea" which was not recommended.')},e.getDefaultOptions=Pa.getDefaultOptions}(mr),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="stackedBar",t.prototype.createLayers.call(this,n),Qc()(!1,'Please use "StackedBar" instead of "StackBar" which was not recommended.')},e.getDefaultOptions=aa.getDefaultOptions}(mr),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="stackedColumn",t.prototype.createLayers.call(this,n),Qc()(!1,'Please use "StackedColumn" instead of "StackColumn" which was not recommended.')},e.getDefaultOptions=Va.getDefaultOptions}(mr),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(L.__extends)(e,t),e.getDefaultOptions=function(){return Object(F.deepMix)({},t.getDefaultOptions.call(this),{title:{visible:!1},description:{visible:!1},padding:[0,0,0,0],legend:{visible:!1},xAxis:{visible:!1},yAxis:{visible:!1},tooltip:{visible:!1}})},e.prototype.coord=function(){},e.prototype.addGeometry=function(){},e.prototype.annotation=function(){var t=this,e=this.options,n=[],i={line:{style:{lineWidth:1,stroke:"#66d6a8"}}};Object(F.each)(e.guideLine,(function(e){var r=Ni("guideLine",{plot:t,cfg:Object(F.deepMix)({},i,e)});n.push(r)})),this.setConfig("annotations",n)},e}(hr)),$c=function(){function t(t){Object(F.assign)(this,t),this.init()}return t.prototype.destroy=function(){this.shape&&this.shape.destroy()},t.prototype.update=function(t,e,n){var i={};if(Object(F.assign)(this,t),this.coord=this.view.geometries[0].coordinate,t.value){var r=[1,0,0,0,1,0,this.coord.convert({x:0,y:this.value}).x,0,1];i.matrix=r}if(t.style){var o=this.shape.attrs,a=Object(F.deepMix)({},o,t.style);i=Object(F.deepMix)({},a,i)}this.shape.stopAnimate(),this.shape.animate(i,e,n)},t.prototype.init=function(){this.coord=this.view.geometries[0].coordinate,this.container=this.view.foregroundGroup.addGroup();var t=this.coord.convert({x:0,y:this.value}).x,e=this.coord.center.y-this.progressSize/2-2,n=this.coord.center.y+this.progressSize/2+2,i=Object(F.deepMix)({},{stroke:"grey",lineWidth:1},this.style);this.shape=this.container.addShape("path",{attrs:Object(L.__assign)({path:[["M",0,e],["L",0,n]]},i),name:"progress-marker"}),this.shape.move(t,0),this.canvas.draw()},t}();Object(F.assign)(R,{onProgressClick:"interval:click",onProgressDblclick:"interval:dblclick",onProgressMousemove:"interval:mousemove",onProgressMousedown:"interval:mousedown",onProgressMouseup:"interval:mouseup",onProgressMouseenter:"progress:mouseenter",onProgressMouseleave:"progress:mouseleave",onProgressContextmenu:"interval:contextmenu"});var Kc={progress:"interval"},Jc={interval:"progress"},tl=["#55A6F3","#E8EDF3"],el=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="progress",e.isEntered=!1,e}return Object(L.__extends)(e,t),e.prototype.processProps=function(){var t=this.options;t.data=this.processData();var e={padding:[0,0,0,0],xField:"value",yField:"1",stackField:"type",barSize:t.size?t.size:this.getSize(),barStyle:t.progressStyle,color:this.parseColorProps(t)||tl};t=Object(F.mix)(t,e)},e.prototype.init=function(){this.processProps(),t.prototype.init.call(this)},e.prototype.beforeInit=function(){var t=this.options.percent;if(!Object(F.isNumber)(t))throw new Error("Percent value is required, and the type of percent must be Number.")},e.prototype.update=function(t){var e=this.options;if(Object(F.hasKey)(t,"percent")&&(e.percent=t.percent,this.changeData(this.processData())),t.style&&(this.styleUpdateAnimation(t.style),this.updateColorConfigByStyle(t.style)),t.color){var n=void 0;Object(F.isArray)(t.color)?(this.options.color=t.color,n=[{fill:t.color[0]},{fill:t.color[1]}]):(this.options.color[0]=t.color,n={fill:t.color}),this.styleUpdateAnimation(n)}t.marker&&(this.updateMarkers(t.marker),this.options.marker=t.marker)},e.prototype.destroy=function(){this.markers&&this.markers.length>0&&(Object(F.each)(this.markers,(function(t){t.destroy()})),this.markers=[]),t.prototype.destroy.call(this)},e.prototype.afterRender=function(){var t=this;this.options.marker&&!this.markers&&(this.markers=[],Object(F.each)(this.options.marker,(function(e){var n=Object(F.mix)({canvas:t.canvas,view:t.view,progressSize:t.options.barSize},e),i=new $c(n);t.markers.push(i)})));var e=this.view.geometries[0].container,n=e.getBBox(),i=e.addShape("rect",{attrs:{width:n.width,height:n.height,x:n.minX,y:n.minY,fill:"rgba(0,0,0,0)"}});this.canvas.draw(),i.on("mouseenter",(function(e){t.isEntered=!0,t.view.emit("progress:mouseenter",e)})),i.on("mouseleave",(function(e){t.isEntered=!1,t.view.emit("progress:mouseleave",e)})),this.canvas.get("container").addEventListener("mouseleave",(function(e){t.isEntered&&(t.view.emit("progress:mouseleave",e),t.isEntered=!1)}))},e.prototype.geometryParser=function(t,e){return"g2"===t?Kc[e]:Jc[e]},e.prototype.coord=function(){this.setConfig("coordinate",{actions:[["transpose"]]})},e.prototype.addGeometry=function(){var t=this.options,e=Fr("interval","main",{positionFields:[t.yField,t.xField],plot:this});e.adjust=[{type:"stack"}],Object(F.has)(t,"animation")&&(e.animate=t.animation),this.setConfig("geometry",e)},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,P)},e.prototype.parseColorProps=function(t){var e;if(t.color){if(e=Object(F.isFunction)(t.color)?t.color(t.percent):t.color,Object(F.isString)(e)){var n=Object(F.clone)(tl);return n[0]=e,n}return e}return t.color},e.prototype.processData=function(){var t=this.options;return[{type:"current",value:t.percent},{type:"rest",value:1-t.percent}]},e.prototype.updateMarkers=function(t){var e=t.length,n=this.getUpdateAnimationOptions();if(Object(F.each)(this.markers,(function(i,r){r>e-1?i.destroy():i.update(t[r],n.duration,n.easing)})),this.markers.length=50?10:4},e.prototype.styleUpdateAnimation=function(t){var e=this.getUpdateAnimationOptions(),n=e.duration,i=e.easing,r=[],o=this.view.geometries;Object(F.each)(o,(function(t){if("interval"===t.type){var e=t.elements;Object(F.each)(e,(function(t){r.push.apply(r,t.shape)}))}})),Object(F.isArray)(t)?Object(F.each)(t,(function(t,e){r[e].animate(t,n,i)})):r[0].animate(t,n,i)},e.prototype.getUpdateAnimationOptions=function(){var t=450,e="easeQuadInOut",n=this.options.animation;return n&&n.update&&(n.update.duration&&(t=n.update.duration),n.update.easing&&(e=n.update.easing)),{duration:t,easing:e}},e.prototype.updateColorConfigByStyle=function(t){var e=this;Object(F.isArray)(t)?Object(F.each)(t,(function(t,n){t.fill&&(e.options.color[n]=t.fill)})):t.fill&&(this.options.color[0]=t.fill)},e}(Zc),nl=el;yr("progress",el);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="progress",t.prototype.createLayers.call(this,n)},e.prototype.update=function(t,e){this.layers[0].update(t,e)},e.getDefaultOptions=nl.getDefaultOptions}(mr);Object(F.assign)(R,{onRingProgressClick:"interval:click",onRingProgressDblclick:"interval:dblclick",onRingProgressMousemove:"interval:mousemove",onRingProgressMousedown:"interval:mousedown",onRingProgressMouseup:"interval:mouseup",onRingProgressMouseenter:"interval:mouseenter",onRingProgressMouseleave:"interval:mouseleave",onRingProgressContextmenu:"interval:contextmenu"});var il=["#55A6F3","#E8EDF3"],rl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ringProgrsss",e}return Object(L.__extends)(e,t),e.prototype.processProps=function(){var t=this.options;t.data=this.processData();var e={padding:[0,0,0,0],xField:"value",yField:"1",stackField:"type",barStyle:t.progressStyle,color:this.parseColorProps(t)||il};t=Object(F.mix)(t,e)},e.prototype.coord=function(){var t={type:"theta",cfg:{radius:1,innerRadius:this.getThickness(this.options.size)}};this.setConfig("coordinate",t)},e.prototype.annotation=function(){},e.prototype.addGeometry=function(){var t=this.options;this.ring=Fr("interval","main",{positionFields:[t.yField,t.xField],plot:this}),this.ring.adjust=[{type:"stack"}],this.setConfig("geometry",this.ring)},e.prototype.animation=function(){this.ring.animate={appear:{duration:1e3}}},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,j)},e.prototype.getThickness=function(t){var e=this.width,n=this.height,i=Math.min(e,n);return t?1-t/i:i>=60?1-20/i:1-10/i},e}(nl),ol=rl;yr("ringProgress",rl);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="ringProgress",t.prototype.createLayers.call(this,n)},e.prototype.update=function(t){this.layers[0].update(t)},e.getDefaultOptions=ol.getDefaultOptions}(mr);Object(F.assign)(R,{onColumnClick:"interval:click",onColumnDblclick:"interval:dblclick",onColumnMousemove:"interval:mousemove",onColumnMousedown:"interval:mousedown",onColumnMouseup:"interval:mouseup",onColumnMouseenter:"interval:mouseenter",onColumnMouseleave:"interval:mouseleave",onColumnContextmenu:"interval:contextmenu"});var al={column:"interval"},sl={interval:"column"},ul=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="tinyColumn",e}return Object(L.__extends)(e,t),e.prototype.init=function(){this.processProps(),t.prototype.init.call(this)},e.prototype.geometryParser=function(t,e){return"g2"===t?al[e]:sl[e]},e.prototype.scale=function(){var t={};t[this.options.xField]={type:"cat"},this.setConfig("scales",t)},e.prototype.addGeometry=function(){var t=this.options,e=Fr("interval","main",{positionFields:[t.xField,t.yField],plot:this});this.setConfig("geometry",e)},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,k)},e.prototype.processProps=function(){var t=this.options,e={padding:[0,0,0,0],columnSize:this.getSize()};t=Object(F.mix)(t,e)},e.prototype.getSize=function(){var t=this.options,e=this.getColumnNum(t.data,t.xField);return this.width/e*.6},e.prototype.getColumnNum=function(t,e){var n=[];return Object(F.each)(t,(function(t){var i=t[e];n.indexOf(i)<0&&n.push(i)})),n.length},e}(Zc),cl=ul;yr("tinyColumn",ul);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="tinyColumn",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=cl.getDefaultOptions}(mr);Object(F.assign)(R,{onAreaClick:"area:click",onAreaDblclick:"area:dblclick",onAreaMousemove:"area:mousemove",onAreaMousedown:"area:mousedown",onAreaMouseup:"area:mouseup",onAreaMouseenter:"area:mouseenter",onAreaMouseleave:"area:mouseleave",onAreaContextmenu:"area:contextmenu",onLineClick:"line:click",onLineDblclick:"line:dblclick",onLineMousemove:"line:mousemove",onLineMousedown:"line:mousedown",onLineMouseup:"line:mouseup",onLineMouseenter:"line:mouseenter",onLineMouseleave:"line:mouseleave",onLineContextmenu:"line:contextmenu"});var ll={area:"area",line:"line"},hl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="tinyArea",e}return Object(L.__extends)(e,t),e.prototype.geometryParser=function(t,e){return ll[e]},e.prototype.addGeometry=function(){this.area=Fr("area","mini",{plot:this}),this.setConfig("geometry",this.area),this.line=Fr("line","mini",{plot:this}),this.setConfig("geometry",this.line)},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,T)},e}(Zc),pl=hl;yr("tinyArea",hl);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="tinyArea",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=pl.getDefaultOptions}(mr);Object(F.assign)(R,{onLineClick:"line:click",onLineDblclick:"line:dblclick",onLineMousemove:"line:mousemove",onLineMousedown:"line:mousedown",onLineMouseup:"line:mouseup",onLineMouseenter:"line:mouseenter",onLineMouseleave:"line:mouseleave",onLineContextmenu:"line:contextmenu"});var fl={line:"line"},dl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="tinyLine",e}return Object(L.__extends)(e,t),e.prototype.geometryParser=function(t,e){return fl[e]},e.prototype.addGeometry=function(){this.line=Fr("line","mini",{plot:this}),this.setConfig("geometry",this.line)},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,E)},e}(Zc),gl=dl;yr("tinyLine",dl);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(L.__extends)(e,t),e.prototype.createLayers=function(e){var n=Object(F.deepMix)({},e);n.type="tinyLine",t.prototype.createLayers.call(this,n)},e.getDefaultOptions=gl.getDefaultOptions}(mr);var yl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(L.__extends)(e,t),e.prototype.getDefaultOptions=function(){return{}},e.prototype.getGlobalOptions=function(t){return{xAxis:t.xAxis,yAxis:t.yAxis,theme:t.theme,legend:t.legend}},e.prototype.createComboLayers=function(){this.globalOptions=Object(F.deepMix)({},this.getDefaultOptions(),this.getGlobalOptions(this.options))},e}(mr),vl=["line","area","column","bar","bubble","scatter"];function ml(t,e){return!!F.contains(vl,t)&&(("line"!==t||!F.has(e,"seriesField"))&&("column"!==t||!F.has(e,"colorField")))}function xl(t,e,n,i,r){var o=er().legend,a=r.split("-"),s="horizontal";"left"!==a[0]&&"right"!==a[0]||(s="vertical");var c=i.addGroup(),l={type:"category-legend",items:t,maxSize:e,container:c,group:c,layout:s,textStyle:{fill:"#8C8C8C",fontSize:12,textAlign:"start",textBaseline:"middle",lineHeight:20},titleDistance:10,autoWrap:!0,itemMarginBottom:4,backgroundPadding:0,maxLength:e},h=new u.Category(l);!function(t,e,n,i){var r=er().bleeding;F.isArray(r)&&F.each(r,(function(t,e){"function"==typeof r[e]&&(r[e]=r[e]({}))}));var o=n.get("container").getBBox(),a=0,s=0,u=i.split("-");"left"===u[0]?a=r[3]:"right"===u[0]?a=t-r[1]-o.width:"center"===u[1]?a=(t-o.width)/2:"left"===u[1]?a=r[3]:"right"===u[1]&&(a=t-r[1]-o.width);"bottom"===u[0]?s=e-r[2]-o.height:"top"===u[0]?s=r[0]:"center"===u[1]?s=(e-o.height)/2:"top"===u[1]?s=r[0]:"bottom"===u[1]&&(s=e-r[2]-o.height);n.setLocation({x:a,y:s}),n.render()}(e,n,h,r),function(t){var e=[];t.get("group").on("click",(function(t){var n=t.target.get("delegateObject").item;if(n.isSingle)n.checked?(t.target.get("parent").attr("opacity",.3),n.layer.hide(),n.checked=!1):(t.target.get("parent").attr("opacity",1),n.layer.show(),n.checked=!0);else{var i=n.layer.view;if(n.checked)t.target.get("parent").attr("opacity",.3),e.push(n.value),i.filter(n.field,(function(t){return!F.contains(e,t)})),i.render(),0===i.filteredData.length?n.layer.hide():n.layer.visibility||n.layer.show(),n.checked=!1;else t.target.get("parent").attr("opacity",1),F.pull(e,n.value),i.filter(n.value,(function(t){return!F.contains(e,t)})),i.render(),n.layer.visibility||n.layer.show(),n.checked=!0}}))}(h);var p,f=h.get("container").getBBox(),d=o.innerPadding;return"left"===a[0]?p=new q(h.get("x")+d[3],h.get("y"),f.width,f.height):"right"===a[0]?p=new q(h.get("x")-d[1],h.get("y"),f.width,f.height):"top"===a[0]?p=new q(h.get("x"),h.get("y")+d[0],f.width,f.height):"bottom"===a[0]&&(p=new q(h.get("x"),h.get("y")-d[2],f.width,f.height)),{position:a[0],component:h,getBBox:function(){return p}}}function bl(t,e){var n=er().bleeding;F.isArray(n)&&F.each(n,(function(t,e){"function"==typeof n[e]&&(n[e]=n[e]({}))}));var i=t.layerBBox.minX,r=t.layerBBox.maxX,o=F.clone(t.layerBBox.minY),a=t.layerBBox.maxY;F.each(e,(function(t){var e=t.position,n=t.getBBox(),s=n.minX,u=n.maxX,c=n.minY,l=n.maxY;l>o&&lo&&l>a&&"bottom"===e&&(a=c),c>o&&c<=a&&"bottom"===e&&(a=c),u>i&&ui&&u0;c--)u(c)}(h,l,r,n)}if(t.xAxis.visible){var d=bl(i,l),g=0===h.length?o-p-n[2]:h[0].get("group").getBBox().maxY;c.destroy(),c=Cl(u[0],"x",a,{start:{x:d[3],y:g},end:{x:r-d[1],y:g},factor:-1},t),l.push({position:"bottom",component:c,getBBox:function(){var t=c.get("group").getBBox();return new q(t.minX,t.minY,t.width,t.height)}})}return l}function Al(t){var e=er();return t.theme&&(F.isString(t.theme)?e=er(t.theme):F.isObject(t.theme)&&(e=t.theme)),e}function Pl(t,e,n){var i=function(t,e){var n=er().tooltip,i={parent:t.canvas.get("container"),panelGroup:t.view.middleGroup,panelRange:t.view.coodinateBBox,capture:!1,canvas:e,frontgroundGroup:t.view.frontgroundGroup,theme:n,backgroundGroup:t.view.backgroundGroup,items:[{name:0,value:0}],domStyles:{"g2-tooltip":{opacity:0}}};return new l.Html(i)}(e[0],t);return i.init(),t.on("mousemove",(function(t){var n=[],r={x:t.x,y:t.y};Object(F.each)(e,(function(t){var e=t.view;e&&t.visibility&&n.push.apply(n,e.getTooltipItems(r))})),n.length>0?(i.setLocation(r),i.update({items:jl(n),domStyles:{"g2-tooltip":{opacity:1}}}),i.show()):i.get("visible")&&i.hide()})),i}function jl(t){var e=[];return Object(F.each)(t,(function(t){-1===function(t,e){var n=-1;return Object(F.each)(t,(function(t,i){var r=!0;for(var o in e)if(Object(F.has)(e,o)&&!Object(F.isObject)(e[o])&&e[o]!==t[o]){r=!1;break}if(r)return n=i,!1})),n}(e,t)&&e.push(t)})),e}!function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.options=n,i}Object(L.__extends)(e,t),e.prototype.getDefaultOptions=function(){return{xAxis:{visible:!0,autoHideLabel:!1,autoRotateLabel:!1,autoRotateTitle:!1,grid:{visible:!1},line:{visible:!0},tickLine:{visible:!0},label:{visible:!0},title:{visible:!1,offset:12}},yAxis:{visible:!0,autoHideLabel:!1,autoRotateLabel:!1,autoRotateTitle:!0,grid:{visible:!0},line:{visible:!0},tickLine:{visible:!0},label:{visible:!0},title:{visible:!1,offset:12},colorMapping:!0,synchroTick:!0},label:{visible:!1},tooltip:{visible:!0,sort:!0},legend:{visible:!0,position:"top-left"}}},e.prototype.createComboLayers=function(){var e=this;t.prototype.createComboLayers.call(this),this.legendInfo=[],this.axisInfo=[],this.paddingComponents=[],this.globalComponents=[],this.singleGeomCount=0,this.backLayer=new H({canvas:this.getCanvas(),width:this.width,height:this.height}),this.options.layers.length>0&&F.each(this.options.layers,(function(t){var n,i,r=e.getOverlappedConfig(t),o=vr(t.type),a=F.deepMix({},t,{canvas:e.canvas,x:0,y:0,width:e.width,height:e.height,tooltip:{domStyles:{"g2-tooltip":{display:"none"}}}},r),s=new o(a);s.render(),s.hide(),(n=e.axisInfo).push.apply(n,function(t,e,n){var i=t.view.geometries[0].scales,r=[],o=ml(t.type,e);if(e.xField){var a={dim:"x",scale:i[e.xField],originalData:e.data};r.push(a)}if(e.yField){a={dim:"y",scale:i[e.yField],originalData:e.data,color:o&&n.yAxis.colorMapping?e.color:null,layer:t};r.push(a)}return r}(s,a,e.globalOptions)),(i=e.legendInfo).push.apply(i,function(t,e){var n=[],i=t.view.geometries[0],r=i.attributes.color,o={isInCircle:!1,color:r.values[0]},a={symbol:"circle",style:{r:4,fill:o.fill}};if(i.shapeFactory&&(a=i.shapeFactory.getMarker(i.type,o)),1===r.scales.length&&"identity"==r.scales[0].type)n.push({value:e.name,checked:!0,marker:a,isSingle:!0,layer:t,name:e.name||i.type});else{var s=r.scales[0].values;F.each(s,(function(e,a){var s=e,u={isInCircle:!1,color:r.values[a]},c={symbol:"circle",style:{r:4,fill:o.color}};i.shapeFactory&&(c=i.shapeFactory.getMarker(i.type,u)),n.push({field:r.scales[0].field,value:s,checked:!0,marker:c,isSingle:!1,layer:t,name:s})}))}return n}(s,a)),e.addLayer(s)})),this.topLayer=new H({canvas:this.getCanvas(),width:this.width,height:this.height}),this.topLayer.render()},e.prototype.getOverlappedConfig=function(t){var e=function(t,e,n){if(e.color)return{single:!1,color:e.color};var i=ml(t,e),r=er().colors;return i&&!e.color?{single:!0,color:r[n]}:void 0}(t.type,t,this.singleGeomCount);return e&&e.single&&this.singleGeomCount++,F.deepMix({},{xAxis:{visible:!1},yAxis:{visible:!1},legend:{visible:!1},padding:[0,0,0,0],color:e?e.color:null})},e.prototype.overlappingLegend=function(){var t=this.legendInfo;return this.legendContainer=this.topLayer.container.addGroup(),xl(t,this.width,this.height,this.getCanvas(),this.globalOptions.legend.position)},e.prototype.render=function(){var t,e=this;this.doDestroy(),this.createComboLayers();var n=er().bleeding;if(this.globalOptions.legend.visible){var i=this.overlappingLegend();this.globalComponents.push({type:"legend",component:i.component}),this.paddingComponents.push(i)}var r=bl(this.layers[0],this.paddingComponents),o=Sl(this.globalOptions,this.axisInfo,r,this.layers[0],this.width,this.height,this.getCanvas());(t=this.paddingComponents).push.apply(t,o),F.each(o,(function(t){e.globalComponents.push({type:"axis",component:t.component})}));var a=bl(this.layers[0],this.paddingComponents);if(this.globalOptions.xAxis.visible||(a[2]+=n[2]),F.each(this.layers,(function(t){t.updateConfig({padding:a}),t.render(),t.show()})),this.globalOptions.yAxis.grid.visible){var s=o[0].component,u=this.layers[0];!function(t,e,n,i){var r=Al(i),o=i.yAxis.grid,a=r.axis.y.grid.style,s=F.deepMix({},a,o.style),u=n.addGroup(),c=t.get("labelItems");F.each(c,(function(t,n){n>0&&u.addShape("path",{attrs:Object(L.__assign)({path:[["M",e.start.x,t.point.y],["L",e.end.x,t.point.y]]},s)})}))}(s,u.view.geometries[0].coordinate,u.view.backgroundGroup,this.globalOptions)}if(this.canvas.draw(),this.globalOptions.tooltip.visible){var c=Pl(this.canvas,this.layers,this.globalOptions.tooltip);this.globalComponents.push({type:"tooltip",component:c})}},e.prototype.doDestroy=function(){this.clearComponents(),this.eachLayer((function(t){t.destroy()})),this.layers=[]},e.prototype.clearComponents=function(){F.each(this.globalComponents,(function(t){"legend"!==t.type&&"tooltip"!==t.type||t.component.destroy(),"axis"===t.type&&t.component.clear()})),this.paddingComponents=[],this.globalComponents=[]}}(yl);n.d(e,"c",(function(){return bo})),n.d(e,"d",(function(){return Wo})),n.d(e,"a",(function(){return _a})),n.d(e,"b",(function(){return Na}))},mrSG:function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",(function(){return r})),n.d(e,"__assign",(function(){return o})),n.d(e,"__rest",(function(){return a})),n.d(e,"__decorate",(function(){return s})),n.d(e,"__param",(function(){return u})),n.d(e,"__metadata",(function(){return c})),n.d(e,"__awaiter",(function(){return l})),n.d(e,"__generator",(function(){return h})),n.d(e,"__exportStar",(function(){return p})),n.d(e,"__values",(function(){return f})),n.d(e,"__read",(function(){return d})),n.d(e,"__spread",(function(){return g})),n.d(e,"__spreadArrays",(function(){return y})),n.d(e,"__await",(function(){return v})),n.d(e,"__asyncGenerator",(function(){return m})),n.d(e,"__asyncDelegator",(function(){return x})),n.d(e,"__asyncValues",(function(){return b})),n.d(e,"__makeTemplateObject",(function(){return M})),n.d(e,"__importStar",(function(){return _})),n.d(e,"__importDefault",(function(){return w}));var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,i){e(n,i,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{u(i.next(t))}catch(t){o(t)}}function s(t){try{u(i.throw(t))}catch(t){o(t)}}function u(t){t.done?r(t.value):new n((function(e){e(t.value)})).then(a,s)}u((i=i.apply(t,e||[])).next())}))}function h(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function g(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{(n=r[t](e)).value instanceof v?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function x(t){var e,n;return e={},i("next"),i("throw",(function(t){throw t})),i("return"),e[Symbol.iterator]=function(){return this},e;function i(i,r){e[i]=t[i]?function(e){return(n=!n)?{value:v(t[i](e)),done:"return"===i}:r?r(e):e}:r}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=f(t),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(e){return new Promise((function(i,r){(function(t,e,n,i){Promise.resolve(i).then((function(e){t({value:e,done:n})}),e)})(i,r,(e=t[n](e)).done,e.value)}))}}}function M(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function _(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function w(t){return t&&t.__esModule?t:{default:t}}},mrT1:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}},nkna:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTAINER_CLASS="g2-tooltip",e.TITLE_CLASS="g2-tooltip-title",e.LIST_CLASS="g2-tooltip-list",e.LIST_ITEM_CLASS="g2-tooltip-list-item",e.MARKER_CLASS="g2-tooltip-marker",e.VALUE_CLASS="g2-tooltip-value",e.NAME_CLASS="g2-tooltip-name",e.CROSSHAIR_X="g2-tooltip-crosshair-x",e.CROSSHAIR_Y="g2-tooltip-crosshair-y"},rDfp:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("mrSG"),r=n("aFU3"),o=n("iTfj"),a={none:[],point:["x","y"],region:["start","end"],points:["points"],circle:["center","radius","startAngle","endAngle"]},s=function(t){function e(e){var n=t.call(this,e)||this;return n.initCfg(),n}return i.__extends(e,t),e.prototype.getDefaultCfg=function(){return{id:"",name:"",type:"",locationType:"none",offsetX:0,offsetY:0,animate:!1,capture:!0,updateAutoRender:!1,animateOption:{appear:null,update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},events:null,defaultCfg:{},visible:!0}},e.prototype.clear=function(){},e.prototype.update=function(t){var e=this,n=this.get("defaultCfg");o.each(t,(function(t,i){var r=t;e.get(i)!==t&&(o.isObject(t)&&n[i]&&(r=o.deepMix({},n[i],t)),e.set(i,r))})),o.hasKey(t,"visible")&&(t.visible?this.show():this.hide()),o.hasKey(t,"capture")&&this.setCapture(t.capture)},e.prototype.getLayoutBBox=function(){return this.getBBox()},e.prototype.getLocationType=function(){return this.get("locationType")},e.prototype.getOffset=function(){return{offsetX:this.get("offsetX"),offsetY:this.get("offsetY")}},e.prototype.setOffset=function(t,e){this.update({offsetX:t,offsetY:e})},e.prototype.setLocation=function(t){var e=i.__assign({},t);this.update(e)},e.prototype.getLocation=function(){var t=this,e={},n=this.get("locationType"),i=a[n];return o.each(i,(function(n){e[n]=t.get(n)})),e},e.prototype.isList=function(){return!1},e.prototype.isSlider=function(){return!1},e.prototype.init=function(){},e.prototype.initCfg=function(){var t=this,e=this.get("defaultCfg");o.each(e,(function(e,n){var i=t.get(n);if(o.isObject(i)){var r=o.deepMix({},e,i);t.set(n,r)}}))},e}(r.Base);e.default=s},sB4O:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={};e.getAnimation=function(t){return i[t.toLowerCase()]},e.registerAnimation=function(t,e){i[t.toLowerCase()]=e}},vYtJ:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={}.toString;e.default=function(t,e){return i.call(t)==="[object "+e+"]"}},yLks:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.FORE="fore",t.MID="mid",t.BG="bg"}(e.LAYER||(e.LAYER={})),function(t){t.TOP="top",t.TOP_LEFT="top-left",t.TOP_RIGHT="top-right",t.RIGHT="right",t.RIGHT_TOP="right-top",t.RIGHT_BOTTOM="right-bottom",t.LEFT="left",t.LEFT_TOP="left-top",t.LEFT_BOTTOM="left-bottom",t.BOTTOM="bottom",t.BOTTOM_LEFT="bottom-left",t.BOTTOM_RIGHT="bottom-right",t.NONE="none"}(e.DIRECTION||(e.DIRECTION={})),function(t){t.AXIS="axis",t.GRID="grid",t.LEGEND="legend",t.TOOLTIP="tooltip",t.ANNOTATION="annotation",t.OTHER="other"}(e.COMPONENT_TYPE||(e.COMPONENT_TYPE={})),e.GROUP_Z_INDEX={FORE:3,MID:2,BG:1},function(t){t.BEFORE_RENDER="beforerender",t.AFTER_RENDER="afterrender",t.BEFORE_PAINT="beforepaint",t.AFTER_PAINT="afterpaint",t.BEFORE_CHANGE_DATA="beforechangedata",t.AFTER_CHANGE_DATA="afterchangedata",t.BEFORE_CLEAR="beforeclear",t.AFTER_CLEAR="afterclear",t.BEFORE_DESTROY="beforedestroy"}(e.VIEW_LIFE_CIRCLE||(e.VIEW_LIFE_CIRCLE={})),function(t){t.MOUSE_ENTER="plot:mouseenter",t.MOUSE_DOWN="plot:mousedown",t.MOUSE_MOVE="plot:mousemove",t.MOUSE_UP="plot:mouseup",t.MOUSE_LEAVE="plot:mouseleave",t.TOUCH_START="plot:touchstart",t.TOUCH_MOVE="plot:touchmove",t.TOUCH_END="plot:touchend",t.TOUCH_CANCEL="plot:touchcancel",t.CLICK="plot:click",t.DBLCLICK="plot:dblclick",t.CONTEXTMENU="plot:contextmenu"}(e.PLOT_EVENTS||(e.PLOT_EVENTS={})),e.GROUP_ATTRS=["color","shape","size"],e.FIELD_ORIGIN="_origin",e.MIN_CHART_WIDTH=100,e.MIN_CHART_HEIGHT=100,e.COMPONENT_MAX_VIEW_PERCENTAGE=.25}}]); \ No newline at end of file diff --git a/public/10.js b/public/10.js index 3a002e2..db98d6e 100644 --- a/public/10.js +++ b/public/10.js @@ -1,494 +1 @@ -(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[10],{ - -/***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/form/BaseForm.vue?vue&type=script&lang=js&": -/*!************************************************************************************************************************************************************************!*\ - !*** ./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/form/BaseForm.vue?vue&type=script&lang=js& ***! - \************************************************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _ItemDiaplsy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ItemDiaplsy */ "./resources/js/components/form/ItemDiaplsy.vue"); -/* harmony import */ var _ItemIf__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ItemIf */ "./resources/js/components/form/ItemIf.vue"); -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// - - -/* harmony default export */ __webpack_exports__["default"] = ({ - components: { - ItemDiaplsy: _ItemDiaplsy__WEBPACK_IMPORTED_MODULE_0__["default"], - ItemIf: _ItemIf__WEBPACK_IMPORTED_MODULE_1__["default"] - }, - props: { - attrs: Object, - keys: String - }, - data: function data() { - return { - loading: false, - isEdit: false, - formData: {} - }; - }, - mounted: function mounted() { - this.formData = this._.cloneDeep(this.attrs.formItemsValue); - }, - computed: { - actionUrl: function actionUrl() { - var keys = this.$store.getters.thisPage.grids.selectionKeys; - return this._.replace(this.attrs.action, "selectionKeys", keys); - } - }, - methods: { - submitForm: function submitForm(formName) { - var _this = this; - - this.$refs[formName].validate(function (valid) { - if (valid) { - _this.loading = true; - - _this.$http.post(_this.actionUrl, _this.formData).then(function (_ref) { - var data = _ref.data, - code = _ref.code, - message = _ref.message; - - if (code == 200) { - _this.attrs.emits.map(function (item) { - _this.$bus.emit(item.name, item.data); - }); - } - })["finally"](function () { - _this.loading = false; - }); - } else { - return false; - } - }); - }, - resetForm: function resetForm(formName) {} - } -}); - -/***/ }), - -/***/ "./node_modules/css-loader/index.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/sass-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/form/BaseForm.vue?vue&type=style&index=0&id=98e36ff6&lang=scss&scoped=true&": -/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-2!./node_modules/sass-loader/dist/cjs.js??ref--6-3!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/form/BaseForm.vue?vue&type=style&index=0&id=98e36ff6&lang=scss&scoped=true& ***! - \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__(/*! ../../../../node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, ".form-bottom-actions[data-v-98e36ff6] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.form-bottom-actions .submit-btn[data-v-98e36ff6] {\n width: 120px;\n}\n.form-item-help[data-v-98e36ff6] {\n color: #999;\n}", ""]); - -// exports - - -/***/ }), - -/***/ "./node_modules/style-loader/index.js!./node_modules/css-loader/index.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/sass-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/form/BaseForm.vue?vue&type=style&index=0&id=98e36ff6&lang=scss&scoped=true&": -/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/style-loader!./node_modules/css-loader!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-2!./node_modules/sass-loader/dist/cjs.js??ref--6-3!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/form/BaseForm.vue?vue&type=style&index=0&id=98e36ff6&lang=scss&scoped=true& ***! - \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - - -var content = __webpack_require__(/*! !../../../../node_modules/css-loader!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src??ref--6-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--6-3!../../../../node_modules/vue-loader/lib??vue-loader-options!./BaseForm.vue?vue&type=style&index=0&id=98e36ff6&lang=scss&scoped=true& */ "./node_modules/css-loader/index.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/sass-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/form/BaseForm.vue?vue&type=style&index=0&id=98e36ff6&lang=scss&scoped=true&"); - -if(typeof content === 'string') content = [[module.i, content, '']]; - -var transform; -var insertInto; - - - -var options = {"hmr":true} - -options.transform = transform -options.insertInto = undefined; - -var update = __webpack_require__(/*! ../../../../node_modules/style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options); - -if(content.locals) module.exports = content.locals; - -if(false) {} - -/***/ }), - -/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/form/BaseForm.vue?vue&type=template&id=98e36ff6&scoped=true&": -/*!****************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/form/BaseForm.vue?vue&type=template&id=98e36ff6&scoped=true& ***! - \****************************************************************************************************************************************************************************************************************************/ -/*! exports provided: render, staticRenderFns */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; }); -var render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _vm.formData - ? _c( - "el-form", - { - ref: "ruleForm", - class: _vm.attrs.attrs.className, - style: _vm.attrs.attrs.style, - attrs: { - model: _vm.formData, - rules: _vm.attrs.attrs.rules, - inline: _vm.attrs.attrs.inline, - "label-position": _vm.attrs.attrs.labelPosition, - "label-width": _vm.attrs.attrs.labelWidth, - "label-suffix": _vm.attrs.attrs.labelSuffix, - "hide-required-asterisk": _vm.attrs.attrs.hideRequiredAsterisk, - "show-message": _vm.attrs.attrs.showMessage, - "inline-message": _vm.attrs.attrs.inlineMessage, - "status-icon": _vm.attrs.attrs.statusIcon, - "validate-on-rule-change": _vm.attrs.attrs.validateOnRuleChange, - size: _vm.attrs.attrs.size, - disabled: _vm.attrs.attrs.disabled - } - }, - [ - _vm._l(_vm.attrs.formItems, function(item, index) { - return [ - _c( - "ItemIf", - { - key: index, - attrs: { - form_item: item, - form_items: _vm.attrs.formItems, - form_data: _vm.formData - } - }, - [ - item.topComponent - ? _c(item.topComponent.componentName, { - tag: "component", - attrs: { attrs: item.topComponent } - }) - : _vm._e(), - _vm._v(" "), - _c( - "el-form-item", - { - attrs: { - label: item.label, - prop: item.prop, - "label-width": item.labelWidth, - required: item.required, - rules: item.rules, - error: item.error, - "show-message": item.showMessage, - "inline-message": item.inlineMessage, - size: item.size - } - }, - [ - [ - _c( - "el-row", - [ - _c( - "el-col", - { attrs: { span: item.inputWidth } }, - [ - item.relationName - ? [ - _c("ItemDiaplsy", { - attrs: { - form_item: item, - form_items: _vm.attrs.formItems, - form_data: _vm.formData - }, - model: { - value: - _vm.formData[item.relationName][ - item.relationValueKey - ], - callback: function($$v) { - _vm.$set( - _vm.formData[item.relationName], - item.relationValueKey, - $$v - ) - }, - expression: - "formData[item.relationName][item.relationValueKey]" - } - }) - ] - : [ - _c("ItemDiaplsy", { - attrs: { - form_item: item, - form_data: _vm.formData - }, - model: { - value: _vm.formData[item.prop], - callback: function($$v) { - _vm.$set( - _vm.formData, - item.prop, - $$v - ) - }, - expression: "formData[item.prop]" - } - }) - ], - _vm._v(" "), - item.help - ? _c("div", { - staticClass: "form-item-help", - domProps: { innerHTML: _vm._s(item.help) } - }) - : _vm._e() - ], - 2 - ) - ], - 1 - ) - ] - ], - 2 - ), - _vm._v(" "), - item.footerComponent - ? _c(item.footerComponent.componentName, { - tag: "component", - attrs: { attrs: item.footerComponent } - }) - : _vm._e() - ], - 1 - ) - ] - }), - _vm._v(" "), - _c("div", { staticClass: "form-bottom-actions" }, [ - _c("div"), - _vm._v(" "), - _c( - "div", - [ - _c( - "el-button", - { - staticClass: "submit-btn", - attrs: { loading: _vm.loading, type: "primary" }, - on: { - click: function($event) { - return _vm.submitForm("ruleForm") - } - } - }, - [_vm._v("提交")] - ) - ], - 1 - ) - ]) - ], - 2 - ) - : _vm._e() -} -var staticRenderFns = [] -render._withStripped = true - - - -/***/ }), - -/***/ "./resources/js/components/form/BaseForm.vue": -/*!***************************************************!*\ - !*** ./resources/js/components/form/BaseForm.vue ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _BaseForm_vue_vue_type_template_id_98e36ff6_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BaseForm.vue?vue&type=template&id=98e36ff6&scoped=true& */ "./resources/js/components/form/BaseForm.vue?vue&type=template&id=98e36ff6&scoped=true&"); -/* harmony import */ var _BaseForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BaseForm.vue?vue&type=script&lang=js& */ "./resources/js/components/form/BaseForm.vue?vue&type=script&lang=js&"); -/* empty/unused harmony star reexport *//* harmony import */ var _BaseForm_vue_vue_type_style_index_0_id_98e36ff6_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BaseForm.vue?vue&type=style&index=0&id=98e36ff6&lang=scss&scoped=true& */ "./resources/js/components/form/BaseForm.vue?vue&type=style&index=0&id=98e36ff6&lang=scss&scoped=true&"); -/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js"); - - - - - - -/* normalize component */ - -var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])( - _BaseForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"], - _BaseForm_vue_vue_type_template_id_98e36ff6_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"], - _BaseForm_vue_vue_type_template_id_98e36ff6_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"], - false, - null, - "98e36ff6", - null - -) - -/* hot reload */ -if (false) { var api; } -component.options.__file = "resources/js/components/form/BaseForm.vue" -/* harmony default export */ __webpack_exports__["default"] = (component.exports); - -/***/ }), - -/***/ "./resources/js/components/form/BaseForm.vue?vue&type=script&lang=js&": -/*!****************************************************************************!*\ - !*** ./resources/js/components/form/BaseForm.vue?vue&type=script&lang=js& ***! - \****************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_BaseForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib??ref--4-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./BaseForm.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/form/BaseForm.vue?vue&type=script&lang=js&"); -/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_BaseForm_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]); - -/***/ }), - -/***/ "./resources/js/components/form/BaseForm.vue?vue&type=style&index=0&id=98e36ff6&lang=scss&scoped=true&": -/*!*************************************************************************************************************!*\ - !*** ./resources/js/components/form/BaseForm.vue?vue&type=style&index=0&id=98e36ff6&lang=scss&scoped=true& ***! - \*************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_2_node_modules_sass_loader_dist_cjs_js_ref_6_3_node_modules_vue_loader_lib_index_js_vue_loader_options_BaseForm_vue_vue_type_style_index_0_id_98e36ff6_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/style-loader!../../../../node_modules/css-loader!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src??ref--6-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--6-3!../../../../node_modules/vue-loader/lib??vue-loader-options!./BaseForm.vue?vue&type=style&index=0&id=98e36ff6&lang=scss&scoped=true& */ "./node_modules/style-loader/index.js!./node_modules/css-loader/index.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/sass-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/form/BaseForm.vue?vue&type=style&index=0&id=98e36ff6&lang=scss&scoped=true&"); -/* harmony import */ var _node_modules_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_2_node_modules_sass_loader_dist_cjs_js_ref_6_3_node_modules_vue_loader_lib_index_js_vue_loader_options_BaseForm_vue_vue_type_style_index_0_id_98e36ff6_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_2_node_modules_sass_loader_dist_cjs_js_ref_6_3_node_modules_vue_loader_lib_index_js_vue_loader_options_BaseForm_vue_vue_type_style_index_0_id_98e36ff6_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__); -/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_2_node_modules_sass_loader_dist_cjs_js_ref_6_3_node_modules_vue_loader_lib_index_js_vue_loader_options_BaseForm_vue_vue_type_style_index_0_id_98e36ff6_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_2_node_modules_sass_loader_dist_cjs_js_ref_6_3_node_modules_vue_loader_lib_index_js_vue_loader_options_BaseForm_vue_vue_type_style_index_0_id_98e36ff6_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__)); - /* harmony default export */ __webpack_exports__["default"] = (_node_modules_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_2_node_modules_sass_loader_dist_cjs_js_ref_6_3_node_modules_vue_loader_lib_index_js_vue_loader_options_BaseForm_vue_vue_type_style_index_0_id_98e36ff6_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a); - -/***/ }), - -/***/ "./resources/js/components/form/BaseForm.vue?vue&type=template&id=98e36ff6&scoped=true&": -/*!**********************************************************************************************!*\ - !*** ./resources/js/components/form/BaseForm.vue?vue&type=template&id=98e36ff6&scoped=true& ***! - \**********************************************************************************************/ -/*! exports provided: render, staticRenderFns */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_BaseForm_vue_vue_type_template_id_98e36ff6_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/vue-loader/lib??vue-loader-options!./BaseForm.vue?vue&type=template&id=98e36ff6&scoped=true& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/form/BaseForm.vue?vue&type=template&id=98e36ff6&scoped=true&"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_BaseForm_vue_vue_type_template_id_98e36ff6_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_BaseForm_vue_vue_type_template_id_98e36ff6_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; }); - - - -/***/ }) - -}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{CtzK:function(t,s,n){"use strict";n.r(s);var a={props:{attrs:Object},methods:{onClick:function(){}}},e=n("KHd+"),r=Object(e.a)(a,(function(){var t=this,s=t.$createElement;return(t._self._c||s)("el-button",{attrs:{type:t.attrs.type,size:t.attrs.size,plain:t.attrs.plain,round:t.attrs.round,circle:t.attrs.circle,disabled:t.attrs.disabled,icon:t.attrs.icon,autofocus:t.attrs.autofocus},on:{click:t.onClick}},[t._v(t._s(t.attrs.content))])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file diff --git a/public/11.js b/public/11.js index 9d69de7..a3f1d7c 100644 --- a/public/11.js +++ b/public/11.js @@ -1,4687 +1 @@ -(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[11],{ - -/***/ "./node_modules/wangeditor/release/wangEditor.js": -/*!*******************************************************!*\ - !*** ./node_modules/wangeditor/release/wangEditor.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -(function (global, factory) { - true ? module.exports = factory() : - undefined; -}(this, (function () { 'use strict'; - -/* - poly-fill -*/ - -var polyfill = function () { - - // Object.assign - if (typeof Object.assign != 'function') { - Object.assign = function (target, varArgs) { - // .length of function is 2 - if (target == null) { - // TypeError if undefined or null - throw new TypeError('Cannot convert undefined or null to object'); - } - - var to = Object(target); - - for (var index = 1; index < arguments.length; index++) { - var nextSource = arguments[index]; - - if (nextSource != null) { - // Skip over if undefined or null - for (var nextKey in nextSource) { - // Avoid bugs when hasOwnProperty is shadowed - if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { - to[nextKey] = nextSource[nextKey]; - } - } - } - } - return to; - }; - } - - // IE 中兼容 Element.prototype.matches - if (!Element.prototype.matches) { - Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector || function (s) { - var matches = (this.document || this.ownerDocument).querySelectorAll(s), - i = matches.length; - while (--i >= 0 && matches.item(i) !== this) {} - return i > -1; - }; - } -}; - -/* - DOM 操作 API -*/ - -// 根据 html 代码片段创建 dom 对象 -function createElemByHTML(html) { - var div = void 0; - div = document.createElement('div'); - div.innerHTML = html; - return div.children; -} - -// 是否是 DOM List -function isDOMList(selector) { - if (!selector) { - return false; - } - if (selector instanceof HTMLCollection || selector instanceof NodeList) { - return true; - } - return false; -} - -// 封装 document.querySelectorAll -function querySelectorAll(selector) { - var result = document.querySelectorAll(selector); - if (isDOMList(result)) { - return result; - } else { - return [result]; - } -} - -// 记录所有的事件绑定 -var eventList = []; - -// 创建构造函数 -function DomElement(selector) { - if (!selector) { - return; - } - - // selector 本来就是 DomElement 对象,直接返回 - if (selector instanceof DomElement) { - return selector; - } - - this.selector = selector; - var nodeType = selector.nodeType; - - // 根据 selector 得出的结果(如 DOM,DOM List) - var selectorResult = []; - if (nodeType === 9) { - // document 节点 - selectorResult = [selector]; - } else if (nodeType === 1) { - // 单个 DOM 节点 - selectorResult = [selector]; - } else if (isDOMList(selector) || selector instanceof Array) { - // DOM List 或者数组 - selectorResult = selector; - } else if (typeof selector === 'string') { - // 字符串 - selector = selector.replace('/\n/mg', '').trim(); - if (selector.indexOf('<') === 0) { - // 如
                - selectorResult = createElemByHTML(selector); - } else { - // 如 #id .class - selectorResult = querySelectorAll(selector); - } - } - - var length = selectorResult.length; - if (!length) { - // 空数组 - return this; - } - - // 加入 DOM 节点 - var i = void 0; - for (i = 0; i < length; i++) { - this[i] = selectorResult[i]; - } - this.length = length; -} - -// 修改原型 -DomElement.prototype = { - constructor: DomElement, - - // 类数组,forEach - forEach: function forEach(fn) { - var i = void 0; - for (i = 0; i < this.length; i++) { - var elem = this[i]; - var result = fn.call(elem, elem, i); - if (result === false) { - break; - } - } - return this; - }, - - // clone - clone: function clone(deep) { - var cloneList = []; - this.forEach(function (elem) { - cloneList.push(elem.cloneNode(!!deep)); - }); - return $(cloneList); - }, - - // 获取第几个元素 - get: function get(index) { - var length = this.length; - if (index >= length) { - index = index % length; - } - return $(this[index]); - }, - - // 第一个 - first: function first() { - return this.get(0); - }, - - // 最后一个 - last: function last() { - var length = this.length; - return this.get(length - 1); - }, - - // 绑定事件 - on: function on(type, selector, fn) { - // selector 不为空,证明绑定事件要加代理 - if (!fn) { - fn = selector; - selector = null; - } - - // type 是否有多个 - var types = []; - types = type.split(/\s+/); - - return this.forEach(function (elem) { - types.forEach(function (type) { - if (!type) { - return; - } - - // 记录下,方便后面解绑 - eventList.push({ - elem: elem, - type: type, - fn: fn - }); - - if (!selector) { - // 无代理 - elem.addEventListener(type, fn); - return; - } - - // 有代理 - elem.addEventListener(type, function (e) { - var target = e.target; - if (target.matches(selector)) { - fn.call(target, e); - } - }); - }); - }); - }, - - // 取消事件绑定 - off: function off(type, fn) { - return this.forEach(function (elem) { - elem.removeEventListener(type, fn); - }); - }, - - // 获取/设置 属性 - attr: function attr(key, val) { - if (val == null) { - // 获取值 - return this[0].getAttribute(key); - } else { - // 设置值 - return this.forEach(function (elem) { - elem.setAttribute(key, val); - }); - } - }, - - // 添加 class - addClass: function addClass(className) { - if (!className) { - return this; - } - return this.forEach(function (elem) { - var arr = void 0; - if (elem.className) { - // 解析当前 className 转换为数组 - arr = elem.className.split(/\s/); - arr = arr.filter(function (item) { - return !!item.trim(); - }); - // 添加 class - if (arr.indexOf(className) < 0) { - arr.push(className); - } - // 修改 elem.class - elem.className = arr.join(' '); - } else { - elem.className = className; - } - }); - }, - - // 删除 class - removeClass: function removeClass(className) { - if (!className) { - return this; - } - return this.forEach(function (elem) { - var arr = void 0; - if (elem.className) { - // 解析当前 className 转换为数组 - arr = elem.className.split(/\s/); - arr = arr.filter(function (item) { - item = item.trim(); - // 删除 class - if (!item || item === className) { - return false; - } - return true; - }); - // 修改 elem.class - elem.className = arr.join(' '); - } - }); - }, - - // 修改 css - css: function css(key, val) { - var currentStyle = key + ':' + val + ';'; - return this.forEach(function (elem) { - var style = (elem.getAttribute('style') || '').trim(); - var styleArr = void 0, - resultArr = []; - if (style) { - // 将 style 按照 ; 拆分为数组 - styleArr = style.split(';'); - styleArr.forEach(function (item) { - // 对每项样式,按照 : 拆分为 key 和 value - var arr = item.split(':').map(function (i) { - return i.trim(); - }); - if (arr.length === 2) { - resultArr.push(arr[0] + ':' + arr[1]); - } - }); - // 替换或者新增 - resultArr = resultArr.map(function (item) { - if (item.indexOf(key) === 0) { - return currentStyle; - } else { - return item; - } - }); - if (resultArr.indexOf(currentStyle) < 0) { - resultArr.push(currentStyle); - } - // 结果 - elem.setAttribute('style', resultArr.join('; ')); - } else { - // style 无值 - elem.setAttribute('style', currentStyle); - } - }); - }, - - // 显示 - show: function show() { - return this.css('display', 'block'); - }, - - // 隐藏 - hide: function hide() { - return this.css('display', 'none'); - }, - - // 获取子节点 - children: function children() { - var elem = this[0]; - if (!elem) { - return null; - } - - return $(elem.children); - }, - - // 获取子节点(包括文本节点) - childNodes: function childNodes() { - var elem = this[0]; - if (!elem) { - return null; - } - - return $(elem.childNodes); - }, - - // 增加子节点 - append: function append($children) { - return this.forEach(function (elem) { - $children.forEach(function (child) { - elem.appendChild(child); - }); - }); - }, - - // 移除当前节点 - remove: function remove() { - return this.forEach(function (elem) { - if (elem.remove) { - elem.remove(); - } else { - var parent = elem.parentElement; - parent && parent.removeChild(elem); - } - }); - }, - - // 是否包含某个子节点 - isContain: function isContain($child) { - var elem = this[0]; - var child = $child[0]; - return elem.contains(child); - }, - - // 尺寸数据 - getSizeData: function getSizeData() { - var elem = this[0]; - return elem.getBoundingClientRect(); // 可得到 bottom height left right top width 的数据 - }, - - // 封装 nodeName - getNodeName: function getNodeName() { - var elem = this[0]; - return elem.nodeName; - }, - - // 从当前元素查找 - find: function find(selector) { - var elem = this[0]; - return $(elem.querySelectorAll(selector)); - }, - - // 获取当前元素的 text - text: function text(val) { - if (!val) { - // 获取 text - var elem = this[0]; - return elem.innerHTML.replace(/<.*?>/g, function () { - return ''; - }); - } else { - // 设置 text - return this.forEach(function (elem) { - elem.innerHTML = val; - }); - } - }, - - // 获取 html - html: function html(value) { - var elem = this[0]; - if (value == null) { - return elem.innerHTML; - } else { - elem.innerHTML = value; - return this; - } - }, - - // 获取 value - val: function val() { - var elem = this[0]; - return elem.value.trim(); - }, - - // focus - focus: function focus() { - return this.forEach(function (elem) { - elem.focus(); - }); - }, - - // parent - parent: function parent() { - var elem = this[0]; - return $(elem.parentElement); - }, - - // parentUntil 找到符合 selector 的父节点 - parentUntil: function parentUntil(selector, _currentElem) { - var results = document.querySelectorAll(selector); - var length = results.length; - if (!length) { - // 传入的 selector 无效 - return null; - } - - var elem = _currentElem || this[0]; - if (elem.nodeName === 'BODY') { - return null; - } - - var parent = elem.parentElement; - var i = void 0; - for (i = 0; i < length; i++) { - if (parent === results[i]) { - // 找到,并返回 - return $(parent); - } - } - - // 继续查找 - return this.parentUntil(selector, parent); - }, - - // 判断两个 elem 是否相等 - equal: function equal($elem) { - if ($elem.nodeType === 1) { - return this[0] === $elem; - } else { - return this[0] === $elem[0]; - } - }, - - // 将该元素插入到某个元素前面 - insertBefore: function insertBefore(selector) { - var $referenceNode = $(selector); - var referenceNode = $referenceNode[0]; - if (!referenceNode) { - return this; - } - return this.forEach(function (elem) { - var parent = referenceNode.parentNode; - parent.insertBefore(elem, referenceNode); - }); - }, - - // 将该元素插入到某个元素后面 - insertAfter: function insertAfter(selector) { - var $referenceNode = $(selector); - var referenceNode = $referenceNode[0]; - if (!referenceNode) { - return this; - } - return this.forEach(function (elem) { - var parent = referenceNode.parentNode; - if (parent.lastChild === referenceNode) { - // 最后一个元素 - parent.appendChild(elem); - } else { - // 不是最后一个元素 - parent.insertBefore(elem, referenceNode.nextSibling); - } - }); - } -}; - -// new 一个对象 -function $(selector) { - return new DomElement(selector); -} - -// 解绑所有事件,用于销毁编辑器 -$.offAll = function () { - eventList.forEach(function (item) { - var elem = item.elem; - var type = item.type; - var fn = item.fn; - // 解绑 - elem.removeEventListener(type, fn); - }); -}; - -/* - 配置信息 -*/ - -var config = { - - // 默认菜单配置 - menus: ['head', 'bold', 'fontSize', 'fontName', 'italic', 'underline', 'strikeThrough', 'foreColor', 'backColor', 'link', 'list', 'justify', 'quote', 'emoticon', 'image', 'table', 'video', 'code', 'undo', 'redo'], - - fontNames: ['宋体', '微软雅黑', 'Arial', 'Tahoma', 'Verdana'], - - colors: ['#000000', '#eeece0', '#1c487f', '#4d80bf', '#c24f4a', '#8baa4a', '#7b5ba1', '#46acc8', '#f9963b', '#ffffff'], - - // // 语言配置 - // lang: { - // '设置标题': 'title', - // '正文': 'p', - // '链接文字': 'link text', - // '链接': 'link', - // '插入': 'insert', - // '创建': 'init' - // }, - - // 表情 - emotions: [{ - // tab 的标题 - title: '默认', - // type -> 'emoji' / 'image' - type: 'image', - // content -> 数组 - content: [{ - alt: '[坏笑]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/50/pcmoren_huaixiao_org.png' - }, { - alt: '[舔屏]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/pcmoren_tian_org.png' - }, { - alt: '[污]', - src: 'http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3c/pcmoren_wu_org.png' - }] - }, { - // tab 的标题 - title: '新浪', - // type -> 'emoji' / 'image' - type: 'image', - // content -> 数组 - content: [{ - src: 'http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/7a/shenshou_thumb.gif', - alt: '[草泥马]' - }, { - src: 'http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/60/horse2_thumb.gif', - alt: '[神马]' - }, { - src: 'http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/bc/fuyun_thumb.gif', - alt: '[浮云]' - }] - }, { - // tab 的标题 - title: 'emoji', - // type -> 'emoji' / 'image' - type: 'emoji', - // content -> 数组 - content: '😀 😃 😄 😁 😆 😅 😂 😊 😇 🙂 🙃 😉 😓 😪 😴 🙄 🤔 😬 🤐'.split(/\s/) - }], - - // 编辑区域的 z-index - zIndex: 10000, - - // 是否开启 debug 模式(debug 模式下错误会 throw error 形式抛出) - debug: false, - - // 插入链接时候的格式校验 - linkCheck: function linkCheck(text, link) { - // text 是插入的文字 - // link 是插入的链接 - return true; // 返回 true 即表示成功 - // return '校验失败' // 返回字符串即表示失败的提示信息 - }, - - // 插入网络图片的校验 - linkImgCheck: function linkImgCheck(src) { - // src 即图片的地址 - return true; // 返回 true 即表示成功 - // return '校验失败' // 返回字符串即表示失败的提示信息 - }, - - // 粘贴过滤样式,默认开启 - pasteFilterStyle: true, - - // 粘贴内容时,忽略图片。默认关闭 - pasteIgnoreImg: false, - - // 对粘贴的文字进行自定义处理,返回处理后的结果。编辑器会将处理后的结果粘贴到编辑区域中。 - // IE 暂时不支持 - pasteTextHandle: function pasteTextHandle(content) { - // content 即粘贴过来的内容(html 或 纯文本),可进行自定义处理然后返回 - return content; - }, - - // onchange 事件 - // onchange: function (html) { - // // html 即变化之后的内容 - // console.log(html) - // }, - - // 是否显示添加网络图片的 tab - showLinkImg: true, - - // 插入网络图片的回调 - linkImgCallback: function linkImgCallback(url) { - // console.log(url) // url 即插入图片的地址 - }, - - // 默认上传图片 max size: 5M - uploadImgMaxSize: 5 * 1024 * 1024, - - // 配置一次最多上传几个图片 - // uploadImgMaxLength: 5, - - // 上传图片,是否显示 base64 格式 - uploadImgShowBase64: false, - - // 上传图片,server 地址(如果有值,则 base64 格式的配置则失效) - // uploadImgServer: '/upload', - - // 自定义配置 filename - uploadFileName: '', - - // 上传图片的自定义参数 - uploadImgParams: { - // token: 'abcdef12345' - }, - - // 上传图片的自定义header - uploadImgHeaders: { - // 'Accept': 'text/x-json' - }, - - // 配置 XHR withCredentials - withCredentials: false, - - // 自定义上传图片超时时间 ms - uploadImgTimeout: 10000, - - // 上传图片 hook - uploadImgHooks: { - // customInsert: function (insertLinkImg, result, editor) { - // console.log('customInsert') - // // 图片上传并返回结果,自定义插入图片的事件,而不是编辑器自动插入图片 - // const data = result.data1 || [] - // data.forEach(link => { - // insertLinkImg(link) - // }) - // }, - before: function before(xhr, editor, files) { - // 图片上传之前触发 - - // 如果返回的结果是 {prevent: true, msg: 'xxxx'} 则表示用户放弃上传 - // return { - // prevent: true, - // msg: '放弃上传' - // } - }, - success: function success(xhr, editor, result) { - // 图片上传并返回结果,图片插入成功之后触发 - }, - fail: function fail(xhr, editor, result) { - // 图片上传并返回结果,但图片插入错误时触发 - }, - error: function error(xhr, editor) { - // 图片上传出错时触发 - }, - timeout: function timeout(xhr, editor) { - // 图片上传超时时触发 - } - }, - - // 是否上传七牛云,默认为 false - qiniu: false - -}; - -/* - 工具 -*/ - -// 和 UA 相关的属性 -var UA = { - _ua: navigator.userAgent, - - // 是否 webkit - isWebkit: function isWebkit() { - var reg = /webkit/i; - return reg.test(this._ua); - }, - - // 是否 IE - isIE: function isIE() { - return 'ActiveXObject' in window; - } -}; - -// 遍历对象 -function objForEach(obj, fn) { - var key = void 0, - result = void 0; - for (key in obj) { - if (obj.hasOwnProperty(key)) { - result = fn.call(obj, key, obj[key]); - if (result === false) { - break; - } - } - } -} - -// 遍历类数组 -function arrForEach(fakeArr, fn) { - var i = void 0, - item = void 0, - result = void 0; - var length = fakeArr.length || 0; - for (i = 0; i < length; i++) { - item = fakeArr[i]; - result = fn.call(fakeArr, item, i); - if (result === false) { - break; - } - } -} - -// 获取随机数 -function getRandom(prefix) { - return prefix + Math.random().toString().slice(2); -} - -// 替换 html 特殊字符 -function replaceHtmlSymbol(html) { - if (html == null) { - return ''; - } - return html.replace(//gm, '>').replace(/"/gm, '"').replace(/(\r\n|\r|\n)/g, '
                '); -} - -// 返回百分比的格式 - - -// 判断是不是 function -function isFunction(fn) { - return typeof fn === 'function'; -} - -/* - bold-menu -*/ -// 构造函数 -function Bold(editor) { - this.editor = editor; - this.$elem = $('
                \n \n
                '); - this.type = 'click'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Bold.prototype = { - constructor: Bold, - - // 点击事件 - onClick: function onClick(e) { - // 点击菜单将触发这里 - - var editor = this.editor; - var isSeleEmpty = editor.selection.isSelectionEmpty(); - - if (isSeleEmpty) { - // 选区是空的,插入并选中一个“空白” - editor.selection.createEmptyRange(); - } - - // 执行 bold 命令 - editor.cmd.do('bold'); - - if (isSeleEmpty) { - // 需要将选取折叠起来 - editor.selection.collapseRange(); - editor.selection.restoreSelection(); - } - }, - - // 试图改变 active 状态 - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - if (editor.cmd.queryCommandState('bold')) { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - 替换多语言 - */ - -var replaceLang = function (editor, str) { - var langArgs = editor.config.langArgs || []; - var result = str; - - langArgs.forEach(function (item) { - var reg = item.reg; - var val = item.val; - - if (reg.test(result)) { - result = result.replace(reg, function () { - return val; - }); - } - }); - - return result; -}; - -/* - droplist -*/ -var _emptyFn = function _emptyFn() {}; - -// 构造函数 -function DropList(menu, opt) { - var _this = this; - - // droplist 所依附的菜单 - var editor = menu.editor; - this.menu = menu; - this.opt = opt; - // 容器 - var $container = $('
                '); - - // 标题 - var $title = opt.$title; - var titleHtml = void 0; - if ($title) { - // 替换多语言 - titleHtml = $title.html(); - titleHtml = replaceLang(editor, titleHtml); - $title.html(titleHtml); - - $title.addClass('w-e-dp-title'); - $container.append($title); - } - - var list = opt.list || []; - var type = opt.type || 'list'; // 'list' 列表形式(如“标题”菜单) / 'inline-block' 块状形式(如“颜色”菜单) - var onClick = opt.onClick || _emptyFn; - - // 加入 DOM 并绑定事件 - var $list = $('
                  '); - $container.append($list); - list.forEach(function (item) { - var $elem = item.$elem; - - // 替换多语言 - var elemHtml = $elem.html(); - elemHtml = replaceLang(editor, elemHtml); - $elem.html(elemHtml); - - var value = item.value; - var $li = $('
                • '); - if ($elem) { - $li.append($elem); - $list.append($li); - $li.on('click', function (e) { - onClick(value); - - // 隐藏 - _this.hideTimeoutId = setTimeout(function () { - _this.hide(); - }, 0); - }); - } - }); - - // 绑定隐藏事件 - $container.on('mouseleave', function (e) { - _this.hideTimeoutId = setTimeout(function () { - _this.hide(); - }, 0); - }); - - // 记录属性 - this.$container = $container; - - // 基本属性 - this._rendered = false; - this._show = false; -} - -// 原型 -DropList.prototype = { - constructor: DropList, - - // 显示(插入DOM) - show: function show() { - if (this.hideTimeoutId) { - // 清除之前的定时隐藏 - clearTimeout(this.hideTimeoutId); - } - - var menu = this.menu; - var $menuELem = menu.$elem; - var $container = this.$container; - if (this._show) { - return; - } - if (this._rendered) { - // 显示 - $container.show(); - } else { - // 加入 DOM 之前先定位位置 - var menuHeight = $menuELem.getSizeData().height || 0; - var width = this.opt.width || 100; // 默认为 100 - $container.css('margin-top', menuHeight + 'px').css('width', width + 'px'); - - // 加入到 DOM - $menuELem.append($container); - this._rendered = true; - } - - // 修改属性 - this._show = true; - }, - - // 隐藏(移除DOM) - hide: function hide() { - if (this.showTimeoutId) { - // 清除之前的定时显示 - clearTimeout(this.showTimeoutId); - } - - var $container = this.$container; - if (!this._show) { - return; - } - // 隐藏并需改属性 - $container.hide(); - this._show = false; - } -}; - -/* - menu - header -*/ -// 构造函数 -function Head(editor) { - var _this = this; - - this.editor = editor; - this.$elem = $('
                  '); - this.type = 'droplist'; - - // 当前是否 active 状态 - this._active = false; - - // 初始化 droplist - this.droplist = new DropList(this, { - width: 100, - $title: $('

                  设置标题

                  '), - type: 'list', // droplist 以列表形式展示 - list: [{ $elem: $('

                  H1

                  '), value: '

                  ' }, { $elem: $('

                  H2

                  '), value: '

                  ' }, { $elem: $('

                  H3

                  '), value: '

                  ' }, { $elem: $('

                  H4

                  '), value: '

                  ' }, { $elem: $('

                  H5
                  '), value: '
                  ' }, { $elem: $('

                  正文

                  '), value: '

                  ' }], - onClick: function onClick(value) { - // 注意 this 是指向当前的 Head 对象 - _this._command(value); - } - }); -} - -// 原型 -Head.prototype = { - constructor: Head, - - // 执行命令 - _command: function _command(value) { - var editor = this.editor; - - var $selectionElem = editor.selection.getSelectionContainerElem(); - if (editor.$textElem.equal($selectionElem)) { - // 不能选中多行来设置标题,否则会出现问题 - // 例如选中的是

                  xxx

                  yyy

                  来设置标题,设置之后会成为

                  xxx
                  yyy

                  不符合预期 - return; - } - - editor.cmd.do('formatBlock', value); - }, - - // 试图改变 active 状态 - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - var reg = /^h/i; - var cmdValue = editor.cmd.queryCommandValue('formatBlock'); - if (reg.test(cmdValue)) { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - menu - fontSize -*/ - -// 构造函数 -function FontSize(editor) { - var _this = this; - - this.editor = editor; - this.$elem = $('
                  '); - this.type = 'droplist'; - - // 当前是否 active 状态 - this._active = false; - - // 初始化 droplist - this.droplist = new DropList(this, { - width: 160, - $title: $('

                  字号

                  '), - type: 'list', // droplist 以列表形式展示 - list: [{ $elem: $('x-small'), value: '1' }, { $elem: $('small'), value: '2' }, { $elem: $('normal'), value: '3' }, { $elem: $('large'), value: '4' }, { $elem: $('x-large'), value: '5' }, { $elem: $('xx-large'), value: '6' }], - onClick: function onClick(value) { - // 注意 this 是指向当前的 FontSize 对象 - _this._command(value); - } - }); -} - -// 原型 -FontSize.prototype = { - constructor: FontSize, - - // 执行命令 - _command: function _command(value) { - var editor = this.editor; - editor.cmd.do('fontSize', value); - } -}; - -/* - menu - fontName -*/ - -// 构造函数 -function FontName(editor) { - var _this = this; - - this.editor = editor; - this.$elem = $('
                  '); - this.type = 'droplist'; - - // 当前是否 active 状态 - this._active = false; - - // 获取配置的字体 - var config = editor.config; - var fontNames = config.fontNames || []; - - // 初始化 droplist - this.droplist = new DropList(this, { - width: 100, - $title: $('

                  字体

                  '), - type: 'list', // droplist 以列表形式展示 - list: fontNames.map(function (fontName) { - return { $elem: $('' + fontName + ''), value: fontName }; - }), - onClick: function onClick(value) { - // 注意 this 是指向当前的 FontName 对象 - _this._command(value); - } - }); -} - -// 原型 -FontName.prototype = { - constructor: FontName, - - _command: function _command(value) { - var editor = this.editor; - editor.cmd.do('fontName', value); - } -}; - -/* - panel -*/ - -var emptyFn = function emptyFn() {}; - -// 记录已经显示 panel 的菜单 -var _isCreatedPanelMenus = []; - -// 构造函数 -function Panel(menu, opt) { - this.menu = menu; - this.opt = opt; -} - -// 原型 -Panel.prototype = { - constructor: Panel, - - // 显示(插入DOM) - show: function show() { - var _this = this; - - var menu = this.menu; - if (_isCreatedPanelMenus.indexOf(menu) >= 0) { - // 该菜单已经创建了 panel 不能再创建 - return; - } - - var editor = menu.editor; - var $body = $('body'); - var $textContainerElem = editor.$textContainerElem; - var opt = this.opt; - - // panel 的容器 - var $container = $('
                  '); - var width = opt.width || 300; // 默认 300px - $container.css('width', width + 'px').css('margin-left', (0 - width) / 2 + 'px'); - - // 添加关闭按钮 - var $closeBtn = $(''); - $container.append($closeBtn); - $closeBtn.on('click', function () { - _this.hide(); - }); - - // 准备 tabs 容器 - var $tabTitleContainer = $('
                    '); - var $tabContentContainer = $('
                    '); - $container.append($tabTitleContainer).append($tabContentContainer); - - // 设置高度 - var height = opt.height; - if (height) { - $tabContentContainer.css('height', height + 'px').css('overflow-y', 'auto'); - } - - // tabs - var tabs = opt.tabs || []; - var tabTitleArr = []; - var tabContentArr = []; - tabs.forEach(function (tab, tabIndex) { - if (!tab) { - return; - } - var title = tab.title || ''; - var tpl = tab.tpl || ''; - - // 替换多语言 - title = replaceLang(editor, title); - tpl = replaceLang(editor, tpl); - - // 添加到 DOM - var $title = $('
                  • ' + title + '
                  • '); - $tabTitleContainer.append($title); - var $content = $(tpl); - $tabContentContainer.append($content); - - // 记录到内存 - $title._index = tabIndex; - tabTitleArr.push($title); - tabContentArr.push($content); - - // 设置 active 项 - if (tabIndex === 0) { - $title._active = true; - $title.addClass('w-e-active'); - } else { - $content.hide(); - } - - // 绑定 tab 的事件 - $title.on('click', function (e) { - if ($title._active) { - return; - } - // 隐藏所有的 tab - tabTitleArr.forEach(function ($title) { - $title._active = false; - $title.removeClass('w-e-active'); - }); - tabContentArr.forEach(function ($content) { - $content.hide(); - }); - - // 显示当前的 tab - $title._active = true; - $title.addClass('w-e-active'); - $content.show(); - }); - }); - - // 绑定关闭事件 - $container.on('click', function (e) { - // 点击时阻止冒泡 - e.stopPropagation(); - }); - $body.on('click', function (e) { - _this.hide(); - }); - - // 添加到 DOM - $textContainerElem.append($container); - - // 绑定 opt 的事件,只有添加到 DOM 之后才能绑定成功 - tabs.forEach(function (tab, index) { - if (!tab) { - return; - } - var events = tab.events || []; - events.forEach(function (event) { - var selector = event.selector; - var type = event.type; - var fn = event.fn || emptyFn; - var $content = tabContentArr[index]; - $content.find(selector).on(type, function (e) { - e.stopPropagation(); - var needToHide = fn(e); - // 执行完事件之后,是否要关闭 panel - if (needToHide) { - _this.hide(); - } - }); - }); - }); - - // focus 第一个 elem - var $inputs = $container.find('input[type=text],textarea'); - if ($inputs.length) { - $inputs.get(0).focus(); - } - - // 添加到属性 - this.$container = $container; - - // 隐藏其他 panel - this._hideOtherPanels(); - // 记录该 menu 已经创建了 panel - _isCreatedPanelMenus.push(menu); - }, - - // 隐藏(移除DOM) - hide: function hide() { - var menu = this.menu; - var $container = this.$container; - if ($container) { - $container.remove(); - } - - // 将该 menu 记录中移除 - _isCreatedPanelMenus = _isCreatedPanelMenus.filter(function (item) { - if (item === menu) { - return false; - } else { - return true; - } - }); - }, - - // 一个 panel 展示时,隐藏其他 panel - _hideOtherPanels: function _hideOtherPanels() { - if (!_isCreatedPanelMenus.length) { - return; - } - _isCreatedPanelMenus.forEach(function (menu) { - var panel = menu.panel || {}; - if (panel.hide) { - panel.hide(); - } - }); - } -}; - -/* - menu - link -*/ -// 构造函数 -function Link(editor) { - this.editor = editor; - this.$elem = $('
                    '); - this.type = 'panel'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Link.prototype = { - constructor: Link, - - // 点击事件 - onClick: function onClick(e) { - var editor = this.editor; - var $linkelem = void 0; - - if (this._active) { - // 当前选区在链接里面 - $linkelem = editor.selection.getSelectionContainerElem(); - if (!$linkelem) { - return; - } - // 将该元素都包含在选取之内,以便后面整体替换 - editor.selection.createRangeByElem($linkelem); - editor.selection.restoreSelection(); - // 显示 panel - this._createPanel($linkelem.text(), $linkelem.attr('href')); - } else { - // 当前选区不在链接里面 - if (editor.selection.isSelectionEmpty()) { - // 选区是空的,未选中内容 - this._createPanel('', ''); - } else { - // 选中内容了 - this._createPanel(editor.selection.getSelectionText(), ''); - } - } - }, - - // 创建 panel - _createPanel: function _createPanel(text, link) { - var _this = this; - - // panel 中需要用到的id - var inputLinkId = getRandom('input-link'); - var inputTextId = getRandom('input-text'); - var btnOkId = getRandom('btn-ok'); - var btnDelId = getRandom('btn-del'); - - // 是否显示“删除链接” - var delBtnDisplay = this._active ? 'inline-block' : 'none'; - - // 初始化并显示 panel - var panel = new Panel(this, { - width: 300, - // panel 中可包含多个 tab - tabs: [{ - // tab 的标题 - title: '链接', - // 模板 - tpl: '
                    \n \n \n
                    \n \n \n
                    \n
                    ', - // 事件绑定 - events: [ - // 插入链接 - { - selector: '#' + btnOkId, - type: 'click', - fn: function fn() { - // 执行插入链接 - var $link = $('#' + inputLinkId); - var $text = $('#' + inputTextId); - var link = $link.val(); - var text = $text.val(); - _this._insertLink(text, link); - - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }, - // 删除链接 - { - selector: '#' + btnDelId, - type: 'click', - fn: function fn() { - // 执行删除链接 - _this._delLink(); - - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }] - } // tab end - ] // tabs end - }); - - // 显示 panel - panel.show(); - - // 记录属性 - this.panel = panel; - }, - - // 删除当前链接 - _delLink: function _delLink() { - if (!this._active) { - return; - } - var editor = this.editor; - var $selectionELem = editor.selection.getSelectionContainerElem(); - if (!$selectionELem) { - return; - } - var selectionText = editor.selection.getSelectionText(); - editor.cmd.do('insertHTML', '' + selectionText + ''); - }, - - // 插入链接 - _insertLink: function _insertLink(text, link) { - var editor = this.editor; - var config = editor.config; - var linkCheck = config.linkCheck; - var checkResult = true; // 默认为 true - if (linkCheck && typeof linkCheck === 'function') { - checkResult = linkCheck(text, link); - } - if (checkResult === true) { - editor.cmd.do('insertHTML', '' + text + ''); - } else { - alert(checkResult); - } - }, - - // 试图改变 active 状态 - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - var $selectionELem = editor.selection.getSelectionContainerElem(); - if (!$selectionELem) { - return; - } - if ($selectionELem.getNodeName() === 'A') { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - italic-menu -*/ -// 构造函数 -function Italic(editor) { - this.editor = editor; - this.$elem = $('
                    \n \n
                    '); - this.type = 'click'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Italic.prototype = { - constructor: Italic, - - // 点击事件 - onClick: function onClick(e) { - // 点击菜单将触发这里 - - var editor = this.editor; - var isSeleEmpty = editor.selection.isSelectionEmpty(); - - if (isSeleEmpty) { - // 选区是空的,插入并选中一个“空白” - editor.selection.createEmptyRange(); - } - - // 执行 italic 命令 - editor.cmd.do('italic'); - - if (isSeleEmpty) { - // 需要将选取折叠起来 - editor.selection.collapseRange(); - editor.selection.restoreSelection(); - } - }, - - // 试图改变 active 状态 - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - if (editor.cmd.queryCommandState('italic')) { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - redo-menu -*/ -// 构造函数 -function Redo(editor) { - this.editor = editor; - this.$elem = $('
                    \n \n
                    '); - this.type = 'click'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Redo.prototype = { - constructor: Redo, - - // 点击事件 - onClick: function onClick(e) { - // 点击菜单将触发这里 - - var editor = this.editor; - - // 执行 redo 命令 - editor.cmd.do('redo'); - } -}; - -/* - strikeThrough-menu -*/ -// 构造函数 -function StrikeThrough(editor) { - this.editor = editor; - this.$elem = $('
                    \n \n
                    '); - this.type = 'click'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -StrikeThrough.prototype = { - constructor: StrikeThrough, - - // 点击事件 - onClick: function onClick(e) { - // 点击菜单将触发这里 - - var editor = this.editor; - var isSeleEmpty = editor.selection.isSelectionEmpty(); - - if (isSeleEmpty) { - // 选区是空的,插入并选中一个“空白” - editor.selection.createEmptyRange(); - } - - // 执行 strikeThrough 命令 - editor.cmd.do('strikeThrough'); - - if (isSeleEmpty) { - // 需要将选取折叠起来 - editor.selection.collapseRange(); - editor.selection.restoreSelection(); - } - }, - - // 试图改变 active 状态 - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - if (editor.cmd.queryCommandState('strikeThrough')) { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - underline-menu -*/ -// 构造函数 -function Underline(editor) { - this.editor = editor; - this.$elem = $('
                    \n \n
                    '); - this.type = 'click'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Underline.prototype = { - constructor: Underline, - - // 点击事件 - onClick: function onClick(e) { - // 点击菜单将触发这里 - - var editor = this.editor; - var isSeleEmpty = editor.selection.isSelectionEmpty(); - - if (isSeleEmpty) { - // 选区是空的,插入并选中一个“空白” - editor.selection.createEmptyRange(); - } - - // 执行 underline 命令 - editor.cmd.do('underline'); - - if (isSeleEmpty) { - // 需要将选取折叠起来 - editor.selection.collapseRange(); - editor.selection.restoreSelection(); - } - }, - - // 试图改变 active 状态 - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - if (editor.cmd.queryCommandState('underline')) { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - undo-menu -*/ -// 构造函数 -function Undo(editor) { - this.editor = editor; - this.$elem = $('
                    \n \n
                    '); - this.type = 'click'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Undo.prototype = { - constructor: Undo, - - // 点击事件 - onClick: function onClick(e) { - // 点击菜单将触发这里 - - var editor = this.editor; - - // 执行 undo 命令 - editor.cmd.do('undo'); - } -}; - -/* - menu - list -*/ -// 构造函数 -function List(editor) { - var _this = this; - - this.editor = editor; - this.$elem = $('
                    '); - this.type = 'droplist'; - - // 当前是否 active 状态 - this._active = false; - - // 初始化 droplist - this.droplist = new DropList(this, { - width: 120, - $title: $('

                    设置列表

                    '), - type: 'list', // droplist 以列表形式展示 - list: [{ $elem: $(' 有序列表'), value: 'insertOrderedList' }, { $elem: $(' 无序列表'), value: 'insertUnorderedList' }], - onClick: function onClick(value) { - // 注意 this 是指向当前的 List 对象 - _this._command(value); - } - }); -} - -// 原型 -List.prototype = { - constructor: List, - - // 执行命令 - _command: function _command(value) { - var editor = this.editor; - var $textElem = editor.$textElem; - editor.selection.restoreSelection(); - if (editor.cmd.queryCommandState(value)) { - return; - } - editor.cmd.do(value); - - // 验证列表是否被包裹在

                    之内 - var $selectionElem = editor.selection.getSelectionContainerElem(); - if ($selectionElem.getNodeName() === 'LI') { - $selectionElem = $selectionElem.parent(); - } - if (/^ol|ul$/i.test($selectionElem.getNodeName()) === false) { - return; - } - if ($selectionElem.equal($textElem)) { - // 证明是顶级标签,没有被

                    包裹 - return; - } - var $parent = $selectionElem.parent(); - if ($parent.equal($textElem)) { - // $parent 是顶级标签,不能删除 - return; - } - - $selectionElem.insertAfter($parent); - $parent.remove(); - }, - - // 试图改变 active 状态 - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - if (editor.cmd.queryCommandState('insertUnOrderedList') || editor.cmd.queryCommandState('insertOrderedList')) { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - menu - justify -*/ -// 构造函数 -function Justify(editor) { - var _this = this; - - this.editor = editor; - this.$elem = $('

                    '); - this.type = 'droplist'; - - // 当前是否 active 状态 - this._active = false; - - // 初始化 droplist - this.droplist = new DropList(this, { - width: 100, - $title: $('

                    对齐方式

                    '), - type: 'list', // droplist 以列表形式展示 - list: [{ $elem: $(' 靠左'), value: 'justifyLeft' }, { $elem: $(' 居中'), value: 'justifyCenter' }, { $elem: $(' 靠右'), value: 'justifyRight' }], - onClick: function onClick(value) { - // 注意 this 是指向当前的 List 对象 - _this._command(value); - } - }); -} - -// 原型 -Justify.prototype = { - constructor: Justify, - - // 执行命令 - _command: function _command(value) { - var editor = this.editor; - editor.cmd.do(value); - } -}; - -/* - menu - Forecolor -*/ -// 构造函数 -function ForeColor(editor) { - var _this = this; - - this.editor = editor; - this.$elem = $('
                    '); - this.type = 'droplist'; - - // 获取配置的颜色 - var config = editor.config; - var colors = config.colors || []; - - // 当前是否 active 状态 - this._active = false; - - // 初始化 droplist - this.droplist = new DropList(this, { - width: 120, - $title: $('

                    文字颜色

                    '), - type: 'inline-block', // droplist 内容以 block 形式展示 - list: colors.map(function (color) { - return { $elem: $(''), value: color }; - }), - onClick: function onClick(value) { - // 注意 this 是指向当前的 ForeColor 对象 - _this._command(value); - } - }); -} - -// 原型 -ForeColor.prototype = { - constructor: ForeColor, - - // 执行命令 - _command: function _command(value) { - var editor = this.editor; - editor.cmd.do('foreColor', value); - } -}; - -/* - menu - BackColor -*/ -// 构造函数 -function BackColor(editor) { - var _this = this; - - this.editor = editor; - this.$elem = $('
                    '); - this.type = 'droplist'; - - // 获取配置的颜色 - var config = editor.config; - var colors = config.colors || []; - - // 当前是否 active 状态 - this._active = false; - - // 初始化 droplist - this.droplist = new DropList(this, { - width: 120, - $title: $('

                    背景色

                    '), - type: 'inline-block', // droplist 内容以 block 形式展示 - list: colors.map(function (color) { - return { $elem: $(''), value: color }; - }), - onClick: function onClick(value) { - // 注意 this 是指向当前的 BackColor 对象 - _this._command(value); - } - }); -} - -// 原型 -BackColor.prototype = { - constructor: BackColor, - - // 执行命令 - _command: function _command(value) { - var editor = this.editor; - editor.cmd.do('backColor', value); - } -}; - -/* - menu - quote -*/ -// 构造函数 -function Quote(editor) { - this.editor = editor; - this.$elem = $('
                    \n \n
                    '); - this.type = 'click'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Quote.prototype = { - constructor: Quote, - - onClick: function onClick(e) { - var editor = this.editor; - var $selectionElem = editor.selection.getSelectionContainerElem(); - var nodeName = $selectionElem.getNodeName(); - - if (!UA.isIE()) { - if (nodeName === 'BLOCKQUOTE') { - // 撤销 quote - editor.cmd.do('formatBlock', '

                    '); - } else { - // 转换为 quote - editor.cmd.do('formatBlock', '

                    '); - } - return; - } - - // IE 中不支持 formatBlock
                    ,要用其他方式兼容 - var content = void 0, - $targetELem = void 0; - if (nodeName === 'P') { - // 将 P 转换为 quote - content = $selectionElem.text(); - $targetELem = $('
                    ' + content + '
                    '); - $targetELem.insertAfter($selectionElem); - $selectionElem.remove(); - return; - } - if (nodeName === 'BLOCKQUOTE') { - // 撤销 quote - content = $selectionElem.text(); - $targetELem = $('

                    ' + content + '

                    '); - $targetELem.insertAfter($selectionElem); - $selectionElem.remove(); - } - }, - - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - var reg = /^BLOCKQUOTE$/i; - var cmdValue = editor.cmd.queryCommandValue('formatBlock'); - if (reg.test(cmdValue)) { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - menu - code -*/ -// 构造函数 -function Code(editor) { - this.editor = editor; - this.$elem = $('
                    \n \n
                    '); - this.type = 'panel'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Code.prototype = { - constructor: Code, - - onClick: function onClick(e) { - var editor = this.editor; - var $startElem = editor.selection.getSelectionStartElem(); - var $endElem = editor.selection.getSelectionEndElem(); - var isSeleEmpty = editor.selection.isSelectionEmpty(); - var selectionText = editor.selection.getSelectionText(); - var $code = void 0; - - if (!$startElem.equal($endElem)) { - // 跨元素选择,不做处理 - editor.selection.restoreSelection(); - return; - } - if (!isSeleEmpty) { - // 选取不是空,用 包裹即可 - $code = $('' + selectionText + ''); - editor.cmd.do('insertElem', $code); - editor.selection.createRangeByElem($code, false); - editor.selection.restoreSelection(); - return; - } - - // 选取是空,且没有夸元素选择,则插入
                    
                    -        if (this._active) {
                    -            // 选中状态,将编辑内容
                    -            this._createPanel($startElem.html());
                    -        } else {
                    -            // 未选中状态,将创建内容
                    -            this._createPanel();
                    -        }
                    -    },
                    -
                    -    _createPanel: function _createPanel(value) {
                    -        var _this = this;
                    -
                    -        // value - 要编辑的内容
                    -        value = value || '';
                    -        var type = !value ? 'new' : 'edit';
                    -        var textId = getRandom('texxt');
                    -        var btnId = getRandom('btn');
                    -
                    -        var panel = new Panel(this, {
                    -            width: 500,
                    -            // 一个 Panel 包含多个 tab
                    -            tabs: [{
                    -                // 标题
                    -                title: '插入代码',
                    -                // 模板
                    -                tpl: '
                    \n \n
                    \n \n
                    \n
                    ', - // 事件绑定 - events: [ - // 插入代码 - { - selector: '#' + btnId, - type: 'click', - fn: function fn() { - var $text = $('#' + textId); - var text = $text.val() || $text.html(); - text = replaceHtmlSymbol(text); - if (type === 'new') { - // 新插入 - _this._insertCode(text); - } else { - // 编辑更新 - _this._updateCode(text); - } - - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }] - } // first tab end - ] // tabs end - }); // new Panel end - - // 显示 panel - panel.show(); - - // 记录属性 - this.panel = panel; - }, - - // 插入代码 - _insertCode: function _insertCode(value) { - var editor = this.editor; - editor.cmd.do('insertHTML', '
                    ' + value + '


                    '); - }, - - // 更新代码 - _updateCode: function _updateCode(value) { - var editor = this.editor; - var $selectionELem = editor.selection.getSelectionContainerElem(); - if (!$selectionELem) { - return; - } - $selectionELem.html(value); - editor.selection.restoreSelection(); - }, - - // 试图改变 active 状态 - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - var $selectionELem = editor.selection.getSelectionContainerElem(); - if (!$selectionELem) { - return; - } - var $parentElem = $selectionELem.parent(); - if ($selectionELem.getNodeName() === 'CODE' && $parentElem.getNodeName() === 'PRE') { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - menu - emoticon -*/ -// 构造函数 -function Emoticon(editor) { - this.editor = editor; - this.$elem = $('
                    \n \n
                    '); - this.type = 'panel'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Emoticon.prototype = { - constructor: Emoticon, - - onClick: function onClick() { - this._createPanel(); - }, - - _createPanel: function _createPanel() { - var _this = this; - - var editor = this.editor; - var config = editor.config; - // 获取表情配置 - var emotions = config.emotions || []; - - // 创建表情 dropPanel 的配置 - var tabConfig = []; - emotions.forEach(function (emotData) { - var emotType = emotData.type; - var content = emotData.content || []; - - // 这一组表情最终拼接出来的 html - var faceHtml = ''; - - // emoji 表情 - if (emotType === 'emoji') { - content.forEach(function (item) { - if (item) { - faceHtml += '' + item + ''; - } - }); - } - // 图片表情 - if (emotType === 'image') { - content.forEach(function (item) { - var src = item.src; - var alt = item.alt; - if (src) { - // 加一个 data-w-e 属性,点击图片的时候不再提示编辑图片 - faceHtml += '' + alt + ''; - } - }); - } - - tabConfig.push({ - title: emotData.title, - tpl: '
                    ' + faceHtml + '
                    ', - events: [{ - selector: 'span.w-e-item', - type: 'click', - fn: function fn(e) { - var target = e.target; - var $target = $(target); - var nodeName = $target.getNodeName(); - - var insertHtml = void 0; - if (nodeName === 'IMG') { - // 插入图片 - insertHtml = $target.parent().html(); - } else { - // 插入 emoji - insertHtml = '' + $target.html() + ''; - } - - _this._insert(insertHtml); - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }] - }); - }); - - var panel = new Panel(this, { - width: 300, - height: 200, - // 一个 Panel 包含多个 tab - tabs: tabConfig - }); - - // 显示 panel - panel.show(); - - // 记录属性 - this.panel = panel; - }, - - // 插入表情 - _insert: function _insert(emotHtml) { - var editor = this.editor; - editor.cmd.do('insertHTML', emotHtml); - } -}; - -/* - menu - table -*/ -// 构造函数 -function Table(editor) { - this.editor = editor; - this.$elem = $('
                    '); - this.type = 'panel'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Table.prototype = { - constructor: Table, - - onClick: function onClick() { - if (this._active) { - // 编辑现有表格 - this._createEditPanel(); - } else { - // 插入新表格 - this._createInsertPanel(); - } - }, - - // 创建插入新表格的 panel - _createInsertPanel: function _createInsertPanel() { - var _this = this; - - // 用到的 id - var btnInsertId = getRandom('btn'); - var textRowNum = getRandom('row'); - var textColNum = getRandom('col'); - - var panel = new Panel(this, { - width: 250, - // panel 包含多个 tab - tabs: [{ - // 标题 - title: '插入表格', - // 模板 - tpl: '
                    \n

                    \n \u521B\u5EFA\n \n \u884C\n \n \u5217\u7684\u8868\u683C\n

                    \n
                    \n \n
                    \n
                    ', - // 事件绑定 - events: [{ - // 点击按钮,插入表格 - selector: '#' + btnInsertId, - type: 'click', - fn: function fn() { - var rowNum = parseInt($('#' + textRowNum).val()); - var colNum = parseInt($('#' + textColNum).val()); - - if (rowNum && colNum && rowNum > 0 && colNum > 0) { - // form 数据有效 - _this._insert(rowNum, colNum); - } - - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }] - } // first tab end - ] // tabs end - }); // panel end - - // 展示 panel - panel.show(); - - // 记录属性 - this.panel = panel; - }, - - // 插入表格 - _insert: function _insert(rowNum, colNum) { - // 拼接 table 模板 - var r = void 0, - c = void 0; - var html = ''; - for (r = 0; r < rowNum; r++) { - html += ''; - if (r === 0) { - for (c = 0; c < colNum; c++) { - html += ''; - } - } else { - for (c = 0; c < colNum; c++) { - html += ''; - } - } - html += ''; - } - html += '
                      


                    '; - - // 执行命令 - var editor = this.editor; - editor.cmd.do('insertHTML', html); - - // 防止 firefox 下出现 resize 的控制点 - editor.cmd.do('enableObjectResizing', false); - editor.cmd.do('enableInlineTableEditing', false); - }, - - // 创建编辑表格的 panel - _createEditPanel: function _createEditPanel() { - var _this2 = this; - - // 可用的 id - var addRowBtnId = getRandom('add-row'); - var addColBtnId = getRandom('add-col'); - var delRowBtnId = getRandom('del-row'); - var delColBtnId = getRandom('del-col'); - var delTableBtnId = getRandom('del-table'); - - // 创建 panel 对象 - var panel = new Panel(this, { - width: 320, - // panel 包含多个 tab - tabs: [{ - // 标题 - title: '编辑表格', - // 模板 - tpl: '
                    \n
                    \n \n \n \n \n
                    \n
                    \n \n \n
                    ', - // 事件绑定 - events: [{ - // 增加行 - selector: '#' + addRowBtnId, - type: 'click', - fn: function fn() { - _this2._addRow(); - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }, { - // 增加列 - selector: '#' + addColBtnId, - type: 'click', - fn: function fn() { - _this2._addCol(); - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }, { - // 删除行 - selector: '#' + delRowBtnId, - type: 'click', - fn: function fn() { - _this2._delRow(); - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }, { - // 删除列 - selector: '#' + delColBtnId, - type: 'click', - fn: function fn() { - _this2._delCol(); - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }, { - // 删除表格 - selector: '#' + delTableBtnId, - type: 'click', - fn: function fn() { - _this2._delTable(); - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }] - }] - }); - // 显示 panel - panel.show(); - }, - - // 获取选中的单元格的位置信息 - _getLocationData: function _getLocationData() { - var result = {}; - var editor = this.editor; - var $selectionELem = editor.selection.getSelectionContainerElem(); - if (!$selectionELem) { - return; - } - var nodeName = $selectionELem.getNodeName(); - if (nodeName !== 'TD' && nodeName !== 'TH') { - return; - } - - // 获取 td index - var $tr = $selectionELem.parent(); - var $tds = $tr.children(); - var tdLength = $tds.length; - $tds.forEach(function (td, index) { - if (td === $selectionELem[0]) { - // 记录并跳出循环 - result.td = { - index: index, - elem: td, - length: tdLength - }; - return false; - } - }); - - // 获取 tr index - var $tbody = $tr.parent(); - var $trs = $tbody.children(); - var trLength = $trs.length; - $trs.forEach(function (tr, index) { - if (tr === $tr[0]) { - // 记录并跳出循环 - result.tr = { - index: index, - elem: tr, - length: trLength - }; - return false; - } - }); - - // 返回结果 - return result; - }, - - // 增加行 - _addRow: function _addRow() { - // 获取当前单元格的位置信息 - var locationData = this._getLocationData(); - if (!locationData) { - return; - } - var trData = locationData.tr; - var $currentTr = $(trData.elem); - var tdData = locationData.td; - var tdLength = tdData.length; - - // 拼接即将插入的字符串 - var newTr = document.createElement('tr'); - var tpl = '', - i = void 0; - for (i = 0; i < tdLength; i++) { - tpl += ' '; - } - newTr.innerHTML = tpl; - // 插入 - $(newTr).insertAfter($currentTr); - }, - - // 增加列 - _addCol: function _addCol() { - // 获取当前单元格的位置信息 - var locationData = this._getLocationData(); - if (!locationData) { - return; - } - var trData = locationData.tr; - var tdData = locationData.td; - var tdIndex = tdData.index; - var $currentTr = $(trData.elem); - var $trParent = $currentTr.parent(); - var $trs = $trParent.children(); - - // 遍历所有行 - $trs.forEach(function (tr) { - var $tr = $(tr); - var $tds = $tr.children(); - var $currentTd = $tds.get(tdIndex); - var name = $currentTd.getNodeName().toLowerCase(); - - // new 一个 td,并插入 - var newTd = document.createElement(name); - $(newTd).insertAfter($currentTd); - }); - }, - - // 删除行 - _delRow: function _delRow() { - // 获取当前单元格的位置信息 - var locationData = this._getLocationData(); - if (!locationData) { - return; - } - var trData = locationData.tr; - var $currentTr = $(trData.elem); - $currentTr.remove(); - }, - - // 删除列 - _delCol: function _delCol() { - // 获取当前单元格的位置信息 - var locationData = this._getLocationData(); - if (!locationData) { - return; - } - var trData = locationData.tr; - var tdData = locationData.td; - var tdIndex = tdData.index; - var $currentTr = $(trData.elem); - var $trParent = $currentTr.parent(); - var $trs = $trParent.children(); - - // 遍历所有行 - $trs.forEach(function (tr) { - var $tr = $(tr); - var $tds = $tr.children(); - var $currentTd = $tds.get(tdIndex); - // 删除 - $currentTd.remove(); - }); - }, - - // 删除表格 - _delTable: function _delTable() { - var editor = this.editor; - var $selectionELem = editor.selection.getSelectionContainerElem(); - if (!$selectionELem) { - return; - } - var $table = $selectionELem.parentUntil('table'); - if (!$table) { - return; - } - $table.remove(); - }, - - // 试图改变 active 状态 - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - var $selectionELem = editor.selection.getSelectionContainerElem(); - if (!$selectionELem) { - return; - } - var nodeName = $selectionELem.getNodeName(); - if (nodeName === 'TD' || nodeName === 'TH') { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - menu - video -*/ -// 构造函数 -function Video(editor) { - this.editor = editor; - this.$elem = $('
                    '); - this.type = 'panel'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Video.prototype = { - constructor: Video, - - onClick: function onClick() { - this._createPanel(); - }, - - _createPanel: function _createPanel() { - var _this = this; - - // 创建 id - var textValId = getRandom('text-val'); - var btnId = getRandom('btn'); - - // 创建 panel - var panel = new Panel(this, { - width: 350, - // 一个 panel 多个 tab - tabs: [{ - // 标题 - title: '插入视频', - // 模板 - tpl: '
                    \n \n
                    \n \n
                    \n
                    ', - // 事件绑定 - events: [{ - selector: '#' + btnId, - type: 'click', - fn: function fn() { - var $text = $('#' + textValId); - var val = $text.val().trim(); - - // 测试用视频地址 - // - - if (val) { - // 插入视频 - _this._insert(val); - } - - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }] - } // first tab end - ] // tabs end - }); // panel end - - // 显示 panel - panel.show(); - - // 记录属性 - this.panel = panel; - }, - - // 插入视频 - _insert: function _insert(val) { - var editor = this.editor; - editor.cmd.do('insertHTML', val + '


                    '); - } -}; - -/* - menu - img -*/ -// 构造函数 -function Image(editor) { - this.editor = editor; - var imgMenuId = getRandom('w-e-img'); - this.$elem = $('
                    '); - editor.imgMenuId = imgMenuId; - this.type = 'panel'; - - // 当前是否 active 状态 - this._active = false; -} - -// 原型 -Image.prototype = { - constructor: Image, - - onClick: function onClick() { - var editor = this.editor; - var config = editor.config; - if (config.qiniu) { - return; - } - if (this._active) { - this._createEditPanel(); - } else { - this._createInsertPanel(); - } - }, - - _createEditPanel: function _createEditPanel() { - var editor = this.editor; - - // id - var width30 = getRandom('width-30'); - var width50 = getRandom('width-50'); - var width100 = getRandom('width-100'); - var delBtn = getRandom('del-btn'); - - // tab 配置 - var tabsConfig = [{ - title: '编辑图片', - tpl: '
                    \n
                    \n \u6700\u5927\u5BBD\u5EA6\uFF1A\n \n \n \n
                    \n
                    \n \n \n
                    ', - events: [{ - selector: '#' + width30, - type: 'click', - fn: function fn() { - var $img = editor._selectedImg; - if ($img) { - $img.css('max-width', '30%'); - } - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }, { - selector: '#' + width50, - type: 'click', - fn: function fn() { - var $img = editor._selectedImg; - if ($img) { - $img.css('max-width', '50%'); - } - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }, { - selector: '#' + width100, - type: 'click', - fn: function fn() { - var $img = editor._selectedImg; - if ($img) { - $img.css('max-width', '100%'); - } - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }, { - selector: '#' + delBtn, - type: 'click', - fn: function fn() { - var $img = editor._selectedImg; - if ($img) { - $img.remove(); - } - // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 - return true; - } - }] - }]; - - // 创建 panel 并显示 - var panel = new Panel(this, { - width: 300, - tabs: tabsConfig - }); - panel.show(); - - // 记录属性 - this.panel = panel; - }, - - _createInsertPanel: function _createInsertPanel() { - var editor = this.editor; - var uploadImg = editor.uploadImg; - var config = editor.config; - - // id - var upTriggerId = getRandom('up-trigger'); - var upFileId = getRandom('up-file'); - var linkUrlId = getRandom('link-url'); - var linkBtnId = getRandom('link-btn'); - - // tabs 的配置 - var tabsConfig = [{ - title: '上传图片', - tpl: '
                    \n
                    \n \n
                    \n
                    \n \n
                    \n
                    ', - events: [{ - // 触发选择图片 - selector: '#' + upTriggerId, - type: 'click', - fn: function fn() { - var $file = $('#' + upFileId); - var fileElem = $file[0]; - if (fileElem) { - fileElem.click(); - } else { - // 返回 true 可关闭 panel - return true; - } - } - }, { - // 选择图片完毕 - selector: '#' + upFileId, - type: 'change', - fn: function fn() { - var $file = $('#' + upFileId); - var fileElem = $file[0]; - if (!fileElem) { - // 返回 true 可关闭 panel - return true; - } - - // 获取选中的 file 对象列表 - var fileList = fileElem.files; - if (fileList.length) { - uploadImg.uploadImg(fileList); - } - - // 返回 true 可关闭 panel - return true; - } - }] - }, // first tab end - { - title: '网络图片', - tpl: '
                    \n \n
                    \n \n
                    \n
                    ', - events: [{ - selector: '#' + linkBtnId, - type: 'click', - fn: function fn() { - var $linkUrl = $('#' + linkUrlId); - var url = $linkUrl.val().trim(); - - if (url) { - uploadImg.insertLinkImg(url); - } - - // 返回 true 表示函数执行结束之后关闭 panel - return true; - } - }] - } // second tab end - ]; // tabs end - - // 判断 tabs 的显示 - var tabsConfigResult = []; - if ((config.uploadImgShowBase64 || config.uploadImgServer || config.customUploadImg) && window.FileReader) { - // 显示“上传图片” - tabsConfigResult.push(tabsConfig[0]); - } - if (config.showLinkImg) { - // 显示“网络图片” - tabsConfigResult.push(tabsConfig[1]); - } - - // 创建 panel 并显示 - var panel = new Panel(this, { - width: 300, - tabs: tabsConfigResult - }); - panel.show(); - - // 记录属性 - this.panel = panel; - }, - - // 试图改变 active 状态 - tryChangeActive: function tryChangeActive(e) { - var editor = this.editor; - var $elem = this.$elem; - if (editor._selectedImg) { - this._active = true; - $elem.addClass('w-e-active'); - } else { - this._active = false; - $elem.removeClass('w-e-active'); - } - } -}; - -/* - 所有菜单的汇总 -*/ - -// 存储菜单的构造函数 -var MenuConstructors = {}; - -MenuConstructors.bold = Bold; - -MenuConstructors.head = Head; - -MenuConstructors.fontSize = FontSize; - -MenuConstructors.fontName = FontName; - -MenuConstructors.link = Link; - -MenuConstructors.italic = Italic; - -MenuConstructors.redo = Redo; - -MenuConstructors.strikeThrough = StrikeThrough; - -MenuConstructors.underline = Underline; - -MenuConstructors.undo = Undo; - -MenuConstructors.list = List; - -MenuConstructors.justify = Justify; - -MenuConstructors.foreColor = ForeColor; - -MenuConstructors.backColor = BackColor; - -MenuConstructors.quote = Quote; - -MenuConstructors.code = Code; - -MenuConstructors.emoticon = Emoticon; - -MenuConstructors.table = Table; - -MenuConstructors.video = Video; - -MenuConstructors.image = Image; - -/* - 菜单集合 -*/ -// 构造函数 -function Menus(editor) { - this.editor = editor; - this.menus = {}; -} - -// 修改原型 -Menus.prototype = { - constructor: Menus, - - // 初始化菜单 - init: function init() { - var _this = this; - - var editor = this.editor; - var config = editor.config || {}; - var configMenus = config.menus || []; // 获取配置中的菜单 - - // 根据配置信息,创建菜单 - configMenus.forEach(function (menuKey) { - var MenuConstructor = MenuConstructors[menuKey]; - if (MenuConstructor && typeof MenuConstructor === 'function') { - // 创建单个菜单 - _this.menus[menuKey] = new MenuConstructor(editor); - } - }); - - // 添加到菜单栏 - this._addToToolbar(); - - // 绑定事件 - this._bindEvent(); - }, - - // 添加到菜单栏 - _addToToolbar: function _addToToolbar() { - var editor = this.editor; - var $toolbarElem = editor.$toolbarElem; - var menus = this.menus; - var config = editor.config; - // config.zIndex 是配置的编辑区域的 z-index,菜单的 z-index 得在其基础上 +1 - var zIndex = config.zIndex + 1; - objForEach(menus, function (key, menu) { - var $elem = menu.$elem; - if ($elem) { - // 设置 z-index - $elem.css('z-index', zIndex); - $toolbarElem.append($elem); - } - }); - }, - - // 绑定菜单 click mouseenter 事件 - _bindEvent: function _bindEvent() { - var menus = this.menus; - var editor = this.editor; - objForEach(menus, function (key, menu) { - var type = menu.type; - if (!type) { - return; - } - var $elem = menu.$elem; - var droplist = menu.droplist; - var panel = menu.panel; - - // 点击类型,例如 bold - if (type === 'click' && menu.onClick) { - $elem.on('click', function (e) { - if (editor.selection.getRange() == null) { - return; - } - menu.onClick(e); - }); - } - - // 下拉框,例如 head - if (type === 'droplist' && droplist) { - $elem.on('mouseenter', function (e) { - if (editor.selection.getRange() == null) { - return; - } - // 显示 - droplist.showTimeoutId = setTimeout(function () { - droplist.show(); - }, 200); - }).on('mouseleave', function (e) { - // 隐藏 - droplist.hideTimeoutId = setTimeout(function () { - droplist.hide(); - }, 0); - }); - } - - // 弹框类型,例如 link - if (type === 'panel' && menu.onClick) { - $elem.on('click', function (e) { - e.stopPropagation(); - if (editor.selection.getRange() == null) { - return; - } - // 在自定义事件中显示 panel - menu.onClick(e); - }); - } - }); - }, - - // 尝试修改菜单状态 - changeActive: function changeActive() { - var menus = this.menus; - objForEach(menus, function (key, menu) { - if (menu.tryChangeActive) { - setTimeout(function () { - menu.tryChangeActive(); - }, 100); - } - }); - } -}; - -/* - 粘贴信息的处理 -*/ - -// 获取粘贴的纯文本 -function getPasteText(e) { - var clipboardData = e.clipboardData || e.originalEvent && e.originalEvent.clipboardData; - var pasteText = void 0; - if (clipboardData == null) { - pasteText = window.clipboardData && window.clipboardData.getData('text'); - } else { - pasteText = clipboardData.getData('text/plain'); - } - - return replaceHtmlSymbol(pasteText); -} - -// 获取粘贴的html -function getPasteHtml(e, filterStyle, ignoreImg) { - var clipboardData = e.clipboardData || e.originalEvent && e.originalEvent.clipboardData; - var pasteText = void 0, - pasteHtml = void 0; - if (clipboardData == null) { - pasteText = window.clipboardData && window.clipboardData.getData('text'); - } else { - pasteText = clipboardData.getData('text/plain'); - pasteHtml = clipboardData.getData('text/html'); - } - if (!pasteHtml && pasteText) { - pasteHtml = '

                    ' + replaceHtmlSymbol(pasteText) + '

                    '; - } - if (!pasteHtml) { - return; - } - - // 过滤word中状态过来的无用字符 - var docSplitHtml = pasteHtml.split(''); - if (docSplitHtml.length === 2) { - pasteHtml = docSplitHtml[0]; - } - - // 过滤无用标签 - pasteHtml = pasteHtml.replace(/<(meta|script|link).+?>/igm, ''); - // 去掉注释 - pasteHtml = pasteHtml.replace(//mg, ''); - // 过滤 data-xxx 属性 - pasteHtml = pasteHtml.replace(/\s?data-.+?=('|").+?('|")/igm, ''); - - if (ignoreImg) { - // 忽略图片 - pasteHtml = pasteHtml.replace(//igm, ''); - } - - if (filterStyle) { - // 过滤样式 - pasteHtml = pasteHtml.replace(/\s?(class|style)=('|").*?('|")/igm, ''); - } else { - // 保留样式 - pasteHtml = pasteHtml.replace(/\s?class=('|").*?('|")/igm, ''); - } - - return pasteHtml; -} - -// 获取粘贴的图片文件 -function getPasteImgs(e) { - var result = []; - var txt = getPasteText(e); - if (txt) { - // 有文字,就忽略图片 - return result; - } - - var clipboardData = e.clipboardData || e.originalEvent && e.originalEvent.clipboardData || {}; - var items = clipboardData.items; - if (!items) { - return result; - } - - objForEach(items, function (key, value) { - var type = value.type; - if (/image/i.test(type)) { - result.push(value.getAsFile()); - } - }); - - return result; -} - -/* - 编辑区域 -*/ - -// 获取一个 elem.childNodes 的 JSON 数据 -function getChildrenJSON($elem) { - var result = []; - var $children = $elem.childNodes() || []; // 注意 childNodes() 可以获取文本节点 - $children.forEach(function (curElem) { - var elemResult = void 0; - var nodeType = curElem.nodeType; - - // 文本节点 - if (nodeType === 3) { - elemResult = curElem.textContent; - elemResult = replaceHtmlSymbol(elemResult); - } - - // 普通 DOM 节点 - if (nodeType === 1) { - elemResult = {}; - - // tag - elemResult.tag = curElem.nodeName.toLowerCase(); - // attr - var attrData = []; - var attrList = curElem.attributes || {}; - var attrListLength = attrList.length || 0; - for (var i = 0; i < attrListLength; i++) { - var attr = attrList[i]; - attrData.push({ - name: attr.name, - value: attr.value - }); - } - elemResult.attrs = attrData; - // children(递归) - elemResult.children = getChildrenJSON($(curElem)); - } - - result.push(elemResult); - }); - return result; -} - -// 构造函数 -function Text(editor) { - this.editor = editor; -} - -// 修改原型 -Text.prototype = { - constructor: Text, - - // 初始化 - init: function init() { - // 绑定事件 - this._bindEvent(); - }, - - // 清空内容 - clear: function clear() { - this.html('


                    '); - }, - - // 获取 设置 html - html: function html(val) { - var editor = this.editor; - var $textElem = editor.$textElem; - var html = void 0; - if (val == null) { - html = $textElem.html(); - // 未选中任何内容的时候点击“加粗”或者“斜体”等按钮,就得需要一个空的占位符 ​ ,这里替换掉 - html = html.replace(/\u200b/gm, ''); - return html; - } else { - $textElem.html(val); - - // 初始化选取,将光标定位到内容尾部 - editor.initSelection(); - } - }, - - // 获取 JSON - getJSON: function getJSON() { - var editor = this.editor; - var $textElem = editor.$textElem; - return getChildrenJSON($textElem); - }, - - // 获取 设置 text - text: function text(val) { - var editor = this.editor; - var $textElem = editor.$textElem; - var text = void 0; - if (val == null) { - text = $textElem.text(); - // 未选中任何内容的时候点击“加粗”或者“斜体”等按钮,就得需要一个空的占位符 ​ ,这里替换掉 - text = text.replace(/\u200b/gm, ''); - return text; - } else { - $textElem.text('

                    ' + val + '

                    '); - - // 初始化选取,将光标定位到内容尾部 - editor.initSelection(); - } - }, - - // 追加内容 - append: function append(html) { - var editor = this.editor; - var $textElem = editor.$textElem; - $textElem.append($(html)); - - // 初始化选取,将光标定位到内容尾部 - editor.initSelection(); - }, - - // 绑定事件 - _bindEvent: function _bindEvent() { - // 实时保存选取 - this._saveRangeRealTime(); - - // 按回车建时的特殊处理 - this._enterKeyHandle(); - - // 清空时保留


                    - this._clearHandle(); - - // 粘贴事件(粘贴文字,粘贴图片) - this._pasteHandle(); - - // tab 特殊处理 - this._tabHandle(); - - // img 点击 - this._imgHandle(); - - // 拖拽事件 - this._dragHandle(); - }, - - // 实时保存选取 - _saveRangeRealTime: function _saveRangeRealTime() { - var editor = this.editor; - var $textElem = editor.$textElem; - - // 保存当前的选区 - function saveRange(e) { - // 随时保存选区 - editor.selection.saveRange(); - // 更新按钮 ative 状态 - editor.menus.changeActive(); - } - // 按键后保存 - $textElem.on('keyup', saveRange); - $textElem.on('mousedown', function (e) { - // mousedown 状态下,鼠标滑动到编辑区域外面,也需要保存选区 - $textElem.on('mouseleave', saveRange); - }); - $textElem.on('mouseup', function (e) { - saveRange(); - // 在编辑器区域之内完成点击,取消鼠标滑动到编辑区外面的事件 - $textElem.off('mouseleave', saveRange); - }); - }, - - // 按回车键时的特殊处理 - _enterKeyHandle: function _enterKeyHandle() { - var editor = this.editor; - var $textElem = editor.$textElem; - - function insertEmptyP($selectionElem) { - var $p = $('


                    '); - $p.insertBefore($selectionElem); - editor.selection.createRangeByElem($p, true); - editor.selection.restoreSelection(); - $selectionElem.remove(); - } - - // 将回车之后生成的非

                    的顶级标签,改为

                    - function pHandle(e) { - var $selectionElem = editor.selection.getSelectionContainerElem(); - var $parentElem = $selectionElem.parent(); - - if ($parentElem.html() === '
                    ') { - // 回车之前光标所在一个

                    .....

                    ,忽然回车生成一个空的


                    - // 而且继续回车跳不出去,因此只能特殊处理 - insertEmptyP($selectionElem); - return; - } - - if (!$parentElem.equal($textElem)) { - // 不是顶级标签 - return; - } - - var nodeName = $selectionElem.getNodeName(); - if (nodeName === 'P') { - // 当前的标签是 P ,不用做处理 - return; - } - - if ($selectionElem.text()) { - // 有内容,不做处理 - return; - } - - // 插入

                    ,并将选取定位到

                    ,删除当前标签 - insertEmptyP($selectionElem); - } - - $textElem.on('keyup', function (e) { - if (e.keyCode !== 13) { - // 不是回车键 - return; - } - // 将回车之后生成的非

                    的顶级标签,改为

                    - pHandle(e); - }); - - //

                    回车时 特殊处理 - function codeHandle(e) { - var $selectionElem = editor.selection.getSelectionContainerElem(); - if (!$selectionElem) { - return; - } - var $parentElem = $selectionElem.parent(); - var selectionNodeName = $selectionElem.getNodeName(); - var parentNodeName = $parentElem.getNodeName(); - - if (selectionNodeName !== 'CODE' || parentNodeName !== 'PRE') { - // 不符合要求 忽略 - return; - } - - if (!editor.cmd.queryCommandSupported('insertHTML')) { - // 必须原生支持 insertHTML 命令 - return; - } - - // 处理:光标定位到代码末尾,联系点击两次回车,即跳出代码块 - if (editor._willBreakCode === true) { - // 此时可以跳出代码块 - // 插入

                    ,并将选取定位到

                    - var $p = $('


                    '); - $p.insertAfter($parentElem); - editor.selection.createRangeByElem($p, true); - editor.selection.restoreSelection(); - - // 修改状态 - editor._willBreakCode = false; - - e.preventDefault(); - return; - } - - var _startOffset = editor.selection.getRange().startOffset; - - // 处理:回车时,不能插入
                    而是插入 \n ,因为是在 pre 标签里面 - editor.cmd.do('insertHTML', '\n'); - editor.selection.saveRange(); - if (editor.selection.getRange().startOffset === _startOffset) { - // 没起作用,再来一遍 - editor.cmd.do('insertHTML', '\n'); - } - - var codeLength = $selectionElem.html().length; - if (editor.selection.getRange().startOffset + 1 === codeLength) { - // 说明光标在代码最后的位置,执行了回车操作 - // 记录下来,以便下次回车时候跳出 code - editor._willBreakCode = true; - } - - // 阻止默认行为 - e.preventDefault(); - } - - $textElem.on('keydown', function (e) { - if (e.keyCode !== 13) { - // 不是回车键 - // 取消即将跳转代码块的记录 - editor._willBreakCode = false; - return; - } - //
                    回车时 特殊处理 - codeHandle(e); - }); - }, - - // 清空时保留


                    - _clearHandle: function _clearHandle() { - var editor = this.editor; - var $textElem = editor.$textElem; - - $textElem.on('keydown', function (e) { - if (e.keyCode !== 8) { - return; - } - var txtHtml = $textElem.html().toLowerCase().trim(); - if (txtHtml === '


                    ') { - // 最后剩下一个空行,就不再删除了 - e.preventDefault(); - return; - } - }); - - $textElem.on('keyup', function (e) { - if (e.keyCode !== 8) { - return; - } - var $p = void 0; - var txtHtml = $textElem.html().toLowerCase().trim(); - - // firefox 时用 txtHtml === '
                    ' 判断,其他用 !txtHtml 判断 - if (!txtHtml || txtHtml === '
                    ') { - // 内容空了 - $p = $('


                    '); - $textElem.html(''); // 一定要先清空,否则在 firefox 下有问题 - $textElem.append($p); - editor.selection.createRangeByElem($p, false, true); - editor.selection.restoreSelection(); - } - }); - }, - - // 粘贴事件(粘贴文字 粘贴图片) - _pasteHandle: function _pasteHandle() { - var editor = this.editor; - var config = editor.config; - var pasteFilterStyle = config.pasteFilterStyle; - var pasteTextHandle = config.pasteTextHandle; - var ignoreImg = config.pasteIgnoreImg; - var $textElem = editor.$textElem; - - // 粘贴图片、文本的事件,每次只能执行一个 - // 判断该次粘贴事件是否可以执行 - var pasteTime = 0; - function canDo() { - var now = Date.now(); - var flag = false; - if (now - pasteTime >= 100) { - // 间隔大于 100 ms ,可以执行 - flag = true; - } - pasteTime = now; - return flag; - } - function resetTime() { - pasteTime = 0; - } - - // 粘贴文字 - $textElem.on('paste', function (e) { - if (UA.isIE()) { - return; - } else { - // 阻止默认行为,使用 execCommand 的粘贴命令 - e.preventDefault(); - } - - // 粘贴图片和文本,只能同时使用一个 - if (!canDo()) { - return; - } - - // 获取粘贴的文字 - var pasteHtml = getPasteHtml(e, pasteFilterStyle, ignoreImg); - var pasteText = getPasteText(e); - pasteText = pasteText.replace(/\n/gm, '
                    '); - - var $selectionElem = editor.selection.getSelectionContainerElem(); - if (!$selectionElem) { - return; - } - var nodeName = $selectionElem.getNodeName(); - - // code 中只能粘贴纯文本 - if (nodeName === 'CODE' || nodeName === 'PRE') { - if (pasteTextHandle && isFunction(pasteTextHandle)) { - // 用户自定义过滤处理粘贴内容 - pasteText = '' + (pasteTextHandle(pasteText) || ''); - } - editor.cmd.do('insertHTML', '

                    ' + pasteText + '

                    '); - return; - } - - // 先放开注释,有问题再追查 ———— - // // 表格中忽略,可能会出现异常问题 - // if (nodeName === 'TD' || nodeName === 'TH') { - // return - // } - - if (!pasteHtml) { - // 没有内容,可继续执行下面的图片粘贴 - resetTime(); - return; - } - try { - // firefox 中,获取的 pasteHtml 可能是没有
                      包裹的
                    • - // 因此执行 insertHTML 会报错 - if (pasteTextHandle && isFunction(pasteTextHandle)) { - // 用户自定义过滤处理粘贴内容 - pasteHtml = '' + (pasteTextHandle(pasteHtml) || ''); - } - editor.cmd.do('insertHTML', pasteHtml); - } catch (ex) { - // 此时使用 pasteText 来兼容一下 - if (pasteTextHandle && isFunction(pasteTextHandle)) { - // 用户自定义过滤处理粘贴内容 - pasteText = '' + (pasteTextHandle(pasteText) || ''); - } - editor.cmd.do('insertHTML', '

                      ' + pasteText + '

                      '); - } - }); - - // 粘贴图片 - $textElem.on('paste', function (e) { - if (UA.isIE()) { - return; - } else { - e.preventDefault(); - } - - // 粘贴图片和文本,只能同时使用一个 - if (!canDo()) { - return; - } - - // 获取粘贴的图片 - var pasteFiles = getPasteImgs(e); - if (!pasteFiles || !pasteFiles.length) { - return; - } - - // 获取当前的元素 - var $selectionElem = editor.selection.getSelectionContainerElem(); - if (!$selectionElem) { - return; - } - var nodeName = $selectionElem.getNodeName(); - - // code 中粘贴忽略 - if (nodeName === 'CODE' || nodeName === 'PRE') { - return; - } - - // 上传图片 - var uploadImg = editor.uploadImg; - uploadImg.uploadImg(pasteFiles); - }); - }, - - // tab 特殊处理 - _tabHandle: function _tabHandle() { - var editor = this.editor; - var $textElem = editor.$textElem; - - $textElem.on('keydown', function (e) { - if (e.keyCode !== 9) { - return; - } - if (!editor.cmd.queryCommandSupported('insertHTML')) { - // 必须原生支持 insertHTML 命令 - return; - } - var $selectionElem = editor.selection.getSelectionContainerElem(); - if (!$selectionElem) { - return; - } - var $parentElem = $selectionElem.parent(); - var selectionNodeName = $selectionElem.getNodeName(); - var parentNodeName = $parentElem.getNodeName(); - - if (selectionNodeName === 'CODE' && parentNodeName === 'PRE') { - //
                       里面
                      -                editor.cmd.do('insertHTML', '    ');
                      -            } else {
                      -                // 普通文字
                      -                editor.cmd.do('insertHTML', '    ');
                      -            }
                      -
                      -            e.preventDefault();
                      -        });
                      -    },
                      -
                      -    // img 点击
                      -    _imgHandle: function _imgHandle() {
                      -        var editor = this.editor;
                      -        var $textElem = editor.$textElem;
                      -
                      -        // 为图片增加 selected 样式
                      -        $textElem.on('click', 'img', function (e) {
                      -            var img = this;
                      -            var $img = $(img);
                      -
                      -            if ($img.attr('data-w-e') === '1') {
                      -                // 是表情图片,忽略
                      -                return;
                      -            }
                      -
                      -            // 记录当前点击过的图片
                      -            editor._selectedImg = $img;
                      -
                      -            // 修改选区并 restore ,防止用户此时点击退格键,会删除其他内容
                      -            editor.selection.createRangeByElem($img);
                      -            editor.selection.restoreSelection();
                      -        });
                      -
                      -        // 去掉图片的 selected 样式
                      -        $textElem.on('click  keyup', function (e) {
                      -            if (e.target.matches('img')) {
                      -                // 点击的是图片,忽略
                      -                return;
                      -            }
                      -            // 删除记录
                      -            editor._selectedImg = null;
                      -        });
                      -    },
                      -
                      -    // 拖拽事件
                      -    _dragHandle: function _dragHandle() {
                      -        var editor = this.editor;
                      -
                      -        // 禁用 document 拖拽事件
                      -        var $document = $(document);
                      -        $document.on('dragleave drop dragenter dragover', function (e) {
                      -            e.preventDefault();
                      -        });
                      -
                      -        // 添加编辑区域拖拽事件
                      -        var $textElem = editor.$textElem;
                      -        $textElem.on('drop', function (e) {
                      -            e.preventDefault();
                      -            var files = e.dataTransfer && e.dataTransfer.files;
                      -            if (!files || !files.length) {
                      -                return;
                      -            }
                      -
                      -            // 上传图片
                      -            var uploadImg = editor.uploadImg;
                      -            uploadImg.uploadImg(files);
                      -        });
                      -    }
                      -};
                      -
                      -/*
                      -    命令,封装 document.execCommand
                      -*/
                      -
                      -// 构造函数
                      -function Command(editor) {
                      -    this.editor = editor;
                      -}
                      -
                      -// 修改原型
                      -Command.prototype = {
                      -    constructor: Command,
                      -
                      -    // 执行命令
                      -    do: function _do(name, value) {
                      -        var editor = this.editor;
                      -
                      -        // 使用 styleWithCSS
                      -        if (!editor._useStyleWithCSS) {
                      -            document.execCommand('styleWithCSS', null, true);
                      -            editor._useStyleWithCSS = true;
                      -        }
                      -
                      -        // 如果无选区,忽略
                      -        if (!editor.selection.getRange()) {
                      -            return;
                      -        }
                      -
                      -        // 恢复选取
                      -        editor.selection.restoreSelection();
                      -
                      -        // 执行
                      -        var _name = '_' + name;
                      -        if (this[_name]) {
                      -            // 有自定义事件
                      -            this[_name](value);
                      -        } else {
                      -            // 默认 command
                      -            this._execCommand(name, value);
                      -        }
                      -
                      -        // 修改菜单状态
                      -        editor.menus.changeActive();
                      -
                      -        // 最后,恢复选取保证光标在原来的位置闪烁
                      -        editor.selection.saveRange();
                      -        editor.selection.restoreSelection();
                      -
                      -        // 触发 onchange
                      -        editor.change && editor.change();
                      -    },
                      -
                      -    // 自定义 insertHTML 事件
                      -    _insertHTML: function _insertHTML(html) {
                      -        var editor = this.editor;
                      -        var range = editor.selection.getRange();
                      -
                      -        if (this.queryCommandSupported('insertHTML')) {
                      -            // W3C
                      -            this._execCommand('insertHTML', html);
                      -        } else if (range.insertNode) {
                      -            // IE
                      -            range.deleteContents();
                      -            range.insertNode($(html)[0]);
                      -        } else if (range.pasteHTML) {
                      -            // IE <= 10
                      -            range.pasteHTML(html);
                      -        }
                      -    },
                      -
                      -    // 插入 elem
                      -    _insertElem: function _insertElem($elem) {
                      -        var editor = this.editor;
                      -        var range = editor.selection.getRange();
                      -
                      -        if (range.insertNode) {
                      -            range.deleteContents();
                      -            range.insertNode($elem[0]);
                      -        }
                      -    },
                      -
                      -    // 封装 execCommand
                      -    _execCommand: function _execCommand(name, value) {
                      -        document.execCommand(name, false, value);
                      -    },
                      -
                      -    // 封装 document.queryCommandValue
                      -    queryCommandValue: function queryCommandValue(name) {
                      -        return document.queryCommandValue(name);
                      -    },
                      -
                      -    // 封装 document.queryCommandState
                      -    queryCommandState: function queryCommandState(name) {
                      -        return document.queryCommandState(name);
                      -    },
                      -
                      -    // 封装 document.queryCommandSupported
                      -    queryCommandSupported: function queryCommandSupported(name) {
                      -        return document.queryCommandSupported(name);
                      -    }
                      -};
                      -
                      -/*
                      -    selection range API
                      -*/
                      -
                      -// 构造函数
                      -function API(editor) {
                      -    this.editor = editor;
                      -    this._currentRange = null;
                      -}
                      -
                      -// 修改原型
                      -API.prototype = {
                      -    constructor: API,
                      -
                      -    // 获取 range 对象
                      -    getRange: function getRange() {
                      -        return this._currentRange;
                      -    },
                      -
                      -    // 保存选区
                      -    saveRange: function saveRange(_range) {
                      -        if (_range) {
                      -            // 保存已有选区
                      -            this._currentRange = _range;
                      -            return;
                      -        }
                      -
                      -        // 获取当前的选区
                      -        var selection = window.getSelection();
                      -        if (selection.rangeCount === 0) {
                      -            return;
                      -        }
                      -        var range = selection.getRangeAt(0);
                      -
                      -        // 判断选区内容是否在编辑内容之内
                      -        var $containerElem = this.getSelectionContainerElem(range);
                      -        if (!$containerElem) {
                      -            return;
                      -        }
                      -
                      -        // 判断选区内容是否在不可编辑区域之内
                      -        if ($containerElem.attr('contenteditable') === 'false' || $containerElem.parentUntil('[contenteditable=false]')) {
                      -            return;
                      -        }
                      -
                      -        var editor = this.editor;
                      -        var $textElem = editor.$textElem;
                      -        if ($textElem.isContain($containerElem)) {
                      -            // 是编辑内容之内的
                      -            this._currentRange = range;
                      -        }
                      -    },
                      -
                      -    // 折叠选区
                      -    collapseRange: function collapseRange(toStart) {
                      -        if (toStart == null) {
                      -            // 默认为 false
                      -            toStart = false;
                      -        }
                      -        var range = this._currentRange;
                      -        if (range) {
                      -            range.collapse(toStart);
                      -        }
                      -    },
                      -
                      -    // 选中区域的文字
                      -    getSelectionText: function getSelectionText() {
                      -        var range = this._currentRange;
                      -        if (range) {
                      -            return this._currentRange.toString();
                      -        } else {
                      -            return '';
                      -        }
                      -    },
                      -
                      -    // 选区的 $Elem
                      -    getSelectionContainerElem: function getSelectionContainerElem(range) {
                      -        range = range || this._currentRange;
                      -        var elem = void 0;
                      -        if (range) {
                      -            elem = range.commonAncestorContainer;
                      -            return $(elem.nodeType === 1 ? elem : elem.parentNode);
                      -        }
                      -    },
                      -    getSelectionStartElem: function getSelectionStartElem(range) {
                      -        range = range || this._currentRange;
                      -        var elem = void 0;
                      -        if (range) {
                      -            elem = range.startContainer;
                      -            return $(elem.nodeType === 1 ? elem : elem.parentNode);
                      -        }
                      -    },
                      -    getSelectionEndElem: function getSelectionEndElem(range) {
                      -        range = range || this._currentRange;
                      -        var elem = void 0;
                      -        if (range) {
                      -            elem = range.endContainer;
                      -            return $(elem.nodeType === 1 ? elem : elem.parentNode);
                      -        }
                      -    },
                      -
                      -    // 选区是否为空
                      -    isSelectionEmpty: function isSelectionEmpty() {
                      -        var range = this._currentRange;
                      -        if (range && range.startContainer) {
                      -            if (range.startContainer === range.endContainer) {
                      -                if (range.startOffset === range.endOffset) {
                      -                    return true;
                      -                }
                      -            }
                      -        }
                      -        return false;
                      -    },
                      -
                      -    // 恢复选区
                      -    restoreSelection: function restoreSelection() {
                      -        var selection = window.getSelection();
                      -        selection.removeAllRanges();
                      -        selection.addRange(this._currentRange);
                      -    },
                      -
                      -    // 创建一个空白(即 ​ 字符)选区
                      -    createEmptyRange: function createEmptyRange() {
                      -        var editor = this.editor;
                      -        var range = this.getRange();
                      -        var $elem = void 0;
                      -
                      -        if (!range) {
                      -            // 当前无 range
                      -            return;
                      -        }
                      -        if (!this.isSelectionEmpty()) {
                      -            // 当前选区必须没有内容才可以
                      -            return;
                      -        }
                      -
                      -        try {
                      -            // 目前只支持 webkit 内核
                      -            if (UA.isWebkit()) {
                      -                // 插入 ​
                      -                editor.cmd.do('insertHTML', '​');
                      -                // 修改 offset 位置
                      -                range.setEnd(range.endContainer, range.endOffset + 1);
                      -                // 存储
                      -                this.saveRange(range);
                      -            } else {
                      -                $elem = $('');
                      -                editor.cmd.do('insertElem', $elem);
                      -                this.createRangeByElem($elem, true);
                      -            }
                      -        } catch (ex) {
                      -            // 部分情况下会报错,兼容一下
                      -        }
                      -    },
                      -
                      -    // 根据 $Elem 设置选区
                      -    createRangeByElem: function createRangeByElem($elem, toStart, isContent) {
                      -        // $elem - 经过封装的 elem
                      -        // toStart - true 开始位置,false 结束位置
                      -        // isContent - 是否选中Elem的内容
                      -        if (!$elem.length) {
                      -            return;
                      -        }
                      -
                      -        var elem = $elem[0];
                      -        var range = document.createRange();
                      -
                      -        if (isContent) {
                      -            range.selectNodeContents(elem);
                      -        } else {
                      -            range.selectNode(elem);
                      -        }
                      -
                      -        if (typeof toStart === 'boolean') {
                      -            range.collapse(toStart);
                      -        }
                      -
                      -        // 存储 range
                      -        this.saveRange(range);
                      -    }
                      -};
                      -
                      -/*
                      -    上传进度条
                      -*/
                      -
                      -function Progress(editor) {
                      -    this.editor = editor;
                      -    this._time = 0;
                      -    this._isShow = false;
                      -    this._isRender = false;
                      -    this._timeoutId = 0;
                      -    this.$textContainer = editor.$textContainerElem;
                      -    this.$bar = $('
                      '); -} - -Progress.prototype = { - constructor: Progress, - - show: function show(progress) { - var _this = this; - - // 状态处理 - if (this._isShow) { - return; - } - this._isShow = true; - - // 渲染 - var $bar = this.$bar; - if (!this._isRender) { - var $textContainer = this.$textContainer; - $textContainer.append($bar); - } else { - this._isRender = true; - } - - // 改变进度(节流,100ms 渲染一次) - if (Date.now() - this._time > 100) { - if (progress <= 1) { - $bar.css('width', progress * 100 + '%'); - this._time = Date.now(); - } - } - - // 隐藏 - var timeoutId = this._timeoutId; - if (timeoutId) { - clearTimeout(timeoutId); - } - timeoutId = setTimeout(function () { - _this._hide(); - }, 500); - }, - - _hide: function _hide() { - var $bar = this.$bar; - $bar.remove(); - - // 修改状态 - this._time = 0; - this._isShow = false; - this._isRender = false; - } -}; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { - return typeof obj; -} : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; -}; - -/* - 上传图片 -*/ - -// 构造函数 -function UploadImg(editor) { - this.editor = editor; -} - -// 原型 -UploadImg.prototype = { - constructor: UploadImg, - - // 根据 debug 弹出不同的信息 - _alert: function _alert(alertInfo, debugInfo) { - var editor = this.editor; - var debug = editor.config.debug; - var customAlert = editor.config.customAlert; - - if (debug) { - throw new Error('wangEditor: ' + (debugInfo || alertInfo)); - } else { - if (customAlert && typeof customAlert === 'function') { - customAlert(alertInfo); - } else { - alert(alertInfo); - } - } - }, - - // 根据链接插入图片 - insertLinkImg: function insertLinkImg(link) { - var _this2 = this; - - if (!link) { - return; - } - var editor = this.editor; - var config = editor.config; - - // 校验格式 - var linkImgCheck = config.linkImgCheck; - var checkResult = void 0; - if (linkImgCheck && typeof linkImgCheck === 'function') { - checkResult = linkImgCheck(link); - if (typeof checkResult === 'string') { - // 校验失败,提示信息 - alert(checkResult); - return; - } - } - - editor.cmd.do('insertHTML', ''); - - // 验证图片 url 是否有效,无效的话给出提示 - var img = document.createElement('img'); - img.onload = function () { - var callback = config.linkImgCallback; - if (callback && typeof callback === 'function') { - callback(link); - } - - img = null; - }; - img.onerror = function () { - img = null; - // 无法成功下载图片 - _this2._alert('插入图片错误', 'wangEditor: \u63D2\u5165\u56FE\u7247\u51FA\u9519\uFF0C\u56FE\u7247\u94FE\u63A5\u662F "' + link + '"\uFF0C\u4E0B\u8F7D\u8BE5\u94FE\u63A5\u5931\u8D25'); - return; - }; - img.onabort = function () { - img = null; - }; - img.src = link; - }, - - // 上传图片 - uploadImg: function uploadImg(files) { - var _this3 = this; - - if (!files || !files.length) { - return; - } - - // ------------------------------ 获取配置信息 ------------------------------ - var editor = this.editor; - var config = editor.config; - var uploadImgServer = config.uploadImgServer; - var uploadImgShowBase64 = config.uploadImgShowBase64; - - var maxSize = config.uploadImgMaxSize; - var maxSizeM = maxSize / 1024 / 1024; - var maxLength = config.uploadImgMaxLength || 10000; - var uploadFileName = config.uploadFileName || ''; - var uploadImgParams = config.uploadImgParams || {}; - var uploadImgParamsWithUrl = config.uploadImgParamsWithUrl; - var uploadImgHeaders = config.uploadImgHeaders || {}; - var hooks = config.uploadImgHooks || {}; - var timeout = config.uploadImgTimeout || 3000; - var withCredentials = config.withCredentials; - if (withCredentials == null) { - withCredentials = false; - } - var customUploadImg = config.customUploadImg; - - if (!customUploadImg) { - // 没有 customUploadImg 的情况下,需要如下两个配置才能继续进行图片上传 - if (!uploadImgServer && !uploadImgShowBase64) { - return; - } - } - - // ------------------------------ 验证文件信息 ------------------------------ - var resultFiles = []; - var errInfo = []; - arrForEach(files, function (file) { - var name = file.name; - var size = file.size; - - // chrome 低版本 name === undefined - if (!name || !size) { - return; - } - - if (/\.(jpg|jpeg|png|bmp|gif|webp)$/i.test(name) === false) { - // 后缀名不合法,不是图片 - errInfo.push('\u3010' + name + '\u3011\u4E0D\u662F\u56FE\u7247'); - return; - } - if (maxSize < size) { - // 上传图片过大 - errInfo.push('\u3010' + name + '\u3011\u5927\u4E8E ' + maxSizeM + 'M'); - return; - } - - // 验证通过的加入结果列表 - resultFiles.push(file); - }); - // 抛出验证信息 - if (errInfo.length) { - this._alert('图片验证未通过: \n' + errInfo.join('\n')); - return; - } - if (resultFiles.length > maxLength) { - this._alert('一次最多上传' + maxLength + '张图片'); - return; - } - - // ------------------------------ 自定义上传 ------------------------------ - if (customUploadImg && typeof customUploadImg === 'function') { - customUploadImg(resultFiles, this.insertLinkImg.bind(this)); - - // 阻止以下代码执行 - return; - } - - // 添加图片数据 - var formdata = new FormData(); - arrForEach(resultFiles, function (file) { - var name = uploadFileName || file.name; - formdata.append(name, file); - }); - - // ------------------------------ 上传图片 ------------------------------ - if (uploadImgServer && typeof uploadImgServer === 'string') { - // 添加参数 - var uploadImgServerArr = uploadImgServer.split('#'); - uploadImgServer = uploadImgServerArr[0]; - var uploadImgServerHash = uploadImgServerArr[1] || ''; - objForEach(uploadImgParams, function (key, val) { - // 因使用者反应,自定义参数不能默认 encode ,由 v3.1.1 版本开始注释掉 - // val = encodeURIComponent(val) - - // 第一,将参数拼接到 url 中 - if (uploadImgParamsWithUrl) { - if (uploadImgServer.indexOf('?') > 0) { - uploadImgServer += '&'; - } else { - uploadImgServer += '?'; - } - uploadImgServer = uploadImgServer + key + '=' + val; - } - - // 第二,将参数添加到 formdata 中 - formdata.append(key, val); - }); - if (uploadImgServerHash) { - uploadImgServer += '#' + uploadImgServerHash; - } - - // 定义 xhr - var xhr = new XMLHttpRequest(); - xhr.open('POST', uploadImgServer); - - // 设置超时 - xhr.timeout = timeout; - xhr.ontimeout = function () { - // hook - timeout - if (hooks.timeout && typeof hooks.timeout === 'function') { - hooks.timeout(xhr, editor); - } - - _this3._alert('上传图片超时'); - }; - - // 监控 progress - if (xhr.upload) { - xhr.upload.onprogress = function (e) { - var percent = void 0; - // 进度条 - var progressBar = new Progress(editor); - if (e.lengthComputable) { - percent = e.loaded / e.total; - progressBar.show(percent); - } - }; - } - - // 返回数据 - xhr.onreadystatechange = function () { - var result = void 0; - if (xhr.readyState === 4) { - if (xhr.status < 200 || xhr.status >= 300) { - // hook - error - if (hooks.error && typeof hooks.error === 'function') { - hooks.error(xhr, editor); - } - - // xhr 返回状态错误 - _this3._alert('上传图片发生错误', '\u4E0A\u4F20\u56FE\u7247\u53D1\u751F\u9519\u8BEF\uFF0C\u670D\u52A1\u5668\u8FD4\u56DE\u72B6\u6001\u662F ' + xhr.status); - return; - } - - result = xhr.responseText; - if ((typeof result === 'undefined' ? 'undefined' : _typeof(result)) !== 'object') { - try { - result = JSON.parse(result); - } catch (ex) { - // hook - fail - if (hooks.fail && typeof hooks.fail === 'function') { - hooks.fail(xhr, editor, result); - } - - _this3._alert('上传图片失败', '上传图片返回结果错误,返回结果是: ' + result); - return; - } - } - if (!hooks.customInsert && result.errno != '0') { - // hook - fail - if (hooks.fail && typeof hooks.fail === 'function') { - hooks.fail(xhr, editor, result); - } - - // 数据错误 - _this3._alert('上传图片失败', '上传图片返回结果错误,返回结果 errno=' + result.errno); - } else { - if (hooks.customInsert && typeof hooks.customInsert === 'function') { - // 使用者自定义插入方法 - hooks.customInsert(_this3.insertLinkImg.bind(_this3), result, editor); - } else { - // 将图片插入编辑器 - var data = result.data || []; - data.forEach(function (link) { - _this3.insertLinkImg(link); - }); - } - - // hook - success - if (hooks.success && typeof hooks.success === 'function') { - hooks.success(xhr, editor, result); - } - } - } - }; - - // hook - before - if (hooks.before && typeof hooks.before === 'function') { - var beforeResult = hooks.before(xhr, editor, resultFiles); - if (beforeResult && (typeof beforeResult === 'undefined' ? 'undefined' : _typeof(beforeResult)) === 'object') { - if (beforeResult.prevent) { - // 如果返回的结果是 {prevent: true, msg: 'xxxx'} 则表示用户放弃上传 - this._alert(beforeResult.msg); - return; - } - } - } - - // 自定义 headers - objForEach(uploadImgHeaders, function (key, val) { - xhr.setRequestHeader(key, val); - }); - - // 跨域传 cookie - xhr.withCredentials = withCredentials; - - // 发送请求 - xhr.send(formdata); - - // 注意,要 return 。不去操作接下来的 base64 显示方式 - return; - } - - // ------------------------------ 显示 base64 格式 ------------------------------ - if (uploadImgShowBase64) { - arrForEach(files, function (file) { - var _this = _this3; - var reader = new FileReader(); - reader.readAsDataURL(file); - reader.onload = function () { - _this.insertLinkImg(this.result); - }; - }); - } - } -}; - -/* - 编辑器构造函数 -*/ - -// id,累加 -var editorId = 1; - -// 构造函数 -function Editor(toolbarSelector, textSelector) { - if (toolbarSelector == null) { - // 没有传入任何参数,报错 - throw new Error('错误:初始化编辑器时候未传入任何参数,请查阅文档'); - } - // id,用以区分单个页面不同的编辑器对象 - this.id = 'wangEditor-' + editorId++; - - this.toolbarSelector = toolbarSelector; - this.textSelector = textSelector; - - // 自定义配置 - this.customConfig = {}; -} - -// 修改原型 -Editor.prototype = { - constructor: Editor, - - // 初始化配置 - _initConfig: function _initConfig() { - // _config 是默认配置,this.customConfig 是用户自定义配置,将它们 merge 之后再赋值 - var target = {}; - this.config = Object.assign(target, config, this.customConfig); - - // 将语言配置,生成正则表达式 - var langConfig = this.config.lang || {}; - var langArgs = []; - objForEach(langConfig, function (key, val) { - // key 即需要生成正则表达式的规则,如“插入链接” - // val 即需要被替换成的语言,如“insert link” - langArgs.push({ - reg: new RegExp(key, 'img'), - val: val - - }); - }); - this.config.langArgs = langArgs; - }, - - // 初始化 DOM - _initDom: function _initDom() { - var _this = this; - - var toolbarSelector = this.toolbarSelector; - var $toolbarSelector = $(toolbarSelector); - var textSelector = this.textSelector; - - var config$$1 = this.config; - var zIndex = config$$1.zIndex; - - // 定义变量 - var $toolbarElem = void 0, - $textContainerElem = void 0, - $textElem = void 0, - $children = void 0; - - if (textSelector == null) { - // 只传入一个参数,即是容器的选择器或元素,toolbar 和 text 的元素自行创建 - $toolbarElem = $('
                      '); - $textContainerElem = $('
                      '); - - // 将编辑器区域原有的内容,暂存起来 - $children = $toolbarSelector.children(); - - // 添加到 DOM 结构中 - $toolbarSelector.append($toolbarElem).append($textContainerElem); - - // 自行创建的,需要配置默认的样式 - $toolbarElem.css('background-color', '#f1f1f1').css('border', '1px solid #ccc'); - $textContainerElem.css('border', '1px solid #ccc').css('border-top', 'none').css('height', '300px'); - } else { - // toolbar 和 text 的选择器都有值,记录属性 - $toolbarElem = $toolbarSelector; - $textContainerElem = $(textSelector); - // 将编辑器区域原有的内容,暂存起来 - $children = $textContainerElem.children(); - } - - // 编辑区域 - $textElem = $('
                      '); - $textElem.attr('contenteditable', 'true').css('width', '100%').css('height', '100%'); - - // 初始化编辑区域内容 - if ($children && $children.length) { - $textElem.append($children); - } else { - $textElem.append($('


                      ')); - } - - // 编辑区域加入DOM - $textContainerElem.append($textElem); - - // 设置通用的 class - $toolbarElem.addClass('w-e-toolbar'); - $textContainerElem.addClass('w-e-text-container'); - $textContainerElem.css('z-index', zIndex); - $textElem.addClass('w-e-text'); - - // 添加 ID - var toolbarElemId = getRandom('toolbar-elem'); - $toolbarElem.attr('id', toolbarElemId); - var textElemId = getRandom('text-elem'); - $textElem.attr('id', textElemId); - - // 记录属性 - this.$toolbarElem = $toolbarElem; - this.$textContainerElem = $textContainerElem; - this.$textElem = $textElem; - this.toolbarElemId = toolbarElemId; - this.textElemId = textElemId; - - // 记录输入法的开始和结束 - var compositionEnd = true; - $textContainerElem.on('compositionstart', function () { - // 输入法开始输入 - compositionEnd = false; - }); - $textContainerElem.on('compositionend', function () { - // 输入法结束输入 - compositionEnd = true; - }); - - // 绑定 onchange - $textContainerElem.on('click keyup', function () { - // 输入法结束才出发 onchange - compositionEnd && _this.change && _this.change(); - }); - $toolbarElem.on('click', function () { - this.change && this.change(); - }); - - //绑定 onfocus 与 onblur 事件 - if (config$$1.onfocus || config$$1.onblur) { - // 当前编辑器是否是焦点状态 - this.isFocus = false; - - $(document).on('click', function (e) { - //判断当前点击元素是否在编辑器内 - var isChild = $textElem.isContain($(e.target)); - - //判断当前点击元素是否为工具栏 - var isToolbar = $toolbarElem.isContain($(e.target)); - var isMenu = $toolbarElem[0] == e.target ? true : false; - - if (!isChild) { - //若为选择工具栏中的功能,则不视为成blur操作 - if (isToolbar && !isMenu) { - return; - } - - if (_this.isFocus) { - _this.onblur && _this.onblur(); - } - _this.isFocus = false; - } else { - if (!_this.isFocus) { - _this.onfocus && _this.onfocus(); - } - _this.isFocus = true; - } - }); - } - }, - - // 封装 command - _initCommand: function _initCommand() { - this.cmd = new Command(this); - }, - - // 封装 selection range API - _initSelectionAPI: function _initSelectionAPI() { - this.selection = new API(this); - }, - - // 添加图片上传 - _initUploadImg: function _initUploadImg() { - this.uploadImg = new UploadImg(this); - }, - - // 初始化菜单 - _initMenus: function _initMenus() { - this.menus = new Menus(this); - this.menus.init(); - }, - - // 添加 text 区域 - _initText: function _initText() { - this.txt = new Text(this); - this.txt.init(); - }, - - // 初始化选区,将光标定位到内容尾部 - initSelection: function initSelection(newLine) { - var $textElem = this.$textElem; - var $children = $textElem.children(); - if (!$children.length) { - // 如果编辑器区域无内容,添加一个空行,重新设置选区 - $textElem.append($('


                      ')); - this.initSelection(); - return; - } - - var $last = $children.last(); - - if (newLine) { - // 新增一个空行 - var html = $last.html().toLowerCase(); - var nodeName = $last.getNodeName(); - if (html !== '
                      ' && html !== '' || nodeName !== 'P') { - // 最后一个元素不是


                      ,添加一个空行,重新设置选区 - $textElem.append($('


                      ')); - this.initSelection(); - return; - } - } - - this.selection.createRangeByElem($last, false, true); - this.selection.restoreSelection(); - }, - - // 绑定事件 - _bindEvent: function _bindEvent() { - // -------- 绑定 onchange 事件 -------- - var onChangeTimeoutId = 0; - var beforeChangeHtml = this.txt.html(); - var config$$1 = this.config; - - // onchange 触发延迟时间 - var onchangeTimeout = config$$1.onchangeTimeout; - onchangeTimeout = parseInt(onchangeTimeout, 10); - if (!onchangeTimeout || onchangeTimeout <= 0) { - onchangeTimeout = 200; - } - - var onchange = config$$1.onchange; - if (onchange && typeof onchange === 'function') { - // 触发 change 的有三个场景: - // 1. $textContainerElem.on('click keyup') - // 2. $toolbarElem.on('click') - // 3. editor.cmd.do() - this.change = function () { - // 判断是否有变化 - var currentHtml = this.txt.html(); - - if (currentHtml.length === beforeChangeHtml.length) { - // 需要比较每一个字符 - if (currentHtml === beforeChangeHtml) { - return; - } - } - - // 执行,使用节流 - if (onChangeTimeoutId) { - clearTimeout(onChangeTimeoutId); - } - onChangeTimeoutId = setTimeout(function () { - // 触发配置的 onchange 函数 - onchange(currentHtml); - beforeChangeHtml = currentHtml; - }, onchangeTimeout); - }; - } - - // -------- 绑定 onblur 事件 -------- - var onblur = config$$1.onblur; - if (onblur && typeof onblur === 'function') { - this.onblur = function () { - var currentHtml = this.txt.html(); - onblur(currentHtml); - }; - } - - // -------- 绑定 onfocus 事件 -------- - var onfocus = config$$1.onfocus; - if (onfocus && typeof onfocus === 'function') { - this.onfocus = function () { - onfocus(); - }; - } - }, - - // 创建编辑器 - create: function create() { - // 初始化配置信息 - this._initConfig(); - - // 初始化 DOM - this._initDom(); - - // 封装 command API - this._initCommand(); - - // 封装 selection range API - this._initSelectionAPI(); - - // 添加 text - this._initText(); - - // 初始化菜单 - this._initMenus(); - - // 添加 图片上传 - this._initUploadImg(); - - // 初始化选区,将光标定位到内容尾部 - this.initSelection(true); - - // 绑定事件 - this._bindEvent(); - }, - - // 解绑所有事件(暂时不对外开放) - _offAllEvent: function _offAllEvent() { - $.offAll(); - } -}; - -// 检验是否浏览器环境 -try { - document; -} catch (ex) { - throw new Error('请在浏览器环境下运行'); -} - -// polyfill -polyfill(); - -// 这里的 `inlinecss` 将被替换成 css 代码的内容,详情可去 ./gulpfile.js 中搜索 `inlinecss` 关键字 -var inlinecss = '.w-e-toolbar,.w-e-text-container,.w-e-menu-panel { padding: 0; margin: 0; box-sizing: border-box;}.w-e-toolbar *,.w-e-text-container *,.w-e-menu-panel * { padding: 0; margin: 0; box-sizing: border-box;}.w-e-clear-fix:after { content: ""; display: table; clear: both;}.w-e-toolbar .w-e-droplist { position: absolute; left: 0; top: 0; background-color: #fff; border: 1px solid #f1f1f1; border-right-color: #ccc; border-bottom-color: #ccc;}.w-e-toolbar .w-e-droplist .w-e-dp-title { text-align: center; color: #999; line-height: 2; border-bottom: 1px solid #f1f1f1; font-size: 13px;}.w-e-toolbar .w-e-droplist ul.w-e-list { list-style: none; line-height: 1;}.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item { color: #333; padding: 5px 0;}.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item:hover { background-color: #f1f1f1;}.w-e-toolbar .w-e-droplist ul.w-e-block { list-style: none; text-align: left; padding: 5px;}.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item { display: inline-block; *display: inline; *zoom: 1; padding: 3px 5px;}.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item:hover { background-color: #f1f1f1;}@font-face { font-family: \'w-e-icon\'; src: url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAABhQAAsAAAAAGAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIPBGNtYXAAAAFoAAABBAAAAQQrSf4BZ2FzcAAAAmwAAAAIAAAACAAAABBnbHlmAAACdAAAEvAAABLwfpUWUWhlYWQAABVkAAAANgAAADYQp00kaGhlYQAAFZwAAAAkAAAAJAfEA+FobXR4AAAVwAAAAIQAAACEeAcD7GxvY2EAABZEAAAARAAAAERBSEX+bWF4cAAAFogAAAAgAAAAIAAsALZuYW1lAAAWqAAAAYYAAAGGmUoJ+3Bvc3QAABgwAAAAIAAAACAAAwAAAAMD3gGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA8fwDwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEAOgAAAA2ACAABAAWAAEAIOkG6Q3pEulH6Wbpd+m56bvpxunL6d/qDepc6l/qZepo6nHqefAN8BTxIPHc8fz//f//AAAAAAAg6QbpDekS6UfpZel36bnpu+nG6cvp3+oN6lzqX+pi6mjqcep38A3wFPEg8dzx/P/9//8AAf/jFv4W+Bb0FsAWoxaTFlIWURZHFkMWMBYDFbUVsxWxFa8VpxWiEA8QCQ7+DkMOJAADAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAACAAD/wAQAA8AABAATAAABNwEnAQMuAScTNwEjAQMlATUBBwGAgAHAQP5Anxc7MmOAAYDA/oDAAoABgP6ATgFAQAHAQP5A/p0yOxcBEU4BgP6A/YDAAYDA/oCAAAQAAAAABAADgAAQACEALQA0AAABOAExETgBMSE4ATEROAExITUhIgYVERQWMyEyNjURNCYjBxQGIyImNTQ2MzIWEyE1EwEzNwPA/IADgPyAGiYmGgOAGiYmGoA4KCg4OCgoOED9AOABAEDgA0D9AAMAQCYa/QAaJiYaAwAaJuAoODgoKDg4/biAAYD+wMAAAAIAAABABAADQAA4ADwAAAEmJy4BJyYjIgcOAQcGBwYHDgEHBhUUFx4BFxYXFhceARcWMzI3PgE3Njc2Nz4BNzY1NCcuAScmJwERDQED1TY4OXY8PT8/PTx2OTg2CwcICwMDAwMLCAcLNjg5djw9Pz89PHY5ODYLBwgLAwMDAwsIBwv9qwFA/sADIAgGBggCAgICCAYGCCkqKlktLi8vLi1ZKiopCAYGCAICAgIIBgYIKSoqWS0uLy8uLVkqKin94AGAwMAAAAAAAgDA/8ADQAPAABsAJwAAASIHDgEHBhUUFx4BFxYxMDc+ATc2NTQnLgEnJgMiJjU0NjMyFhUUBgIAQjs6VxkZMjJ4MjIyMngyMhkZVzo7QlBwcFBQcHADwBkZVzo7Qnh9fcxBQUFBzH19eEI7OlcZGf4AcFBQcHBQUHAAAAEAAAAABAADgAArAAABIgcOAQcGBycRISc+ATMyFx4BFxYVFAcOAQcGBxc2Nz4BNzY1NCcuAScmIwIANTIyXCkpI5YBgJA1i1BQRUZpHh4JCSIYGB5VKCAgLQwMKCiLXl1qA4AKCycbHCOW/oCQNDweHmlGRVArKClJICEaYCMrK2I2NjlqXV6LKCgAAQAAAAAEAAOAACoAABMUFx4BFxYXNyYnLgEnJjU0Nz4BNzYzMhYXByERByYnLgEnJiMiBw4BBwYADAwtICAoVR4YGCIJCR4eaUZFUFCLNZABgJYjKSlcMjI1al1eiygoAYA5NjZiKysjYBohIEkpKCtQRUZpHh48NJABgJYjHBsnCwooKIteXQAAAAACAAAAQAQBAwAAJgBNAAATMhceARcWFRQHDgEHBiMiJy4BJyY1JzQ3PgE3NjMVIgYHDgEHPgEhMhceARcWFRQHDgEHBiMiJy4BJyY1JzQ3PgE3NjMVIgYHDgEHPgHhLikpPRESEhE9KSkuLikpPRESASMjelJRXUB1LQkQBwgSAkkuKSk9ERISET0pKS4uKSk9ERIBIyN6UlFdQHUtCRAHCBICABIRPSkpLi4pKT0REhIRPSkpLiBdUVJ6IyOAMC4IEwoCARIRPSkpLi4pKT0REhIRPSkpLiBdUVJ6IyOAMC4IEwoCAQAABgBA/8AEAAPAAAMABwALABEAHQApAAAlIRUhESEVIREhFSEnESM1IzUTFTMVIzU3NSM1MxUVESM1MzUjNTM1IzUBgAKA/YACgP2AAoD9gMBAQECAwICAwMCAgICAgIACAIACAIDA/wDAQP3yMkCSPDJAku7+wEBAQEBAAAYAAP/ABAADwAADAAcACwAXACMALwAAASEVIREhFSERIRUhATQ2MzIWFRQGIyImETQ2MzIWFRQGIyImETQ2MzIWFRQGIyImAYACgP2AAoD9gAKA/YD+gEs1NUtLNTVLSzU1S0s1NUtLNTVLSzU1SwOAgP8AgP8AgANANUtLNTVLS/61NUtLNTVLS/61NUtLNTVLSwADAAAAAAQAA6AAAwANABQAADchFSElFSE1EyEVITUhJQkBIxEjEQAEAPwABAD8AIABAAEAAQD9YAEgASDggEBAwEBAAQCAgMABIP7g/wABAAAAAAACAB7/zAPiA7QAMwBkAAABIiYnJicmNDc2PwE+ATMyFhcWFxYUBwYPAQYiJyY0PwE2NCcuASMiBg8BBhQXFhQHDgEjAyImJyYnJjQ3Nj8BNjIXFhQPAQYUFx4BMzI2PwE2NCcmNDc2MhcWFxYUBwYPAQ4BIwG4ChMIIxISEhIjwCNZMTFZIyMSEhISI1gPLA8PD1gpKRQzHBwzFMApKQ8PCBMKuDFZIyMSEhISI1gPLA8PD1gpKRQzHBwzFMApKQ8PDysQIxISEhIjwCNZMQFECAckLS1eLS0kwCIlJSIkLS1eLS0kVxAQDysPWCl0KRQVFRTAKXQpDysQBwj+iCUiJC0tXi0tJFcQEA8rD1gpdCkUFRUUwCl0KQ8rEA8PJC0tXi0tJMAiJQAAAAAFAAD/wAQAA8AAGwA3AFMAXwBrAAAFMjc+ATc2NTQnLgEnJiMiBw4BBwYVFBceARcWEzIXHgEXFhUUBw4BBwYjIicuAScmNTQ3PgE3NhMyNz4BNzY3BgcOAQcGIyInLgEnJicWFx4BFxYnNDYzMhYVFAYjIiYlNDYzMhYVFAYjIiYCAGpdXosoKCgoi15dampdXosoKCgoi15dalZMTHEgISEgcUxMVlZMTHEgISEgcUxMVisrKlEmJiMFHBtWODc/Pzc4VhscBSMmJlEqK9UlGxslJRsbJQGAJRsbJSUbGyVAKCiLXl1qal1eiygoKCiLXl1qal1eiygoA6AhIHFMTFZWTExxICEhIHFMTFZWTExxICH+CQYGFRAQFEM6OlYYGRkYVjo6QxQQEBUGBvcoODgoKDg4KCg4OCgoODgAAAMAAP/ABAADwAAbADcAQwAAASIHDgEHBhUUFx4BFxYzMjc+ATc2NTQnLgEnJgMiJy4BJyY1NDc+ATc2MzIXHgEXFhUUBw4BBwYTBycHFwcXNxc3JzcCAGpdXosoKCgoi15dampdXosoKCgoi15dalZMTHEgISEgcUxMVlZMTHEgISEgcUxMSqCgYKCgYKCgYKCgA8AoKIteXWpqXV6LKCgoKIteXWpqXV6LKCj8YCEgcUxMVlZMTHEgISEgcUxMVlZMTHEgIQKgoKBgoKBgoKBgoKAAAQBl/8ADmwPAACkAAAEiJiMiBw4BBwYVFBYzLgE1NDY3MAcGAgcGBxUhEzM3IzceATMyNjcOAQMgRGhGcVNUbRobSUgGDWVKEBBLPDxZAT1sxizXNC1VJi5QGB09A7AQHh1hPj9BTTsLJjeZbwN9fv7Fj5AjGQIAgPYJDzdrCQcAAAAAAgAAAAAEAAOAAAkAFwAAJTMHJzMRIzcXIyURJyMRMxUhNTMRIwcRA4CAoKCAgKCggP8AQMCA/oCAwEDAwMACAMDAwP8AgP1AQEACwIABAAADAMAAAANAA4AAFgAfACgAAAE+ATU0Jy4BJyYjIREhMjc+ATc2NTQmATMyFhUUBisBEyMRMzIWFRQGAsQcIBQURi4vNf7AAYA1Ly5GFBRE/oRlKjw8KWafn58sPj4B2yJULzUvLkYUFPyAFBRGLi81RnQBRks1NUv+gAEASzU1SwAAAAACAMAAAANAA4AAHwAjAAABMxEUBw4BBwYjIicuAScmNREzERQWFx4BMzI2Nz4BNQEhFSECwIAZGVc6O0JCOzpXGRmAGxgcSSgoSRwYG/4AAoD9gAOA/mA8NDVOFhcXFk41NDwBoP5gHjgXGBsbGBc4Hv6ggAAAAAABAIAAAAOAA4AACwAAARUjATMVITUzASM1A4CA/sCA/kCAAUCAA4BA/QBAQAMAQAABAAAAAAQAA4AAPQAAARUjHgEVFAYHDgEjIiYnLgE1MxQWMzI2NTQmIyE1IS4BJy4BNTQ2Nz4BMzIWFx4BFSM0JiMiBhUUFjMyFhcEAOsVFjUwLHE+PnEsMDWAck5OcnJO/gABLAIEATA1NTAscT4+cSwwNYByTk5yck47bisBwEAdQSI1YiQhJCQhJGI1NExMNDRMQAEDASRiNTViJCEkJCEkYjU0TEw0NEwhHwAAAAcAAP/ABAADwAADAAcACwAPABMAGwAjAAATMxUjNzMVIyUzFSM3MxUjJTMVIwMTIRMzEyETAQMhAyMDIQMAgIDAwMABAICAwMDAAQCAgBAQ/QAQIBACgBD9QBADABAgEP2AEAHAQEBAQEBAQEBAAkD+QAHA/oABgPwAAYD+gAFA/sAAAAoAAAAABAADgAADAAcACwAPABMAFwAbAB8AIwAnAAATESERATUhFR0BITUBFSE1IxUhNREhFSElIRUhETUhFQEhFSEhNSEVAAQA/YABAP8AAQD/AED/AAEA/wACgAEA/wABAPyAAQD/AAKAAQADgPyAA4D9wMDAQMDAAgDAwMDA/wDAwMABAMDA/sDAwMAAAAUAAAAABAADgAADAAcACwAPABMAABMhFSEVIRUhESEVIREhFSERIRUhAAQA/AACgP2AAoD9gAQA/AAEAPwAA4CAQID/AIABQID/AIAAAAAABQAAAAAEAAOAAAMABwALAA8AEwAAEyEVIRchFSERIRUhAyEVIREhFSEABAD8AMACgP2AAoD9gMAEAPwABAD8AAOAgECA/wCAAUCA/wCAAAAFAAAAAAQAA4AAAwAHAAsADwATAAATIRUhBSEVIREhFSEBIRUhESEVIQAEAPwAAYACgP2AAoD9gP6ABAD8AAQA/AADgIBAgP8AgAFAgP8AgAAAAAABAD8APwLmAuYALAAAJRQPAQYjIi8BBwYjIi8BJjU0PwEnJjU0PwE2MzIfATc2MzIfARYVFA8BFxYVAuYQThAXFxCoqBAXFhBOEBCoqBAQThAWFxCoqBAXFxBOEBCoqBDDFhBOEBCoqBAQThAWFxCoqBAXFxBOEBCoqBAQThAXFxCoqBAXAAAABgAAAAADJQNuABQAKAA8AE0AVQCCAAABERQHBisBIicmNRE0NzY7ATIXFhUzERQHBisBIicmNRE0NzY7ATIXFhcRFAcGKwEiJyY1ETQ3NjsBMhcWExEhERQXFhcWMyEyNzY3NjUBIScmJyMGBwUVFAcGKwERFAcGIyEiJyY1ESMiJyY9ATQ3NjsBNzY3NjsBMhcWHwEzMhcWFQElBgUIJAgFBgYFCCQIBQaSBQUIJQgFBQUFCCUIBQWSBQUIJQgFBQUFCCUIBQVJ/gAEBAUEAgHbAgQEBAT+gAEAGwQGtQYEAfcGBQg3Ghsm/iUmGxs3CAUFBQUIsSgIFxYXtxcWFgkosAgFBgIS/rcIBQUFBQgBSQgFBgYFCP63CAUFBQUIAUkIBQYGBQj+twgFBQUFCAFJCAUGBgX+WwId/eMNCwoFBQUFCgsNAmZDBQICBVUkCAYF/eMwIiMhIi8CIAUGCCQIBQVgFQ8PDw8VYAUFCAACAAcASQO3Aq8AGgAuAAAJAQYjIi8BJjU0PwEnJjU0PwE2MzIXARYVFAcBFRQHBiMhIicmPQE0NzYzITIXFgFO/vYGBwgFHQYG4eEGBh0FCAcGAQoGBgJpBQUI/dsIBQUFBQgCJQgFBQGF/vYGBhwGCAcG4OEGBwcGHQUF/vUFCAcG/vslCAUFBQUIJQgFBQUFAAAAAQAjAAAD3QNuALMAACUiJyYjIgcGIyInJjU0NzY3Njc2NzY9ATQnJiMhIgcGHQEUFxYXFjMWFxYVFAcGIyInJiMiBwYjIicmNTQ3Njc2NzY3Nj0BETQ1NDU0JzQnJicmJyYnJicmIyInJjU0NzYzMhcWMzI3NjMyFxYVFAcGIwYHBgcGHQEUFxYzITI3Nj0BNCcmJyYnJjU0NzYzMhcWMzI3NjMyFxYVFAcGByIHBgcGFREUFxYXFhcyFxYVFAcGIwPBGTMyGhkyMxkNCAcJCg0MERAKEgEHFf5+FgcBFQkSEw4ODAsHBw4bNTUaGDExGA0HBwkJCwwQDwkSAQIBAgMEBAUIEhENDQoLBwcOGjU1GhgwMRgOBwcJCgwNEBAIFAEHDwGQDgcBFAoXFw8OBwcOGTMyGRkxMRkOBwcKCg0NEBEIFBQJEREODQoLBwcOAAICAgIMCw8RCQkBAQMDBQxE4AwFAwMFDNRRDQYBAgEICBIPDA0CAgICDAwOEQgJAQIDAwUNRSEB0AINDQgIDg4KCgsLBwcDBgEBCAgSDwwNAgICAg0MDxEICAECAQYMULYMBwEBBwy2UAwGAQEGBxYPDA0CAgICDQwPEQgIAQECBg1P/eZEDAYCAgEJCBEPDA0AAAIAAP+3A/8DtwATADkAAAEyFxYVFAcCBwYjIicmNTQ3ATYzARYXFh8BFgcGIyInJicmJyY1FhcWFxYXFjMyNzY3Njc2NzY3NjcDmygeHhq+TDdFSDQ0NQFtISn9+BcmJy8BAkxMe0c2NiEhEBEEExQQEBIRCRcIDxITFRUdHR4eKQO3GxooJDP+mUY0NTRJSTABSx/9sSsfHw0oek1MGhsuLzo6RAMPDgsLCgoWJRsaEREKCwQEAgABAAAAAAAA9evv618PPPUACwQAAAAAANbEBFgAAAAA1sQEWAAA/7cEAQPAAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAD//wQBAAEAAAAAAAAAAAAAAAAAAAAhBAAAAAAAAAAAAAAAAgAAAAQAAAAEAAAABAAAAAQAAMAEAAAABAAAAAQAAAAEAABABAAAAAQAAAAEAAAeBAAAAAQAAAAEAABlBAAAAAQAAMAEAADABAAAgAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAMlAD8DJQAAA74ABwQAACMD/wAAAAAAAAAKABQAHgBMAJQA+AE2AXwBwgI2AnQCvgLoA34EHgSIBMoE8gU0BXAFiAXgBiIGagaSBroG5AcoB+AIKgkcCXgAAQAAACEAtAAKAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGljb21vb24AaQBjAG8AbQBvAG8AblZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGljb21vb24AaQBjAG8AbQBvAG8Abmljb21vb24AaQBjAG8AbQBvAG8AblJlZ3VsYXIAUgBlAGcAdQBsAGEAcmljb21vb24AaQBjAG8AbQBvAG8AbkZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=) format(\'truetype\'); font-weight: normal; font-style: normal;}[class^="w-e-icon-"],[class*=" w-e-icon-"] { /* use !important to prevent issues with browser extensions that change fonts */ font-family: \'w-e-icon\' !important; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1; /* Better Font Rendering =========== */ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;}.w-e-icon-close:before { content: "\\f00d";}.w-e-icon-upload2:before { content: "\\e9c6";}.w-e-icon-trash-o:before { content: "\\f014";}.w-e-icon-header:before { content: "\\f1dc";}.w-e-icon-pencil2:before { content: "\\e906";}.w-e-icon-paint-brush:before { content: "\\f1fc";}.w-e-icon-image:before { content: "\\e90d";}.w-e-icon-play:before { content: "\\e912";}.w-e-icon-location:before { content: "\\e947";}.w-e-icon-undo:before { content: "\\e965";}.w-e-icon-redo:before { content: "\\e966";}.w-e-icon-quotes-left:before { content: "\\e977";}.w-e-icon-list-numbered:before { content: "\\e9b9";}.w-e-icon-list2:before { content: "\\e9bb";}.w-e-icon-link:before { content: "\\e9cb";}.w-e-icon-happy:before { content: "\\e9df";}.w-e-icon-bold:before { content: "\\ea62";}.w-e-icon-underline:before { content: "\\ea63";}.w-e-icon-italic:before { content: "\\ea64";}.w-e-icon-strikethrough:before { content: "\\ea65";}.w-e-icon-table2:before { content: "\\ea71";}.w-e-icon-paragraph-left:before { content: "\\ea77";}.w-e-icon-paragraph-center:before { content: "\\ea78";}.w-e-icon-paragraph-right:before { content: "\\ea79";}.w-e-icon-terminal:before { content: "\\f120";}.w-e-icon-page-break:before { content: "\\ea68";}.w-e-icon-cancel-circle:before { content: "\\ea0d";}.w-e-icon-font:before { content: "\\ea5c";}.w-e-icon-text-heigh:before { content: "\\ea5f";}.w-e-toolbar { display: -webkit-box; display: -ms-flexbox; display: flex; padding: 0 5px; /* flex-wrap: wrap; */ /* 单个菜单 */}.w-e-toolbar .w-e-menu { position: relative; text-align: center; padding: 5px 10px; cursor: pointer;}.w-e-toolbar .w-e-menu i { color: #999;}.w-e-toolbar .w-e-menu:hover i { color: #333;}.w-e-toolbar .w-e-active i { color: #1e88e5;}.w-e-toolbar .w-e-active:hover i { color: #1e88e5;}.w-e-text-container .w-e-panel-container { position: absolute; top: 0; left: 50%; border: 1px solid #ccc; border-top: 0; box-shadow: 1px 1px 2px #ccc; color: #333; background-color: #fff; /* 为 emotion panel 定制的样式 */ /* 上传图片的 panel 定制样式 */}.w-e-text-container .w-e-panel-container .w-e-panel-close { position: absolute; right: 0; top: 0; padding: 5px; margin: 2px 5px 0 0; cursor: pointer; color: #999;}.w-e-text-container .w-e-panel-container .w-e-panel-close:hover { color: #333;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title { list-style: none; display: -webkit-box; display: -ms-flexbox; display: flex; font-size: 14px; margin: 2px 10px 0 10px; border-bottom: 1px solid #f1f1f1;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-item { padding: 3px 5px; color: #999; cursor: pointer; margin: 0 3px; position: relative; top: 1px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-active { color: #333; border-bottom: 1px solid #333; cursor: default; font-weight: 700;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content { padding: 10px 15px 10px 15px; font-size: 16px; /* 输入框的样式 */ /* 按钮的样式 */}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input:focus,.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus,.w-e-text-container .w-e-panel-container .w-e-panel-tab-content button:focus { outline: none;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea { width: 100%; border: 1px solid #ccc; padding: 5px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus { border-color: #1e88e5;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text] { border: none; border-bottom: 1px solid #ccc; font-size: 14px; height: 20px; color: #333; text-align: left;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].small { width: 30px; text-align: center;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].block { display: block; width: 100%; margin: 10px 0;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text]:focus { border-bottom: 2px solid #1e88e5;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button { font-size: 14px; color: #1e88e5; border: none; padding: 5px 10px; background-color: #fff; cursor: pointer; border-radius: 3px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.left { float: left; margin-right: 10px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.right { float: right; margin-left: 10px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.gray { color: #999;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.red { color: #c24f4a;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button:hover { background-color: #f1f1f1;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container:after { content: ""; display: table; clear: both;}.w-e-text-container .w-e-panel-container .w-e-emoticon-container .w-e-item { cursor: pointer; font-size: 18px; padding: 0 3px; display: inline-block; *display: inline; *zoom: 1;}.w-e-text-container .w-e-panel-container .w-e-up-img-container { text-align: center;}.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn { display: inline-block; *display: inline; *zoom: 1; color: #999; cursor: pointer; font-size: 60px; line-height: 1;}.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn:hover { color: #333;}.w-e-text-container { position: relative;}.w-e-text-container .w-e-progress { position: absolute; background-color: #1e88e5; bottom: 0; left: 0; height: 1px;}.w-e-text { padding: 0 10px; overflow-y: scroll;}.w-e-text p,.w-e-text h1,.w-e-text h2,.w-e-text h3,.w-e-text h4,.w-e-text h5,.w-e-text table,.w-e-text pre { margin: 10px 0; line-height: 1.5;}.w-e-text ul,.w-e-text ol { margin: 10px 0 10px 20px;}.w-e-text blockquote { display: block; border-left: 8px solid #d0e5f2; padding: 5px 10px; margin: 10px 0; line-height: 1.4; font-size: 100%; background-color: #f1f1f1;}.w-e-text code { display: inline-block; *display: inline; *zoom: 1; background-color: #f1f1f1; border-radius: 3px; padding: 3px 5px; margin: 0 3px;}.w-e-text pre code { display: block;}.w-e-text table { border-top: 1px solid #ccc; border-left: 1px solid #ccc;}.w-e-text table td,.w-e-text table th { border-bottom: 1px solid #ccc; border-right: 1px solid #ccc; padding: 3px 5px;}.w-e-text table th { border-bottom: 2px solid #ccc; text-align: center;}.w-e-text:focus { outline: none;}.w-e-text img { cursor: pointer;}.w-e-text img:hover { box-shadow: 0 0 5px #333;}'; - -// 将 css 代码添加到