(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["G"] = factory(); else root["G"] = factory(); })(window, function() { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "./src/index.ts"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./node_modules/_@antv_event-emitter@0.1.2@@antv/event-emitter/esm/index.js": /*!**********************************************************************************!*\ !*** ./node_modules/_@antv_event-emitter@0.1.2@@antv/event-emitter/esm/index.js ***! \**********************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); 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++) { if (!es[i]) { continue; } 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_1 = events.length; for (var i = 0; i < length_1; i++) { if (events[i].callback === callback) { events.splice(i, 1); length_1--; i--; } } if (events.length === 0) { delete this._events[evt]; } } } return this; }; /* 当前所有的事件 */ EventEmitter.prototype.getEvents = function () { return this._events; }; return EventEmitter; }(); /* harmony default export */ __webpack_exports__["default"] = (EventEmitter); /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/abstract/base.js": /*!***********************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@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@1.13.0@tslib/tslib.es6.js"); /* harmony import */ var _antv_event_emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/event-emitter */ "./node_modules/_@antv_event-emitter@0.1.2@@antv/event-emitter/esm/index.js"); /* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/util */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@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"]); /* harmony default export */ __webpack_exports__["default"] = (Base); /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/abstract/canvas.js": /*!*************************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@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@1.13.0@tslib/tslib.es6.js"); /* harmony import */ var detect_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! detect-browser */ "./node_modules/_detect-browser@5.1.0@detect-browser/index.js"); /* harmony import */ var detect_browser__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(detect_browser__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _container__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./container */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/abstract/container.js"); /* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/util */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/util/util.js"); /* harmony import */ var _animate_timeline__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../animate/timeline */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/animate/timeline.js"); /* harmony import */ var _event_event_contoller__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../event/event-contoller */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/event/event-contoller.js"); var PX_SUFFIX = 'px'; var browser = Object(detect_browser__WEBPACK_IMPORTED_MODULE_1__["detect"])(); var isFirefox = browser && browser.name === 'firefox'; 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'; // CSS transform 目前尚未经过长时间验证,为了避免影响上层业务,默认关闭,上层按需开启 cfg['supportCSSTransform'] = false; return cfg; }; /** * @protected * 初始化容器 */ Canvas.prototype.initContainer = function () { var container = this.get('container'); if (Object(_util_util__WEBPACK_IMPORTED_MODULE_3__["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 () { var eventController = new _event_event_contoller__WEBPACK_IMPORTED_MODULE_5__["default"]({ canvas: this }); eventController.init(); this.set('eventController', eventController); }; /** * @protected * 初始化时间轴 */ Canvas.prototype.initTimeline = function () { var timeline = new _animate_timeline__WEBPACK_IMPORTED_MODULE_4__["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_3__["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_3__["isBrowser"] && el) { // 直接设置样式,不等待鼠标移动时再设置 el.style.cursor = cursor; } }; // 实现接口 Canvas.prototype.getPointByEvent = function (ev) { var supportCSSTransform = this.get('supportCSSTransform'); if (supportCSSTransform) { // For Firefox <= 38 if (isFirefox && !Object(_util_util__WEBPACK_IMPORTED_MODULE_3__["isNil"])(ev.layerX) && ev.layerX !== ev.offsetX) { return { x: ev.layerX, y: ev.layerY }; } if (!Object(_util_util__WEBPACK_IMPORTED_MODULE_3__["isNil"])(ev.offsetX)) { // For IE6+, Firefox >= 39, Chrome, Safari, Opera return { x: ev.offsetX, y: ev.offsetY }; } } // should calculate by self for other cases, like Safari in ios // TODO: support CSS transform var _a = this.getClientByEvent(ev), clientX = _a.x, clientY = _a.y; return this.getPointByClient(clientX, clientY); }; // 获取 touch 事件的 clientX 和 clientY 需要单独处理 Canvas.prototype.getClientByEvent = function (ev) { var clientInfo = ev; if (ev.touches) { if (ev.type === 'touchend') { clientInfo = ev.changedTouches[0]; } else { clientInfo = ev.touches[0]; } } return { x: clientInfo.clientX, y: clientInfo.clientY }; }; // 实现接口 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 () { var eventController = this.get('eventController'); eventController.destroy(); }; 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_2__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Canvas); /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/abstract/container.js": /*!****************************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@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@1.13.0@tslib/tslib.es6.js"); /* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./element */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@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@0.5.0-beta.1@@antv/g-base/esm/util/util.js"); var SHAPE_MAP = {}; var INDEX = '_INDEX'; /** * 设置 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; }; } 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 (!Object(_util_util__WEBPACK_IMPORTED_MODULE_2__["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 (Object(_util_util__WEBPACK_IMPORTED_MODULE_2__["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); element.onCanvasChange('add'); 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); /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/abstract/element.js": /*!**************************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@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@1.13.0@tslib/tslib.es6.js"); /* harmony import */ var _antv_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antv/util */ "./node_modules/_@antv_util@2.0.9@@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@3.1.0-beta.2@@antv/matrix-util/esm/index.js"); /* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/util */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@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@0.5.0-beta.1@@antv/g-base/esm/util/matrix.js"); /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./base */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/abstract/base.js"); var MATRIX = 'matrix'; 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) { if (this.cfg.isClipShape) { var applyTo = this.cfg.applyTo; if (applyTo) { applyTo.onCanvasChange('clip'); } } else { 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.cfg.totalMatrix; if (!totalMatrix) { var currentMatrix = this.attr('matrix'); var parentMatrix = this.cfg.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); if (invertMatrix) { 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, applyTo: this, attrs: clipCfg.attrs, canvas: canvas }); } } this.set('clipShape', clipShape); this.onCanvasChange('clip'); return clipShape; }; Element.prototype.getClip = function () { // 高频率调用的地方直接使用 this.cfg.xxx var clipShape = this.cfg.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'); var pauseTime = timeline.getTime(); Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(animations, function (animation) { animation._paused = true; animation._pauseTime = pauseTime; if (animation.pauseCallback) { // 动画暂停时的回调 animation.pauseCallback(); } }); // 记录下是在什么时候暂停的 this.set('_pause', { isPaused: true, pauseTime: pauseTime }); 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 _this = this; var paths = eventObj.propagationPath; var events = this.getEvents(); var relativeShape; if (type === 'mouseenter') { relativeShape = eventObj.fromShape; } else if (type === 'mouseleave') { relativeShape = eventObj.toShape; } var _loop_1 = function (i) { var element = paths[i]; // 暂定跟 name 绑定 var name_1 = element.get('name'); if (name_1) { // 第一个 mouseenter 和 mouseleave 的停止即可,因为后面的都是前面的 Parent if ( // 只有 element 是 Group 或者 Canvas 的时候,才需要判断 isParent (element.isGroup() || element.isCanvas && element.isCanvas()) && relativeShape && Object(_util_util__WEBPACK_IMPORTED_MODULE_3__["isParent"])(element, relativeShape)) { return "break"; } if (Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["isArray"])(name_1)) { Object(_antv_util__WEBPACK_IMPORTED_MODULE_1__["each"])(name_1, function (subName) { _this.emitDelegateEvent(element, subName, eventObj); }); } else { this_1.emitDelegateEvent(element, name_1, eventObj); } } }; var this_1 = this; // 至少有一个对象,且第一个对象为 shape for (var i = 0; i < paths.length; i++) { var state_1 = _loop_1(i); if (state_1 === "break") break; } }; Element.prototype.emitDelegateEvent = function (element, name, eventObj) { var events = this.getEvents(); // 事件委托的形式 name:type var eventName = name + DELEGATION_SPLIT + eventObj.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 = _antv_matrix_util__WEBPACK_IMPORTED_MODULE_2__["ext"].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 = _antv_matrix_util__WEBPACK_IMPORTED_MODULE_2__["ext"].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 = _antv_matrix_util__WEBPACK_IMPORTED_MODULE_2__["ext"].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 = _antv_matrix_util__WEBPACK_IMPORTED_MODULE_2__["ext"].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 = _antv_matrix_util__WEBPACK_IMPORTED_MODULE_2__["ext"].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); /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/abstract/group.js": /*!************************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@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@1.13.0@tslib/tslib.es6.js"); /* harmony import */ var _container__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./container */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@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); /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/abstract/shape.js": /*!************************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@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@1.13.0@tslib/tslib.es6.js"); /* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./element */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@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@0.5.0-beta.1@@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.cfg.bbox; if (!bbox) { bbox = this.calculateBBox(); this.set('bbox', bbox); } return bbox; }; // 计算相对于画布的包围盒 AbstractShape.prototype.getCanvasBBox = function () { var canvasBBox = this.cfg.canvasBBox; if (!canvasBBox) { canvasBBox = this.calculateCanvasBBox(); this.set('canvasBBox', canvasBBox); } return canvasBBox; }; AbstractShape.prototype.applyMatrix = function (matrix) { _super.prototype.applyMatrix.call(this, matrix); // 清理掉缓存的包围盒 this.set('canvasBBox', 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('canvasBBox', 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); /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/animate/timeline.js": /*!**************************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@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@2.0.9@@antv/util/esm/index.js"); /* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-timer */ "./node_modules/_d3-timer@1.0.10@d3-timer/src/index.js"); /* harmony import */ var d3_ease__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-ease */ "./node_modules/_d3-ease@1.0.6@d3-ease/src/index.js"); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/_d3-interpolate@1.4.0@d3-interpolate/src/index.js"); /* harmony import */ var _util_path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/path */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@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@0.5.0-beta.1@@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 () { console.log('here... initTimer') 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; console.log('here... run timer') 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); /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/event/event-contoller.js": /*!*******************************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/event/event-contoller.js ***! \*******************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _graph_event__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./graph-event */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/event/graph-event.js"); /* harmony import */ var _util_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/util */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/util/util.js"); /** * @fileoverview 事件处理器 * @author dxq613@gmail.com */ var CLICK_OFFSET = 40; var LEFT_BTN_CODE = 0; var DELEGATION_SPLIT = ':'; var EVENTS = ['mousedown', 'mouseup', 'dblclick', 'mouseout', 'mouseover', 'mousemove', 'mouseleave', 'mouseenter', 'touchstart', 'touchmove', 'touchend', 'dragenter', 'dragover', 'dragleave', 'drop', 'contextmenu', 'mousewheel']; // 是否有委托事件监听 function hasDelegation(events, type) { for (var key in events) { if (events.hasOwnProperty(key) && key.indexOf(DELEGATION_SPLIT + type) >= 0) { return true; } } return false; } // 触发目标事件,目标只能是 shape 或 canvas function emitTargetEvent(target, type, eventObj) { eventObj.name = type; eventObj.target = target; eventObj.currentTarget = target; eventObj.delegateTarget = target; target.emit(type, eventObj); } // 事件冒泡, enter 和 leave 需要对 fromShape 和 toShape 进行判同 function bubbleEvent(container, type, eventObj) { if (eventObj.bubbles) { var relativeShape = void 0; var isOverEvent = false; if (type === 'mouseenter') { relativeShape = eventObj.fromShape; isOverEvent = true; } else if (type === 'mouseleave') { isOverEvent = true; relativeShape = eventObj.toShape; } // canvas 上的 mouseenter, mouseleave 事件,仅当进入或者移出 canvas 时触发 if (container.isCanvas() && isOverEvent) { return; } // 如果相关图形同当前图形在同一个容器内,不触发事件 if (relativeShape && Object(_util_util__WEBPACK_IMPORTED_MODULE_1__["isParent"])(container, relativeShape)) { // 阻止继续向上冒泡 eventObj.bubbles = false; return; } // 事件名称可能在委托过程中被修改,因此事件冒泡时需要重新设置事件名称 eventObj.name = type; eventObj.currentTarget = container; eventObj.delegateTarget = container; container.emit(type, eventObj); } } var EventController = /** @class */ function () { function EventController(cfg) { var _this = this; // 正在被拖拽的图形 this.draggingShape = null; this.dragging = false; // 当前鼠标/touch所在位置的图形 this.currentShape = null; this.mousedownShape = null; this.mousedownPoint = null; // 统一处理所有的回调 this._eventCallback = function (ev) { var type = ev.type; _this._triggerEvent(type, ev); }; // 在 document 处理拖拽到画布外的事件,处理从图形上移除画布未被捕捉的问题 this._onDocumentMove = function (ev) { var canvas = _this.canvas; var el = canvas.get('el'); if (el !== ev.target) { // 不在 canvas 上移动 if (_this.dragging || _this.currentShape) { var pointInfo = _this._getPointInfo(ev); // 还在拖拽过程中 if (_this.dragging) { _this._emitEvent('drag', ev, pointInfo, _this.draggingShape); } // 说明从某个图形直接移动到了画布外面, // 修复了 mouseleave 的 bug 后不再出现这种情况 // if (this.currentShape) { // this._emitEvent('mouseleave', ev, pointInfo, this.currentShape, this.currentShape, null); // this.currentShape = null; // } } } }; // 在 document 上处理拖拽到外面,释放鼠标时触发 dragend this._onDocumentMouseUp = function (ev) { var canvas = _this.canvas; var el = canvas.get('el'); if (el !== ev.target) { // 不在 canvas 上移动 if (_this.dragging) { var pointInfo = _this._getPointInfo(ev); if (_this.draggingShape) { // 如果存在拖拽的图形,则也触发 drop 事件 _this._emitEvent('drop', ev, pointInfo, null); } _this._emitEvent('dragend', ev, pointInfo, _this.draggingShape); _this._afterDrag(_this.draggingShape, pointInfo, ev); } } }; this.canvas = cfg.canvas; } EventController.prototype.init = function () { this._bindEvents(); }; // 注册事件 EventController.prototype._bindEvents = function () { var _this = this; var el = this.canvas.get('el'); Object(_util_util__WEBPACK_IMPORTED_MODULE_1__["each"])(EVENTS, function (eventName) { el.addEventListener(eventName, _this._eventCallback); }); if (document) { // 处理移动到外面没有触发 shape mouse leave 的事件 // 处理拖拽到外部的问题 document.addEventListener('mousemove', this._onDocumentMove); // 处理拖拽过程中在外部释放鼠标的问题 document.addEventListener('mouseup', this._onDocumentMouseUp); } }; // 清理事件 EventController.prototype._clearEvents = function () { var _this = this; var el = this.canvas.get('el'); Object(_util_util__WEBPACK_IMPORTED_MODULE_1__["each"])(EVENTS, function (eventName) { el.removeEventListener(eventName, _this._eventCallback); }); if (document) { document.removeEventListener('mousemove', this._onDocumentMove); document.removeEventListener('mouseup', this._onDocumentMouseUp); } }; EventController.prototype._getEventObj = function (type, event, point, target, fromShape, toShape) { var eventObj = new _graph_event__WEBPACK_IMPORTED_MODULE_0__["default"](type, event); eventObj.fromShape = fromShape; eventObj.toShape = toShape; eventObj.x = point.x; eventObj.y = point.y; eventObj.clientX = point.clientX; eventObj.clientY = point.clientY; eventObj.propagationPath.push(target); // 事件的x,y应该是基于画布左上角的,与canvas的matrix无关 return eventObj; }; // 根据点获取图形,提取成独立方法,便于后续优化 EventController.prototype._getShape = function (point, ev) { return this.canvas.getShape(point.x, point.y, ev); }; // 获取事件的当前点的信息 EventController.prototype._getPointInfo = function (ev) { var canvas = this.canvas; var clientPoint = canvas.getClientByEvent(ev); var point = canvas.getPointByEvent(ev); return { x: point.x, y: point.y, clientX: clientPoint.x, clientY: clientPoint.y }; }; // 触发事件 EventController.prototype._triggerEvent = function (type, ev) { var pointInfo = this._getPointInfo(ev); // 每次都获取图形有一定成本,后期可以考虑进行缓存策略 var shape = this._getShape(pointInfo, ev); var method = this["_on" + type]; var leaveCanvas = false; if (method) { method.call(this, pointInfo, shape, ev); } else { var preShape = this.currentShape; // 如果进入、移出画布时存在图形,则要分别触发事件 if (type === 'mouseenter' || type === 'dragenter' || type === 'mouseover') { this._emitEvent(type, ev, pointInfo, null, null, shape); // 先进入画布 if (shape) { this._emitEvent(type, ev, pointInfo, shape, null, shape); // 再触发图形的事件 } if (type === 'mouseenter' && this.draggingShape) { // 如果正在拖拽图形, 则触发 dragleave this._emitEvent('dragenter', ev, pointInfo, null); } } else if (type === 'mouseleave' || type === 'dragleave' || type === 'mouseout') { leaveCanvas = true; if (preShape) { this._emitEvent(type, ev, pointInfo, preShape, preShape, null); // 先触发图形的事件 } this._emitEvent(type, ev, pointInfo, null, preShape, null); // 再触发离开画布事件 if (type === 'mouseleave' && this.draggingShape) { this._emitEvent('dragleave', ev, pointInfo, null); } } else { this._emitEvent(type, ev, pointInfo, shape, null, null); // 一般事件中不需要考虑 from, to } } if (!leaveCanvas) { this.currentShape = shape; } // 当鼠标从画布移动到 shape 或者从 preShape 移动到 shape 时,应用 shape 上的鼠标样式 if (shape && !shape.get('destroyed')) { var canvas = this.canvas; var el = canvas.get('el'); el.style.cursor = shape.attr('cursor') || canvas.get('cursor'); } }; // 记录下点击的位置、图形,便于拖拽事件、click 事件的判定 EventController.prototype._onmousedown = function (pointInfo, shape, event) { // 只有鼠标左键的 mousedown 事件才会设置 mousedownShape 等属性,避免鼠标右键的 mousedown 事件引起其他事件发生 if (event.button === LEFT_BTN_CODE) { this.mousedownShape = shape; this.mousedownPoint = pointInfo; this.mousedownTimeStamp = event.timeStamp; } this._emitEvent('mousedown', event, pointInfo, shape, null, null); // mousedown 不考虑fromShape, toShape }; // mouseleave 和 mouseenter 都是成对存在的 // mouseenter 和 mouseover 同时触发 EventController.prototype._emitMouseoverEvents = function (event, pointInfo, fromShape, toShape) { var el = this.canvas.get('el'); if (fromShape !== toShape) { if (fromShape) { this._emitEvent('mouseout', event, pointInfo, fromShape, fromShape, toShape); this._emitEvent('mouseleave', event, pointInfo, fromShape, fromShape, toShape); // 当鼠标从 fromShape 移动到画布上时,重置鼠标样式 if (!toShape || toShape.get('destroyed')) { el.style.cursor = this.canvas.get('cursor'); } } if (toShape) { this._emitEvent('mouseover', event, pointInfo, toShape, fromShape, toShape); this._emitEvent('mouseenter', event, pointInfo, toShape, fromShape, toShape); } } }; // dragover 不等同于 mouseover,而等同于 mousemove EventController.prototype._emitDragoverEvents = function (event, pointInfo, fromShape, toShape, isCanvasEmit) { if (toShape) { if (toShape !== fromShape) { if (fromShape) { this._emitEvent('dragleave', event, pointInfo, fromShape, fromShape, toShape); } this._emitEvent('dragenter', event, pointInfo, toShape, fromShape, toShape); } if (!isCanvasEmit) { this._emitEvent('dragover', event, pointInfo, toShape); } } else if (fromShape) { // TODO: 此处判断有问题,当 drag 图形时,也会触发一次 dragleave 事件,因为此时 toShape 为 null,这不是所期望的 // 经过空白区域 this._emitEvent('dragleave', event, pointInfo, fromShape, fromShape, toShape); } if (isCanvasEmit) { this._emitEvent('dragover', event, pointInfo, toShape); } }; // drag 完成后,需要做一些清理工作 EventController.prototype._afterDrag = function (draggingShape, pointInfo, event) { if (draggingShape) { draggingShape.set('capture', true); // 恢复可以拾取 this.draggingShape = null; } this.dragging = false; // drag 完成后,有可能 draggingShape 已经移动到了当前位置,所以不能直接取当前图形 var shape = this._getShape(pointInfo, event); // 拖拽完成后,进行 enter,leave 的判定 if (shape !== draggingShape) { this._emitMouseoverEvents(event, pointInfo, draggingShape, shape); } this.currentShape = shape; // 更新当前 shape,如果不处理当前图形的 mouseleave 事件可能会出问题 }; // 按键抬起时,会终止拖拽、触发点击 EventController.prototype._onmouseup = function (pointInfo, shape, event) { // eevent.button === 0 表示鼠标左键事件,此处加上判断主要是为了避免右键鼠标会触发 mouseup 和 click 事件 // ref: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button if (event.button === LEFT_BTN_CODE) { var draggingShape = this.draggingShape; if (this.dragging) { // 存在可以拖拽的图形,同时拖拽到其他图形上时触发 drag 事件 if (draggingShape) { this._emitEvent('drop', event, pointInfo, shape); } this._emitEvent('dragend', event, pointInfo, draggingShape); this._afterDrag(draggingShape, pointInfo, event); } else { this._emitEvent('mouseup', event, pointInfo, shape); // 先触发 mouseup 再触发 click if (shape === this.mousedownShape) { this._emitEvent('click', event, pointInfo, shape); } this.mousedownShape = null; this.mousedownPoint = null; } } }; // 当触发浏览器的 dragover 事件时,不会再触发 mousemove ,所以这时候的 dragenter, dragleave 事件需要重新处理 EventController.prototype._ondragover = function (pointInfo, shape, event) { event.preventDefault(); // 如果不对 dragover 进行 preventDefault,则不会在 canvas 上触发 drop 事件 var preShape = this.currentShape; this._emitDragoverEvents(event, pointInfo, preShape, shape, true); }; // 大量的图形事件,都通过 mousemove 模拟 EventController.prototype._onmousemove = function (pointInfo, shape, event) { var canvas = this.canvas; var preShape = this.currentShape; var draggingShape = this.draggingShape; // 正在拖拽时 if (this.dragging) { // 正在拖拽中 if (draggingShape) { // 如果拖拽了 shape 会触发 dragenter, dragleave, dragover 和 drag 事件 this._emitDragoverEvents(event, pointInfo, preShape, shape, false); } // 如果存在 draggingShape 则会在 draggingShape 上触发 drag 事件,冒泡到 canvas 上 // 否则在 canvas 上触发 drag 事件 this._emitEvent('drag', event, pointInfo, draggingShape); } else { var mousedownPoint = this.mousedownPoint; if (mousedownPoint) { // 当鼠标点击下去,同时移动时,进行 drag 判定 var mousedownShape = this.mousedownShape; var now = event.timeStamp; var timeWindow = now - this.mousedownTimeStamp; var dx = mousedownPoint.clientX - pointInfo.clientX; var dy = mousedownPoint.clientY - pointInfo.clientY; var dist = dx * dx + dy * dy; if (timeWindow > 120 || dist > CLICK_OFFSET) { if (mousedownShape && mousedownShape.get('draggable')) { // 设置了 draggable 的 shape 才能触发 drag 相关的事件 draggingShape = this.mousedownShape; // 拖动鼠标点下时的 shape draggingShape.set('capture', false); // 禁止继续拾取,否则无法进行 dragover,dragenter,dragleave,drop的判定 this.draggingShape = draggingShape; this.dragging = true; this._emitEvent('dragstart', event, pointInfo, draggingShape); // 清理按下鼠标时缓存的值 this.mousedownShape = null; this.mousedownPoint = null; } else if (!mousedownShape && canvas.get('draggable')) { // 设置了 draggable 的 canvas 才能触发 drag 相关的事件 this.dragging = true; this._emitEvent('dragstart', event, pointInfo, null); // 清理按下鼠标时缓存的值 this.mousedownShape = null; this.mousedownPoint = null; } else { this._emitMouseoverEvents(event, pointInfo, preShape, shape); this._emitEvent('mousemove', event, pointInfo, shape); } } else { this._emitMouseoverEvents(event, pointInfo, preShape, shape); this._emitEvent('mousemove', event, pointInfo, shape); } } else { // 没有按键按下时,则直接触发 mouse over 相关的各种事件 this._emitMouseoverEvents(event, pointInfo, preShape, shape); // 始终触发移动 this._emitEvent('mousemove', event, pointInfo, shape); } } }; // 触发事件 EventController.prototype._emitEvent = function (type, event, pointInfo, shape, fromShape, toShape) { var eventObj = this._getEventObj(type, event, pointInfo, shape, fromShape, toShape); // 存在 shape 触发,则进行冒泡处理 if (shape) { eventObj.shape = shape; // 触发 shape 上的事件 emitTargetEvent(shape, type, eventObj); var parent_1 = shape.getParent(); // 执行冒泡 while (parent_1) { // 委托事件要先触发 parent_1.emitDelegation(type, eventObj); // 事件冒泡停止,不能妨碍委托事件 if (!eventObj.propagationStopped) { bubbleEvent(parent_1, type, eventObj); } eventObj.propagationPath.push(parent_1); parent_1 = parent_1.getParent(); } } else { // 如果没有 shape 直接在 canvas 上触发 var canvas = this.canvas; // 直接触发 canvas 上的事件 emitTargetEvent(canvas, type, eventObj); } }; EventController.prototype.destroy = function () { // 清理事件 this._clearEvents(); // 清理缓存的对象 this.canvas = null; this.currentShape = null; this.draggingShape = null; this.mousedownPoint = null; this.mousedownShape = null; this.mousedownTimeStamp = null; }; return EventController; }(); /* harmony default export */ __webpack_exports__["default"] = (EventController); /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/event/graph-event.js": /*!***************************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@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); /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/index.js": /*!***************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@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@0.5.0-beta.1@@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@0.5.0-beta.1@@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@0.5.0-beta.1@@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@0.5.0-beta.1@@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@0.5.0-beta.1@@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@0.5.0-beta.1@@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@0.5.0-beta.1@@antv/g-base/package.json"); var version = pkg.version; /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/util/color.js": /*!********************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@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); }; /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/util/matrix.js": /*!*********************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@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; } /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/util/path.js": /*!*******************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@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@2.0.9@@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].min !== 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; }; /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/util/util.js": /*!*******************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/esm/util/util.js ***! \*******************************************************************************/ /*! exports provided: removeFromArray, isBrowser, isNil, isFunction, isString, isObject, isArray, mix, each, upperFirst, isParent, isAllowCapture */ /***/ (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 export (binding) */ __webpack_require__.d(__webpack_exports__, "isParent", function() { return isParent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isAllowCapture", function() { return isAllowCapture; }); /* harmony import */ var _antv_util_lib_is_nil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antv/util/lib/is-nil */ "./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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'; // 是否元素的父容器 function isParent(container, shape) { // 所有 shape 都是 canvas 的子元素 if (container.isCanvas()) { return true; } var parent = shape.getParent(); var isParent = false; while (parent) { if (parent === container) { isParent = true; break; } parent = parent.getParent(); } return isParent; } function isAllowCapture(element) { // @ts-ignore return element.cfg.visible && element.cfg.capture; } /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/circle.js": /*!*********************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/circle.js ***! \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function default_1(shape) { var _a = shape.attr(), x = _a.x, y = _a.y, r = _a.r; return { x: x - r, y: y - r, width: r * 2, height: r * 2 }; } exports.default = default_1; /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/ellipse.js": /*!**********************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/ellipse.js ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function default_1(shape) { var attrs = shape.attr(); var x = attrs.x, y = attrs.y, rx = attrs.rx, ry = attrs.ry; return { x: x - rx, y: y - ry, width: rx * 2, height: ry * 2 }; } exports.default = default_1; /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/index.js": /*!********************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/index.js ***! \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var register_1 = __webpack_require__(/*! ./register */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/register.js"); exports.getBBoxMethod = register_1.getMethod; var rect_1 = __webpack_require__(/*! ./rect */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/rect.js"); var circle_1 = __webpack_require__(/*! ./circle */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/circle.js"); var polyline_1 = __webpack_require__(/*! ./polyline */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/polyline.js"); var polygon_1 = __webpack_require__(/*! ./polygon */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/polygon.js"); var text_1 = __webpack_require__(/*! ./text */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/text.js"); var path_1 = __webpack_require__(/*! ./path */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/path.js"); var line_1 = __webpack_require__(/*! ./line */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/line.js"); var ellipse_1 = __webpack_require__(/*! ./ellipse */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/ellipse.js"); register_1.register('rect', rect_1.default); register_1.register('image', rect_1.default); // image 使用 rect 的包围盒计算 register_1.register('circle', circle_1.default); register_1.register('marker', circle_1.default); // marker 使用 circle 的计算方案 register_1.register('polyline', polyline_1.default); register_1.register('polygon', polygon_1.default); register_1.register('text', text_1.default); register_1.register('path', path_1.default); register_1.register('line', line_1.default); register_1.register('ellipse', ellipse_1.default); /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/line.js": /*!*******************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/line.js ***! \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var util_1 = __webpack_require__(/*! ./util */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/util.js"); function default_1(shape) { var attrs = shape.attr(); var x1 = attrs.x1, y1 = attrs.y1, x2 = attrs.x2, y2 = attrs.y2; var minX = Math.min(x1, x2); var maxX = Math.max(x1, x2); var minY = Math.min(y1, y2); var maxY = Math.max(y1, y2); var bbox = { minX: minX, maxX: maxX, minY: minY, maxY: maxY }; bbox = util_1.mergeArrowBBox(shape, bbox); return { x: bbox.minX, y: bbox.minY, width: bbox.maxX - bbox.minX, height: bbox.maxY - bbox.minY }; } exports.default = default_1; /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/path.js": /*!*******************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/path.js ***! \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var quadratic_1 = __webpack_require__(/*! @antv/g-math/lib/quadratic */ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/quadratic.js"); var cubic_1 = __webpack_require__(/*! @antv/g-math/lib/cubic */ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/cubic.js"); var arc_1 = __webpack_require__(/*! @antv/g-math/lib/arc */ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/arc.js"); var path_2_segments_1 = __webpack_require__(/*! @antv/path-util/lib/path-2-segments */ "./node_modules/_@antv_path-util@2.0.8@@antv/path-util/lib/path-2-segments.js"); var is_number_equal_1 = __webpack_require__(/*! @antv/util/lib/is-number-equal */ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/is-number-equal.js"); var util_1 = __webpack_require__(/*! ./util */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/util.js"); function getPathBox(segments, lineWidth) { var xArr = []; var yArr = []; var segmentsWithAngle = []; for (var i = 0; i < segments.length; i++) { var segment = segments[i]; var currentPoint = segment.currentPoint, params = segment.params, prePoint = segment.prePoint; var box = void 0; switch (segment.command) { case 'Q': box = quadratic_1.default.box(prePoint[0], prePoint[1], params[1], params[2], params[3], params[4]); break; case 'C': box = cubic_1.default.box(prePoint[0], prePoint[1], params[1], params[2], params[3], params[4], params[5], params[6]); break; case 'A': var arcParams = segment.arcParams; box = arc_1.default.box(arcParams.cx, arcParams.cy, arcParams.rx, arcParams.ry, arcParams.xRotation, arcParams.startAngle, arcParams.endAngle); break; default: xArr.push(currentPoint[0]); yArr.push(currentPoint[1]); break; } if (box) { segment.box = box; xArr.push(box.x, box.x + box.width); yArr.push(box.y, box.y + box.height); } if (lineWidth && (segment.command === 'L' || segment.command === 'M') && segment.prePoint && segment.nextPoint) { segmentsWithAngle.push(segment); } } // bbox calculation should ignore NaN for path attribute // ref: https://github.com/antvis/g/issues/210 xArr = xArr.filter(function (item) { return !Number.isNaN(item); }); yArr = yArr.filter(function (item) { return !Number.isNaN(item); }); var minX = Math.min.apply(null, xArr); var minY = Math.min.apply(null, yArr); var maxX = Math.max.apply(null, xArr); var maxY = Math.max.apply(null, yArr); if (segmentsWithAngle.length === 0) { return { x: minX, y: minY, width: maxX - minX, height: maxY - minY }; } for (var i = 0; i < segmentsWithAngle.length; i++) { var segment = segmentsWithAngle[i]; var currentPoint = segment.currentPoint; var extra = void 0; if (currentPoint[0] === minX) { extra = getExtraFromSegmentWithAngle(segment, lineWidth); minX = minX - extra.xExtra; } else if (currentPoint[0] === maxX) { extra = getExtraFromSegmentWithAngle(segment, lineWidth); maxX = maxX + extra.xExtra; } if (currentPoint[1] === minY) { extra = getExtraFromSegmentWithAngle(segment, lineWidth); minY = minY - extra.yExtra; } else if (currentPoint[1] === maxY) { extra = getExtraFromSegmentWithAngle(segment, lineWidth); maxY = maxY + extra.yExtra; } } return { x: minX, y: minY, width: maxX - minX, height: maxY - minY }; } function getExtraFromSegmentWithAngle(segment, lineWidth) { var prePoint = segment.prePoint, currentPoint = segment.currentPoint, nextPoint = segment.nextPoint; var currentAndPre = Math.pow(currentPoint[0] - prePoint[0], 2) + Math.pow(currentPoint[1] - prePoint[1], 2); var currentAndNext = Math.pow(currentPoint[0] - nextPoint[0], 2) + Math.pow(currentPoint[1] - nextPoint[1], 2); var preAndNext = Math.pow(prePoint[0] - nextPoint[0], 2) + Math.pow(prePoint[1] - nextPoint[1], 2); // 以 currentPoint 为顶点的夹角 var currentAngle = Math.acos((currentAndPre + currentAndNext - preAndNext) / (2 * Math.sqrt(currentAndPre) * Math.sqrt(currentAndNext))); // 夹角为空、 0 或 PI 时,不需要计算夹角处的额外宽度 // 注意: 由于计算精度问题,夹角为 0 的情况计算出来的角度可能是一个很小的值,还需要判断其与 0 是否近似相等 if (!currentAngle || Math.sin(currentAngle) === 0 || is_number_equal_1.default(currentAngle, 0)) { return { xExtra: 0, yExtra: 0 }; } var xAngle = Math.abs(Math.atan2(nextPoint[1] - currentPoint[1], nextPoint[0] - currentPoint[0])); var yAngle = Math.abs(Math.atan2(nextPoint[0] - currentPoint[0], nextPoint[1] - currentPoint[1])); // 将夹角转为锐角 xAngle = xAngle > Math.PI / 2 ? Math.PI - xAngle : xAngle; yAngle = yAngle > Math.PI / 2 ? Math.PI - yAngle : yAngle; // 这里不考虑在水平和垂直方向的投影,直接使用最大差值 // 由于上层统一加减了二分之一线宽,这里需要进行弥补 var extra = { // 水平方向投影 xExtra: Math.cos(currentAngle / 2 - xAngle) * (lineWidth / 2 * (1 / Math.sin(currentAngle / 2))) - lineWidth / 2 || 0, // 垂直方向投影 yExtra: Math.cos(yAngle - currentAngle / 2) * (lineWidth / 2 * (1 / Math.sin(currentAngle / 2))) - lineWidth / 2 || 0 }; return extra; } function default_1(shape) { var attrs = shape.attr(); var path = attrs.path, stroke = attrs.stroke; var lineWidth = stroke ? attrs.lineWidth : 0; // 只有有 stroke 时,lineWidth 才生效 var segments = shape.get('segments') || path_2_segments_1.default(path); var _a = getPathBox(segments, lineWidth), x = _a.x, y = _a.y, width = _a.width, height = _a.height; var bbox = { minX: x, minY: y, maxX: x + width, maxY: y + height }; bbox = util_1.mergeArrowBBox(shape, bbox); return { x: bbox.minX, y: bbox.minY, width: bbox.maxX - bbox.minX, height: bbox.maxY - bbox.minY }; } exports.default = default_1; /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/polygon.js": /*!**********************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/polygon.js ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var util_1 = __webpack_require__(/*! @antv/g-math/lib/util */ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/util.js"); function default_1(shape) { var attrs = shape.attr(); var points = attrs.points; var xArr = []; var yArr = []; for (var i = 0; i < points.length; i++) { var point = points[i]; xArr.push(point[0]); yArr.push(point[1]); } return util_1.getBBoxByArray(xArr, yArr); } exports.default = default_1; /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/polyline.js": /*!***********************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/polyline.js ***! \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var util_1 = __webpack_require__(/*! @antv/g-math/lib/util */ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/util.js"); var util_2 = __webpack_require__(/*! ./util */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/util.js"); function default_1(shape) { var attrs = shape.attr(); var points = attrs.points; var xArr = []; var yArr = []; for (var i = 0; i < points.length; i++) { var point = points[i]; xArr.push(point[0]); yArr.push(point[1]); } var _a = util_1.getBBoxByArray(xArr, yArr), x = _a.x, y = _a.y, width = _a.width, height = _a.height; var bbox = { minX: x, minY: y, maxX: x + width, maxY: y + height }; bbox = util_2.mergeArrowBBox(shape, bbox); return { x: bbox.minX, y: bbox.minY, width: bbox.maxX - bbox.minX, height: bbox.maxY - bbox.minY }; } exports.default = default_1; /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/rect.js": /*!*******************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/rect.js ***! \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function default_1(shape) { var attrs = shape.attr(); var x = attrs.x, y = attrs.y, width = attrs.width, height = attrs.height; return { x: x, y: y, width: width, height: height }; } exports.default = default_1; /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/register.js": /*!***********************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/register.js ***! \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var cache = new Map(); /** * 注册计算包围盒的算法 * @param type 方法名 * @param method 方法 */ function register(type, method) { cache.set(type, method); } exports.register = register; /** * 获取计算包围盒的算法 * @param type 方法名 */ function getMethod(type) { return cache.get(type); } exports.getMethod = getMethod; /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/text.js": /*!*******************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/text.js ***! \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var text_1 = __webpack_require__(/*! ../util/text */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/util/text.js"); function default_1(shape) { var attrs = shape.attr(); var x = attrs.x, y = attrs.y, text = attrs.text, fontSize = attrs.fontSize, lineHeight = attrs.lineHeight; var font = attrs.font; if (!font) { // 如果未组装 font font = text_1.assembleFont(attrs); } var width = text_1.getTextWidth(text, font); var bbox; if (!width) { // 如果width不存在,四点共其实点 bbox = { x: x, y: y, width: 0, height: 0 }; } else { var textAlign = attrs.textAlign, textBaseline = attrs.textBaseline; var height = text_1.getTextHeight(text, fontSize, lineHeight); // attrs.height // 默认左右对齐:left, 默认上下对齐 bottom var point = { x: x, y: y - height }; if (textAlign) { if (textAlign === 'end' || textAlign === 'right') { point.x -= width; } else if (textAlign === 'center') { point.x -= width / 2; } } if (textBaseline) { if (textBaseline === 'top') { point.y += height; } else if (textBaseline === 'middle') { point.y += height / 2; } } bbox = { x: point.x, y: point.y, width: width, height: height }; } return bbox; } exports.default = default_1; /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/util.js": /*!*******************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/bbox/util.js ***! \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // 合并包围盒 function mergeBBox(bbox1, bbox2) { if (!bbox1 || !bbox2) { return bbox1 || bbox2; } return { minX: Math.min(bbox1.minX, bbox2.minX), minY: Math.min(bbox1.minY, bbox2.minY), maxX: Math.max(bbox1.maxX, bbox2.maxX), maxY: Math.max(bbox1.maxY, bbox2.maxY) }; } exports.mergeBBox = mergeBBox; // 合并箭头的包围盒 function mergeArrowBBox(shape, bbox) { var startArrowShape = shape.get('startArrowShape'); var endArrowShape = shape.get('endArrowShape'); var startArrowBBox = null; var endArrowBBox = null; if (startArrowShape) { startArrowBBox = startArrowShape.getCanvasBBox(); bbox = mergeBBox(bbox, startArrowBBox); } if (endArrowShape) { endArrowBBox = endArrowShape.getCanvasBBox(); bbox = mergeBBox(bbox, endArrowBBox); } return bbox; } exports.mergeArrowBBox = mergeArrowBBox; /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/interfaces.js": /*!********************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/interfaces.js ***! \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/types.js": /*!***************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/types.js ***! \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/util/matrix.js": /*!*********************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/util/matrix.js ***! \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * @fileoverview 矩阵运算,本来是要引入 gl-matrix, 但是考虑到 g-mobile 对大小有限制,同时 g-webgl 使用的 matrix 不一致 * 所以,这里仅实现 2D 几个运算,上层自己引入 gl-matrix * @author dxq613@gmail.com */ Object.defineProperty(exports, "__esModule", { value: true }); /** * 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; } exports.multiplyMatrix = multiplyMatrix; /** * 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; } exports.multiplyVec2 = multiplyVec2; /** * 矩阵的逆 * @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; } exports.invert = invert; /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/util/offscreen.js": /*!************************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/util/offscreen.js ***! \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // 全局设置一个唯一离屏的 ctx,用于计算 isPointInPath var offScreenCtx = null; function getOffScreenContext() { if (!offScreenCtx) { var canvas = document.createElement('canvas'); canvas.width = 1; canvas.height = 1; offScreenCtx = canvas.getContext('2d'); } return offScreenCtx; } exports.getOffScreenContext = getOffScreenContext; /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/util/text.js": /*!*******************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/util/text.js ***! \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var util_1 = __webpack_require__(/*! ./util */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/util/util.js"); var offscreen_1 = __webpack_require__(/*! ./offscreen */ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/util/offscreen.js"); /** * 获取文本的高度 * @param text 文本 * @param fontSize 字体大小 * @param lineHeight 行高,可以为空 */ function getTextHeight(text, fontSize, lineHeight) { var lineCount = 1; if (util_1.isString(text)) { lineCount = text.split('\n').length; } if (lineCount > 1) { var spaceingY = getLineSpaceing(fontSize, lineHeight); return fontSize * lineCount + spaceingY * (lineCount - 1); } return fontSize; } exports.getTextHeight = getTextHeight; /** * 获取行间距如果文本多行,需要获取文本间距 * @param fontSize 字体大小 * @param lineHeight 行高 */ function getLineSpaceing(fontSize, lineHeight) { return lineHeight ? lineHeight - fontSize : fontSize * 0.14; } exports.getLineSpaceing = getLineSpaceing; /** * 字体宽度 * @param text 文本 * @param font 字体 */ function getTextWidth(text, font) { var context = offscreen_1.getOffScreenContext(); // 获取离屏的 ctx 进行计算 var width = 0; // null 或者 undefined 时,宽度为 0 if (util_1.isNil(text) || text === '') { return width; } context.save(); context.font = font; if (util_1.isString(text) && text.includes('\n')) { var textArr = text.split('\n'); util_1.each(textArr, function (subText) { var measureWidth = context.measureText(subText).width; if (width < measureWidth) { width = measureWidth; } }); } else { width = context.measureText(text).width; } context.restore(); return width; } exports.getTextWidth = getTextWidth; function assembleFont(attrs) { var fontSize = attrs.fontSize, fontFamily = attrs.fontFamily, fontWeight = attrs.fontWeight, fontStyle = attrs.fontStyle, fontVariant = attrs.fontVariant; return [fontStyle, fontVariant, fontWeight, fontSize + "px", fontFamily].join(' ').trim(); } exports.assembleFont = assembleFont; /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/util/util.js": /*!*******************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/lib/util/util.js ***! \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function removeFromArray(arr, obj) { var index = arr.indexOf(obj); if (index !== -1) { arr.splice(index, 1); } } exports.removeFromArray = removeFromArray; exports.isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined'; var is_nil_1 = __webpack_require__(/*! @antv/util/lib/is-nil */ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/is-nil.js"); exports.isNil = is_nil_1.default; var is_function_1 = __webpack_require__(/*! @antv/util/lib/is-function */ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/is-function.js"); exports.isFunction = is_function_1.default; var is_string_1 = __webpack_require__(/*! @antv/util/lib/is-string */ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/is-string.js"); exports.isString = is_string_1.default; var is_object_1 = __webpack_require__(/*! @antv/util/lib/is-object */ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/is-object.js"); exports.isObject = is_object_1.default; var is_array_1 = __webpack_require__(/*! @antv/util/lib/is-array */ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/is-array.js"); exports.isArray = is_array_1.default; var mix_1 = __webpack_require__(/*! @antv/util/lib/mix */ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/mix.js"); exports.mix = mix_1.default; var each_1 = __webpack_require__(/*! @antv/util/lib/each */ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/each.js"); exports.each = each_1.default; var upper_first_1 = __webpack_require__(/*! @antv/util/lib/upper-first */ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/upper-first.js"); exports.upperFirst = upper_first_1.default; // 是否元素的父容器 function isParent(container, shape) { // 所有 shape 都是 canvas 的子元素 if (container.isCanvas()) { return true; } var parent = shape.getParent(); var isParent = false; while (parent) { if (parent === container) { isParent = true; break; } parent = parent.getParent(); } return isParent; } exports.isParent = isParent; function isAllowCapture(element) { // @ts-ignore return element.cfg.visible && element.cfg.capture; } exports.isAllowCapture = isAllowCapture; /***/ }), /***/ "./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/package.json": /*!***************************************************************************!*\ !*** ./node_modules/_@antv_g-base@0.5.0-beta.1@@antv/g-base/package.json ***! \***************************************************************************/ /*! exports provided: name, version, description, main, module, types, files, scripts, repository, keywords, publishConfig, author, license, bugs, devDependencies, homepage, dependencies, __npminstall_done, gitHead, _from, _resolved, default */ /***/ (function(module) { module.exports = JSON.parse("{\"name\":\"@antv/g-base\",\"version\":\"0.5.0-beta.1\",\"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 tests/unit\",\"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/torch\":\"^1.0.0\",\"gl-matrix\":\"^3.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.3\",\"@antv/matrix-util\":\"^3.1.0-beta.1\",\"@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\",\"detect-browser\":\"^5.1.0\"},\"__npminstall_done\":\"Fri May 29 2020 19:03:41 GMT+0800 (GMT+08:00)\",\"gitHead\":\"f1dd2cc436ea123939f400a9a9d88f1ebce46be9\",\"_from\":\"@antv/g-base@0.5.0-beta.1\",\"_resolved\":\"https://registry.npm.taobao.org/@antv/g-base/download/@antv/g-base-0.5.0-beta.1.tgz\"}"); /***/ }), /***/ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/arc.js": /*!******************************************************************!*\ !*** ./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/arc.js ***! \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var util_1 = __webpack_require__(/*! ./util */ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/util.js"); var ellipse_1 = __webpack_require__(/*! ./ellipse */ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/ellipse.js"); // 偏导数 x function derivativeXAt(cx, cy, rx, ry, xRotation, startAngle, endAngle, angle) { return -1 * rx * Math.cos(xRotation) * Math.sin(angle) - ry * Math.sin(xRotation) * Math.cos(angle); } // 偏导数 y function derivativeYAt(cx, cy, rx, ry, xRotation, startAngle, endAngle, angle) { return -1 * rx * Math.sin(xRotation) * Math.sin(angle) + ry * Math.cos(xRotation) * Math.cos(angle); } // x 的极值 function xExtrema(rx, ry, xRotation) { return Math.atan(-ry / rx * Math.tan(xRotation)); } // y 的极值 function yExtrema(rx, ry, xRotation) { return Math.atan(ry / (rx * Math.tan(xRotation))); } // 根据角度求 x 坐标 function xAt(cx, cy, rx, ry, xRotation, angle) { return rx * Math.cos(xRotation) * Math.cos(angle) - ry * Math.sin(xRotation) * Math.sin(angle) + cx; } // 根据角度求 y 坐标 function yAt(cx, cy, rx, ry, xRotation, angle) { return rx * Math.sin(xRotation) * Math.cos(angle) + ry * Math.cos(xRotation) * Math.sin(angle) + cy; } // 获取点在椭圆上的角度 function getAngle(rx, ry, x0, y0) { var angle = Math.atan2(y0 * rx, x0 * ry); // 转换到 0 - 2PI 内 return (angle + Math.PI * 2) % (Math.PI * 2); } // 根据角度获取,x,y function getPoint(rx, ry, angle) { return { x: rx * Math.cos(angle), y: ry * Math.sin(angle) }; } // 旋转 function rotate(x, y, angle) { var cos = Math.cos(angle); var sin = Math.sin(angle); return [x * cos - y * sin, x * sin + y * cos]; } exports.default = { /** * 计算包围盒 * @param {number} cx 圆心 x * @param {number} cy 圆心 y * @param {number} rx x 轴方向的半径 * @param {number} ry y 轴方向的半径 * @param {number} xRotation 旋转角度 * @param {number} startAngle 起始角度 * @param {number} endAngle 结束角度 * @return {object} 包围盒对象 */ box: function (cx, cy, rx, ry, xRotation, startAngle, endAngle) { var xDim = xExtrema(rx, ry, xRotation); var minX = Infinity; var maxX = -Infinity; var xs = [startAngle, endAngle]; for (var i = -Math.PI * 2; i <= Math.PI * 2; i += Math.PI) { var xAngle = xDim + i; if (startAngle < endAngle) { if (startAngle < xAngle && xAngle < endAngle) { xs.push(xAngle); } } else { if (endAngle < xAngle && xAngle < startAngle) { xs.push(xAngle); } } } for (var i = 0; i < xs.length; i++) { var x = xAt(cx, cy, rx, ry, xRotation, xs[i]); if (x < minX) { minX = x; } if (x > maxX) { maxX = x; } } var yDim = yExtrema(rx, ry, xRotation); var minY = Infinity; var maxY = -Infinity; var ys = [startAngle, endAngle]; for (var i = -Math.PI * 2; i <= Math.PI * 2; i += Math.PI) { var yAngle = yDim + i; if (startAngle < endAngle) { if (startAngle < yAngle && yAngle < endAngle) { ys.push(yAngle); } } else { if (endAngle < yAngle && yAngle < startAngle) { ys.push(yAngle); } } } for (var i = 0; i < ys.length; i++) { var y = yAt(cx, cy, rx, ry, xRotation, ys[i]); if (y < minY) { minY = y; } if (y > maxY) { maxY = y; } } return { x: minX, y: minY, width: maxX - minX, height: maxY - minY }; }, /** * 获取圆弧的长度,计算圆弧长度时不考虑旋转角度, * 仅跟 rx, ry, startAngle, endAngle 相关 * @param {number} cx 圆心 x * @param {number} cy 圆心 y * @param {number} rx x 轴方向的半径 * @param {number} ry y 轴方向的半径 * @param {number} xRotation 旋转角度 * @param {number} startAngle 起始角度 * @param {number} endAngle 结束角度 */ length: function (cx, cy, rx, ry, xRotation, startAngle, endAngle) {}, /** * 获取指定点到圆弧的最近距离的点 * @param {number} cx 圆心 x * @param {number} cy 圆心 y * @param {number} rx x 轴方向的半径 * @param {number} ry y 轴方向的半径 * @param {number} xRotation 旋转角度 * @param {number} startAngle 起始角度 * @param {number} endAngle 结束角度 * @param {number} x0 指定点的 x * @param {number} y0 指定点的 y * @return {object} 到指定点最近距离的点 */ nearestPoint: function (cx, cy, rx, ry, xRotation, startAngle, endAngle, x0, y0) { // 将最近距离问题转换成到椭圆中心 0,0 没有旋转的椭圆问题 var relativeVector = rotate(x0 - cx, y0 - cy, -xRotation); var x1 = relativeVector[0], y1 = relativeVector[1]; // 计算点到椭圆的最近的点 var relativePoint = ellipse_1.default.nearestPoint(0, 0, rx, ry, x1, y1); // 获取点在椭圆上的角度 var angle = getAngle(rx, ry, relativePoint.x, relativePoint.y); // 点没有在圆弧上 if (angle < startAngle) { // 小于起始圆弧 relativePoint = getPoint(rx, ry, startAngle); } else if (angle > endAngle) { // 大于结束圆弧 relativePoint = getPoint(rx, ry, endAngle); } // 旋转到 xRotation 的角度 var vector = rotate(relativePoint.x, relativePoint.y, xRotation); return { x: vector[0] + cx, y: vector[1] + cy }; }, pointDistance: function (cx, cy, rx, ry, xRotation, startAngle, endAngle, x0, y0) { var nearestPoint = this.nearestPoint(cx, cy, rx, ry, x0, y0); return util_1.distance(nearestPoint.x, nearestPoint.y, x0, y0); }, pointAt: function (cx, cy, rx, ry, xRotation, startAngle, endAngle, t) { var angle = (endAngle - startAngle) * t + startAngle; return { x: xAt(cx, cy, rx, ry, xRotation, angle), y: yAt(cx, cy, rx, ry, xRotation, angle) }; }, tangentAngle: function (cx, cy, rx, ry, xRotation, startAngle, endAngle, t) { var angle = (endAngle - startAngle) * t + startAngle; var dx = derivativeXAt(cx, cy, rx, ry, xRotation, startAngle, endAngle, angle); var dy = derivativeYAt(cx, cy, rx, ry, xRotation, startAngle, endAngle, angle); return util_1.piMod(Math.atan2(dy, dx)); } }; /***/ }), /***/ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/bezier.js": /*!*********************************************************************!*\ !*** ./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/bezier.js ***! \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var util_1 = __webpack_require__(/*! ./util */ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/util.js"); var EPSILON = 0.0001; /** * 使用牛顿切割法求最近的点 * @param {number[]} xArr 点的 x 数组 * @param {number[]} yArr 点的 y 数组 * @param {number} x 指定的点 x * @param {number} y 指定的点 y * @param {Function} tCallback 差值函数 */ function nearestPoint(xArr, yArr, x, y, tCallback) { var t; var interval = 0.005; var d = Infinity; var v0 = [x, y]; for (var i = 0; i <= 20; i++) { var _t = i * 0.05; var v1 = [tCallback.apply(null, xArr.concat([_t])), tCallback.apply(null, yArr.concat([_t]))]; var d1 = util_1.distance(v0[0], v0[1], v1[0], v1[1]); if (d1 < d) { t = _t; d = d1; } } // 提前终止 if (t === 0) { return { x: xArr[0], y: yArr[0] }; } if (t === 1) { var count = xArr.length; return { x: xArr[count - 1], y: yArr[count - 1] }; } d = Infinity; for (var i = 0; i < 32; i++) { if (interval < EPSILON) { break; } var prev = t - interval; var next = t + interval; var v1 = [tCallback.apply(null, xArr.concat([prev])), tCallback.apply(null, yArr.concat([prev]))]; var d1 = util_1.distance(v0[0], v0[1], v1[0], v1[1]); if (prev >= 0 && d1 < d) { t = prev; d = d1; } else { var v2 = [tCallback.apply(null, xArr.concat([next])), tCallback.apply(null, yArr.concat([next]))]; var d2 = util_1.distance(v0[0], v0[1], v2[0], v2[1]); if (next <= 1 && d2 < d) { t = next; d = d2; } else { interval *= 0.5; } } } return { x: tCallback.apply(null, xArr.concat([t])), y: tCallback.apply(null, yArr.concat([t])) }; } exports.nearestPoint = nearestPoint; // 近似求解 https://community.khronos.org/t/3d-cubic-bezier-segment-length/62363/2 function snapLength(xArr, yArr) { var totalLength = 0; var count = xArr.length; for (var i = 0; i < count; i++) { var x = xArr[i]; var y = yArr[i]; var nextX = xArr[(i + 1) % count]; var nextY = yArr[(i + 1) % count]; totalLength += util_1.distance(x, y, nextX, nextY); } return totalLength / 2; } exports.snapLength = snapLength; /***/ }), /***/ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/cubic.js": /*!********************************************************************!*\ !*** ./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/cubic.js ***! \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var util_1 = __webpack_require__(/*! ./util */ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/util.js"); var line_1 = __webpack_require__(/*! ./line */ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/line.js"); var bezier_1 = __webpack_require__(/*! ./bezier */ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/bezier.js"); function cubicAt(p0, p1, p2, p3, t) { var onet = 1 - t; // t * t * t 的性能大概是 Math.pow(t, 3) 的三倍 return onet * onet * onet * p0 + 3 * p1 * t * onet * onet + 3 * p2 * t * t * onet + p3 * t * t * t; } function derivativeAt(p0, p1, p2, p3, t) { var onet = 1 - t; return 3 * (onet * onet * (p1 - p0) + 2 * onet * t * (p2 - p1) + t * t * (p3 - p2)); } function extrema(p0, p1, p2, p3) { var a = -3 * p0 + 9 * p1 - 9 * p2 + 3 * p3; var b = 6 * p0 - 12 * p1 + 6 * p2; var c = 3 * p1 - 3 * p0; var extremas = []; var t1; var t2; var discSqrt; if (util_1.isNumberEqual(a, 0)) { if (!util_1.isNumberEqual(b, 0)) { t1 = -c / b; if (t1 >= 0 && t1 <= 1) { extremas.push(t1); } } } else { var disc = b * b - 4 * a * c; if (util_1.isNumberEqual(disc, 0)) { extremas.push(-b / (2 * a)); } else if (disc > 0) { discSqrt = Math.sqrt(disc); t1 = (-b + discSqrt) / (2 * a); t2 = (-b - discSqrt) / (2 * a); if (t1 >= 0 && t1 <= 1) { extremas.push(t1); } if (t2 >= 0 && t2 <= 1) { extremas.push(t2); } } } return extremas; } // 分割贝塞尔曲线 function divideCubic(x1, y1, x2, y2, x3, y3, x4, y4, t) { // 划分点 var xt = cubicAt(x1, x2, x3, x4, t); var yt = cubicAt(y1, y2, y3, y4, t); // 计算两点之间的差值点 var c1 = line_1.default.pointAt(x1, y1, x2, y2, t); var c2 = line_1.default.pointAt(x2, y2, x3, y3, t); var c3 = line_1.default.pointAt(x3, y3, x4, y4, t); var c12 = line_1.default.pointAt(c1.x, c1.y, c2.x, c2.y, t); var c23 = line_1.default.pointAt(c2.x, c2.y, c3.x, c3.y, t); return [[x1, y1, c1.x, c1.y, c12.x, c12.y, xt, yt], [xt, yt, c23.x, c23.y, c3.x, c3.y, x4, y4]]; } // 使用迭代法取贝塞尔曲线的长度,二阶和三阶分开写,更清晰和便于调试 function cubicLength(x1, y1, x2, y2, x3, y3, x4, y4, iterationCount) { if (iterationCount === 0) { return bezier_1.snapLength([x1, x2, x3, x4], [y1, y2, y3, y4]); } var cubics = divideCubic(x1, y1, x2, y2, x3, y3, x4, y4, 0.5); var left = cubics[0]; var right = cubics[1]; left.push(iterationCount - 1); right.push(iterationCount - 1); return cubicLength.apply(null, left) + cubicLength.apply(null, right); } exports.default = { extrema: extrema, box: function (x1, y1, x2, y2, x3, y3, x4, y4) { var xArr = [x1, x4]; var yArr = [y1, y4]; var xExtrema = extrema(x1, x2, x3, x4); var yExtrema = extrema(y1, y2, y3, y4); for (var i = 0; i < xExtrema.length; i++) { xArr.push(cubicAt(x1, x2, x3, x4, xExtrema[i])); } for (var i = 0; i < yExtrema.length; i++) { yArr.push(cubicAt(y1, y2, y3, y4, yExtrema[i])); } return util_1.getBBoxByArray(xArr, yArr); }, length: function (x1, y1, x2, y2, x3, y3, x4, y4) { // 迭代三次,划分成 8 段求长度 return cubicLength(x1, y1, x2, y2, x3, y3, x4, y4, 3); }, nearestPoint: function (x1, y1, x2, y2, x3, y3, x4, y4, x0, y0) { return bezier_1.nearestPoint([x1, x2, x3, x4], [y1, y2, y3, y4], x0, y0, cubicAt); }, pointDistance: function (x1, y1, x2, y2, x3, y3, x4, y4, x0, y0) { var point = this.nearestPoint(x1, y1, x2, y2, x3, y3, x4, y4, x0, y0); return util_1.distance(point.x, point.y, x0, y0); }, interpolationAt: cubicAt, pointAt: function (x1, y1, x2, y2, x3, y3, x4, y4, t) { return { x: cubicAt(x1, x2, x3, x4, t), y: cubicAt(y1, y2, y3, y4, t) }; }, divide: function (x1, y1, x2, y2, x3, y3, x4, y4, t) { return divideCubic(x1, y1, x2, y2, x3, y3, x4, y4, t); }, tangentAngle: function (x1, y1, x2, y2, x3, y3, x4, y4, t) { var dx = derivativeAt(x1, x2, x3, x4, t); var dy = derivativeAt(y1, y2, y3, y4, t); return util_1.piMod(Math.atan2(dy, dx)); } }; /***/ }), /***/ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/ellipse.js": /*!**********************************************************************!*\ !*** ./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/ellipse.js ***! \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * @fileoverview 椭圆的一些计算, * - 周长计算参考:https://www.mathsisfun.com/geometry/ellipse-perimeter.html * - 距离计算参考:https://wet-robots.ghost.io/simple-method-for-distance-to-ellipse/ * @author dxq613@gmail.com */ Object.defineProperty(exports, "__esModule", { value: true }); var util_1 = __webpack_require__(/*! ./util */ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/util.js"); function copysign(v1, v2) { var absv = Math.abs(v1); return v2 > 0 ? absv : absv * -1; } exports.default = { /** * 包围盒计算 * @param {number} x 椭圆中心 x * @param {number} y 椭圆中心 y * @param {number} rx 椭圆 x 方向半径 * @param {number} ry 椭圆 y 方向半径 * @return {object} 包围盒 */ box: function (x, y, rx, ry) { return { x: x - rx, y: y - ry, width: rx * 2, height: ry * 2 }; }, /** * 计算周长,使用近似法 * @param {number} x 椭圆中心 x * @param {number} y 椭圆中心 y * @param {number} rx 椭圆 x 方向半径 * @param {number} ry 椭圆 y 方向半径 * @return {number} 椭圆周长 */ length: function (x, y, rx, ry) { return Math.PI * (3 * (rx + ry) - Math.sqrt((3 * rx + ry) * (rx + 3 * ry))); }, /** * 距离椭圆最近的点 * @param {number} x 椭圆中心 x * @param {number} y 椭圆中心 y * @param {number} rx 椭圆 x 方向半径 * @param {number} ry 椭圆 y 方向半径 * @param {number} x0 指定的点 x * @param {number} y0 指定的点 y * @return {object} 椭圆上距离指定点最近的点 */ nearestPoint: function (x, y, rx, ry, x0, y0) { var a = rx; var b = ry; // 假如椭圆半径为0则返回圆心 if (a === 0 || b === 0) { return { x: x, y: y }; } // 转换成 0, 0 为中心的椭圆计算 var relativeX = x0 - x; var relativeY = y0 - y; var px = Math.abs(relativeX); var py = Math.abs(relativeY); var squareA = a * a; var squareB = b * b; // const angle0 = Math.atan2(relativeY, relativeX); var t = Math.PI / 4; var nearestX; // 椭圆上的任一点 var nearestY; // 迭代 4 次 for (var i = 0; i < 4; i++) { nearestX = a * Math.cos(t); nearestY = b * Math.sin(t); var ex = (squareA - squareB) * Math.pow(Math.cos(t), 3) / a; var ey = (squareB - squareA) * Math.pow(Math.sin(t), 3) / b; var rx1 = nearestX - ex; var ry1 = nearestY - ey; var qx = px - ex; var qy = py - ey; var r = Math.hypot(ry1, rx1); var q = Math.hypot(qy, qx); var delta_c = r * Math.asin((rx1 * qy - ry1 * qx) / (r * q)); var delta_t = delta_c / Math.sqrt(squareA + squareB - nearestX * nearestX - nearestY * nearestY); t += delta_t; t = Math.min(Math.PI / 2, Math.max(0, t)); } return { x: x + copysign(nearestX, relativeX), y: y + copysign(nearestY, relativeY) }; }, /** * 点到椭圆最近的距离 * @param {number} x 椭圆中心 x * @param {number} y 椭圆中心 y * @param {number} rx 椭圆 x 方向半径 * @param {number} ry 椭圆 y 方向半径 * @param {number} x0 指定的点 x * @param {number} y0 指定的点 y * @return {number} 点到椭圆的距离 */ pointDistance: function (x, y, rx, ry, x0, y0) { var nearestPoint = this.nearestPoint(x, y, rx, ry, x0, y0); return util_1.distance(nearestPoint.x, nearestPoint.y, x0, y0); }, /** * 根据比例获取点 * @param {number} x 椭圆中心 x * @param {number} y 椭圆中心 y * @param {number} rx 椭圆 x 方向半径 * @param {number} ry 椭圆 y 方向半径 * @param {number} t 指定比例,x轴方向为 0 * @return {object} 点 */ pointAt: function (x, y, rx, ry, t) { var angle = 2 * Math.PI * t; // 按照角度进行计算,而不按照周长计算 return { x: x + rx * Math.cos(angle), y: y + ry * Math.sin(angle) }; }, /** * 根据比例计算切线角度 * @param {number} x 椭圆中心 x * @param {number} y 椭圆中心 y * @param {number} rx 椭圆 x 方向半径 * @param {number} ry 椭圆 y 方向半径 * @param {number} t 指定比例 0 - 1 之间,x轴方向为 0。在 0-1 范围之外是循环还是返回 null,还需要调整 * @return {number} 角度,在 0 - 2PI 之间 */ tangentAngle: function (x, y, rx, ry, t) { var angle = 2 * Math.PI * t; // 按照角度进行计算,而不按照周长计算 // 直接使用 x,y 的导数计算, x' = -rx * sin(t); y' = ry * cos(t); var tangentAngle = Math.atan2(ry * Math.cos(angle), -rx * Math.sin(angle)); // 也可以使用指定点的切线方程计算,成本有些高 // const point = this.pointAt(0, 0, rx, ry, t); // 椭圆的切线同椭圆的中心不相关 // let tangentAngle = -1 * Math.atan((ry * ry * point.x) / (rx * rx * point.y)); // if (angle >= 0 && angle <= Math.PI) { // tangentAngle += Math.PI; // } return util_1.piMod(tangentAngle); } }; /***/ }), /***/ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/line.js": /*!*******************************************************************!*\ !*** ./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/line.js ***! \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var util_1 = __webpack_require__(/*! ./util */ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/util.js"); var vec2 = __webpack_require__(/*! gl-matrix/vec2 */ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/vec2.js"); exports.default = { /** * 计算线段的包围盒 * @param {number} x1 起始点 x * @param {number} y1 起始点 y * @param {number} x2 结束点 x * @param {number} y2 结束点 y * @return {object} 包围盒对象 */ box: function (x1, y1, x2, y2) { return util_1.getBBoxByArray([x1, x2], [y1, y2]); }, /** * 线段的长度 * @param {number} x1 起始点 x * @param {number} y1 起始点 y * @param {number} x2 结束点 x * @param {number} y2 结束点 y * @return {number} 距离 */ length: function (x1, y1, x2, y2) { return util_1.distance(x1, y1, x2, y2); }, /** * 根据比例获取点 * @param {number} x1 起始点 x * @param {number} y1 起始点 y * @param {number} x2 结束点 x * @param {number} y2 结束点 y * @param {number} t 指定比例 * @return {object} 包含 x, y 的点 */ pointAt: function (x1, y1, x2, y2, t) { return { x: (1 - t) * x1 + t * x2, y: (1 - t) * y1 + t * y2 }; }, /** * 点到线段的距离 * @param {number} x1 起始点 x * @param {number} y1 起始点 y * @param {number} x2 结束点 x * @param {number} y2 结束点 y * @param {number} x 测试点 x * @param {number} y 测试点 y * @return {number} 距离 */ pointDistance: function (x1, y1, x2, y2, x, y) { // 投影距离 x1, y1 的向量,假设 p, p1, p2 三个点,投影点为 a // p1a = p1p.p1p2/|p1p2| * (p1p 的单位向量) var cross = (x2 - x1) * (x - x1) + (y2 - y1) * (y - y1); if (cross < 0) { return util_1.distance(x1, y1, x, y); } var lengthSquare = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1); if (cross > lengthSquare) { return util_1.distance(x2, y2, x, y); } return this.pointToLine(x1, y1, x2, y2, x, y); }, /** * 点到直线的距离,而不是点到线段的距离 * @param {number} x1 起始点 x * @param {number} y1 起始点 y * @param {number} x2 结束点 x * @param {number} y2 结束点 y * @param {number} x 测试点 x * @param {number} y 测试点 y * @return {number} 距离 */ pointToLine: function (x1, y1, x2, y2, x, y) { var d = [x2 - x1, y2 - y1]; // 如果端点相等,则判定点到点的距离 if (vec2.exactEquals(d, [0, 0])) { return Math.sqrt((x - x1) * (x - x1) + (y - y1) * (y - y1)); } var u = [-d[1], d[0]]; vec2.normalize(u, u); var a = [x - x1, y - y1]; return Math.abs(vec2.dot(a, u)); }, /** * 线段的角度 * @param {number} x1 起始点 x * @param {number} y1 起始点 y * @param {number} x2 结束点 x * @param {number} y2 结束点 y * @return {number} 导数 */ tangentAngle: function (x1, y1, x2, y2) { return Math.atan2(y2 - y1, x2 - x1); } }; /***/ }), /***/ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/polyline.js": /*!***********************************************************************!*\ !*** ./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/polyline.js ***! \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var segments_1 = __webpack_require__(/*! ./segments */ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/segments.js"); var util_1 = __webpack_require__(/*! ./util */ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/util.js"); exports.default = { /** * 计算多折线的包围盒 * @param {array} points 点的集合 [x,y] 的形式 * @return {object} 包围盒 */ box: function (points) { var xArr = []; var yArr = []; for (var i = 0; i < points.length; i++) { var point = points[i]; xArr.push(point[0]); yArr.push(point[1]); } return util_1.getBBoxByArray(xArr, yArr); }, /** * 计算多折线的长度 * @param {array} points 点的集合 [x,y] 的形式 * @return {object} 多条边的长度 */ length: function (points) { return segments_1.lengthOfSegment(points); }, /** * 根据比例获取多折线的点 * @param {array} points 点的集合 [x,y] 的形式 * @param {number} t 在多折线的长度上的比例 * @return {object} 根据比例值计算出来的点 */ pointAt: function (points, t) { return segments_1.pointAtSegments(points, t); }, /** * 指定点到多折线的距离 * @param {array} points 点的集合 [x,y] 的形式 * @param {number} x 指定点的 x * @param {number} y 指定点的 y * @return {number} 点到多折线的距离 */ pointDistance: function (points, x, y) { return segments_1.distanceAtSegment(points, x, y); }, /** * 根据比例获取多折线的切线角度 * @param {array} points 点的集合 [x,y] 的形式 * @param {number} t 在多折线的长度上的比例 * @return {object} 根据比例值计算出来的角度 */ tangentAngle: function (points, t) { return segments_1.angleAtSegments(points, t); } }; /***/ }), /***/ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/quadratic.js": /*!************************************************************************!*\ !*** ./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/quadratic.js ***! \************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var line_1 = __webpack_require__(/*! ./line */ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/line.js"); var util_1 = __webpack_require__(/*! ./util */ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/util.js"); var bezier_1 = __webpack_require__(/*! ./bezier */ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/bezier.js"); // 差值公式 function quadraticAt(p0, p1, p2, t) { var onet = 1 - t; return onet * onet * p0 + 2 * t * onet * p1 + t * t * p2; } // 求极值 function extrema(p0, p1, p2) { var a = p0 + p2 - 2 * p1; if (util_1.isNumberEqual(a, 0)) { return [0.5]; } var rst = (p0 - p1) / a; if (rst <= 1 && rst >= 0) { return [rst]; } return []; } function derivativeAt(p0, p1, p2, t) { return 2 * (1 - t) * (p1 - p0) + 2 * t * (p2 - p1); } // 分割贝塞尔曲线 function divideQuadratic(x1, y1, x2, y2, x3, y3, t) { // 划分点 var xt = quadraticAt(x1, x2, x3, t); var yt = quadraticAt(y1, y2, y3, t); // 分割的第一条曲线的控制点 var controlPoint1 = line_1.default.pointAt(x1, y1, x2, y2, t); // 分割的第二条曲线的控制点 var controlPoint2 = line_1.default.pointAt(x2, y2, x3, y3, t); return [[x1, y1, controlPoint1.x, controlPoint1.y, xt, yt], [xt, yt, controlPoint2.x, controlPoint2.y, x3, y3]]; } // 使用迭代法取贝塞尔曲线的长度 function quadraticLength(x1, y1, x2, y2, x3, y3, iterationCount) { if (iterationCount === 0) { return (util_1.distance(x1, y1, x2, y2) + util_1.distance(x2, y2, x3, y3) + util_1.distance(x1, y1, x3, y3)) / 2; } var quadratics = divideQuadratic(x1, y1, x2, y2, x3, y3, 0.5); var left = quadratics[0]; var right = quadratics[1]; left.push(iterationCount - 1); right.push(iterationCount - 1); return quadraticLength.apply(null, left) + quadraticLength.apply(null, right); } exports.default = { box: function (x1, y1, x2, y2, x3, y3) { var xExtrema = extrema(x1, x2, x3)[0]; var yExtrema = extrema(y1, y2, y3)[0]; // 控制点不加入 box 的计算 var xArr = [x1, x3]; var yArr = [y1, y3]; if (xExtrema !== undefined) { xArr.push(quadraticAt(x1, x2, x3, xExtrema)); } if (yExtrema !== undefined) { yArr.push(quadraticAt(y1, y2, y3, yExtrema)); } return util_1.getBBoxByArray(xArr, yArr); }, length: function (x1, y1, x2, y2, x3, y3) { return quadraticLength(x1, y1, x2, y2, x3, y3, 3); }, nearestPoint: function (x1, y1, x2, y2, x3, y3, x0, y0) { return bezier_1.nearestPoint([x1, x2, x3], [y1, y2, y3], x0, y0, quadraticAt); }, pointDistance: function (x1, y1, x2, y2, x3, y3, x0, y0) { var point = this.nearestPoint(x1, y1, x2, y2, x3, y3, x0, y0); return util_1.distance(point.x, point.y, x0, y0); }, interpolationAt: quadraticAt, pointAt: function (x1, y1, x2, y2, x3, y3, t) { return { x: quadraticAt(x1, x2, x3, t), y: quadraticAt(y1, y2, y3, t) }; }, divide: function (x1, y1, x2, y2, x3, y3, t) { return divideQuadratic(x1, y1, x2, y2, x3, y3, t); }, tangentAngle: function (x1, y1, x2, y2, x3, y3, t) { var dx = derivativeAt(x1, x2, x3, t); var dy = derivativeAt(y1, y2, y3, t); var angle = Math.atan2(dy, dx); return util_1.piMod(angle); } }; /***/ }), /***/ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/segments.js": /*!***********************************************************************!*\ !*** ./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/segments.js ***! \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var line_1 = __webpack_require__(/*! ./line */ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/line.js"); var util_1 = __webpack_require__(/*! ./util */ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/util.js"); function analyzePoints(points) { // 计算每段的长度和总的长度 var totalLength = 0; var segments = []; for (var i = 0; i < points.length - 1; i++) { var from = points[i]; var to = points[i + 1]; var length_1 = util_1.distance(from[0], from[1], to[0], to[1]); var seg = { from: from, to: to, length: length_1 }; segments.push(seg); totalLength += length_1; } return { segments: segments, totalLength: totalLength }; } function lengthOfSegment(points) { if (points.length < 2) { return 0; } var totalLength = 0; for (var i = 0; i < points.length - 1; i++) { var from = points[i]; var to = points[i + 1]; totalLength += util_1.distance(from[0], from[1], to[0], to[1]); } return totalLength; } exports.lengthOfSegment = lengthOfSegment; /** * 按照比例在数据片段中获取点 * @param {array} points 点的集合 * @param {number} t 百分比 0-1 * @return {object} 点的坐标 */ function pointAtSegments(points, t) { // 边界判断 if (t > 1 || t < 0 || points.length < 2) { return null; } var _a = analyzePoints(points), segments = _a.segments, totalLength = _a.totalLength; // 多个点有可能重合 if (totalLength === 0) { return { x: points[0][0], y: points[0][1] }; } // 计算比例 var startRatio = 0; var point = null; for (var i = 0; i < segments.length; i++) { var seg = segments[i]; var from = seg.from, to = seg.to; var currentRatio = seg.length / totalLength; if (t >= startRatio && t <= startRatio + currentRatio) { var localRatio = (t - startRatio) / currentRatio; point = line_1.default.pointAt(from[0], from[1], to[0], to[1], localRatio); break; } startRatio += currentRatio; } return point; } exports.pointAtSegments = pointAtSegments; /** * 按照比例在数据片段中获取切线的角度 * @param {array} points 点的集合 * @param {number} t 百分比 0-1 */ function angleAtSegments(points, t) { // 边界判断 if (t > 1 || t < 0 || points.length < 2) { return 0; } var _a = analyzePoints(points), segments = _a.segments, totalLength = _a.totalLength; // 计算比例 var startRatio = 0; var angle = 0; for (var i = 0; i < segments.length; i++) { var seg = segments[i]; var from = seg.from, to = seg.to; var currentRatio = seg.length / totalLength; if (t >= startRatio && t <= startRatio + currentRatio) { angle = Math.atan2(to[1] - from[1], to[0] - from[0]); break; } startRatio += currentRatio; } return angle; } exports.angleAtSegments = angleAtSegments; function distanceAtSegment(points, x, y) { var minDistance = Infinity; for (var i = 0; i < points.length - 1; i++) { var point = points[i]; var nextPoint = points[i + 1]; var distance_1 = line_1.default.pointDistance(point[0], point[1], nextPoint[0], nextPoint[1], x, y); if (distance_1 < minDistance) { minDistance = distance_1; } } return minDistance; } exports.distanceAtSegment = distanceAtSegment; /***/ }), /***/ "./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/util.js": /*!*******************************************************************!*\ !*** ./node_modules/_@antv_g-math@0.1.3@@antv/g-math/lib/util.js ***! \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function minNum(array) { return Math.min.apply(null, array); } function maxNum(array) { return Math.max.apply(null, array); } /** * 两点之间的距离 * @param {number} x1 起始点 x * @param {number} y1 起始点 y * @param {number} x2 结束点 x * @param {number} y2 结束点 y * @return {number} 距离 */ function distance(x1, y1, x2, y2) { var dx = x1 - x2; var dy = y1 - y2; return Math.sqrt(dx * dx + dy * dy); } exports.distance = distance; function isNumberEqual(v1, v2) { return Math.abs(v1 - v2) < 0.001; } exports.isNumberEqual = isNumberEqual; function getBBoxByArray(xArr, yArr) { var minX = minNum(xArr); var minY = minNum(yArr); var maxX = maxNum(xArr); var maxY = maxNum(yArr); return { x: minX, y: minY, width: maxX - minX, height: maxY - minY }; } exports.getBBoxByArray = getBBoxByArray; function getBBoxRange(x1, y1, x2, y2) { return { minX: minNum([x1, x2]), maxX: maxNum([x1, x2]), minY: minNum([y1, y2]), maxY: maxNum([y1, y2]) }; } exports.getBBoxRange = getBBoxRange; function piMod(angle) { return (angle + Math.PI * 2) % (Math.PI * 2); } exports.piMod = piMod; /***/ }), /***/ "./node_modules/_@antv_matrix-util@3.0.3@@antv/matrix-util/lib/mat3.js": /*!*****************************************************************************!*\ !*** ./node_modules/_@antv_matrix-util@3.0.3@@antv/matrix-util/lib/mat3.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@1.13.0@tslib/tslib.es6.js"); tslib_1.__exportStar(__webpack_require__(/*! gl-matrix/mat3 */ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/mat3.js"), exports); var mat3_1 = __webpack_require__(/*! gl-matrix/mat3 */ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/mat3.js"); function leftTranslate(out, a, v) { var transMat = new Array(9); mat3_1.fromTranslation(transMat, v); return mat3_1.multiply(out, transMat, a); } function leftRotate(out, a, rad) { var rotateMat = new Array(9); mat3_1.fromRotation(rotateMat, rad); return mat3_1.multiply(out, rotateMat, a); } function leftScale(out, a, v) { var scaleMat = new Array(9); mat3_1.fromScaling(scaleMat, v); return mat3_1.multiply(out, scaleMat, a); } function leftMultiply(out, a, a1) { return mat3_1.multiply(out, a1, a); } /** * 根据 actions 来做 transform * @param m * @param actions */ function transform(m, actions) { var matrix = m ? [].concat(m) : [1, 0, 0, 0, 1, 0, 0, 0, 1]; for (var i = 0, len = actions.length; i < len; i++) { var action = actions[i]; switch (action[0]) { case 't': leftTranslate(matrix, matrix, [action[1], action[2]]); break; case 's': leftScale(matrix, matrix, [action[1], action[2]]); break; case 'r': leftRotate(matrix, matrix, action[1]); break; case 'm': leftMultiply(matrix, matrix, action[1]); break; default: break; } } return matrix; } exports.transform = transform; /***/ }), /***/ "./node_modules/_@antv_matrix-util@3.1.0-beta.2@@antv/matrix-util/esm/ext.js": /*!***********************************************************************************!*\ !*** ./node_modules/_@antv_matrix-util@3.1.0-beta.2@@antv/matrix-util/esm/ext.js ***! \***********************************************************************************/ /*! exports provided: leftTranslate, leftRotate, leftScale, transform, direction, angleTo, vertical */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "leftTranslate", function() { return leftTranslate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "leftRotate", function() { return leftRotate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "leftScale", function() { return leftScale; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transform", function() { return transform; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "direction", function() { return direction; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "angleTo", function() { return angleTo; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "vertical", function() { return vertical; }); /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! gl-matrix */ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/index.js"); /** * @description 扩展方法,提供 gl-matrix 为提供的方法 * */ function leftTranslate(out, a, v) { var transMat = [0, 0, 0, 0, 0, 0, 0, 0, 0]; gl_matrix__WEBPACK_IMPORTED_MODULE_0__["mat3"].fromTranslation(transMat, v); return gl_matrix__WEBPACK_IMPORTED_MODULE_0__["mat3"].multiply(out, transMat, a); } function leftRotate(out, a, rad) { var rotateMat = [0, 0, 0, 0, 0, 0, 0, 0, 0]; gl_matrix__WEBPACK_IMPORTED_MODULE_0__["mat3"].fromRotation(rotateMat, rad); return gl_matrix__WEBPACK_IMPORTED_MODULE_0__["mat3"].multiply(out, rotateMat, a); } function leftScale(out, a, v) { var scaleMat = [0, 0, 0, 0, 0, 0, 0, 0, 0]; gl_matrix__WEBPACK_IMPORTED_MODULE_0__["mat3"].fromScaling(scaleMat, v); return gl_matrix__WEBPACK_IMPORTED_MODULE_0__["mat3"].multiply(out, scaleMat, a); } function leftMultiply(out, a, a1) { return gl_matrix__WEBPACK_IMPORTED_MODULE_0__["mat3"].multiply(out, a1, a); } /** * 根据 actions 来做 transform * @param m * @param actions */ function transform(m, actions) { var matrix = m ? [].concat(m) : [1, 0, 0, 0, 1, 0, 0, 0, 1]; for (var i = 0, len = actions.length; i < len; i++) { var action = actions[i]; switch (action[0]) { case 't': leftTranslate(matrix, matrix, [action[1], action[2]]); break; case 's': leftScale(matrix, matrix, [action[1], action[2]]); break; case 'r': leftRotate(matrix, matrix, action[1]); break; case 'm': leftMultiply(matrix, matrix, action[1]); break; default: break; } } return matrix; } /** * 向量 v1 到 向量 v2 夹角的方向 * @param {Array} v1 向量 * @param {Array} v2 向量 * @return {Boolean} >= 0 顺时针 < 0 逆时针 */ function direction(v1, v2) { return v1[0] * v2[1] - v2[0] * v1[1]; } /** * 二维向量 v1 到 v2 的夹角 * @param v1 * @param v2 * @param direct */ function angleTo(v1, v2, direct) { var ang = gl_matrix__WEBPACK_IMPORTED_MODULE_0__["vec2"].angle(v1, v2); var angleLargeThanPI = direction(v1, v2) >= 0; if (direct) { if (angleLargeThanPI) { return Math.PI * 2 - ang; } return ang; } if (angleLargeThanPI) { return ang; } return Math.PI * 2 - ang; } /** * 计算二维向量的垂直向量 * @param out * @param v * @param flag */ function vertical(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; } /***/ }), /***/ "./node_modules/_@antv_matrix-util@3.1.0-beta.2@@antv/matrix-util/esm/index.js": /*!*************************************************************************************!*\ !*** ./node_modules/_@antv_matrix-util@3.1.0-beta.2@@antv/matrix-util/esm/index.js ***! \*************************************************************************************/ /*! exports provided: mat3, vec2, vec3, ext */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! gl-matrix */ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mat3", function() { return gl_matrix__WEBPACK_IMPORTED_MODULE_0__["mat3"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "vec2", function() { return gl_matrix__WEBPACK_IMPORTED_MODULE_0__["vec2"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "vec3", function() { return gl_matrix__WEBPACK_IMPORTED_MODULE_0__["vec3"]; }); /* harmony import */ var _ext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ext */ "./node_modules/_@antv_matrix-util@3.1.0-beta.2@@antv/matrix-util/esm/ext.js"); /* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "ext", function() { return _ext__WEBPACK_IMPORTED_MODULE_1__; }); /***/ }), /***/ "./node_modules/_@antv_path-util@2.0.8@@antv/path-util/lib/get-arc-params.js": /*!***********************************************************************************!*\ !*** ./node_modules/_@antv_path-util@2.0.8@@antv/path-util/lib/get-arc-params.js ***! \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var mod_1 = __webpack_require__(/*! @antv/util/lib/mod */ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/mod.js"); var to_radian_1 = __webpack_require__(/*! @antv/util/lib/to-radian */ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/to-radian.js"); // 向量长度 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]; } exports.isSamePoint = isSamePoint; // 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 = mod_1.default(to_radian_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 }; } exports.default = getArcParams; /***/ }), /***/ "./node_modules/_@antv_path-util@2.0.8@@antv/path-util/lib/parse-path-string.js": /*!**************************************************************************************!*\ !*** ./node_modules/_@antv_path-util@2.0.8@@antv/path-util/lib/parse-path-string.js ***! \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var is_array_1 = __webpack_require__(/*! @antv/util/lib/is-array */ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/is-array.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'); // Parses given path string into an array of arrays of path segments function parsePathString(pathString) { if (!pathString) { return null; } if (is_array_1.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; } exports.default = parsePathString; /***/ }), /***/ "./node_modules/_@antv_path-util@2.0.8@@antv/path-util/lib/parse-path.js": /*!*******************************************************************************!*\ !*** ./node_modules/_@antv_path-util@2.0.8@@antv/path-util/lib/parse-path.js ***! \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var each_1 = __webpack_require__(/*! @antv/util/lib/each */ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/each.js"); var is_array_1 = __webpack_require__(/*! @antv/util/lib/is-array */ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/is-array.js"); var is_string_1 = __webpack_require__(/*! @antv/util/lib/is-string */ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/is-string.js"); var regexTags = /[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/ig; var regexDot = /[^\s\,]+/ig; function parsePath(p) { var path = p || []; if (is_array_1.default(path)) { return path; } if (is_string_1.default(path)) { path = path.match(regexTags); each_1.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 each_1.default(item, function (sub, i) { if (!isNaN(sub)) { // @ts-ignore item[i] = +sub; } }); // @ts-ignore path[index] = item; }); return path; } } exports.default = parsePath; /***/ }), /***/ "./node_modules/_@antv_path-util@2.0.8@@antv/path-util/lib/path-2-absolute.js": /*!************************************************************************************!*\ !*** ./node_modules/_@antv_path-util@2.0.8@@antv/path-util/lib/path-2-absolute.js ***! \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var parse_path_string_1 = __webpack_require__(/*! ./parse-path-string */ "./node_modules/_@antv_path-util@2.0.8@@antv/path-util/lib/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 = parse_path_string_1.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; } exports.default = pathToAbsolute; /***/ }), /***/ "./node_modules/_@antv_path-util@2.0.8@@antv/path-util/lib/path-2-segments.js": /*!************************************************************************************!*\ !*** ./node_modules/_@antv_path-util@2.0.8@@antv/path-util/lib/path-2-segments.js ***! \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var get_arc_params_1 = __webpack_require__(/*! ./get-arc-params */ "./node_modules/_@antv_path-util@2.0.8@@antv/path-util/lib/get-arc-params.js"); var get_arc_params_2 = __webpack_require__(/*! ./get-arc-params */ "./node_modules/_@antv_path-util@2.0.8@@antv/path-util/lib/get-arc-params.js"); var parse_path_1 = __webpack_require__(/*! ./parse-path */ "./node_modules/_@antv_path-util@2.0.8@@antv/path-util/lib/parse-path.js"); // 点对称 function toSymmetry(point, center) { return [center[0] + (center[0] - point[0]), center[1] + (center[1] - point[1])]; } function getSegments(path) { path = parse_path_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 = get_arc_params_1.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] && get_arc_params_2.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.cx, cx = _b === void 0 ? 0 : _b, _c = _a.cy, cy = _c === void 0 ? 0 : _c, _d = _a.rx, rx = _d === void 0 ? 0 : _d, _e = _a.ry, ry = _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 = rx * Math.cos(startAngle - d) + cx; var dy1 = ry * Math.sin(startAngle - d) + cy; segment.startTangent = [dx1 - startMovePoint[0], dy1 - startMovePoint[1]]; var dx2 = rx * Math.cos(startAngle + endAngle + d) + cx; var dy2 = ry * Math.sin(startAngle + endAngle - d) + cy; segment.endTangent = [prePoint[0] - dx2, prePoint[1] - dy2]; } segments.push(segment); } return segments; } exports.default = getSegments; /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/augment.js": /*!******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/mix.js"); /* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-function */ "./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/cache.js": /*!****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/clamp.js": /*!****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/clear-animation-frame.js": /*!********************************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); } ; /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/clone.js": /*!****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/contains.js": /*!*******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/debounce.js": /*!*******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/deep-mix.js": /*!*******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/difference.js": /*!*********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/filter.js"); /* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./contains */ "./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/each.js": /*!***************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/is-array.js"); /* harmony import */ var _is_object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-object */ "./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/ends-with.js": /*!********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/is-array.js"); /* harmony import */ var _is_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-string */ "./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/every.js": /*!****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/extend.js": /*!*****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/mix.js"); /* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-function */ "./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/filter.js": /*!*****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@antv/util/esm/filter.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@2.0.9@@antv/util/esm/is-array-like.js"); var filter = function (arr, func) { if (!Object(_is_array_like__WEBPACK_IMPORTED_MODULE_0__["default"])(arr)) { return arr; } var result = []; for (var index = 0; index < arr.length; index++) { var value = arr[index]; if (func(value, index)) { result.push(value); } } return result; }; /* harmony default export */ __webpack_exports__["default"] = (filter); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/find-index.js": /*!*********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/find.js": /*!***************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/is-function.js"); /* harmony import */ var _is_match__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-match */ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-match.js"); /* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-array */ "./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/first-value.js": /*!**********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/is-nil.js"); /* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-array */ "./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/fixed-base.js": /*!*********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/flatten-deep.js": /*!***********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/flatten.js": /*!******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/for-in.js": /*!*****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/each.js"); /* harmony default export */ __webpack_exports__["default"] = (_each__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/get-range.js": /*!********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/is-array.js"); var getRange = function (values) { // 存在 NaN 时,min,max 判定会出问题 var filterValues = values.filter(function (v) { return !isNaN(v); }); if (!filterValues.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]); } filterValues = tmp; } var max = Math.max.apply(null, filterValues); var min = Math.min.apply(null, filterValues); return { min: min, max: max }; }; /* harmony default export */ __webpack_exports__["default"] = (getRange); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/get-type.js": /*!*******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/get-wrap-behavior.js": /*!****************************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/get.js": /*!**************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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; }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/group-by.js": /*!*******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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 _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-array.js"); /* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-function */ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-function.js"); var hasOwnProperty = Object.prototype.hasOwnProperty; function groupBy(data, condition) { if (!condition || !Object(_is_array__WEBPACK_IMPORTED_MODULE_0__["default"])(data)) { return {}; } var result = {}; // 兼容方法和 字符串的写法 var predicate = Object(_is_function__WEBPACK_IMPORTED_MODULE_1__["default"])(condition) ? condition : function (item) { return item[condition]; }; var key; for (var i = 0; i < data.length; i++) { var item = data[i]; 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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/group-to-map.js": /*!***********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/is-array.js"); /* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-function */ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-function.js"); /* harmony import */ var _group_by__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./group-by */ "./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/group.js": /*!****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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; }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/has-key.js": /*!******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/has.js"); /* harmony default export */ __webpack_exports__["default"] = (_has__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/has-value.js": /*!********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/contains.js"); /* harmony import */ var _values__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./values */ "./node_modules/_@antv_util@2.0.9@@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); }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/has.js": /*!**************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/head.js": /*!***************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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; } /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/identity.js": /*!*******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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; }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/index-of.js": /*!*******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/index.js": /*!****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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@2.0.9@@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 会报类型错误 /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-arguments.js": /*!***********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-array-like.js": /*!************************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-array.js": /*!*******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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'); }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-boolean.js": /*!*********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-date.js": /*!******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-decimal.js": /*!*********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-element.js": /*!*********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-empty.js": /*!*******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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@2.0.9@@antv/util/esm/is-array-like.js"); /* harmony import */ var _get_type__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./get-type */ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/get-type.js"); /* harmony import */ var _is_prototype__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./is-prototype */ "./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-equal-with.js": /*!************************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/is-function.js"); /* harmony import */ var _is_equal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-equal */ "./node_modules/_@antv_util@2.0.9@@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); }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-equal.js": /*!*******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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@2.0.9@@antv/util/esm/is-array-like.js"); /* harmony import */ var _is_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-string */ "./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-error.js": /*!*******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-even.js": /*!******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-finite.js": /*!********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-function.js": /*!**********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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'); }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-integer.js": /*!*********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-match.js": /*!*******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/is-nil.js"); /* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./keys */ "./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-negative.js": /*!**********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-nil.js": /*!*****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-null.js": /*!******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-number-equal.js": /*!**************************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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; } ; /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-number.js": /*!********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-object-like.js": /*!*************************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-object.js": /*!********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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'; }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-odd.js": /*!*****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-plain-object.js": /*!**************************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/is-object-like.js"); /* harmony import */ var _is_type__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-type */ "./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-positive.js": /*!**********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-prototype.js": /*!***********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-reg-exp.js": /*!*********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-string.js": /*!********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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'); }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-type.js": /*!******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-undefined.js": /*!***********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/keys.js": /*!***************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/each.js"); /* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-function */ "./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/last.js": /*!***************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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; } /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/lower-case.js": /*!*********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/lower-first.js": /*!**********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/map-values.js": /*!*********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/is-nil.js"); /* harmony import */ var _is_object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-object */ "./node_modules/_@antv_util@2.0.9@@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; }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/map.js": /*!**************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@antv/util/esm/map.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@2.0.9@@antv/util/esm/is-array-like.js"); var map = function (arr, func) { if (!Object(_is_array_like__WEBPACK_IMPORTED_MODULE_0__["default"])(arr)) { // @ts-ignore return arr; } var result = []; for (var index = 0; index < arr.length; index++) { var value = arr[index]; result.push(func(value, index)); } return result; }; /* harmony default export */ __webpack_exports__["default"] = (map); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/max-by.js": /*!*****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/each.js"); /* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-array */ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-array.js"); /* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-function */ "./node_modules/_@antv_util@2.0.9@@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; }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/memoize.js": /*!******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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; }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/min-by.js": /*!*****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/each.js"); /* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-array */ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-array.js"); /* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-function */ "./node_modules/_@antv_util@2.0.9@@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; }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/mix.js": /*!**************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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; } /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/mod.js": /*!**************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/noop.js": /*!***************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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 () {}); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/number2color.js": /*!***********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/parse-radius.js": /*!***********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/pick.js": /*!***************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/each.js"); /* harmony import */ var _is_plain_object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-plain-object */ "./node_modules/_@antv_util@2.0.9@@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; }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/pull-at.js": /*!******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/pull.js": /*!***************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/reduce.js": /*!*****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/each.js"); /* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-array */ "./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/remove.js": /*!*****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/is-array-like.js"); /* harmony import */ var _pull_at__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pull-at */ "./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/request-animation-frame.js": /*!**********************************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); } ; /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/set.js": /*!**************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/is-object.js"); /* harmony import */ var _is_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-string */ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-string.js"); /* harmony import */ var _is_number__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-number */ "./node_modules/_@antv_util@2.0.9@@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; }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/size.js": /*!***************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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@2.0.9@@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; } /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/some.js": /*!***************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/sort-by.js": /*!******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/is-array.js"); /* harmony import */ var _is_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-string */ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-string.js"); /* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-function */ "./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/starts-with.js": /*!**********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/is-array.js"); /* harmony import */ var _is_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-string */ "./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/substitute.js": /*!*********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/throttle.js": /*!*******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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; }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/to-array.js": /*!*******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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) : []; }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/to-degree.js": /*!********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/to-integer.js": /*!*********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/to-radian.js": /*!********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/to-string.js": /*!********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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(); }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/union.js": /*!****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/uniq.js": /*!***************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/contains.js"); /* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./each */ "./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/unique-id.js": /*!********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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]; }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/upper-case.js": /*!*********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/upper-first.js": /*!**********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/values-of-key.js": /*!************************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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 _is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-array */ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-array.js"); /* harmony import */ var _is_nil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-nil */ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/is-nil.js"); /* harmony default export */ __webpack_exports__["default"] = (function (data, name) { var rst = []; var tmpMap = {}; for (var i = 0; i < data.length; i++) { var obj = data[i]; var value = obj[name]; if (!Object(_is_nil__WEBPACK_IMPORTED_MODULE_1__["default"])(value)) { // flatten if (!Object(_is_array__WEBPACK_IMPORTED_MODULE_0__["default"])(value)) { value = [value]; } for (var j = 0; j < value.length; j++) { var val = value[j]; // unique if (!tmpMap[val]) { rst.push(val); tmpMap[val] = true; } } } } return rst; }); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/values.js": /*!*****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/esm/each.js"); /* harmony import */ var _is_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-function */ "./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/esm/wrap-behavior.js": /*!************************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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); /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/clear-animation-frame.js": /*!********************************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@antv/util/lib/clear-animation-frame.js ***! \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function cancelAnimationFrame(handler) { var method = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || // @ts-ignore window.mozCancelAnimationFrame || // @ts-ignore window.msCancelAnimationFrame || clearTimeout; method(handler); } exports.default = cancelAnimationFrame; ; /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/each.js": /*!***************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/lib/is-array.js"); var is_object_1 = __webpack_require__(/*! ./is-object */ "./node_modules/_@antv_util@2.0.9@@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; /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/is-array.js": /*!*******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/lib/is-type.js"); exports.default = function (value) { return Array.isArray ? Array.isArray(value) : is_type_1.default(value, 'Array'); }; /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/is-function.js": /*!**********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/lib/is-type.js"); exports.default = function (value) { return is_type_1.default(value, 'Function'); }; /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/is-nil.js": /*!*****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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; /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/is-number-equal.js": /*!**************************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@antv/util/lib/is-number-equal.js ***! \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 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; } exports.default = isNumberEqual; ; /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/is-object.js": /*!********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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'; }; /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/is-string.js": /*!********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/lib/is-type.js"); exports.default = function (str) { return is_type_1.default(str, 'String'); }; /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/is-type.js": /*!******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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; /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/mix.js": /*!**************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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; /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/mod.js": /*!**************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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; /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/request-animation-frame.js": /*!**********************************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@antv/util/lib/request-animation-frame.js ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 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); } exports.default = requestAnimationFrame; ; /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/to-radian.js": /*!********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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; /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/to-string.js": /*!********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@antv/util/lib/is-nil.js"); exports.default = function (value) { if (is_nil_1.default(value)) return ''; return value.toString(); }; /***/ }), /***/ "./node_modules/_@antv_util@2.0.9@@antv/util/lib/upper-first.js": /*!**********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.9@@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@2.0.9@@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; /***/ }), /***/ "./node_modules/_d3-color@1.4.1@d3-color/src/color.js": /*!************************************************************!*\ !*** ./node_modules/_d3-color@1.4.1@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@1.4.1@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 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000 : l === 4 ? rgba(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@1.4.1@d3-color/src/cubehelix.js": /*!****************************************************************!*\ !*** ./node_modules/_d3-color@1.4.1@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@1.4.1@d3-color/src/define.js"); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/_d3-color@1.4.1@d3-color/src/color.js"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/_d3-color@1.4.1@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@1.4.1@d3-color/src/define.js": /*!*************************************************************!*\ !*** ./node_modules/_d3-color@1.4.1@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@1.4.1@d3-color/src/index.js": /*!************************************************************!*\ !*** ./node_modules/_d3-color@1.4.1@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@1.4.1@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@1.4.1@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@1.4.1@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@1.4.1@d3-color/src/lab.js": /*!**********************************************************!*\ !*** ./node_modules/_d3-color@1.4.1@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@1.4.1@d3-color/src/define.js"); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/_d3-color@1.4.1@d3-color/src/color.js"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/_d3-color@1.4.1@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@1.4.1@d3-color/src/math.js": /*!***********************************************************!*\ !*** ./node_modules/_d3-color@1.4.1@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@1.0.6@d3-ease/src/back.js": /*!*********************************************************!*\ !*** ./node_modules/_d3-ease@1.0.6@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@1.0.6@d3-ease/src/bounce.js": /*!***********************************************************!*\ !*** ./node_modules/_d3-ease@1.0.6@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@1.0.6@d3-ease/src/circle.js": /*!***********************************************************!*\ !*** ./node_modules/_d3-ease@1.0.6@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@1.0.6@d3-ease/src/cubic.js": /*!**********************************************************!*\ !*** ./node_modules/_d3-ease@1.0.6@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@1.0.6@d3-ease/src/elastic.js": /*!************************************************************!*\ !*** ./node_modules/_d3-ease@1.0.6@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@1.0.6@d3-ease/src/exp.js": /*!********************************************************!*\ !*** ./node_modules/_d3-ease@1.0.6@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@1.0.6@d3-ease/src/index.js": /*!**********************************************************!*\ !*** ./node_modules/_d3-ease@1.0.6@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@1.0.6@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@1.0.6@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@1.0.6@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@1.0.6@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@1.0.6@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@1.0.6@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@1.0.6@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@1.0.6@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@1.0.6@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@1.0.6@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@1.0.6@d3-ease/src/linear.js": /*!***********************************************************!*\ !*** ./node_modules/_d3-ease@1.0.6@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@1.0.6@d3-ease/src/poly.js": /*!*********************************************************!*\ !*** ./node_modules/_d3-ease@1.0.6@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@1.0.6@d3-ease/src/quad.js": /*!*********************************************************!*\ !*** ./node_modules/_d3-ease@1.0.6@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@1.0.6@d3-ease/src/sin.js": /*!********************************************************!*\ !*** ./node_modules/_d3-ease@1.0.6@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@1.4.0@d3-interpolate/src/array.js": /*!************************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.0@d3-interpolate/src/value.js"); /* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./numberArray.js */ "./node_modules/_d3-interpolate@1.4.0@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@1.4.0@d3-interpolate/src/basis.js": /*!************************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.0@d3-interpolate/src/basisClosed.js": /*!******************************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.0@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@1.4.0@d3-interpolate/src/color.js": /*!************************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.0@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@1.4.0@d3-interpolate/src/constant.js": /*!***************************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.0@d3-interpolate/src/cubehelix.js": /*!****************************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.1@d3-color/src/index.js"); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/_d3-interpolate@1.4.0@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@1.4.0@d3-interpolate/src/date.js": /*!***********************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.0@d3-interpolate/src/discrete.js": /*!***************************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.0@d3-interpolate/src/hcl.js": /*!**********************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.1@d3-color/src/index.js"); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/_d3-interpolate@1.4.0@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@1.4.0@d3-interpolate/src/hsl.js": /*!**********************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.1@d3-color/src/index.js"); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/_d3-interpolate@1.4.0@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@1.4.0@d3-interpolate/src/hue.js": /*!**********************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.0@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@1.4.0@d3-interpolate/src/index.js": /*!************************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.0@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@1.4.0@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@1.4.0@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@1.4.0@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@1.4.0@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@1.4.0@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@1.4.0@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@1.4.0@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@1.4.0@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@1.4.0@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@1.4.0@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@1.4.0@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@1.4.0@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@1.4.0@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@1.4.0@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@1.4.0@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@1.4.0@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@1.4.0@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@1.4.0@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@1.4.0@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@1.4.0@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@1.4.0@d3-interpolate/src/lab.js": /*!**********************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.1@d3-color/src/index.js"); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/_d3-interpolate@1.4.0@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@1.4.0@d3-interpolate/src/number.js": /*!*************************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.0@d3-interpolate/src/numberArray.js": /*!******************************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.0@d3-interpolate/src/object.js": /*!*************************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.0@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@1.4.0@d3-interpolate/src/piecewise.js": /*!****************************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.0@d3-interpolate/src/quantize.js": /*!***************************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.0@d3-interpolate/src/rgb.js": /*!**********************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.1@d3-color/src/index.js"); /* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ "./node_modules/_d3-interpolate@1.4.0@d3-interpolate/src/basis.js"); /* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basisClosed.js */ "./node_modules/_d3-interpolate@1.4.0@d3-interpolate/src/basisClosed.js"); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./color.js */ "./node_modules/_d3-interpolate@1.4.0@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@1.4.0@d3-interpolate/src/round.js": /*!************************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.0@d3-interpolate/src/string.js": /*!*************************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.0@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@1.4.0@d3-interpolate/src/transform/decompose.js": /*!**************************************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.0@d3-interpolate/src/transform/index.js": /*!**********************************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.0@d3-interpolate/src/number.js"); /* harmony import */ var _parse_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parse.js */ "./node_modules/_d3-interpolate@1.4.0@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@1.4.0@d3-interpolate/src/transform/parse.js": /*!**********************************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.0@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@1.4.0@d3-interpolate/src/value.js": /*!************************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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@1.4.1@d3-color/src/index.js"); /* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rgb.js */ "./node_modules/_d3-interpolate@1.4.0@d3-interpolate/src/rgb.js"); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./array.js */ "./node_modules/_d3-interpolate@1.4.0@d3-interpolate/src/array.js"); /* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./date.js */ "./node_modules/_d3-interpolate@1.4.0@d3-interpolate/src/date.js"); /* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number.js */ "./node_modules/_d3-interpolate@1.4.0@d3-interpolate/src/number.js"); /* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./object.js */ "./node_modules/_d3-interpolate@1.4.0@d3-interpolate/src/object.js"); /* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./string.js */ "./node_modules/_d3-interpolate@1.4.0@d3-interpolate/src/string.js"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constant.js */ "./node_modules/_d3-interpolate@1.4.0@d3-interpolate/src/constant.js"); /* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ "./node_modules/_d3-interpolate@1.4.0@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@1.4.0@d3-interpolate/src/zoom.js": /*!***********************************************************************!*\ !*** ./node_modules/_d3-interpolate@1.4.0@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-timer@1.0.10@d3-timer/src/index.js": /*!*************************************************************!*\ !*** ./node_modules/_d3-timer@1.0.10@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@1.0.10@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@1.0.10@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@1.0.10@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@1.0.10@d3-timer/src/interval.js": /*!****************************************************************!*\ !*** ./node_modules/_d3-timer@1.0.10@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@1.0.10@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@1.0.10@d3-timer/src/timeout.js": /*!***************************************************************!*\ !*** ./node_modules/_d3-timer@1.0.10@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@1.0.10@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@1.0.10@d3-timer/src/timer.js": /*!*************************************************************!*\ !*** ./node_modules/_d3-timer@1.0.10@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/_detect-browser@5.1.0@detect-browser/index.js": /*!********************************************************************!*\ !*** ./node_modules/_detect-browser@5.1.0@detect-browser/index.js ***! \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { var __spreadArrays = this && this.__spreadArrays || function () { 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; }; Object.defineProperty(exports, "__esModule", { value: true }); var BrowserInfo = /** @class */ function () { function BrowserInfo(name, version, os) { this.name = name; this.version = version; this.os = os; this.type = 'browser'; } return BrowserInfo; }(); exports.BrowserInfo = BrowserInfo; var NodeInfo = /** @class */ function () { function NodeInfo(version) { this.version = version; this.type = 'node'; this.name = 'node'; this.os = process.platform; } return NodeInfo; }(); exports.NodeInfo = NodeInfo; var SearchBotDeviceInfo = /** @class */ function () { function SearchBotDeviceInfo(name, version, os, bot) { this.name = name; this.version = version; this.os = os; this.bot = bot; this.type = 'bot-device'; } return SearchBotDeviceInfo; }(); exports.SearchBotDeviceInfo = SearchBotDeviceInfo; var BotInfo = /** @class */ function () { function BotInfo() { this.type = 'bot'; this.bot = true; // NOTE: deprecated test name instead this.name = 'bot'; this.version = null; this.os = null; } return BotInfo; }(); exports.BotInfo = BotInfo; var ReactNativeInfo = /** @class */ function () { function ReactNativeInfo() { this.type = 'react-native'; this.name = 'react-native'; this.version = null; this.os = null; } return ReactNativeInfo; }(); exports.ReactNativeInfo = ReactNativeInfo; ; // tslint:disable-next-line:max-line-length var SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/; var SEARCHBOT_OS_REGEX = /(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/; var REQUIRED_VERSION_PARTS = 3; var userAgentRules = [['aol', /AOLShield\/([0-9\._]+)/], ['edge', /Edge\/([0-9\._]+)/], ['edge-ios', /EdgiOS\/([0-9\._]+)/], ['yandexbrowser', /YaBrowser\/([0-9\._]+)/], ['kakaotalk', /KAKAOTALK\s([0-9\.]+)/], ['samsung', /SamsungBrowser\/([0-9\.]+)/], ['silk', /\bSilk\/([0-9._-]+)\b/], ['miui', /MiuiBrowser\/([0-9\.]+)$/], ['beaker', /BeakerBrowser\/([0-9\.]+)/], ['edge-chromium', /Edg\/([0-9\.]+)/], ['chromium-webview', /(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/], ['chrome', /(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/], ['phantomjs', /PhantomJS\/([0-9\.]+)(:?\s|$)/], ['crios', /CriOS\/([0-9\.]+)(:?\s|$)/], ['firefox', /Firefox\/([0-9\.]+)(?:\s|$)/], ['fxios', /FxiOS\/([0-9\.]+)/], ['opera-mini', /Opera Mini.*Version\/([0-9\.]+)/], ['opera', /Opera\/([0-9\.]+)(?:\s|$)/], ['opera', /OPR\/([0-9\.]+)(:?\s|$)/], ['ie', /Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/], ['ie', /MSIE\s([0-9\.]+);.*Trident\/[4-7].0/], ['ie', /MSIE\s(7\.0)/], ['bb10', /BB10;\sTouch.*Version\/([0-9\.]+)/], ['android', /Android\s([0-9\.]+)/], ['ios', /Version\/([0-9\._]+).*Mobile.*Safari.*/], ['safari', /Version\/([0-9\._]+).*Safari/], ['facebook', /FBAV\/([0-9\.]+)/], ['instagram', /Instagram\s([0-9\.]+)/], ['ios-webview', /AppleWebKit\/([0-9\.]+).*Mobile/], ['ios-webview', /AppleWebKit\/([0-9\.]+).*Gecko\)$/], ['searchbot', SEARCHBOX_UA_REGEX]]; var operatingSystemRules = [['iOS', /iP(hone|od|ad)/], ['Android OS', /Android/], ['BlackBerry OS', /BlackBerry|BB10/], ['Windows Mobile', /IEMobile/], ['Amazon OS', /Kindle/], ['Windows 3.11', /Win16/], ['Windows 95', /(Windows 95)|(Win95)|(Windows_95)/], ['Windows 98', /(Windows 98)|(Win98)/], ['Windows 2000', /(Windows NT 5.0)|(Windows 2000)/], ['Windows XP', /(Windows NT 5.1)|(Windows XP)/], ['Windows Server 2003', /(Windows NT 5.2)/], ['Windows Vista', /(Windows NT 6.0)/], ['Windows 7', /(Windows NT 6.1)/], ['Windows 8', /(Windows NT 6.2)/], ['Windows 8.1', /(Windows NT 6.3)/], ['Windows 10', /(Windows NT 10.0)/], ['Windows ME', /Windows ME/], ['Open BSD', /OpenBSD/], ['Sun OS', /SunOS/], ['Chrome OS', /CrOS/], ['Linux', /(Linux)|(X11)/], ['Mac OS', /(Mac_PowerPC)|(Macintosh)/], ['QNX', /QNX/], ['BeOS', /BeOS/], ['OS/2', /OS\/2/]]; function detect(userAgent) { if (!!userAgent) { return parseUserAgent(userAgent); } if (typeof document === 'undefined' && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { return new ReactNativeInfo(); } if (typeof navigator !== 'undefined') { return parseUserAgent(navigator.userAgent); } return getNodeVersion(); } exports.detect = detect; function matchUserAgent(ua) { // opted for using reduce here rather than Array#first with a regex.test call // this is primarily because using the reduce we only perform the regex // execution once rather than once for the test and for the exec again below // probably something that needs to be benchmarked though return ua !== '' && userAgentRules.reduce(function (matched, _a) { var browser = _a[0], regex = _a[1]; if (matched) { return matched; } var uaMatch = regex.exec(ua); return !!uaMatch && [browser, uaMatch]; }, false); } function browserName(ua) { var data = matchUserAgent(ua); return data ? data[0] : null; } exports.browserName = browserName; function parseUserAgent(ua) { var matchedRule = matchUserAgent(ua); if (!matchedRule) { return null; } var name = matchedRule[0], match = matchedRule[1]; if (name === 'searchbot') { return new BotInfo(); } var versionParts = match[1] && match[1].split(/[._]/).slice(0, 3); if (versionParts) { if (versionParts.length < REQUIRED_VERSION_PARTS) { versionParts = __spreadArrays(versionParts, createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length)); } } else { versionParts = []; } var version = versionParts.join('.'); var os = detectOS(ua); var searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua); if (searchBotMatch && searchBotMatch[1]) { return new SearchBotDeviceInfo(name, version, os, searchBotMatch[1]); } return new BrowserInfo(name, versionParts.join('.'), os); } exports.parseUserAgent = parseUserAgent; function detectOS(ua) { for (var ii = 0, count = operatingSystemRules.length; ii < count; ii++) { var _a = operatingSystemRules[ii], os = _a[0], regex = _a[1]; var match = regex.exec(ua); if (match) { return os; } } return null; } exports.detectOS = detectOS; function getNodeVersion() { var isNode = typeof process !== 'undefined' && process.version; return isNode ? new NodeInfo(process.version.slice(1)) : null; } exports.getNodeVersion = getNodeVersion; function createVersionParts(count) { var output = []; for (var ii = 0; ii < count; ii++) { output.push('0'); } return output; } /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../_process@0.11.10@process/browser.js */ "./node_modules/_process@0.11.10@process/browser.js"))) /***/ }), /***/ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/common.js": /*!***************************************************************!*\ !*** ./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/common.js ***! \***************************************************************/ /*! exports provided: EPSILON, ARRAY_TYPE, RANDOM, setMatrixArrayType, toRadian, equals */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EPSILON", function() { return EPSILON; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_TYPE", function() { return ARRAY_TYPE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RANDOM", function() { return RANDOM; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setMatrixArrayType", function() { return setMatrixArrayType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toRadian", function() { return toRadian; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equals", function() { return equals; }); /** * Common utilities * @module glMatrix */ // Configuration Constants var EPSILON = 0.000001; var ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array; var RANDOM = Math.random; /** * Sets the type of array used when creating new vectors and matrices * * @param {Float32ArrayConstructor | ArrayConstructor} type Array type, such as Float32Array or Array */ function setMatrixArrayType(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)); } if (!Math.hypot) Math.hypot = function () { var y = 0, i = arguments.length; while (i--) { y += arguments[i] * arguments[i]; } return Math.sqrt(y); }; /***/ }), /***/ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/index.js": /*!**************************************************************!*\ !*** ./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/index.js ***! \**************************************************************/ /*! exports provided: glMatrix, mat2, mat2d, mat3, mat4, quat, quat2, vec2, vec3, vec4 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/common.js"); /* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "glMatrix", function() { return _common_js__WEBPACK_IMPORTED_MODULE_0__; }); /* harmony import */ var _mat2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mat2.js */ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/mat2.js"); /* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "mat2", function() { return _mat2_js__WEBPACK_IMPORTED_MODULE_1__; }); /* harmony import */ var _mat2d_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mat2d.js */ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/mat2d.js"); /* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "mat2d", function() { return _mat2d_js__WEBPACK_IMPORTED_MODULE_2__; }); /* harmony import */ var _mat3_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mat3.js */ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/mat3.js"); /* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "mat3", function() { return _mat3_js__WEBPACK_IMPORTED_MODULE_3__; }); /* harmony import */ var _mat4_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mat4.js */ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/mat4.js"); /* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "mat4", function() { return _mat4_js__WEBPACK_IMPORTED_MODULE_4__; }); /* harmony import */ var _quat_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./quat.js */ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/quat.js"); /* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "quat", function() { return _quat_js__WEBPACK_IMPORTED_MODULE_5__; }); /* harmony import */ var _quat2_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./quat2.js */ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/quat2.js"); /* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "quat2", function() { return _quat2_js__WEBPACK_IMPORTED_MODULE_6__; }); /* harmony import */ var _vec2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./vec2.js */ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/vec2.js"); /* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "vec2", function() { return _vec2_js__WEBPACK_IMPORTED_MODULE_7__; }); /* harmony import */ var _vec3_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./vec3.js */ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/vec3.js"); /* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "vec3", function() { return _vec3_js__WEBPACK_IMPORTED_MODULE_8__; }); /* harmony import */ var _vec4_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./vec4.js */ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/vec4.js"); /* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "vec4", function() { return _vec4_js__WEBPACK_IMPORTED_MODULE_9__; }); /***/ }), /***/ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/mat2.js": /*!*************************************************************!*\ !*** ./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/mat2.js ***! \*************************************************************/ /*! exports provided: create, clone, copy, identity, fromValues, set, transpose, invert, adjoint, determinant, multiply, rotate, scale, fromRotation, fromScaling, str, frob, LDU, add, subtract, exactEquals, equals, multiplyScalar, multiplyScalarAndAdd, mul, sub */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "create", function() { return create; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clone", function() { return clone; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copy", function() { return copy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromValues", function() { return fromValues; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transpose", function() { return transpose; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "invert", function() { return invert; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "adjoint", function() { return adjoint; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "determinant", function() { return determinant; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiply", function() { return multiply; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rotate", function() { return rotate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scale", function() { return scale; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromRotation", function() { return fromRotation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromScaling", function() { return fromScaling; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "str", function() { return str; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "frob", function() { return frob; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LDU", function() { return LDU; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "add", function() { return add; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subtract", function() { return subtract; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exactEquals", function() { return exactEquals; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equals", function() { return equals; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiplyScalar", function() { return multiplyScalar; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiplyScalarAndAdd", function() { return multiplyScalarAndAdd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mul", function() { return mul; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sub", function() { return sub; }); /* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/common.js"); /** * 2x2 Matrix * @module mat2 */ /** * Creates a new identity mat2 * * @returns {mat2} a new 2x2 matrix */ function create() { var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__["ARRAY_TYPE"](4); if (_common_js__WEBPACK_IMPORTED_MODULE_0__["ARRAY_TYPE"] != Float32Array) { out[1] = 0; out[2] = 0; } out[0] = 1; out[3] = 1; return out; } /** * Creates a new mat2 initialized with values from an existing matrix * * @param {ReadonlyMat2} a matrix to clone * @returns {mat2} a new 2x2 matrix */ function clone(a) { var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__["ARRAY_TYPE"](4); out[0] = a[0]; out[1] = a[1]; out[2] = a[2]; out[3] = a[3]; return out; } /** * Copy the values from one mat2 to another * * @param {mat2} out the receiving matrix * @param {ReadonlyMat2} a the source matrix * @returns {mat2} out */ function copy(out, a) { out[0] = a[0]; out[1] = a[1]; out[2] = a[2]; out[3] = a[3]; return out; } /** * Set a mat2 to the identity matrix * * @param {mat2} out the receiving matrix * @returns {mat2} out */ function identity(out) { out[0] = 1; out[1] = 0; out[2] = 0; out[3] = 1; return out; } /** * Create a new mat2 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} m10 Component in column 1, row 0 position (index 2) * @param {Number} m11 Component in column 1, row 1 position (index 3) * @returns {mat2} out A new 2x2 matrix */ function fromValues(m00, m01, m10, m11) { var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__["ARRAY_TYPE"](4); out[0] = m00; out[1] = m01; out[2] = m10; out[3] = m11; return out; } /** * Set the components of a mat2 to the given values * * @param {mat2} 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} m10 Component in column 1, row 0 position (index 2) * @param {Number} m11 Component in column 1, row 1 position (index 3) * @returns {mat2} out */ function set(out, m00, m01, m10, m11) { out[0] = m00; out[1] = m01; out[2] = m10; out[3] = m11; return out; } /** * Transpose the values of a mat2 * * @param {mat2} out the receiving matrix * @param {ReadonlyMat2} a the source matrix * @returns {mat2} 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 a1 = a[1]; out[1] = a[2]; out[2] = a1; } else { out[0] = a[0]; out[1] = a[2]; out[2] = a[1]; out[3] = a[3]; } return out; } /** * Inverts a mat2 * * @param {mat2} out the receiving matrix * @param {ReadonlyMat2} a the source matrix * @returns {mat2} out */ function invert(out, a) { var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; // Calculate the determinant var det = a0 * a3 - a2 * a1; if (!det) { return null; } det = 1.0 / det; out[0] = a3 * det; out[1] = -a1 * det; out[2] = -a2 * det; out[3] = a0 * det; return out; } /** * Calculates the adjugate of a mat2 * * @param {mat2} out the receiving matrix * @param {ReadonlyMat2} a the source matrix * @returns {mat2} out */ function adjoint(out, a) { // Caching this value is nessecary if out == a var a0 = a[0]; out[0] = a[3]; out[1] = -a[1]; out[2] = -a[2]; out[3] = a0; return out; } /** * Calculates the determinant of a mat2 * * @param {ReadonlyMat2} a the source matrix * @returns {Number} determinant of a */ function determinant(a) { return a[0] * a[3] - a[2] * a[1]; } /** * Multiplies two mat2's * * @param {mat2} out the receiving matrix * @param {ReadonlyMat2} a the first operand * @param {ReadonlyMat2} b the second operand * @returns {mat2} out */ function multiply(out, a, b) { var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; out[0] = a0 * b0 + a2 * b1; out[1] = a1 * b0 + a3 * b1; out[2] = a0 * b2 + a2 * b3; out[3] = a1 * b2 + a3 * b3; return out; } /** * Rotates a mat2 by the given angle * * @param {mat2} out the receiving matrix * @param {ReadonlyMat2} a the matrix to rotate * @param {Number} rad the angle to rotate the matrix by * @returns {mat2} out */ function rotate(out, a, rad) { var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; var s = Math.sin(rad); var c = Math.cos(rad); out[0] = a0 * c + a2 * s; out[1] = a1 * c + a3 * s; out[2] = a0 * -s + a2 * c; out[3] = a1 * -s + a3 * c; return out; } /** * Scales the mat2 by the dimensions in the given vec2 * * @param {mat2} out the receiving matrix * @param {ReadonlyMat2} a the matrix to rotate * @param {ReadonlyVec2} v the vec2 to scale the matrix by * @returns {mat2} out **/ function scale(out, a, v) { var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; var v0 = v[0], v1 = v[1]; out[0] = a0 * v0; out[1] = a1 * v0; out[2] = a2 * v1; out[3] = a3 * v1; return out; } /** * Creates a matrix from a given angle * This is equivalent to (but much faster than): * * mat2.identity(dest); * mat2.rotate(dest, dest, rad); * * @param {mat2} out mat2 receiving operation result * @param {Number} rad the angle to rotate the matrix by * @returns {mat2} out */ function fromRotation(out, rad) { var s = Math.sin(rad); var c = Math.cos(rad); out[0] = c; out[1] = s; out[2] = -s; out[3] = c; return out; } /** * Creates a matrix from a vector scaling * This is equivalent to (but much faster than): * * mat2.identity(dest); * mat2.scale(dest, dest, vec); * * @param {mat2} out mat2 receiving operation result * @param {ReadonlyVec2} v Scaling vector * @returns {mat2} out */ function fromScaling(out, v) { out[0] = v[0]; out[1] = 0; out[2] = 0; out[3] = v[1]; return out; } /** * Returns a string representation of a mat2 * * @param {ReadonlyMat2} a matrix to represent as a string * @returns {String} string representation of the matrix */ function str(a) { return "mat2(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ")"; } /** * Returns Frobenius norm of a mat2 * * @param {ReadonlyMat2} a the matrix to calculate Frobenius norm of * @returns {Number} Frobenius norm */ function frob(a) { return Math.hypot(a[0], a[1], a[2], a[3]); } /** * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix * @param {ReadonlyMat2} L the lower triangular matrix * @param {ReadonlyMat2} D the diagonal matrix * @param {ReadonlyMat2} U the upper triangular matrix * @param {ReadonlyMat2} a the input matrix to factorize */ function LDU(L, D, U, a) { L[2] = a[2] / a[0]; U[0] = a[0]; U[1] = a[1]; U[3] = a[3] - L[2] * U[1]; return [L, D, U]; } /** * Adds two mat2's * * @param {mat2} out the receiving matrix * @param {ReadonlyMat2} a the first operand * @param {ReadonlyMat2} b the second operand * @returns {mat2} 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]; return out; } /** * Subtracts matrix b from matrix a * * @param {mat2} out the receiving matrix * @param {ReadonlyMat2} a the first operand * @param {ReadonlyMat2} b the second operand * @returns {mat2} 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]; return out; } /** * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) * * @param {ReadonlyMat2} a The first matrix. * @param {ReadonlyMat2} 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]; } /** * Returns whether or not the matrices have approximately the same elements in the same position. * * @param {ReadonlyMat2} a The first matrix. * @param {ReadonlyMat2} 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]; var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; return Math.abs(a0 - b0) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a3), Math.abs(b3)); } /** * Multiply each element of the matrix by a scalar. * * @param {mat2} out the receiving matrix * @param {ReadonlyMat2} a the matrix to scale * @param {Number} b amount to scale the matrix's elements by * @returns {mat2} 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; return out; } /** * Adds two mat2's after multiplying each element of the second operand by a scalar value. * * @param {mat2} out the receiving vector * @param {ReadonlyMat2} a the first operand * @param {ReadonlyMat2} b the second operand * @param {Number} scale the amount to scale b's elements by before adding * @returns {mat2} 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; return out; } /** * Alias for {@link mat2.multiply} * @function */ var mul = multiply; /** * Alias for {@link mat2.subtract} * @function */ var sub = subtract; /***/ }), /***/ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/mat2d.js": /*!**************************************************************!*\ !*** ./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/mat2d.js ***! \**************************************************************/ /*! exports provided: create, clone, copy, identity, fromValues, set, invert, determinant, multiply, rotate, scale, translate, fromRotation, fromScaling, fromTranslation, str, frob, add, subtract, multiplyScalar, multiplyScalarAndAdd, exactEquals, equals, mul, sub */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "create", function() { return create; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clone", function() { return clone; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copy", function() { return copy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromValues", function() { return fromValues; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "invert", function() { return invert; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "determinant", function() { return determinant; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiply", function() { return multiply; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rotate", function() { return rotate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scale", function() { return scale; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "translate", function() { return translate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromRotation", function() { return fromRotation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromScaling", function() { return fromScaling; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromTranslation", function() { return fromTranslation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "str", function() { return str; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "frob", function() { return frob; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "add", function() { return add; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subtract", function() { return subtract; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiplyScalar", function() { return multiplyScalar; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiplyScalarAndAdd", function() { return multiplyScalarAndAdd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exactEquals", function() { return exactEquals; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equals", function() { return equals; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mul", function() { return mul; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sub", function() { return sub; }); /* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/common.js"); /** * 2x3 Matrix * @module mat2d * @description * A mat2d contains six elements defined as: *
* [a, b, * c, d, * tx, ty] ** This is a short form for the 3x3 matrix: *
* [a, b, 0, * c, d, 0, * tx, ty, 1] ** The last column is ignored so the array is shorter and operations are faster. */ /** * Creates a new identity mat2d * * @returns {mat2d} a new 2x3 matrix */ function create() { var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__["ARRAY_TYPE"](6); if (_common_js__WEBPACK_IMPORTED_MODULE_0__["ARRAY_TYPE"] != Float32Array) { out[1] = 0; out[2] = 0; out[4] = 0; out[5] = 0; } out[0] = 1; out[3] = 1; return out; } /** * Creates a new mat2d initialized with values from an existing matrix * * @param {ReadonlyMat2d} a matrix to clone * @returns {mat2d} a new 2x3 matrix */ function clone(a) { var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__["ARRAY_TYPE"](6); out[0] = a[0]; out[1] = a[1]; out[2] = a[2]; out[3] = a[3]; out[4] = a[4]; out[5] = a[5]; return out; } /** * Copy the values from one mat2d to another * * @param {mat2d} out the receiving matrix * @param {ReadonlyMat2d} a the source matrix * @returns {mat2d} 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]; return out; } /** * Set a mat2d to the identity matrix * * @param {mat2d} out the receiving matrix * @returns {mat2d} out */ function identity(out) { out[0] = 1; out[1] = 0; out[2] = 0; out[3] = 1; out[4] = 0; out[5] = 0; return out; } /** * Create a new mat2d with the given values * * @param {Number} a Component A (index 0) * @param {Number} b Component B (index 1) * @param {Number} c Component C (index 2) * @param {Number} d Component D (index 3) * @param {Number} tx Component TX (index 4) * @param {Number} ty Component TY (index 5) * @returns {mat2d} A new mat2d */ function fromValues(a, b, c, d, tx, ty) { var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__["ARRAY_TYPE"](6); out[0] = a; out[1] = b; out[2] = c; out[3] = d; out[4] = tx; out[5] = ty; return out; } /** * Set the components of a mat2d to the given values * * @param {mat2d} out the receiving matrix * @param {Number} a Component A (index 0) * @param {Number} b Component B (index 1) * @param {Number} c Component C (index 2) * @param {Number} d Component D (index 3) * @param {Number} tx Component TX (index 4) * @param {Number} ty Component TY (index 5) * @returns {mat2d} out */ function set(out, a, b, c, d, tx, ty) { out[0] = a; out[1] = b; out[2] = c; out[3] = d; out[4] = tx; out[5] = ty; return out; } /** * Inverts a mat2d * * @param {mat2d} out the receiving matrix * @param {ReadonlyMat2d} a the source matrix * @returns {mat2d} out */ function invert(out, a) { var aa = a[0], ab = a[1], ac = a[2], ad = a[3]; var atx = a[4], aty = a[5]; var det = aa * ad - ab * ac; if (!det) { return null; } det = 1.0 / det; out[0] = ad * det; out[1] = -ab * det; out[2] = -ac * det; out[3] = aa * det; out[4] = (ac * aty - ad * atx) * det; out[5] = (ab * atx - aa * aty) * det; return out; } /** * Calculates the determinant of a mat2d * * @param {ReadonlyMat2d} a the source matrix * @returns {Number} determinant of a */ function determinant(a) { return a[0] * a[3] - a[1] * a[2]; } /** * Multiplies two mat2d's * * @param {mat2d} out the receiving matrix * @param {ReadonlyMat2d} a the first operand * @param {ReadonlyMat2d} b the second operand * @returns {mat2d} out */ function multiply(out, a, b) { var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5]; var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5]; out[0] = a0 * b0 + a2 * b1; out[1] = a1 * b0 + a3 * b1; out[2] = a0 * b2 + a2 * b3; out[3] = a1 * b2 + a3 * b3; out[4] = a0 * b4 + a2 * b5 + a4; out[5] = a1 * b4 + a3 * b5 + a5; return out; } /** * Rotates a mat2d by the given angle * * @param {mat2d} out the receiving matrix * @param {ReadonlyMat2d} a the matrix to rotate * @param {Number} rad the angle to rotate the matrix by * @returns {mat2d} out */ function rotate(out, a, rad) { var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5]; var s = Math.sin(rad); var c = Math.cos(rad); out[0] = a0 * c + a2 * s; out[1] = a1 * c + a3 * s; out[2] = a0 * -s + a2 * c; out[3] = a1 * -s + a3 * c; out[4] = a4; out[5] = a5; return out; } /** * Scales the mat2d by the dimensions in the given vec2 * * @param {mat2d} out the receiving matrix * @param {ReadonlyMat2d} a the matrix to translate * @param {ReadonlyVec2} v the vec2 to scale the matrix by * @returns {mat2d} out **/ function scale(out, a, v) { var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5]; var v0 = v[0], v1 = v[1]; out[0] = a0 * v0; out[1] = a1 * v0; out[2] = a2 * v1; out[3] = a3 * v1; out[4] = a4; out[5] = a5; return out; } /** * Translates the mat2d by the dimensions in the given vec2 * * @param {mat2d} out the receiving matrix * @param {ReadonlyMat2d} a the matrix to translate * @param {ReadonlyVec2} v the vec2 to translate the matrix by * @returns {mat2d} out **/ function translate(out, a, v) { var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5]; var v0 = v[0], v1 = v[1]; out[0] = a0; out[1] = a1; out[2] = a2; out[3] = a3; out[4] = a0 * v0 + a2 * v1 + a4; out[5] = a1 * v0 + a3 * v1 + a5; return out; } /** * Creates a matrix from a given angle * This is equivalent to (but much faster than): * * mat2d.identity(dest); * mat2d.rotate(dest, dest, rad); * * @param {mat2d} out mat2d receiving operation result * @param {Number} rad the angle to rotate the matrix by * @returns {mat2d} out */ function fromRotation(out, rad) { var s = Math.sin(rad), c = Math.cos(rad); out[0] = c; out[1] = s; out[2] = -s; out[3] = c; out[4] = 0; out[5] = 0; return out; } /** * Creates a matrix from a vector scaling * This is equivalent to (but much faster than): * * mat2d.identity(dest); * mat2d.scale(dest, dest, vec); * * @param {mat2d} out mat2d receiving operation result * @param {ReadonlyVec2} v Scaling vector * @returns {mat2d} out */ function fromScaling(out, v) { out[0] = v[0]; out[1] = 0; out[2] = 0; out[3] = v[1]; out[4] = 0; out[5] = 0; return out; } /** * Creates a matrix from a vector translation * This is equivalent to (but much faster than): * * mat2d.identity(dest); * mat2d.translate(dest, dest, vec); * * @param {mat2d} out mat2d receiving operation result * @param {ReadonlyVec2} v Translation vector * @returns {mat2d} out */ function fromTranslation(out, v) { out[0] = 1; out[1] = 0; out[2] = 0; out[3] = 1; out[4] = v[0]; out[5] = v[1]; return out; } /** * Returns a string representation of a mat2d * * @param {ReadonlyMat2d} a matrix to represent as a string * @returns {String} string representation of the matrix */ function str(a) { return "mat2d(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ")"; } /** * Returns Frobenius norm of a mat2d * * @param {ReadonlyMat2d} a the matrix to calculate Frobenius norm of * @returns {Number} Frobenius norm */ function frob(a) { return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1); } /** * Adds two mat2d's * * @param {mat2d} out the receiving matrix * @param {ReadonlyMat2d} a the first operand * @param {ReadonlyMat2d} b the second operand * @returns {mat2d} 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]; return out; } /** * Subtracts matrix b from matrix a * * @param {mat2d} out the receiving matrix * @param {ReadonlyMat2d} a the first operand * @param {ReadonlyMat2d} b the second operand * @returns {mat2d} 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]; return out; } /** * Multiply each element of the matrix by a scalar. * * @param {mat2d} out the receiving matrix * @param {ReadonlyMat2d} a the matrix to scale * @param {Number} b amount to scale the matrix's elements by * @returns {mat2d} 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; return out; } /** * Adds two mat2d's after multiplying each element of the second operand by a scalar value. * * @param {mat2d} out the receiving vector * @param {ReadonlyMat2d} a the first operand * @param {ReadonlyMat2d} b the second operand * @param {Number} scale the amount to scale b's elements by before adding * @returns {mat2d} 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; return out; } /** * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) * * @param {ReadonlyMat2d} a The first matrix. * @param {ReadonlyMat2d} 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]; } /** * Returns whether or not the matrices have approximately the same elements in the same position. * * @param {ReadonlyMat2d} a The first matrix. * @param {ReadonlyMat2d} 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]; var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5]; return Math.abs(a0 - b0) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a5), Math.abs(b5)); } /** * Alias for {@link mat2d.multiply} * @function */ var mul = multiply; /** * Alias for {@link mat2d.subtract} * @function */ var sub = subtract; /***/ }), /***/ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/mat3.js": /*!*************************************************************!*\ !*** ./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/mat3.js ***! \*************************************************************/ /*! exports provided: create, fromMat4, clone, copy, fromValues, set, identity, transpose, invert, adjoint, determinant, multiply, translate, rotate, scale, fromTranslation, fromRotation, fromScaling, fromMat2d, fromQuat, normalFromMat4, projection, str, frob, add, subtract, multiplyScalar, multiplyScalarAndAdd, exactEquals, equals, mul, sub */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "create", function() { return create; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromMat4", function() { return fromMat4; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clone", function() { return clone; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copy", function() { return copy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromValues", function() { return fromValues; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transpose", function() { return transpose; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "invert", function() { return invert; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "adjoint", function() { return adjoint; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "determinant", function() { return determinant; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiply", function() { return multiply; }); /* 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 export (binding) */ __webpack_require__.d(__webpack_exports__, "scale", function() { return scale; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromTranslation", function() { return fromTranslation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromRotation", function() { return fromRotation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromScaling", function() { return fromScaling; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromMat2d", function() { return fromMat2d; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromQuat", function() { return fromQuat; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalFromMat4", function() { return normalFromMat4; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "projection", function() { return projection; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "str", function() { return str; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "frob", function() { return frob; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "add", function() { return add; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subtract", function() { return subtract; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiplyScalar", function() { return multiplyScalar; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiplyScalarAndAdd", function() { return multiplyScalarAndAdd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exactEquals", function() { return exactEquals; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equals", function() { return equals; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mul", function() { return mul; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sub", function() { return sub; }); /* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/common.js"); /** * 3x3 Matrix * @module mat3 */ /** * Creates a new identity mat3 * * @returns {mat3} a new 3x3 matrix */ function create() { var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__["ARRAY_TYPE"](9); if (_common_js__WEBPACK_IMPORTED_MODULE_0__["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 {ReadonlyMat4} 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 {ReadonlyMat3} a matrix to clone * @returns {mat3} a new 3x3 matrix */ function clone(a) { var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__["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 {ReadonlyMat3} 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 _common_js__WEBPACK_IMPORTED_MODULE_0__["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 {ReadonlyMat3} 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 {ReadonlyMat3} 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 {ReadonlyMat3} 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 {ReadonlyMat3} 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 {ReadonlyMat3} a the first operand * @param {ReadonlyMat3} 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 {ReadonlyMat3} a the matrix to translate * @param {ReadonlyVec2} 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 {ReadonlyMat3} 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 {ReadonlyMat3} a the matrix to rotate * @param {ReadonlyVec2} 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 {ReadonlyVec2} 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 {ReadonlyVec2} 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 {ReadonlyMat2d} 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 {ReadonlyQuat} 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 {ReadonlyMat4} 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 {ReadonlyMat3} 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 {ReadonlyMat3} a the matrix to calculate Frobenius norm of * @returns {Number} Frobenius norm */ function frob(a) { return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); } /** * Adds two mat3's * * @param {mat3} out the receiving matrix * @param {ReadonlyMat3} a the first operand * @param {ReadonlyMat3} 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 {ReadonlyMat3} a the first operand * @param {ReadonlyMat3} 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 {ReadonlyMat3} 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 {ReadonlyMat3} a the first operand * @param {ReadonlyMat3} 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 {ReadonlyMat3} a The first matrix. * @param {ReadonlyMat3} 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 {ReadonlyMat3} a The first matrix. * @param {ReadonlyMat3} 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) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a8), Math.abs(b8)); } /** * Alias for {@link mat3.multiply} * @function */ var mul = multiply; /** * Alias for {@link mat3.subtract} * @function */ var sub = subtract; /***/ }), /***/ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/mat4.js": /*!*************************************************************!*\ !*** ./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/mat4.js ***! \*************************************************************/ /*! exports provided: create, clone, copy, fromValues, set, identity, transpose, invert, adjoint, determinant, multiply, translate, scale, rotate, rotateX, rotateY, rotateZ, fromTranslation, fromScaling, fromRotation, fromXRotation, fromYRotation, fromZRotation, fromRotationTranslation, fromQuat2, getTranslation, getScaling, getRotation, fromRotationTranslationScale, fromRotationTranslationScaleOrigin, fromQuat, frustum, perspective, perspectiveFromFieldOfView, ortho, lookAt, targetTo, str, frob, add, subtract, multiplyScalar, multiplyScalarAndAdd, exactEquals, equals, mul, sub */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "create", function() { return create; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clone", function() { return clone; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copy", function() { return copy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromValues", function() { return fromValues; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transpose", function() { return transpose; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "invert", function() { return invert; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "adjoint", function() { return adjoint; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "determinant", function() { return determinant; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiply", function() { return multiply; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "translate", function() { return translate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scale", function() { return scale; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rotate", function() { return rotate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rotateX", function() { return rotateX; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rotateY", function() { return rotateY; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rotateZ", function() { return rotateZ; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromTranslation", function() { return fromTranslation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromScaling", function() { return fromScaling; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromRotation", function() { return fromRotation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromXRotation", function() { return fromXRotation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromYRotation", function() { return fromYRotation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromZRotation", function() { return fromZRotation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromRotationTranslation", function() { return fromRotationTranslation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromQuat2", function() { return fromQuat2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTranslation", function() { return getTranslation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getScaling", function() { return getScaling; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRotation", function() { return getRotation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromRotationTranslationScale", function() { return fromRotationTranslationScale; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromRotationTranslationScaleOrigin", function() { return fromRotationTranslationScaleOrigin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromQuat", function() { return fromQuat; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "frustum", function() { return frustum; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "perspective", function() { return perspective; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "perspectiveFromFieldOfView", function() { return perspectiveFromFieldOfView; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ortho", function() { return ortho; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lookAt", function() { return lookAt; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "targetTo", function() { return targetTo; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "str", function() { return str; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "frob", function() { return frob; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "add", function() { return add; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subtract", function() { return subtract; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiplyScalar", function() { return multiplyScalar; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiplyScalarAndAdd", function() { return multiplyScalarAndAdd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exactEquals", function() { return exactEquals; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equals", function() { return equals; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mul", function() { return mul; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sub", function() { return sub; }); /* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ "./node_modules/_gl-matrix@3.3.0@gl-matrix/esm/common.js"); /** * 4x4 Matrix