@antv/hierarchy 0.6.10 → 0.6.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc +9 -23
- package/.github/workflows/build.yml +32 -0
- package/README.md +10 -2
- package/assets/compact-box-bt.png +0 -0
- package/assets/compact-box-h.png +0 -0
- package/assets/compact-box-lr.png +0 -0
- package/assets/compact-box-rl.png +0 -0
- package/assets/compact-box-tb.png +0 -0
- package/assets/compact-box-v.png +0 -0
- package/assets/dendrogram-bt.png +0 -0
- package/assets/dendrogram-h.png +0 -0
- package/assets/dendrogram-lr.png +0 -0
- package/assets/dendrogram-rl.png +0 -0
- package/assets/dendrogram-tb.png +0 -0
- package/assets/dendrogram-v.png +0 -0
- package/assets/indented-h.png +0 -0
- package/assets/indented-lr.png +0 -0
- package/assets/indented-rl.png +0 -0
- package/assets/layered-tidy-bt.png +0 -0
- package/assets/layered-tidy-h.png +0 -0
- package/assets/layered-tidy-lr.png +0 -0
- package/assets/layered-tidy-rl.png +0 -0
- package/assets/layered-tidy-tb.png +0 -0
- package/assets/layered-tidy-v.png +0 -0
- package/assets/mindmap.png +0 -0
- package/build/hierarchy.js +196 -3394
- package/build/hierarchy.js.map +1 -1
- package/dist/hierarchy.min.js +1 -1
- package/lib/compact-box.js +1 -1
- package/lib/dendrogram.js +1 -1
- package/lib/indented.js +1 -2
- package/lib/layout/dendrogram.js +0 -1
- package/lib/layout/do-layout.js +0 -1
- package/lib/layout/hierarchy.js +0 -3
- package/lib/layout/indented.js +6 -12
- package/lib/layout/mindmap.js +0 -1
- package/lib/mindmap.js +1 -1
- package/lib/util.js +1 -4
- package/package.json +35 -44
- package/src/layout/indented.js +8 -10
- package/src/util.js +1 -3
- package/.github/ISSUE_TEMPLATE.md +0 -21
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -19
- package/.travis.yml +0 -25
package/build/hierarchy.js
CHANGED
|
@@ -70,96 +70,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
70
70
|
/******/ __webpack_require__.p = "";
|
|
71
71
|
/******/
|
|
72
72
|
/******/ // Load entry module and return exports
|
|
73
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
73
|
+
/******/ return __webpack_require__(__webpack_require__.s = 5);
|
|
74
74
|
/******/ })
|
|
75
75
|
/************************************************************************/
|
|
76
76
|
/******/ ([
|
|
77
77
|
/* 0 */
|
|
78
|
-
/***/ (function(module,
|
|
79
|
-
|
|
80
|
-
"use strict";
|
|
81
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);
|
|
82
|
-
|
|
83
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (value) {
|
|
84
|
-
return Array.isArray ? Array.isArray(value) : Object(__WEBPACK_IMPORTED_MODULE_0__is_type__["a" /* default */])(value, 'Array');
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
/***/ }),
|
|
88
|
-
/* 1 */
|
|
89
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
90
|
-
|
|
91
|
-
"use strict";
|
|
92
|
-
var isArrayLike = function (value) {
|
|
93
|
-
/**
|
|
94
|
-
* isArrayLike([1, 2, 3]) => true
|
|
95
|
-
* isArrayLike(document.body.children) => true
|
|
96
|
-
* isArrayLike('abc') => true
|
|
97
|
-
* isArrayLike(Function) => false
|
|
98
|
-
*/
|
|
99
|
-
return value !== null && typeof value !== 'function' && isFinite(value.length);
|
|
100
|
-
};
|
|
101
|
-
/* harmony default export */ __webpack_exports__["a"] = (isArrayLike);
|
|
102
|
-
|
|
103
|
-
/***/ }),
|
|
104
|
-
/* 2 */
|
|
105
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
106
|
-
|
|
107
|
-
"use strict";
|
|
108
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);
|
|
109
|
-
/**
|
|
110
|
-
* 是否为函数
|
|
111
|
-
* @param {*} fn 对象
|
|
112
|
-
* @return {Boolean} 是否函数
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (value) {
|
|
116
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__["a" /* default */])(value, 'Function');
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
/***/ }),
|
|
120
|
-
/* 3 */
|
|
121
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
122
|
-
|
|
123
|
-
"use strict";
|
|
124
|
-
var toString = {}.toString;
|
|
125
|
-
var isType = function (value, type) {
|
|
126
|
-
return toString.call(value) === '[object ' + type + ']';
|
|
127
|
-
};
|
|
128
|
-
/* harmony default export */ __webpack_exports__["a"] = (isType);
|
|
129
|
-
|
|
130
|
-
/***/ }),
|
|
131
|
-
/* 4 */
|
|
132
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
133
|
-
|
|
134
|
-
"use strict";
|
|
135
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);
|
|
136
|
-
|
|
137
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (str) {
|
|
138
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__["a" /* default */])(str, 'String');
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
/***/ }),
|
|
142
|
-
/* 5 */
|
|
143
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
144
|
-
|
|
145
|
-
"use strict";
|
|
146
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);
|
|
147
|
-
/**
|
|
148
|
-
* 判断是否数字
|
|
149
|
-
* @return {Boolean} 是否数字
|
|
150
|
-
*/
|
|
151
|
-
|
|
152
|
-
var isNumber = function (value) {
|
|
153
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__["a" /* default */])(value, 'Number');
|
|
154
|
-
};
|
|
155
|
-
/* harmony default export */ __webpack_exports__["a"] = (isNumber);
|
|
156
|
-
|
|
157
|
-
/***/ }),
|
|
158
|
-
/* 6 */
|
|
159
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
160
|
-
|
|
161
|
-
var _require = __webpack_require__(38),
|
|
162
|
-
mix = _require.mix;
|
|
78
|
+
/***/ (function(module, exports) {
|
|
163
79
|
|
|
164
80
|
/**
|
|
165
81
|
* Get average height or height for node's position calculation, according to align.
|
|
@@ -176,106 +92,15 @@ function getHeight(preNode, node, align, heightField) {
|
|
|
176
92
|
return align === 'center' ? (preNode[heightField] + node[heightField]) / 2 : preNode.height;
|
|
177
93
|
}
|
|
178
94
|
module.exports = {
|
|
179
|
-
assign:
|
|
95
|
+
assign: Object.assign,
|
|
180
96
|
getHeight: getHeight
|
|
181
97
|
};
|
|
182
98
|
|
|
183
99
|
/***/ }),
|
|
184
|
-
/*
|
|
185
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
186
|
-
|
|
187
|
-
"use strict";
|
|
188
|
-
// isFinite,
|
|
189
|
-
var isNil = function (value) {
|
|
190
|
-
/**
|
|
191
|
-
* isNil(null) => true
|
|
192
|
-
* isNil() => true
|
|
193
|
-
*/
|
|
194
|
-
return value === null || value === undefined;
|
|
195
|
-
};
|
|
196
|
-
/* harmony default export */ __webpack_exports__["a"] = (isNil);
|
|
197
|
-
|
|
198
|
-
/***/ }),
|
|
199
|
-
/* 8 */
|
|
200
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
201
|
-
|
|
202
|
-
"use strict";
|
|
203
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);
|
|
204
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_object__ = __webpack_require__(12);
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
function each(elements, func) {
|
|
208
|
-
if (!elements) {
|
|
209
|
-
return;
|
|
210
|
-
}
|
|
211
|
-
var rst;
|
|
212
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array__["a" /* default */])(elements)) {
|
|
213
|
-
for (var i = 0, len = elements.length; i < len; i++) {
|
|
214
|
-
rst = func(elements[i], i);
|
|
215
|
-
if (rst === false) {
|
|
216
|
-
break;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
} else if (Object(__WEBPACK_IMPORTED_MODULE_1__is_object__["a" /* default */])(elements)) {
|
|
220
|
-
for (var k in elements) {
|
|
221
|
-
if (elements.hasOwnProperty(k)) {
|
|
222
|
-
rst = func(elements[k], k);
|
|
223
|
-
if (rst === false) {
|
|
224
|
-
break;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
/* harmony default export */ __webpack_exports__["a"] = (each);
|
|
231
|
-
|
|
232
|
-
/***/ }),
|
|
233
|
-
/* 9 */
|
|
234
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
235
|
-
|
|
236
|
-
"use strict";
|
|
237
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_nil__ = __webpack_require__(7);
|
|
238
|
-
|
|
239
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (value) {
|
|
240
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_0__is_nil__["a" /* default */])(value)) return '';
|
|
241
|
-
return value.toString();
|
|
242
|
-
});
|
|
243
|
-
|
|
244
|
-
/***/ }),
|
|
245
|
-
/* 10 */
|
|
246
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
247
|
-
|
|
248
|
-
"use strict";
|
|
249
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_object_like__ = __webpack_require__(14);
|
|
250
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_type__ = __webpack_require__(3);
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
var isPlainObject = function (value) {
|
|
254
|
-
/**
|
|
255
|
-
* isObjectLike(new Foo) => false
|
|
256
|
-
* isObjectLike([1, 2, 3]) => false
|
|
257
|
-
* isObjectLike({ x: 0, y: 0 }) => true
|
|
258
|
-
* isObjectLike(Object.create(null)) => true
|
|
259
|
-
*/
|
|
260
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_object_like__["a" /* default */])(value) || !Object(__WEBPACK_IMPORTED_MODULE_1__is_type__["a" /* default */])(value, 'Object')) {
|
|
261
|
-
return false;
|
|
262
|
-
}
|
|
263
|
-
if (Object.getPrototypeOf(value) === null) {
|
|
264
|
-
return true;
|
|
265
|
-
}
|
|
266
|
-
var proto = value;
|
|
267
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
|
268
|
-
proto = Object.getPrototypeOf(proto);
|
|
269
|
-
}
|
|
270
|
-
return Object.getPrototypeOf(value) === proto;
|
|
271
|
-
};
|
|
272
|
-
/* harmony default export */ __webpack_exports__["a"] = (isPlainObject);
|
|
273
|
-
|
|
274
|
-
/***/ }),
|
|
275
|
-
/* 11 */
|
|
100
|
+
/* 1 */
|
|
276
101
|
/***/ (function(module, exports, __webpack_require__) {
|
|
277
102
|
|
|
278
|
-
var hierarchy = __webpack_require__(
|
|
103
|
+
var hierarchy = __webpack_require__(3);
|
|
279
104
|
var Layout = /*#__PURE__*/function () {
|
|
280
105
|
function Layout(root, options) {
|
|
281
106
|
if (options === void 0) {
|
|
@@ -294,101 +119,10 @@ var Layout = /*#__PURE__*/function () {
|
|
|
294
119
|
module.exports = Layout;
|
|
295
120
|
|
|
296
121
|
/***/ }),
|
|
297
|
-
/*
|
|
298
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
299
|
-
|
|
300
|
-
"use strict";
|
|
301
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (value) {
|
|
302
|
-
/**
|
|
303
|
-
* isObject({}) => true
|
|
304
|
-
* isObject([1, 2, 3]) => true
|
|
305
|
-
* isObject(Function) => true
|
|
306
|
-
* isObject(null) => false
|
|
307
|
-
*/
|
|
308
|
-
var type = typeof value;
|
|
309
|
-
return value !== null && type === 'object' || type === 'function';
|
|
310
|
-
});
|
|
311
|
-
|
|
312
|
-
/***/ }),
|
|
313
|
-
/* 13 */
|
|
314
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
315
|
-
|
|
316
|
-
"use strict";
|
|
317
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);
|
|
318
|
-
|
|
319
|
-
var contains = function (arr, value) {
|
|
320
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__["a" /* default */])(arr)) {
|
|
321
|
-
return false;
|
|
322
|
-
}
|
|
323
|
-
return arr.indexOf(value) > -1;
|
|
324
|
-
};
|
|
325
|
-
/* harmony default export */ __webpack_exports__["a"] = (contains);
|
|
326
|
-
|
|
327
|
-
/***/ }),
|
|
328
|
-
/* 14 */
|
|
329
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
330
|
-
|
|
331
|
-
"use strict";
|
|
332
|
-
var isObjectLike = function (value) {
|
|
333
|
-
/**
|
|
334
|
-
* isObjectLike({}) => true
|
|
335
|
-
* isObjectLike([1, 2, 3]) => true
|
|
336
|
-
* isObjectLike(Function) => false
|
|
337
|
-
* isObjectLike(null) => false
|
|
338
|
-
*/
|
|
339
|
-
return typeof value === 'object' && value !== null;
|
|
340
|
-
};
|
|
341
|
-
/* harmony default export */ __webpack_exports__["a"] = (isObjectLike);
|
|
342
|
-
|
|
343
|
-
/***/ }),
|
|
344
|
-
/* 15 */
|
|
345
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
346
|
-
|
|
347
|
-
"use strict";
|
|
348
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__each__ = __webpack_require__(8);
|
|
349
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
// @ts-ignore
|
|
353
|
-
var values = Object.values ? function (obj) {
|
|
354
|
-
return Object.values(obj);
|
|
355
|
-
} : function (obj) {
|
|
356
|
-
var result = [];
|
|
357
|
-
Object(__WEBPACK_IMPORTED_MODULE_0__each__["a" /* default */])(obj, function (value, key) {
|
|
358
|
-
if (!(Object(__WEBPACK_IMPORTED_MODULE_1__is_function__["a" /* default */])(obj) && key === 'prototype')) {
|
|
359
|
-
result.push(value);
|
|
360
|
-
}
|
|
361
|
-
});
|
|
362
|
-
return result;
|
|
363
|
-
};
|
|
364
|
-
/* harmony default export */ __webpack_exports__["a"] = (values);
|
|
365
|
-
|
|
366
|
-
/***/ }),
|
|
367
|
-
/* 16 */
|
|
368
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
369
|
-
|
|
370
|
-
"use strict";
|
|
371
|
-
/* harmony export (immutable) */ __webpack_exports__["a"] = mix;
|
|
372
|
-
// FIXME: Mutable param should be forbidden in static lang.
|
|
373
|
-
function _mix(dist, obj) {
|
|
374
|
-
for (var key in obj) {
|
|
375
|
-
if (obj.hasOwnProperty(key) && key !== 'constructor' && obj[key] !== undefined) {
|
|
376
|
-
dist[key] = obj[key];
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
function mix(dist, src1, src2, src3) {
|
|
381
|
-
if (src1) _mix(dist, src1);
|
|
382
|
-
if (src2) _mix(dist, src2);
|
|
383
|
-
if (src3) _mix(dist, src3);
|
|
384
|
-
return dist;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
/***/ }),
|
|
388
|
-
/* 17 */
|
|
122
|
+
/* 2 */
|
|
389
123
|
/***/ (function(module, exports, __webpack_require__) {
|
|
390
124
|
|
|
391
|
-
var separateTree = __webpack_require__(
|
|
125
|
+
var separateTree = __webpack_require__(4);
|
|
392
126
|
var VALID_DIRECTIONS = ['LR',
|
|
393
127
|
// left to right
|
|
394
128
|
'RL',
|
|
@@ -401,7 +135,6 @@ var VALID_DIRECTIONS = ['LR',
|
|
|
401
135
|
// horizontal
|
|
402
136
|
'V' // vertical
|
|
403
137
|
];
|
|
404
|
-
|
|
405
138
|
var HORIZONTAL_DIRECTIONS = ['LR', 'RL', 'H'];
|
|
406
139
|
var isHorizontal = function isHorizontal(direction) {
|
|
407
140
|
return HORIZONTAL_DIRECTIONS.indexOf(direction) > -1;
|
|
@@ -463,11 +196,11 @@ module.exports = function (root, options, layoutAlgrithm) {
|
|
|
463
196
|
};
|
|
464
197
|
|
|
465
198
|
/***/ }),
|
|
466
|
-
/*
|
|
199
|
+
/* 3 */
|
|
467
200
|
/***/ (function(module, exports, __webpack_require__) {
|
|
468
201
|
|
|
469
202
|
/* eslint-disable no-cond-assign */
|
|
470
|
-
var util = __webpack_require__(
|
|
203
|
+
var util = __webpack_require__(0);
|
|
471
204
|
var PEM = 18;
|
|
472
205
|
var DEFAULT_HEIGHT = PEM * 2;
|
|
473
206
|
var DEFAULT_GAP = PEM;
|
|
@@ -498,7 +231,6 @@ var DEFAULT_OPTIONS = {
|
|
|
498
231
|
return d.width || label.split('').length * PEM; // FIXME DO NOT get width like this
|
|
499
232
|
}
|
|
500
233
|
};
|
|
501
|
-
|
|
502
234
|
function Node(data, options) {
|
|
503
235
|
var me = this;
|
|
504
236
|
me.vgap = me.hgap = 0;
|
|
@@ -553,3113 +285,192 @@ util.assign(Node.prototype, {
|
|
|
553
285
|
var me = this;
|
|
554
286
|
var nodes = [me];
|
|
555
287
|
var current;
|
|
556
|
-
while (current = nodes.shift()) {
|
|
557
|
-
callback(current);
|
|
558
|
-
nodes = current.children.concat(nodes);
|
|
559
|
-
}
|
|
560
|
-
},
|
|
561
|
-
DFTraverse: function DFTraverse(callback) {
|
|
562
|
-
// Depth First traverse
|
|
563
|
-
this.eachNode(callback);
|
|
564
|
-
},
|
|
565
|
-
BFTraverse: function BFTraverse(callback) {
|
|
566
|
-
// Breadth First traverse
|
|
567
|
-
var me = this;
|
|
568
|
-
var nodes = [me];
|
|
569
|
-
var current;
|
|
570
|
-
while (current = nodes.shift()) {
|
|
571
|
-
callback(current);
|
|
572
|
-
nodes = nodes.concat(current.children);
|
|
573
|
-
}
|
|
574
|
-
},
|
|
575
|
-
getBoundingBox: function getBoundingBox() {
|
|
576
|
-
// BBox for just one tree node
|
|
577
|
-
var bb = {
|
|
578
|
-
left: Number.MAX_VALUE,
|
|
579
|
-
top: Number.MAX_VALUE,
|
|
580
|
-
width: 0,
|
|
581
|
-
height: 0
|
|
582
|
-
};
|
|
583
|
-
this.eachNode(function (node) {
|
|
584
|
-
bb.left = Math.min(bb.left, node.x);
|
|
585
|
-
bb.top = Math.min(bb.top, node.y);
|
|
586
|
-
bb.width = Math.max(bb.width, node.x + node.width);
|
|
587
|
-
bb.height = Math.max(bb.height, node.y + node.height);
|
|
588
|
-
});
|
|
589
|
-
return bb;
|
|
590
|
-
},
|
|
591
|
-
// translate
|
|
592
|
-
translate: function translate(tx, ty) {
|
|
593
|
-
if (tx === void 0) {
|
|
594
|
-
tx = 0;
|
|
595
|
-
}
|
|
596
|
-
if (ty === void 0) {
|
|
597
|
-
ty = 0;
|
|
598
|
-
}
|
|
599
|
-
this.eachNode(function (node) {
|
|
600
|
-
node.x += tx;
|
|
601
|
-
node.y += ty;
|
|
602
|
-
node.x += node.preH;
|
|
603
|
-
node.y += node.preV;
|
|
604
|
-
});
|
|
605
|
-
},
|
|
606
|
-
right2left: function right2left() {
|
|
607
|
-
var me = this;
|
|
608
|
-
var bb = me.getBoundingBox();
|
|
609
|
-
me.eachNode(function (node) {
|
|
610
|
-
node.x = node.x - (node.x - bb.left) * 2 - node.width;
|
|
611
|
-
// node.x = - node.x;
|
|
612
|
-
});
|
|
613
|
-
|
|
614
|
-
me.translate(bb.width, 0);
|
|
615
|
-
},
|
|
616
|
-
bottom2top: function bottom2top() {
|
|
617
|
-
var me = this;
|
|
618
|
-
var bb = me.getBoundingBox();
|
|
619
|
-
me.eachNode(function (node) {
|
|
620
|
-
node.y = node.y - (node.y - bb.top) * 2 - node.height;
|
|
621
|
-
// node.y = - node.y;
|
|
622
|
-
});
|
|
623
|
-
|
|
624
|
-
me.translate(0, bb.height);
|
|
625
|
-
}
|
|
626
|
-
});
|
|
627
|
-
function hierarchy(data, options, isolated) {
|
|
628
|
-
if (options === void 0) {
|
|
629
|
-
options = {};
|
|
630
|
-
}
|
|
631
|
-
options = util.assign({}, DEFAULT_OPTIONS, options);
|
|
632
|
-
var root = new Node(data, options);
|
|
633
|
-
var nodes = [root];
|
|
634
|
-
var node;
|
|
635
|
-
if (!isolated && !data.collapsed) {
|
|
636
|
-
while (node = nodes.shift()) {
|
|
637
|
-
if (!node.data.collapsed) {
|
|
638
|
-
var children = options.getChildren(node.data);
|
|
639
|
-
var length = children ? children.length : 0;
|
|
640
|
-
node.children = new Array(length);
|
|
641
|
-
if (children && length) {
|
|
642
|
-
for (var i = 0; i < length; i++) {
|
|
643
|
-
var child = new Node(children[i], options);
|
|
644
|
-
node.children[i] = child;
|
|
645
|
-
nodes.push(child);
|
|
646
|
-
child.parent = node;
|
|
647
|
-
child.depth = node.depth + 1;
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
return root;
|
|
654
|
-
}
|
|
655
|
-
module.exports = hierarchy;
|
|
656
|
-
|
|
657
|
-
/***/ }),
|
|
658
|
-
/* 19 */
|
|
659
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
660
|
-
|
|
661
|
-
"use strict";
|
|
662
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);
|
|
663
|
-
|
|
664
|
-
var filter = function (arr, func) {
|
|
665
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__["a" /* default */])(arr)) {
|
|
666
|
-
return arr;
|
|
667
|
-
}
|
|
668
|
-
var result = [];
|
|
669
|
-
for (var index = 0; index < arr.length; index++) {
|
|
670
|
-
var value = arr[index];
|
|
671
|
-
if (func(value, index)) {
|
|
672
|
-
result.push(value);
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
return result;
|
|
676
|
-
};
|
|
677
|
-
/* harmony default export */ __webpack_exports__["a"] = (filter);
|
|
678
|
-
|
|
679
|
-
/***/ }),
|
|
680
|
-
/* 20 */
|
|
681
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
682
|
-
|
|
683
|
-
"use strict";
|
|
684
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_nil__ = __webpack_require__(7);
|
|
685
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys__ = __webpack_require__(21);
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
function isMatch(obj, attrs) {
|
|
689
|
-
var _keys = Object(__WEBPACK_IMPORTED_MODULE_1__keys__["a" /* default */])(attrs);
|
|
690
|
-
var length = _keys.length;
|
|
691
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_0__is_nil__["a" /* default */])(obj)) return !length;
|
|
692
|
-
for (var i = 0; i < length; i += 1) {
|
|
693
|
-
var key = _keys[i];
|
|
694
|
-
if (attrs[key] !== obj[key] || !(key in obj)) {
|
|
695
|
-
return false;
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
return true;
|
|
699
|
-
}
|
|
700
|
-
/* harmony default export */ __webpack_exports__["a"] = (isMatch);
|
|
701
|
-
|
|
702
|
-
/***/ }),
|
|
703
|
-
/* 21 */
|
|
704
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
705
|
-
|
|
706
|
-
"use strict";
|
|
707
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__each__ = __webpack_require__(8);
|
|
708
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
var keys = Object.keys ? function (obj) {
|
|
712
|
-
return Object.keys(obj);
|
|
713
|
-
} : function (obj) {
|
|
714
|
-
var result = [];
|
|
715
|
-
Object(__WEBPACK_IMPORTED_MODULE_0__each__["a" /* default */])(obj, function (value, key) {
|
|
716
|
-
if (!(Object(__WEBPACK_IMPORTED_MODULE_1__is_function__["a" /* default */])(obj) && key === 'prototype')) {
|
|
717
|
-
result.push(key);
|
|
718
|
-
}
|
|
719
|
-
});
|
|
720
|
-
return result;
|
|
721
|
-
};
|
|
722
|
-
/* harmony default export */ __webpack_exports__["a"] = (keys);
|
|
723
|
-
|
|
724
|
-
/***/ }),
|
|
725
|
-
/* 22 */
|
|
726
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
727
|
-
|
|
728
|
-
"use strict";
|
|
729
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);
|
|
730
|
-
|
|
731
|
-
/**
|
|
732
|
-
* @param {Array} arr The array to iterate over.
|
|
733
|
-
* @return {*} Returns the maximum value.
|
|
734
|
-
* @example
|
|
735
|
-
*
|
|
736
|
-
* max([1, 2]);
|
|
737
|
-
* // => 2
|
|
738
|
-
*
|
|
739
|
-
* max([]);
|
|
740
|
-
* // => undefined
|
|
741
|
-
*
|
|
742
|
-
* const data = new Array(1250010).fill(1).map((d,idx) => idx);
|
|
743
|
-
*
|
|
744
|
-
* max(data);
|
|
745
|
-
* // => 1250010
|
|
746
|
-
* // Math.max(...data) will encounter "Maximum call stack size exceeded" error
|
|
747
|
-
*/
|
|
748
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (arr) {
|
|
749
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array__["a" /* default */])(arr)) {
|
|
750
|
-
return undefined;
|
|
751
|
-
}
|
|
752
|
-
return arr.reduce(function (prev, curr) {
|
|
753
|
-
return Math.max(prev, curr);
|
|
754
|
-
}, arr[0]);
|
|
755
|
-
});
|
|
756
|
-
|
|
757
|
-
/***/ }),
|
|
758
|
-
/* 23 */
|
|
759
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
760
|
-
|
|
761
|
-
"use strict";
|
|
762
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);
|
|
763
|
-
|
|
764
|
-
/**
|
|
765
|
-
* @param {Array} arr The array to iterate over.
|
|
766
|
-
* @return {*} Returns the minimum value.
|
|
767
|
-
* @example
|
|
768
|
-
*
|
|
769
|
-
* min([1, 2]);
|
|
770
|
-
* // => 1
|
|
771
|
-
*
|
|
772
|
-
* min([]);
|
|
773
|
-
* // => undefined
|
|
774
|
-
*
|
|
775
|
-
* const data = new Array(1250010).fill(1).map((d,idx) => idx);
|
|
776
|
-
*
|
|
777
|
-
* min(data);
|
|
778
|
-
* // => 1250010
|
|
779
|
-
* // Math.min(...data) will encounter "Maximum call stack size exceeded" error
|
|
780
|
-
*/
|
|
781
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (arr) {
|
|
782
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array__["a" /* default */])(arr)) {
|
|
783
|
-
return undefined;
|
|
784
|
-
}
|
|
785
|
-
return arr.reduce(function (prev, curr) {
|
|
786
|
-
return Math.min(prev, curr);
|
|
787
|
-
}, arr[0]);
|
|
788
|
-
});
|
|
789
|
-
|
|
790
|
-
/***/ }),
|
|
791
|
-
/* 24 */
|
|
792
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
793
|
-
|
|
794
|
-
"use strict";
|
|
795
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);
|
|
796
|
-
|
|
797
|
-
var splice = Array.prototype.splice;
|
|
798
|
-
var pullAt = function pullAt(arr, indexes) {
|
|
799
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__["a" /* default */])(arr)) {
|
|
800
|
-
return [];
|
|
801
|
-
}
|
|
802
|
-
var length = arr ? indexes.length : 0;
|
|
803
|
-
var last = length - 1;
|
|
804
|
-
while (length--) {
|
|
805
|
-
var previous = void 0;
|
|
806
|
-
var index = indexes[length];
|
|
807
|
-
if (length === last || index !== previous) {
|
|
808
|
-
previous = index;
|
|
809
|
-
splice.call(arr, index, 1);
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
return arr;
|
|
813
|
-
};
|
|
814
|
-
/* harmony default export */ __webpack_exports__["a"] = (pullAt);
|
|
815
|
-
|
|
816
|
-
/***/ }),
|
|
817
|
-
/* 25 */
|
|
818
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
819
|
-
|
|
820
|
-
"use strict";
|
|
821
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__each__ = __webpack_require__(8);
|
|
822
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_array__ = __webpack_require__(0);
|
|
823
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__is_plain_object__ = __webpack_require__(10);
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
var reduce = function (arr, fn, init) {
|
|
828
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_1__is_array__["a" /* default */])(arr) && !Object(__WEBPACK_IMPORTED_MODULE_2__is_plain_object__["a" /* default */])(arr)) {
|
|
829
|
-
return arr;
|
|
830
|
-
}
|
|
831
|
-
var result = init;
|
|
832
|
-
Object(__WEBPACK_IMPORTED_MODULE_0__each__["a" /* default */])(arr, function (data, i) {
|
|
833
|
-
result = fn(result, data, i);
|
|
834
|
-
});
|
|
835
|
-
return result;
|
|
836
|
-
};
|
|
837
|
-
/* harmony default export */ __webpack_exports__["a"] = (reduce);
|
|
838
|
-
|
|
839
|
-
/***/ }),
|
|
840
|
-
/* 26 */
|
|
841
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
842
|
-
|
|
843
|
-
"use strict";
|
|
844
|
-
/* harmony export (immutable) */ __webpack_exports__["a"] = uniq;
|
|
845
|
-
function uniq(arr, cache) {
|
|
846
|
-
if (cache === void 0) {
|
|
847
|
-
cache = new Map();
|
|
848
|
-
}
|
|
849
|
-
var r = [];
|
|
850
|
-
if (Array.isArray(arr)) {
|
|
851
|
-
for (var i = 0, len = arr.length; i < len; i++) {
|
|
852
|
-
var item = arr[i];
|
|
853
|
-
// 加一个 cache,提升性能
|
|
854
|
-
if (!cache.has(item)) {
|
|
855
|
-
r.push(item);
|
|
856
|
-
cache.set(item, true);
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
return r;
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
/***/ }),
|
|
864
|
-
/* 27 */
|
|
865
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
866
|
-
|
|
867
|
-
"use strict";
|
|
868
|
-
/* harmony export (immutable) */ __webpack_exports__["a"] = groupToMap;
|
|
869
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);
|
|
870
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);
|
|
871
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__group_by__ = __webpack_require__(28);
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
/**
|
|
876
|
-
* 将数据分组成 map
|
|
877
|
-
* @param data
|
|
878
|
-
* @param condition
|
|
879
|
-
*/
|
|
880
|
-
function groupToMap(data, condition) {
|
|
881
|
-
if (!condition) {
|
|
882
|
-
return {
|
|
883
|
-
0: data
|
|
884
|
-
};
|
|
885
|
-
}
|
|
886
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_1__is_function__["a" /* default */])(condition)) {
|
|
887
|
-
// 如果是字符串,则按照 a*b 风格成数组
|
|
888
|
-
var paramscondition_1 = Object(__WEBPACK_IMPORTED_MODULE_0__is_array__["a" /* default */])(condition) ? condition : condition.replace(/\s+/g, '').split('*');
|
|
889
|
-
condition = function (row) {
|
|
890
|
-
var unique = '_'; // 避免出现数字作为Key的情况,会进行按照数字的排序
|
|
891
|
-
// 根据字段列表的值,拼接成 key
|
|
892
|
-
for (var i = 0, l = paramscondition_1.length; i < l; i++) {
|
|
893
|
-
unique += row[paramscondition_1[i]] && row[paramscondition_1[i]].toString();
|
|
894
|
-
}
|
|
895
|
-
return unique;
|
|
896
|
-
};
|
|
897
|
-
}
|
|
898
|
-
return Object(__WEBPACK_IMPORTED_MODULE_2__group_by__["a" /* default */])(data, condition);
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
/***/ }),
|
|
902
|
-
/* 28 */
|
|
903
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
904
|
-
|
|
905
|
-
"use strict";
|
|
906
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);
|
|
907
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
911
|
-
function groupBy(data, condition) {
|
|
912
|
-
if (!condition || !Object(__WEBPACK_IMPORTED_MODULE_0__is_array__["a" /* default */])(data)) {
|
|
913
|
-
return {};
|
|
914
|
-
}
|
|
915
|
-
var result = {};
|
|
916
|
-
// 兼容方法和 字符串的写法
|
|
917
|
-
var predicate = Object(__WEBPACK_IMPORTED_MODULE_1__is_function__["a" /* default */])(condition) ? condition : function (item) {
|
|
918
|
-
return item[condition];
|
|
919
|
-
};
|
|
920
|
-
var key;
|
|
921
|
-
for (var i = 0; i < data.length; i++) {
|
|
922
|
-
var item = data[i];
|
|
923
|
-
key = predicate(item);
|
|
924
|
-
if (hasOwnProperty.call(result, key)) {
|
|
925
|
-
result[key].push(item);
|
|
926
|
-
} else {
|
|
927
|
-
result[key] = [item];
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
return result;
|
|
931
|
-
}
|
|
932
|
-
/* harmony default export */ __webpack_exports__["a"] = (groupBy);
|
|
933
|
-
|
|
934
|
-
/***/ }),
|
|
935
|
-
/* 29 */
|
|
936
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
937
|
-
|
|
938
|
-
"use strict";
|
|
939
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (obj, key) {
|
|
940
|
-
return obj.hasOwnProperty(key);
|
|
941
|
-
});
|
|
942
|
-
|
|
943
|
-
/***/ }),
|
|
944
|
-
/* 30 */
|
|
945
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
946
|
-
|
|
947
|
-
"use strict";
|
|
948
|
-
var toString = {}.toString;
|
|
949
|
-
var getType = function (value) {
|
|
950
|
-
return toString.call(value).replace(/^\[object /, '').replace(/]$/, '');
|
|
951
|
-
};
|
|
952
|
-
/* harmony default export */ __webpack_exports__["a"] = (getType);
|
|
953
|
-
|
|
954
|
-
/***/ }),
|
|
955
|
-
/* 31 */
|
|
956
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
957
|
-
|
|
958
|
-
"use strict";
|
|
959
|
-
var objectProto = Object.prototype;
|
|
960
|
-
var isPrototype = function (value) {
|
|
961
|
-
var Ctor = value && value.constructor;
|
|
962
|
-
var proto = typeof Ctor === 'function' && Ctor.prototype || objectProto;
|
|
963
|
-
return value === proto;
|
|
964
|
-
};
|
|
965
|
-
/* harmony default export */ __webpack_exports__["a"] = (isPrototype);
|
|
966
|
-
|
|
967
|
-
/***/ }),
|
|
968
|
-
/* 32 */
|
|
969
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
970
|
-
|
|
971
|
-
"use strict";
|
|
972
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_function__ = __webpack_require__(2);
|
|
973
|
-
|
|
974
|
-
/**
|
|
975
|
-
* _.memoize(calColor);
|
|
976
|
-
* _.memoize(calColor, (...args) => args[0]);
|
|
977
|
-
* @param f
|
|
978
|
-
* @param resolver
|
|
979
|
-
*/
|
|
980
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (f, resolver) {
|
|
981
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_function__["a" /* default */])(f)) {
|
|
982
|
-
throw new TypeError('Expected a function');
|
|
983
|
-
}
|
|
984
|
-
var memoized = function () {
|
|
985
|
-
var args = [];
|
|
986
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
987
|
-
args[_i] = arguments[_i];
|
|
988
|
-
}
|
|
989
|
-
// 使用方法构造 key,如果不存在 resolver,则直接取第一个参数作为 key
|
|
990
|
-
var key = resolver ? resolver.apply(this, args) : args[0];
|
|
991
|
-
var cache = memoized.cache;
|
|
992
|
-
if (cache.has(key)) {
|
|
993
|
-
return cache.get(key);
|
|
994
|
-
}
|
|
995
|
-
var result = f.apply(this, args);
|
|
996
|
-
// 缓存起来
|
|
997
|
-
cache.set(key, result);
|
|
998
|
-
return result;
|
|
999
|
-
};
|
|
1000
|
-
memoized.cache = new Map();
|
|
1001
|
-
return memoized;
|
|
1002
|
-
});
|
|
1003
|
-
|
|
1004
|
-
/***/ }),
|
|
1005
|
-
/* 33 */
|
|
1006
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1007
|
-
|
|
1008
|
-
"use strict";
|
|
1009
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_object_like__ = __webpack_require__(14);
|
|
1010
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_array_like__ = __webpack_require__(1);
|
|
1011
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__is_string__ = __webpack_require__(4);
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
var isEqual = function (value, other) {
|
|
1016
|
-
if (value === other) {
|
|
1017
|
-
return true;
|
|
1018
|
-
}
|
|
1019
|
-
if (!value || !other) {
|
|
1020
|
-
return false;
|
|
1021
|
-
}
|
|
1022
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_2__is_string__["a" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_2__is_string__["a" /* default */])(other)) {
|
|
1023
|
-
return false;
|
|
1024
|
-
}
|
|
1025
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_1__is_array_like__["a" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_1__is_array_like__["a" /* default */])(other)) {
|
|
1026
|
-
if (value.length !== other.length) {
|
|
1027
|
-
return false;
|
|
1028
|
-
}
|
|
1029
|
-
var rst = true;
|
|
1030
|
-
for (var i = 0; i < value.length; i++) {
|
|
1031
|
-
rst = isEqual(value[i], other[i]);
|
|
1032
|
-
if (!rst) {
|
|
1033
|
-
break;
|
|
1034
|
-
}
|
|
1035
|
-
}
|
|
1036
|
-
return rst;
|
|
1037
|
-
}
|
|
1038
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_0__is_object_like__["a" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_0__is_object_like__["a" /* default */])(other)) {
|
|
1039
|
-
var valueKeys = Object.keys(value);
|
|
1040
|
-
var otherKeys = Object.keys(other);
|
|
1041
|
-
if (valueKeys.length !== otherKeys.length) {
|
|
1042
|
-
return false;
|
|
1043
|
-
}
|
|
1044
|
-
var rst = true;
|
|
1045
|
-
for (var i = 0; i < valueKeys.length; i++) {
|
|
1046
|
-
rst = isEqual(value[valueKeys[i]], other[valueKeys[i]]);
|
|
1047
|
-
if (!rst) {
|
|
1048
|
-
break;
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
return rst;
|
|
1052
|
-
}
|
|
1053
|
-
return false;
|
|
1054
|
-
};
|
|
1055
|
-
/* harmony default export */ __webpack_exports__["a"] = (isEqual);
|
|
1056
|
-
|
|
1057
|
-
/***/ }),
|
|
1058
|
-
/* 34 */
|
|
1059
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1060
|
-
|
|
1061
|
-
"use strict";
|
|
1062
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(116);
|
|
1063
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__values__ = __webpack_require__(15);
|
|
1064
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__memoize__ = __webpack_require__(32);
|
|
1065
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__is_string__ = __webpack_require__(4);
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
var ctx;
|
|
1071
|
-
/**
|
|
1072
|
-
* 计算文本的宽度
|
|
1073
|
-
*/
|
|
1074
|
-
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_2__memoize__["a" /* default */])(function (text, font) {
|
|
1075
|
-
if (font === void 0) {
|
|
1076
|
-
font = {};
|
|
1077
|
-
}
|
|
1078
|
-
var fontSize = font.fontSize,
|
|
1079
|
-
fontFamily = font.fontFamily,
|
|
1080
|
-
fontWeight = font.fontWeight,
|
|
1081
|
-
fontStyle = font.fontStyle,
|
|
1082
|
-
fontVariant = font.fontVariant;
|
|
1083
|
-
if (!ctx) {
|
|
1084
|
-
ctx = document.createElement('canvas').getContext('2d');
|
|
1085
|
-
}
|
|
1086
|
-
ctx.font = [fontStyle, fontVariant, fontWeight, fontSize + "px", fontFamily].join(' ');
|
|
1087
|
-
return ctx.measureText(Object(__WEBPACK_IMPORTED_MODULE_3__is_string__["a" /* default */])(text) ? text : '').width;
|
|
1088
|
-
}, function (text, font) {
|
|
1089
|
-
if (font === void 0) {
|
|
1090
|
-
font = {};
|
|
1091
|
-
}
|
|
1092
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __spreadArrays */])([text], Object(__WEBPACK_IMPORTED_MODULE_1__values__["a" /* default */])(font)).join('');
|
|
1093
|
-
}));
|
|
1094
|
-
|
|
1095
|
-
/***/ }),
|
|
1096
|
-
/* 35 */
|
|
1097
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1098
|
-
|
|
1099
|
-
var hierarchy = __webpack_require__(18);
|
|
1100
|
-
module.exports = function (root, options) {
|
|
1101
|
-
// separate into left and right trees
|
|
1102
|
-
var left = hierarchy(root.data, options, true); // root only
|
|
1103
|
-
var right = hierarchy(root.data, options, true); // root only
|
|
1104
|
-
// automatically
|
|
1105
|
-
var treeSize = root.children.length;
|
|
1106
|
-
var rightTreeSize = Math.round(treeSize / 2);
|
|
1107
|
-
// separate left and right tree by meta data
|
|
1108
|
-
var getSide = options.getSide || function (child, index) {
|
|
1109
|
-
if (index < rightTreeSize) {
|
|
1110
|
-
return 'right';
|
|
1111
|
-
}
|
|
1112
|
-
return 'left';
|
|
1113
|
-
};
|
|
1114
|
-
for (var i = 0; i < treeSize; i++) {
|
|
1115
|
-
var child = root.children[i];
|
|
1116
|
-
var side = getSide(child, i);
|
|
1117
|
-
if (side === 'right') {
|
|
1118
|
-
right.children.push(child);
|
|
1119
|
-
} else {
|
|
1120
|
-
left.children.push(child);
|
|
1121
|
-
}
|
|
1122
|
-
}
|
|
1123
|
-
left.eachNode(function (node) {
|
|
1124
|
-
if (!node.isRoot()) {
|
|
1125
|
-
node.side = 'left';
|
|
1126
|
-
}
|
|
1127
|
-
});
|
|
1128
|
-
right.eachNode(function (node) {
|
|
1129
|
-
if (!node.isRoot()) {
|
|
1130
|
-
node.side = 'right';
|
|
1131
|
-
}
|
|
1132
|
-
});
|
|
1133
|
-
return {
|
|
1134
|
-
left: left,
|
|
1135
|
-
right: right
|
|
1136
|
-
};
|
|
1137
|
-
};
|
|
1138
|
-
|
|
1139
|
-
/***/ }),
|
|
1140
|
-
/* 36 */
|
|
1141
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1142
|
-
|
|
1143
|
-
var hierarchy = {
|
|
1144
|
-
compactBox: __webpack_require__(37),
|
|
1145
|
-
dendrogram: __webpack_require__(120),
|
|
1146
|
-
indented: __webpack_require__(122),
|
|
1147
|
-
mindmap: __webpack_require__(124)
|
|
1148
|
-
};
|
|
1149
|
-
module.exports = hierarchy;
|
|
1150
|
-
|
|
1151
|
-
/***/ }),
|
|
1152
|
-
/* 37 */
|
|
1153
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1154
|
-
|
|
1155
|
-
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
1156
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
1157
|
-
var TreeLayout = __webpack_require__(11);
|
|
1158
|
-
var nonLayeredTidyTree = __webpack_require__(119);
|
|
1159
|
-
var doTreeLayout = __webpack_require__(17);
|
|
1160
|
-
var util = __webpack_require__(6);
|
|
1161
|
-
var CompactBoxTreeLayout = /*#__PURE__*/function (_TreeLayout) {
|
|
1162
|
-
_inheritsLoose(CompactBoxTreeLayout, _TreeLayout);
|
|
1163
|
-
function CompactBoxTreeLayout() {
|
|
1164
|
-
return _TreeLayout.apply(this, arguments) || this;
|
|
1165
|
-
}
|
|
1166
|
-
var _proto = CompactBoxTreeLayout.prototype;
|
|
1167
|
-
_proto.execute = function execute() {
|
|
1168
|
-
var me = this;
|
|
1169
|
-
return doTreeLayout(me.rootNode, me.options, nonLayeredTidyTree);
|
|
1170
|
-
};
|
|
1171
|
-
return CompactBoxTreeLayout;
|
|
1172
|
-
}(TreeLayout);
|
|
1173
|
-
var DEFAULT_OPTIONS = {};
|
|
1174
|
-
function compactBoxLayout(root, options) {
|
|
1175
|
-
options = util.assign({}, DEFAULT_OPTIONS, options);
|
|
1176
|
-
return new CompactBoxTreeLayout(root, options).execute();
|
|
1177
|
-
}
|
|
1178
|
-
module.exports = compactBoxLayout;
|
|
1179
|
-
|
|
1180
|
-
/***/ }),
|
|
1181
|
-
/* 38 */
|
|
1182
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1183
|
-
|
|
1184
|
-
"use strict";
|
|
1185
|
-
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
|
1186
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__contains__ = __webpack_require__(13);
|
|
1187
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "contains", function() { return __WEBPACK_IMPORTED_MODULE_0__contains__["a"]; });
|
|
1188
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "includes", function() { return __WEBPACK_IMPORTED_MODULE_0__contains__["a"]; });
|
|
1189
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__difference__ = __webpack_require__(39);
|
|
1190
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "difference", function() { return __WEBPACK_IMPORTED_MODULE_1__difference__["a"]; });
|
|
1191
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__find__ = __webpack_require__(40);
|
|
1192
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "find", function() { return __WEBPACK_IMPORTED_MODULE_2__find__["a"]; });
|
|
1193
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__find_index__ = __webpack_require__(41);
|
|
1194
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return __WEBPACK_IMPORTED_MODULE_3__find_index__["a"]; });
|
|
1195
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__first_value__ = __webpack_require__(42);
|
|
1196
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "firstValue", function() { return __WEBPACK_IMPORTED_MODULE_4__first_value__["a"]; });
|
|
1197
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__flatten__ = __webpack_require__(43);
|
|
1198
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "flatten", function() { return __WEBPACK_IMPORTED_MODULE_5__flatten__["a"]; });
|
|
1199
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__flatten_deep__ = __webpack_require__(44);
|
|
1200
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "flattenDeep", function() { return __WEBPACK_IMPORTED_MODULE_6__flatten_deep__["a"]; });
|
|
1201
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__get_range__ = __webpack_require__(45);
|
|
1202
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getRange", function() { return __WEBPACK_IMPORTED_MODULE_7__get_range__["a"]; });
|
|
1203
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__pull__ = __webpack_require__(46);
|
|
1204
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "pull", function() { return __WEBPACK_IMPORTED_MODULE_8__pull__["a"]; });
|
|
1205
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__pull_at__ = __webpack_require__(24);
|
|
1206
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "pullAt", function() { return __WEBPACK_IMPORTED_MODULE_9__pull_at__["a"]; });
|
|
1207
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__reduce__ = __webpack_require__(25);
|
|
1208
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return __WEBPACK_IMPORTED_MODULE_10__reduce__["a"]; });
|
|
1209
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__remove__ = __webpack_require__(47);
|
|
1210
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "remove", function() { return __WEBPACK_IMPORTED_MODULE_11__remove__["a"]; });
|
|
1211
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__sort_by__ = __webpack_require__(48);
|
|
1212
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "sortBy", function() { return __WEBPACK_IMPORTED_MODULE_12__sort_by__["a"]; });
|
|
1213
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__union__ = __webpack_require__(49);
|
|
1214
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "union", function() { return __WEBPACK_IMPORTED_MODULE_13__union__["a"]; });
|
|
1215
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__uniq__ = __webpack_require__(26);
|
|
1216
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "uniq", function() { return __WEBPACK_IMPORTED_MODULE_14__uniq__["a"]; });
|
|
1217
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__values_of_key__ = __webpack_require__(50);
|
|
1218
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "valuesOfKey", function() { return __WEBPACK_IMPORTED_MODULE_15__values_of_key__["a"]; });
|
|
1219
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__head__ = __webpack_require__(51);
|
|
1220
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "head", function() { return __WEBPACK_IMPORTED_MODULE_16__head__["a"]; });
|
|
1221
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__last__ = __webpack_require__(52);
|
|
1222
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return __WEBPACK_IMPORTED_MODULE_17__last__["a"]; });
|
|
1223
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__starts_with__ = __webpack_require__(53);
|
|
1224
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "startsWith", function() { return __WEBPACK_IMPORTED_MODULE_18__starts_with__["a"]; });
|
|
1225
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__ends_with__ = __webpack_require__(54);
|
|
1226
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "endsWith", function() { return __WEBPACK_IMPORTED_MODULE_19__ends_with__["a"]; });
|
|
1227
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__filter__ = __webpack_require__(19);
|
|
1228
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return __WEBPACK_IMPORTED_MODULE_20__filter__["a"]; });
|
|
1229
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__every__ = __webpack_require__(55);
|
|
1230
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "every", function() { return __WEBPACK_IMPORTED_MODULE_21__every__["a"]; });
|
|
1231
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__some__ = __webpack_require__(56);
|
|
1232
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "some", function() { return __WEBPACK_IMPORTED_MODULE_22__some__["a"]; });
|
|
1233
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__group__ = __webpack_require__(57);
|
|
1234
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "group", function() { return __WEBPACK_IMPORTED_MODULE_23__group__["a"]; });
|
|
1235
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__group_by__ = __webpack_require__(28);
|
|
1236
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return __WEBPACK_IMPORTED_MODULE_24__group_by__["a"]; });
|
|
1237
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__group_to_map__ = __webpack_require__(27);
|
|
1238
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "groupToMap", function() { return __WEBPACK_IMPORTED_MODULE_25__group_to_map__["a"]; });
|
|
1239
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__get_wrap_behavior__ = __webpack_require__(58);
|
|
1240
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getWrapBehavior", function() { return __WEBPACK_IMPORTED_MODULE_26__get_wrap_behavior__["a"]; });
|
|
1241
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__wrap_behavior__ = __webpack_require__(59);
|
|
1242
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "wrapBehavior", function() { return __WEBPACK_IMPORTED_MODULE_27__wrap_behavior__["a"]; });
|
|
1243
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__number2color__ = __webpack_require__(60);
|
|
1244
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "number2color", function() { return __WEBPACK_IMPORTED_MODULE_28__number2color__["a"]; });
|
|
1245
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__parse_radius__ = __webpack_require__(61);
|
|
1246
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "parseRadius", function() { return __WEBPACK_IMPORTED_MODULE_29__parse_radius__["a"]; });
|
|
1247
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__clamp__ = __webpack_require__(62);
|
|
1248
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "clamp", function() { return __WEBPACK_IMPORTED_MODULE_30__clamp__["a"]; });
|
|
1249
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__fixed_base__ = __webpack_require__(63);
|
|
1250
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "fixedBase", function() { return __WEBPACK_IMPORTED_MODULE_31__fixed_base__["a"]; });
|
|
1251
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__is_decimal__ = __webpack_require__(64);
|
|
1252
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isDecimal", function() { return __WEBPACK_IMPORTED_MODULE_32__is_decimal__["a"]; });
|
|
1253
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__is_even__ = __webpack_require__(65);
|
|
1254
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isEven", function() { return __WEBPACK_IMPORTED_MODULE_33__is_even__["a"]; });
|
|
1255
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__is_integer__ = __webpack_require__(66);
|
|
1256
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isInteger", function() { return __WEBPACK_IMPORTED_MODULE_34__is_integer__["a"]; });
|
|
1257
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__is_negative__ = __webpack_require__(67);
|
|
1258
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isNegative", function() { return __WEBPACK_IMPORTED_MODULE_35__is_negative__["a"]; });
|
|
1259
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__is_number_equal__ = __webpack_require__(68);
|
|
1260
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isNumberEqual", function() { return __WEBPACK_IMPORTED_MODULE_36__is_number_equal__["a"]; });
|
|
1261
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_37__is_odd__ = __webpack_require__(69);
|
|
1262
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isOdd", function() { return __WEBPACK_IMPORTED_MODULE_37__is_odd__["a"]; });
|
|
1263
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__is_positive__ = __webpack_require__(70);
|
|
1264
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isPositive", function() { return __WEBPACK_IMPORTED_MODULE_38__is_positive__["a"]; });
|
|
1265
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__max__ = __webpack_require__(22);
|
|
1266
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return __WEBPACK_IMPORTED_MODULE_39__max__["a"]; });
|
|
1267
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__max_by__ = __webpack_require__(71);
|
|
1268
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "maxBy", function() { return __WEBPACK_IMPORTED_MODULE_40__max_by__["a"]; });
|
|
1269
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__min__ = __webpack_require__(23);
|
|
1270
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return __WEBPACK_IMPORTED_MODULE_41__min__["a"]; });
|
|
1271
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_42__min_by__ = __webpack_require__(72);
|
|
1272
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "minBy", function() { return __WEBPACK_IMPORTED_MODULE_42__min_by__["a"]; });
|
|
1273
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_43__mod__ = __webpack_require__(73);
|
|
1274
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "mod", function() { return __WEBPACK_IMPORTED_MODULE_43__mod__["a"]; });
|
|
1275
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_44__to_degree__ = __webpack_require__(74);
|
|
1276
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "toDegree", function() { return __WEBPACK_IMPORTED_MODULE_44__to_degree__["a"]; });
|
|
1277
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_45__to_integer__ = __webpack_require__(75);
|
|
1278
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "toInteger", function() { return __WEBPACK_IMPORTED_MODULE_45__to_integer__["a"]; });
|
|
1279
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_46__to_radian__ = __webpack_require__(76);
|
|
1280
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "toRadian", function() { return __WEBPACK_IMPORTED_MODULE_46__to_radian__["a"]; });
|
|
1281
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_47__for_in__ = __webpack_require__(77);
|
|
1282
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "forIn", function() { return __WEBPACK_IMPORTED_MODULE_47__for_in__["a"]; });
|
|
1283
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_48__has__ = __webpack_require__(29);
|
|
1284
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "has", function() { return __WEBPACK_IMPORTED_MODULE_48__has__["a"]; });
|
|
1285
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_49__has_key__ = __webpack_require__(78);
|
|
1286
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "hasKey", function() { return __WEBPACK_IMPORTED_MODULE_49__has_key__["a"]; });
|
|
1287
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_50__has_value__ = __webpack_require__(79);
|
|
1288
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "hasValue", function() { return __WEBPACK_IMPORTED_MODULE_50__has_value__["a"]; });
|
|
1289
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_51__keys__ = __webpack_require__(21);
|
|
1290
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return __WEBPACK_IMPORTED_MODULE_51__keys__["a"]; });
|
|
1291
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_52__is_match__ = __webpack_require__(20);
|
|
1292
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isMatch", function() { return __WEBPACK_IMPORTED_MODULE_52__is_match__["a"]; });
|
|
1293
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_53__values__ = __webpack_require__(15);
|
|
1294
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "values", function() { return __WEBPACK_IMPORTED_MODULE_53__values__["a"]; });
|
|
1295
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_54__lower_case__ = __webpack_require__(80);
|
|
1296
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "lowerCase", function() { return __WEBPACK_IMPORTED_MODULE_54__lower_case__["a"]; });
|
|
1297
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_55__lower_first__ = __webpack_require__(81);
|
|
1298
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "lowerFirst", function() { return __WEBPACK_IMPORTED_MODULE_55__lower_first__["a"]; });
|
|
1299
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_56__substitute__ = __webpack_require__(82);
|
|
1300
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "substitute", function() { return __WEBPACK_IMPORTED_MODULE_56__substitute__["a"]; });
|
|
1301
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_57__upper_case__ = __webpack_require__(83);
|
|
1302
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "upperCase", function() { return __WEBPACK_IMPORTED_MODULE_57__upper_case__["a"]; });
|
|
1303
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_58__upper_first__ = __webpack_require__(84);
|
|
1304
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "upperFirst", function() { return __WEBPACK_IMPORTED_MODULE_58__upper_first__["a"]; });
|
|
1305
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_59__get_type__ = __webpack_require__(30);
|
|
1306
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getType", function() { return __WEBPACK_IMPORTED_MODULE_59__get_type__["a"]; });
|
|
1307
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_60__is_arguments__ = __webpack_require__(85);
|
|
1308
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isArguments", function() { return __WEBPACK_IMPORTED_MODULE_60__is_arguments__["a"]; });
|
|
1309
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_61__is_array__ = __webpack_require__(0);
|
|
1310
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return __WEBPACK_IMPORTED_MODULE_61__is_array__["a"]; });
|
|
1311
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_62__is_array_like__ = __webpack_require__(1);
|
|
1312
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isArrayLike", function() { return __WEBPACK_IMPORTED_MODULE_62__is_array_like__["a"]; });
|
|
1313
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_63__is_boolean__ = __webpack_require__(86);
|
|
1314
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isBoolean", function() { return __WEBPACK_IMPORTED_MODULE_63__is_boolean__["a"]; });
|
|
1315
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_64__is_date__ = __webpack_require__(87);
|
|
1316
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isDate", function() { return __WEBPACK_IMPORTED_MODULE_64__is_date__["a"]; });
|
|
1317
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_65__is_error__ = __webpack_require__(88);
|
|
1318
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isError", function() { return __WEBPACK_IMPORTED_MODULE_65__is_error__["a"]; });
|
|
1319
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_66__is_function__ = __webpack_require__(2);
|
|
1320
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isFunction", function() { return __WEBPACK_IMPORTED_MODULE_66__is_function__["a"]; });
|
|
1321
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_67__is_finite__ = __webpack_require__(89);
|
|
1322
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isFinite", function() { return __WEBPACK_IMPORTED_MODULE_67__is_finite__["a"]; });
|
|
1323
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_68__is_nil__ = __webpack_require__(7);
|
|
1324
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isNil", function() { return __WEBPACK_IMPORTED_MODULE_68__is_nil__["a"]; });
|
|
1325
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_69__is_null__ = __webpack_require__(90);
|
|
1326
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isNull", function() { return __WEBPACK_IMPORTED_MODULE_69__is_null__["a"]; });
|
|
1327
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_70__is_number__ = __webpack_require__(5);
|
|
1328
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isNumber", function() { return __WEBPACK_IMPORTED_MODULE_70__is_number__["a"]; });
|
|
1329
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_71__is_object__ = __webpack_require__(12);
|
|
1330
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return __WEBPACK_IMPORTED_MODULE_71__is_object__["a"]; });
|
|
1331
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_72__is_object_like__ = __webpack_require__(14);
|
|
1332
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isObjectLike", function() { return __WEBPACK_IMPORTED_MODULE_72__is_object_like__["a"]; });
|
|
1333
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_73__is_plain_object__ = __webpack_require__(10);
|
|
1334
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isPlainObject", function() { return __WEBPACK_IMPORTED_MODULE_73__is_plain_object__["a"]; });
|
|
1335
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_74__is_prototype__ = __webpack_require__(31);
|
|
1336
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isPrototype", function() { return __WEBPACK_IMPORTED_MODULE_74__is_prototype__["a"]; });
|
|
1337
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_75__is_reg_exp__ = __webpack_require__(91);
|
|
1338
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isRegExp", function() { return __WEBPACK_IMPORTED_MODULE_75__is_reg_exp__["a"]; });
|
|
1339
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_76__is_string__ = __webpack_require__(4);
|
|
1340
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isString", function() { return __WEBPACK_IMPORTED_MODULE_76__is_string__["a"]; });
|
|
1341
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_77__is_type__ = __webpack_require__(3);
|
|
1342
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isType", function() { return __WEBPACK_IMPORTED_MODULE_77__is_type__["a"]; });
|
|
1343
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_78__is_undefined__ = __webpack_require__(92);
|
|
1344
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isUndefined", function() { return __WEBPACK_IMPORTED_MODULE_78__is_undefined__["a"]; });
|
|
1345
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_79__is_element__ = __webpack_require__(93);
|
|
1346
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isElement", function() { return __WEBPACK_IMPORTED_MODULE_79__is_element__["a"]; });
|
|
1347
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_80__request_animation_frame__ = __webpack_require__(94);
|
|
1348
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "requestAnimationFrame", function() { return __WEBPACK_IMPORTED_MODULE_80__request_animation_frame__["a"]; });
|
|
1349
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_81__clear_animation_frame__ = __webpack_require__(95);
|
|
1350
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "clearAnimationFrame", function() { return __WEBPACK_IMPORTED_MODULE_81__clear_animation_frame__["a"]; });
|
|
1351
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_82__augment__ = __webpack_require__(96);
|
|
1352
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "augment", function() { return __WEBPACK_IMPORTED_MODULE_82__augment__["a"]; });
|
|
1353
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_83__clone__ = __webpack_require__(97);
|
|
1354
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "clone", function() { return __WEBPACK_IMPORTED_MODULE_83__clone__["a"]; });
|
|
1355
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_84__debounce__ = __webpack_require__(98);
|
|
1356
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return __WEBPACK_IMPORTED_MODULE_84__debounce__["a"]; });
|
|
1357
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_85__memoize__ = __webpack_require__(32);
|
|
1358
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "memoize", function() { return __WEBPACK_IMPORTED_MODULE_85__memoize__["a"]; });
|
|
1359
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_86__deep_mix__ = __webpack_require__(99);
|
|
1360
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "deepMix", function() { return __WEBPACK_IMPORTED_MODULE_86__deep_mix__["a"]; });
|
|
1361
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_87__each__ = __webpack_require__(8);
|
|
1362
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "each", function() { return __WEBPACK_IMPORTED_MODULE_87__each__["a"]; });
|
|
1363
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_88__extend__ = __webpack_require__(100);
|
|
1364
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return __WEBPACK_IMPORTED_MODULE_88__extend__["a"]; });
|
|
1365
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_89__index_of__ = __webpack_require__(101);
|
|
1366
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "indexOf", function() { return __WEBPACK_IMPORTED_MODULE_89__index_of__["a"]; });
|
|
1367
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_90__is_empty__ = __webpack_require__(102);
|
|
1368
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return __WEBPACK_IMPORTED_MODULE_90__is_empty__["a"]; });
|
|
1369
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_91__is_equal__ = __webpack_require__(33);
|
|
1370
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isEqual", function() { return __WEBPACK_IMPORTED_MODULE_91__is_equal__["a"]; });
|
|
1371
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_92__is_equal_with__ = __webpack_require__(103);
|
|
1372
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isEqualWith", function() { return __WEBPACK_IMPORTED_MODULE_92__is_equal_with__["a"]; });
|
|
1373
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_93__map__ = __webpack_require__(104);
|
|
1374
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return __WEBPACK_IMPORTED_MODULE_93__map__["a"]; });
|
|
1375
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_94__map_values__ = __webpack_require__(105);
|
|
1376
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "mapValues", function() { return __WEBPACK_IMPORTED_MODULE_94__map_values__["a"]; });
|
|
1377
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_95__mix__ = __webpack_require__(16);
|
|
1378
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "mix", function() { return __WEBPACK_IMPORTED_MODULE_95__mix__["a"]; });
|
|
1379
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "assign", function() { return __WEBPACK_IMPORTED_MODULE_95__mix__["a"]; });
|
|
1380
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_96__get__ = __webpack_require__(106);
|
|
1381
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "get", function() { return __WEBPACK_IMPORTED_MODULE_96__get__["a"]; });
|
|
1382
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_97__set__ = __webpack_require__(107);
|
|
1383
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return __WEBPACK_IMPORTED_MODULE_97__set__["a"]; });
|
|
1384
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_98__pick__ = __webpack_require__(108);
|
|
1385
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "pick", function() { return __WEBPACK_IMPORTED_MODULE_98__pick__["a"]; });
|
|
1386
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_99__omit__ = __webpack_require__(109);
|
|
1387
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "omit", function() { return __WEBPACK_IMPORTED_MODULE_99__omit__["a"]; });
|
|
1388
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_100__throttle__ = __webpack_require__(110);
|
|
1389
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return __WEBPACK_IMPORTED_MODULE_100__throttle__["a"]; });
|
|
1390
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_101__to_array__ = __webpack_require__(111);
|
|
1391
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return __WEBPACK_IMPORTED_MODULE_101__to_array__["a"]; });
|
|
1392
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_102__to_string__ = __webpack_require__(9);
|
|
1393
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "toString", function() { return __WEBPACK_IMPORTED_MODULE_102__to_string__["a"]; });
|
|
1394
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_103__unique_id__ = __webpack_require__(112);
|
|
1395
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "uniqueId", function() { return __WEBPACK_IMPORTED_MODULE_103__unique_id__["a"]; });
|
|
1396
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_104__noop__ = __webpack_require__(113);
|
|
1397
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return __WEBPACK_IMPORTED_MODULE_104__noop__["a"]; });
|
|
1398
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_105__identity__ = __webpack_require__(114);
|
|
1399
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return __WEBPACK_IMPORTED_MODULE_105__identity__["a"]; });
|
|
1400
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_106__size__ = __webpack_require__(115);
|
|
1401
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "size", function() { return __WEBPACK_IMPORTED_MODULE_106__size__["a"]; });
|
|
1402
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_107__measure_text_width__ = __webpack_require__(34);
|
|
1403
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "measureTextWidth", function() { return __WEBPACK_IMPORTED_MODULE_107__measure_text_width__["a"]; });
|
|
1404
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_108__get_ellipsis_text__ = __webpack_require__(117);
|
|
1405
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getEllipsisText", function() { return __WEBPACK_IMPORTED_MODULE_108__get_ellipsis_text__["a"]; });
|
|
1406
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_109__cache__ = __webpack_require__(118);
|
|
1407
|
-
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Cache", function() { return __WEBPACK_IMPORTED_MODULE_109__cache__["a"]; });
|
|
1408
|
-
// array
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
// event
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
// format
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
// math
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
// object
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
// string
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
// type
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
// other
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
// text
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
// 不知道为什么,需要把这个 export,不然 ts 会报类型错误
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
/***/ }),
|
|
1530
|
-
/* 39 */
|
|
1531
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1532
|
-
|
|
1533
|
-
"use strict";
|
|
1534
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__filter__ = __webpack_require__(19);
|
|
1535
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__contains__ = __webpack_require__(13);
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
/**
|
|
1539
|
-
* Flattens `array` a single level deep.
|
|
1540
|
-
*
|
|
1541
|
-
* @param {Array} arr The array to inspect.
|
|
1542
|
-
* @param {Array} values The values to exclude.
|
|
1543
|
-
* @return {Array} Returns the new array of filtered values.
|
|
1544
|
-
* @example
|
|
1545
|
-
* difference([2, 1], [2, 3]); // => [1]
|
|
1546
|
-
*/
|
|
1547
|
-
var difference = function (arr, values) {
|
|
1548
|
-
if (values === void 0) {
|
|
1549
|
-
values = [];
|
|
1550
|
-
}
|
|
1551
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__filter__["a" /* default */])(arr, function (value) {
|
|
1552
|
-
return !Object(__WEBPACK_IMPORTED_MODULE_1__contains__["a" /* default */])(values, value);
|
|
1553
|
-
});
|
|
1554
|
-
};
|
|
1555
|
-
/* harmony default export */ __webpack_exports__["a"] = (difference);
|
|
1556
|
-
|
|
1557
|
-
/***/ }),
|
|
1558
|
-
/* 40 */
|
|
1559
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1560
|
-
|
|
1561
|
-
"use strict";
|
|
1562
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_function__ = __webpack_require__(2);
|
|
1563
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_match__ = __webpack_require__(20);
|
|
1564
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__is_array__ = __webpack_require__(0);
|
|
1565
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__is_plain_object__ = __webpack_require__(10);
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
function find(arr, predicate) {
|
|
1571
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_2__is_array__["a" /* default */])(arr)) return null;
|
|
1572
|
-
var _predicate;
|
|
1573
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_0__is_function__["a" /* default */])(predicate)) {
|
|
1574
|
-
_predicate = predicate;
|
|
1575
|
-
}
|
|
1576
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_3__is_plain_object__["a" /* default */])(predicate)) {
|
|
1577
|
-
_predicate = function (a) {
|
|
1578
|
-
return Object(__WEBPACK_IMPORTED_MODULE_1__is_match__["a" /* default */])(a, predicate);
|
|
1579
|
-
};
|
|
1580
|
-
}
|
|
1581
|
-
if (_predicate) {
|
|
1582
|
-
for (var i = 0; i < arr.length; i += 1) {
|
|
1583
|
-
if (_predicate(arr[i])) {
|
|
1584
|
-
return arr[i];
|
|
1585
|
-
}
|
|
1586
|
-
}
|
|
1587
|
-
}
|
|
1588
|
-
return null;
|
|
1589
|
-
}
|
|
1590
|
-
/* harmony default export */ __webpack_exports__["a"] = (find);
|
|
1591
|
-
|
|
1592
|
-
/***/ }),
|
|
1593
|
-
/* 41 */
|
|
1594
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1595
|
-
|
|
1596
|
-
"use strict";
|
|
1597
|
-
function findIndex(arr, predicate, fromIndex) {
|
|
1598
|
-
if (fromIndex === void 0) {
|
|
1599
|
-
fromIndex = 0;
|
|
1600
|
-
}
|
|
1601
|
-
for (var i = fromIndex; i < arr.length; i++) {
|
|
1602
|
-
if (predicate(arr[i], i)) {
|
|
1603
|
-
// 找到终止循环
|
|
1604
|
-
return i;
|
|
1605
|
-
}
|
|
1606
|
-
}
|
|
1607
|
-
return -1;
|
|
1608
|
-
}
|
|
1609
|
-
/* harmony default export */ __webpack_exports__["a"] = (findIndex);
|
|
1610
|
-
|
|
1611
|
-
/***/ }),
|
|
1612
|
-
/* 42 */
|
|
1613
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1614
|
-
|
|
1615
|
-
"use strict";
|
|
1616
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_nil__ = __webpack_require__(7);
|
|
1617
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_array__ = __webpack_require__(0);
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
var firstValue = function (data, name) {
|
|
1621
|
-
var rst = null;
|
|
1622
|
-
for (var i = 0; i < data.length; i++) {
|
|
1623
|
-
var obj = data[i];
|
|
1624
|
-
var value = obj[name];
|
|
1625
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_nil__["a" /* default */])(value)) {
|
|
1626
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_1__is_array__["a" /* default */])(value)) {
|
|
1627
|
-
rst = value[0]; // todo 这里是否应该使用递归,调用 firstValue @绝云
|
|
1628
|
-
} else {
|
|
1629
|
-
rst = value;
|
|
1630
|
-
}
|
|
1631
|
-
break;
|
|
1632
|
-
}
|
|
1633
|
-
}
|
|
1634
|
-
return rst;
|
|
1635
|
-
};
|
|
1636
|
-
/* harmony default export */ __webpack_exports__["a"] = (firstValue);
|
|
1637
|
-
|
|
1638
|
-
/***/ }),
|
|
1639
|
-
/* 43 */
|
|
1640
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1641
|
-
|
|
1642
|
-
"use strict";
|
|
1643
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);
|
|
1644
|
-
|
|
1645
|
-
/**
|
|
1646
|
-
* Flattens `array` a single level deep.
|
|
1647
|
-
*
|
|
1648
|
-
* @param {Array} arr The array to flatten.
|
|
1649
|
-
* @return {Array} Returns the new flattened array.
|
|
1650
|
-
* @example
|
|
1651
|
-
*
|
|
1652
|
-
* flatten([1, [2, [3, [4]], 5]]); // => [1, 2, [3, [4]], 5]
|
|
1653
|
-
*/
|
|
1654
|
-
var flatten = function (arr) {
|
|
1655
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array__["a" /* default */])(arr)) {
|
|
1656
|
-
return [];
|
|
1657
|
-
}
|
|
1658
|
-
var rst = [];
|
|
1659
|
-
for (var i = 0; i < arr.length; i++) {
|
|
1660
|
-
rst = rst.concat(arr[i]);
|
|
1661
|
-
}
|
|
1662
|
-
return rst;
|
|
1663
|
-
};
|
|
1664
|
-
/* harmony default export */ __webpack_exports__["a"] = (flatten);
|
|
1665
|
-
|
|
1666
|
-
/***/ }),
|
|
1667
|
-
/* 44 */
|
|
1668
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1669
|
-
|
|
1670
|
-
"use strict";
|
|
1671
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);
|
|
1672
|
-
|
|
1673
|
-
/**
|
|
1674
|
-
* Flattens `array` a single level deep.
|
|
1675
|
-
*
|
|
1676
|
-
* @param {Array} arr The array to flatten.
|
|
1677
|
-
* @param {Array} result The array to return.
|
|
1678
|
-
* @return {Array} Returns the new flattened array.
|
|
1679
|
-
* @example
|
|
1680
|
-
*
|
|
1681
|
-
* flattenDeep([1, [2, [3, [4]], 5]]); // => [1, 2, 3, 4, 5]
|
|
1682
|
-
*/
|
|
1683
|
-
var flattenDeep = function (arr, result) {
|
|
1684
|
-
if (result === void 0) {
|
|
1685
|
-
result = [];
|
|
1686
|
-
}
|
|
1687
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array__["a" /* default */])(arr)) {
|
|
1688
|
-
result.push(arr);
|
|
1689
|
-
} else {
|
|
1690
|
-
for (var i = 0; i < arr.length; i += 1) {
|
|
1691
|
-
flattenDeep(arr[i], result);
|
|
1692
|
-
}
|
|
1693
|
-
}
|
|
1694
|
-
return result;
|
|
1695
|
-
};
|
|
1696
|
-
/* harmony default export */ __webpack_exports__["a"] = (flattenDeep);
|
|
1697
|
-
|
|
1698
|
-
/***/ }),
|
|
1699
|
-
/* 45 */
|
|
1700
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1701
|
-
|
|
1702
|
-
"use strict";
|
|
1703
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);
|
|
1704
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__max__ = __webpack_require__(22);
|
|
1705
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__min__ = __webpack_require__(23);
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
var getRange = function (values) {
|
|
1710
|
-
// 存在 NaN 时,min,max 判定会出问题
|
|
1711
|
-
var filterValues = values.filter(function (v) {
|
|
1712
|
-
return !isNaN(v);
|
|
1713
|
-
});
|
|
1714
|
-
if (!filterValues.length) {
|
|
1715
|
-
// 如果没有数值则直接返回0
|
|
1716
|
-
return {
|
|
1717
|
-
min: 0,
|
|
1718
|
-
max: 0
|
|
1719
|
-
};
|
|
1720
|
-
}
|
|
1721
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array__["a" /* default */])(values[0])) {
|
|
1722
|
-
var tmp = [];
|
|
1723
|
-
for (var i = 0; i < values.length; i++) {
|
|
1724
|
-
tmp = tmp.concat(values[i]);
|
|
1725
|
-
}
|
|
1726
|
-
filterValues = tmp;
|
|
1727
|
-
}
|
|
1728
|
-
var max = Object(__WEBPACK_IMPORTED_MODULE_1__max__["a" /* default */])(filterValues);
|
|
1729
|
-
var min = Object(__WEBPACK_IMPORTED_MODULE_2__min__["a" /* default */])(filterValues);
|
|
1730
|
-
return {
|
|
1731
|
-
min: min,
|
|
1732
|
-
max: max
|
|
1733
|
-
};
|
|
1734
|
-
};
|
|
1735
|
-
/* harmony default export */ __webpack_exports__["a"] = (getRange);
|
|
1736
|
-
|
|
1737
|
-
/***/ }),
|
|
1738
|
-
/* 46 */
|
|
1739
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1740
|
-
|
|
1741
|
-
"use strict";
|
|
1742
|
-
var arrPrototype = Array.prototype;
|
|
1743
|
-
var splice = arrPrototype.splice;
|
|
1744
|
-
var indexOf = arrPrototype.indexOf;
|
|
1745
|
-
var pull = function (arr) {
|
|
1746
|
-
var values = [];
|
|
1747
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
1748
|
-
values[_i - 1] = arguments[_i];
|
|
1749
|
-
}
|
|
1750
|
-
for (var i = 0; i < values.length; i++) {
|
|
1751
|
-
var value = values[i];
|
|
1752
|
-
var fromIndex = -1;
|
|
1753
|
-
while ((fromIndex = indexOf.call(arr, value)) > -1) {
|
|
1754
|
-
splice.call(arr, fromIndex, 1);
|
|
1755
|
-
}
|
|
1756
|
-
}
|
|
1757
|
-
return arr;
|
|
1758
|
-
};
|
|
1759
|
-
/* harmony default export */ __webpack_exports__["a"] = (pull);
|
|
1760
|
-
|
|
1761
|
-
/***/ }),
|
|
1762
|
-
/* 47 */
|
|
1763
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1764
|
-
|
|
1765
|
-
"use strict";
|
|
1766
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);
|
|
1767
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__pull_at__ = __webpack_require__(24);
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
var remove = function (arr, predicate) {
|
|
1771
|
-
/**
|
|
1772
|
-
* const arr = [1, 2, 3, 4]
|
|
1773
|
-
* const evens = remove(arr, n => n % 2 == 0)
|
|
1774
|
-
* console.log(arr) // => [1, 3]
|
|
1775
|
-
* console.log(evens) // => [2, 4]
|
|
1776
|
-
*/
|
|
1777
|
-
var result = [];
|
|
1778
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__["a" /* default */])(arr)) {
|
|
1779
|
-
return result;
|
|
1780
|
-
}
|
|
1781
|
-
var i = -1;
|
|
1782
|
-
var indexes = [];
|
|
1783
|
-
var length = arr.length;
|
|
1784
|
-
while (++i < length) {
|
|
1785
|
-
var value = arr[i];
|
|
1786
|
-
if (predicate(value, i, arr)) {
|
|
1787
|
-
result.push(value);
|
|
1788
|
-
indexes.push(i);
|
|
1789
|
-
}
|
|
1790
|
-
}
|
|
1791
|
-
Object(__WEBPACK_IMPORTED_MODULE_1__pull_at__["a" /* default */])(arr, indexes);
|
|
1792
|
-
return result;
|
|
1793
|
-
};
|
|
1794
|
-
/* harmony default export */ __webpack_exports__["a"] = (remove);
|
|
1795
|
-
|
|
1796
|
-
/***/ }),
|
|
1797
|
-
/* 48 */
|
|
1798
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1799
|
-
|
|
1800
|
-
"use strict";
|
|
1801
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);
|
|
1802
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_string__ = __webpack_require__(4);
|
|
1803
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__is_function__ = __webpack_require__(2);
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
function sortBy(arr, key) {
|
|
1808
|
-
var comparer;
|
|
1809
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_2__is_function__["a" /* default */])(key)) {
|
|
1810
|
-
comparer = function (a, b) {
|
|
1811
|
-
return key(a) - key(b);
|
|
1812
|
-
};
|
|
1813
|
-
} else {
|
|
1814
|
-
var keys_1 = [];
|
|
1815
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_1__is_string__["a" /* default */])(key)) {
|
|
1816
|
-
keys_1.push(key);
|
|
1817
|
-
} else if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array__["a" /* default */])(key)) {
|
|
1818
|
-
keys_1 = key;
|
|
1819
|
-
}
|
|
1820
|
-
comparer = function (a, b) {
|
|
1821
|
-
for (var i = 0; i < keys_1.length; i += 1) {
|
|
1822
|
-
var prop = keys_1[i];
|
|
1823
|
-
if (a[prop] > b[prop]) {
|
|
1824
|
-
return 1;
|
|
1825
|
-
}
|
|
1826
|
-
if (a[prop] < b[prop]) {
|
|
1827
|
-
return -1;
|
|
1828
|
-
}
|
|
1829
|
-
}
|
|
1830
|
-
return 0;
|
|
1831
|
-
};
|
|
1832
|
-
}
|
|
1833
|
-
arr.sort(comparer);
|
|
1834
|
-
return arr;
|
|
1835
|
-
}
|
|
1836
|
-
/* harmony default export */ __webpack_exports__["a"] = (sortBy);
|
|
1837
|
-
|
|
1838
|
-
/***/ }),
|
|
1839
|
-
/* 49 */
|
|
1840
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1841
|
-
|
|
1842
|
-
"use strict";
|
|
1843
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__uniq__ = __webpack_require__(26);
|
|
1844
|
-
|
|
1845
|
-
var union = function () {
|
|
1846
|
-
var sources = [];
|
|
1847
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1848
|
-
sources[_i] = arguments[_i];
|
|
1849
|
-
}
|
|
1850
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__uniq__["a" /* default */])([].concat.apply([], sources));
|
|
1851
|
-
};
|
|
1852
|
-
/* harmony default export */ __webpack_exports__["a"] = (union);
|
|
1853
|
-
|
|
1854
|
-
/***/ }),
|
|
1855
|
-
/* 50 */
|
|
1856
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1857
|
-
|
|
1858
|
-
"use strict";
|
|
1859
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);
|
|
1860
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_nil__ = __webpack_require__(7);
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (data, name) {
|
|
1864
|
-
var rst = [];
|
|
1865
|
-
var tmpMap = {};
|
|
1866
|
-
for (var i = 0; i < data.length; i++) {
|
|
1867
|
-
var obj = data[i];
|
|
1868
|
-
var value = obj[name];
|
|
1869
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_1__is_nil__["a" /* default */])(value)) {
|
|
1870
|
-
// flatten
|
|
1871
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array__["a" /* default */])(value)) {
|
|
1872
|
-
value = [value];
|
|
1873
|
-
}
|
|
1874
|
-
for (var j = 0; j < value.length; j++) {
|
|
1875
|
-
var val = value[j];
|
|
1876
|
-
// unique
|
|
1877
|
-
if (!tmpMap[val]) {
|
|
1878
|
-
rst.push(val);
|
|
1879
|
-
tmpMap[val] = true;
|
|
1880
|
-
}
|
|
1881
|
-
}
|
|
1882
|
-
}
|
|
1883
|
-
}
|
|
1884
|
-
return rst;
|
|
1885
|
-
});
|
|
1886
|
-
|
|
1887
|
-
/***/ }),
|
|
1888
|
-
/* 51 */
|
|
1889
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1890
|
-
|
|
1891
|
-
"use strict";
|
|
1892
|
-
/* harmony export (immutable) */ __webpack_exports__["a"] = head;
|
|
1893
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);
|
|
1894
|
-
|
|
1895
|
-
function head(o) {
|
|
1896
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__["a" /* default */])(o)) {
|
|
1897
|
-
return o[0];
|
|
1898
|
-
}
|
|
1899
|
-
return undefined;
|
|
1900
|
-
}
|
|
1901
|
-
|
|
1902
|
-
/***/ }),
|
|
1903
|
-
/* 52 */
|
|
1904
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1905
|
-
|
|
1906
|
-
"use strict";
|
|
1907
|
-
/* harmony export (immutable) */ __webpack_exports__["a"] = last;
|
|
1908
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);
|
|
1909
|
-
|
|
1910
|
-
function last(o) {
|
|
1911
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__["a" /* default */])(o)) {
|
|
1912
|
-
var arr = o;
|
|
1913
|
-
return arr[arr.length - 1];
|
|
1914
|
-
}
|
|
1915
|
-
return undefined;
|
|
1916
|
-
}
|
|
1917
|
-
|
|
1918
|
-
/***/ }),
|
|
1919
|
-
/* 53 */
|
|
1920
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1921
|
-
|
|
1922
|
-
"use strict";
|
|
1923
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);
|
|
1924
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_string__ = __webpack_require__(4);
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
function startsWith(arr, e) {
|
|
1928
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__is_array__["a" /* default */])(arr) || Object(__WEBPACK_IMPORTED_MODULE_1__is_string__["a" /* default */])(arr) ? arr[0] === e : false;
|
|
1929
|
-
}
|
|
1930
|
-
/* harmony default export */ __webpack_exports__["a"] = (startsWith);
|
|
1931
|
-
|
|
1932
|
-
/***/ }),
|
|
1933
|
-
/* 54 */
|
|
1934
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1935
|
-
|
|
1936
|
-
"use strict";
|
|
1937
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);
|
|
1938
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_string__ = __webpack_require__(4);
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
function endsWith(arr, e) {
|
|
1942
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__is_array__["a" /* default */])(arr) || Object(__WEBPACK_IMPORTED_MODULE_1__is_string__["a" /* default */])(arr) ? arr[arr.length - 1] === e : false;
|
|
1943
|
-
}
|
|
1944
|
-
/* harmony default export */ __webpack_exports__["a"] = (endsWith);
|
|
1945
|
-
|
|
1946
|
-
/***/ }),
|
|
1947
|
-
/* 55 */
|
|
1948
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1949
|
-
|
|
1950
|
-
"use strict";
|
|
1951
|
-
/**
|
|
1952
|
-
* 只要有一个不满足条件就返回 false
|
|
1953
|
-
* @param arr
|
|
1954
|
-
* @param func
|
|
1955
|
-
*/
|
|
1956
|
-
var every = function (arr, func) {
|
|
1957
|
-
for (var i = 0; i < arr.length; i++) {
|
|
1958
|
-
if (!func(arr[i], i)) return false;
|
|
1959
|
-
}
|
|
1960
|
-
return true;
|
|
1961
|
-
};
|
|
1962
|
-
/* harmony default export */ __webpack_exports__["a"] = (every);
|
|
1963
|
-
|
|
1964
|
-
/***/ }),
|
|
1965
|
-
/* 56 */
|
|
1966
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1967
|
-
|
|
1968
|
-
"use strict";
|
|
1969
|
-
/**
|
|
1970
|
-
* 只要有一个满足条件就返回 true
|
|
1971
|
-
* @param arr
|
|
1972
|
-
* @param func
|
|
1973
|
-
*/
|
|
1974
|
-
var some = function (arr, func) {
|
|
1975
|
-
for (var i = 0; i < arr.length; i++) {
|
|
1976
|
-
if (func(arr[i], i)) return true;
|
|
1977
|
-
}
|
|
1978
|
-
return false;
|
|
1979
|
-
};
|
|
1980
|
-
/* harmony default export */ __webpack_exports__["a"] = (some);
|
|
1981
|
-
|
|
1982
|
-
/***/ }),
|
|
1983
|
-
/* 57 */
|
|
1984
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1985
|
-
|
|
1986
|
-
"use strict";
|
|
1987
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__group_to_map__ = __webpack_require__(27);
|
|
1988
|
-
|
|
1989
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (data, condition) {
|
|
1990
|
-
if (!condition) {
|
|
1991
|
-
// 没有条件,则自身改成数组
|
|
1992
|
-
return [data];
|
|
1993
|
-
}
|
|
1994
|
-
var groups = Object(__WEBPACK_IMPORTED_MODULE_0__group_to_map__["a" /* default */])(data, condition);
|
|
1995
|
-
var array = [];
|
|
1996
|
-
for (var i in groups) {
|
|
1997
|
-
array.push(groups[i]);
|
|
1998
|
-
}
|
|
1999
|
-
return array;
|
|
2000
|
-
});
|
|
2001
|
-
|
|
2002
|
-
/***/ }),
|
|
2003
|
-
/* 58 */
|
|
2004
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2005
|
-
|
|
2006
|
-
"use strict";
|
|
2007
|
-
/**
|
|
2008
|
-
* 获取封装的事件
|
|
2009
|
-
* @protected
|
|
2010
|
-
* @param {Object} obj 对象
|
|
2011
|
-
* @param {String} action 事件名称
|
|
2012
|
-
* @return {Function} 返回事件处理函数
|
|
2013
|
-
*/
|
|
2014
|
-
function getWrapBehavior(obj, action) {
|
|
2015
|
-
return obj['_wrap_' + action];
|
|
2016
|
-
}
|
|
2017
|
-
/* harmony default export */ __webpack_exports__["a"] = (getWrapBehavior);
|
|
2018
|
-
|
|
2019
|
-
/***/ }),
|
|
2020
|
-
/* 59 */
|
|
2021
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2022
|
-
|
|
2023
|
-
"use strict";
|
|
2024
|
-
/**
|
|
2025
|
-
* 封装事件,便于使用上下文this,和便于解除事件时使用
|
|
2026
|
-
* @protected
|
|
2027
|
-
* @param {Object} obj 对象
|
|
2028
|
-
* @param {String} action 事件名称
|
|
2029
|
-
* @return {Function} 返回事件处理函数
|
|
2030
|
-
*/
|
|
2031
|
-
function wrapBehavior(obj, action) {
|
|
2032
|
-
if (obj['_wrap_' + action]) {
|
|
2033
|
-
return obj['_wrap_' + action];
|
|
2034
|
-
}
|
|
2035
|
-
var method = function (e) {
|
|
2036
|
-
obj[action](e);
|
|
2037
|
-
};
|
|
2038
|
-
obj['_wrap_' + action] = method;
|
|
2039
|
-
return method;
|
|
2040
|
-
}
|
|
2041
|
-
/* harmony default export */ __webpack_exports__["a"] = (wrapBehavior);
|
|
2042
|
-
|
|
2043
|
-
/***/ }),
|
|
2044
|
-
/* 60 */
|
|
2045
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2046
|
-
|
|
2047
|
-
"use strict";
|
|
2048
|
-
var numColorCache = {};
|
|
2049
|
-
function numberToColor(num) {
|
|
2050
|
-
// 增加缓存
|
|
2051
|
-
var color = numColorCache[num];
|
|
2052
|
-
if (!color) {
|
|
2053
|
-
var str = num.toString(16);
|
|
2054
|
-
for (var i = str.length; i < 6; i++) {
|
|
2055
|
-
str = '0' + str;
|
|
2056
|
-
}
|
|
2057
|
-
color = '#' + str;
|
|
2058
|
-
numColorCache[num] = color;
|
|
2059
|
-
}
|
|
2060
|
-
return color;
|
|
2061
|
-
}
|
|
2062
|
-
/* harmony default export */ __webpack_exports__["a"] = (numberToColor);
|
|
2063
|
-
|
|
2064
|
-
/***/ }),
|
|
2065
|
-
/* 61 */
|
|
2066
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2067
|
-
|
|
2068
|
-
"use strict";
|
|
2069
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);
|
|
2070
|
-
|
|
2071
|
-
function parseRadius(radius) {
|
|
2072
|
-
var r1 = 0,
|
|
2073
|
-
r2 = 0,
|
|
2074
|
-
r3 = 0,
|
|
2075
|
-
r4 = 0;
|
|
2076
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array__["a" /* default */])(radius)) {
|
|
2077
|
-
if (radius.length === 1) {
|
|
2078
|
-
r1 = r2 = r3 = r4 = radius[0];
|
|
2079
|
-
} else if (radius.length === 2) {
|
|
2080
|
-
r1 = r3 = radius[0];
|
|
2081
|
-
r2 = r4 = radius[1];
|
|
2082
|
-
} else if (radius.length === 3) {
|
|
2083
|
-
r1 = radius[0];
|
|
2084
|
-
r2 = r4 = radius[1];
|
|
2085
|
-
r3 = radius[2];
|
|
2086
|
-
} else {
|
|
2087
|
-
r1 = radius[0];
|
|
2088
|
-
r2 = radius[1];
|
|
2089
|
-
r3 = radius[2];
|
|
2090
|
-
r4 = radius[3];
|
|
2091
|
-
}
|
|
2092
|
-
} else {
|
|
2093
|
-
r1 = r2 = r3 = r4 = radius;
|
|
2094
|
-
}
|
|
2095
|
-
return {
|
|
2096
|
-
r1: r1,
|
|
2097
|
-
r2: r2,
|
|
2098
|
-
r3: r3,
|
|
2099
|
-
r4: r4
|
|
2100
|
-
};
|
|
2101
|
-
}
|
|
2102
|
-
/* harmony default export */ __webpack_exports__["a"] = (parseRadius);
|
|
2103
|
-
|
|
2104
|
-
/***/ }),
|
|
2105
|
-
/* 62 */
|
|
2106
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2107
|
-
|
|
2108
|
-
"use strict";
|
|
2109
|
-
var clamp = function (a, min, max) {
|
|
2110
|
-
if (a < min) {
|
|
2111
|
-
return min;
|
|
2112
|
-
} else if (a > max) {
|
|
2113
|
-
return max;
|
|
2114
|
-
}
|
|
2115
|
-
return a;
|
|
2116
|
-
};
|
|
2117
|
-
/* harmony default export */ __webpack_exports__["a"] = (clamp);
|
|
2118
|
-
|
|
2119
|
-
/***/ }),
|
|
2120
|
-
/* 63 */
|
|
2121
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2122
|
-
|
|
2123
|
-
"use strict";
|
|
2124
|
-
var fixedBase = function (v, base) {
|
|
2125
|
-
var str = base.toString();
|
|
2126
|
-
var index = str.indexOf('.');
|
|
2127
|
-
if (index === -1) {
|
|
2128
|
-
return Math.round(v);
|
|
2129
|
-
}
|
|
2130
|
-
var length = str.substr(index + 1).length;
|
|
2131
|
-
if (length > 20) {
|
|
2132
|
-
length = 20;
|
|
2133
|
-
}
|
|
2134
|
-
return parseFloat(v.toFixed(length));
|
|
2135
|
-
};
|
|
2136
|
-
/* harmony default export */ __webpack_exports__["a"] = (fixedBase);
|
|
2137
|
-
|
|
2138
|
-
/***/ }),
|
|
2139
|
-
/* 64 */
|
|
2140
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2141
|
-
|
|
2142
|
-
"use strict";
|
|
2143
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__(5);
|
|
2144
|
-
|
|
2145
|
-
var isDecimal = function (num) {
|
|
2146
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__["a" /* default */])(num) && num % 1 !== 0;
|
|
2147
|
-
};
|
|
2148
|
-
/* harmony default export */ __webpack_exports__["a"] = (isDecimal);
|
|
2149
|
-
|
|
2150
|
-
/***/ }),
|
|
2151
|
-
/* 65 */
|
|
2152
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2153
|
-
|
|
2154
|
-
"use strict";
|
|
2155
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__(5);
|
|
2156
|
-
|
|
2157
|
-
var isEven = function (num) {
|
|
2158
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__["a" /* default */])(num) && num % 2 === 0;
|
|
2159
|
-
};
|
|
2160
|
-
/* harmony default export */ __webpack_exports__["a"] = (isEven);
|
|
2161
|
-
|
|
2162
|
-
/***/ }),
|
|
2163
|
-
/* 66 */
|
|
2164
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2165
|
-
|
|
2166
|
-
"use strict";
|
|
2167
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__(5);
|
|
2168
|
-
|
|
2169
|
-
var isInteger = Number.isInteger ? Number.isInteger : function (num) {
|
|
2170
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__["a" /* default */])(num) && num % 1 === 0;
|
|
2171
|
-
};
|
|
2172
|
-
/* harmony default export */ __webpack_exports__["a"] = (isInteger);
|
|
2173
|
-
|
|
2174
|
-
/***/ }),
|
|
2175
|
-
/* 67 */
|
|
2176
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2177
|
-
|
|
2178
|
-
"use strict";
|
|
2179
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__(5);
|
|
2180
|
-
|
|
2181
|
-
var isNegative = function (num) {
|
|
2182
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__["a" /* default */])(num) && num < 0;
|
|
2183
|
-
};
|
|
2184
|
-
/* harmony default export */ __webpack_exports__["a"] = (isNegative);
|
|
2185
|
-
|
|
2186
|
-
/***/ }),
|
|
2187
|
-
/* 68 */
|
|
2188
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2189
|
-
|
|
2190
|
-
"use strict";
|
|
2191
|
-
/* harmony export (immutable) */ __webpack_exports__["a"] = isNumberEqual;
|
|
2192
|
-
var PRECISION = 0.00001; // numbers less than this is considered as 0
|
|
2193
|
-
function isNumberEqual(a, b, precision) {
|
|
2194
|
-
if (precision === void 0) {
|
|
2195
|
-
precision = PRECISION;
|
|
2196
|
-
}
|
|
2197
|
-
return Math.abs(a - b) < precision;
|
|
2198
|
-
}
|
|
2199
|
-
;
|
|
2200
|
-
|
|
2201
|
-
/***/ }),
|
|
2202
|
-
/* 69 */
|
|
2203
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2204
|
-
|
|
2205
|
-
"use strict";
|
|
2206
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__(5);
|
|
2207
|
-
|
|
2208
|
-
var isOdd = function (num) {
|
|
2209
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__["a" /* default */])(num) && num % 2 !== 0;
|
|
2210
|
-
};
|
|
2211
|
-
/* harmony default export */ __webpack_exports__["a"] = (isOdd);
|
|
2212
|
-
|
|
2213
|
-
/***/ }),
|
|
2214
|
-
/* 70 */
|
|
2215
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2216
|
-
|
|
2217
|
-
"use strict";
|
|
2218
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__(5);
|
|
2219
|
-
|
|
2220
|
-
var isPositive = function (num) {
|
|
2221
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__["a" /* default */])(num) && num > 0;
|
|
2222
|
-
};
|
|
2223
|
-
/* harmony default export */ __webpack_exports__["a"] = (isPositive);
|
|
2224
|
-
|
|
2225
|
-
/***/ }),
|
|
2226
|
-
/* 71 */
|
|
2227
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2228
|
-
|
|
2229
|
-
"use strict";
|
|
2230
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);
|
|
2231
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
/**
|
|
2235
|
-
* @param {Array} arr The array to iterate over.
|
|
2236
|
-
* @param {Function} [fn] The iteratee invoked per element.
|
|
2237
|
-
* @return {*} Returns the maximum value.
|
|
2238
|
-
* @example
|
|
2239
|
-
*
|
|
2240
|
-
* var objects = [{ 'n': 1 }, { 'n': 2 }];
|
|
2241
|
-
*
|
|
2242
|
-
* maxBy(objects, function(o) { return o.n; });
|
|
2243
|
-
* // => { 'n': 2 }
|
|
2244
|
-
*
|
|
2245
|
-
* maxBy(objects, 'n');
|
|
2246
|
-
* // => { 'n': 2 }
|
|
2247
|
-
*/
|
|
2248
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (arr, fn) {
|
|
2249
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array__["a" /* default */])(arr)) {
|
|
2250
|
-
return undefined;
|
|
2251
|
-
}
|
|
2252
|
-
var maxItem;
|
|
2253
|
-
var max = -Infinity;
|
|
2254
|
-
for (var i = 0; i < arr.length; i++) {
|
|
2255
|
-
var item = arr[i];
|
|
2256
|
-
var v = Object(__WEBPACK_IMPORTED_MODULE_1__is_function__["a" /* default */])(fn) ? fn(item) : item[fn];
|
|
2257
|
-
if (v > max) {
|
|
2258
|
-
maxItem = item;
|
|
2259
|
-
max = v;
|
|
2260
|
-
}
|
|
2261
|
-
}
|
|
2262
|
-
return maxItem;
|
|
2263
|
-
});
|
|
2264
|
-
|
|
2265
|
-
/***/ }),
|
|
2266
|
-
/* 72 */
|
|
2267
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2268
|
-
|
|
2269
|
-
"use strict";
|
|
2270
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);
|
|
2271
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
/**
|
|
2275
|
-
* @param {Array} arr The array to iterate over.
|
|
2276
|
-
* @param {Function} [fn] The iteratee invoked per element.
|
|
2277
|
-
* @return {*} Returns the minimum value.
|
|
2278
|
-
* @example
|
|
2279
|
-
*
|
|
2280
|
-
* var objects = [{ 'n': 1 }, { 'n': 2 }];
|
|
2281
|
-
*
|
|
2282
|
-
* minBy(objects, function(o) { return o.n; });
|
|
2283
|
-
* // => { 'n': 1 }
|
|
2284
|
-
*
|
|
2285
|
-
* minBy(objects, 'n');
|
|
2286
|
-
* // => { 'n': 1 }
|
|
2287
|
-
*/
|
|
2288
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (arr, fn) {
|
|
2289
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array__["a" /* default */])(arr)) {
|
|
2290
|
-
return undefined;
|
|
2291
|
-
}
|
|
2292
|
-
var minItem;
|
|
2293
|
-
var min = Infinity;
|
|
2294
|
-
for (var i = 0; i < arr.length; i++) {
|
|
2295
|
-
var item = arr[i];
|
|
2296
|
-
var v = Object(__WEBPACK_IMPORTED_MODULE_1__is_function__["a" /* default */])(fn) ? fn(item) : item[fn];
|
|
2297
|
-
if (v < min) {
|
|
2298
|
-
minItem = item;
|
|
2299
|
-
min = v;
|
|
2300
|
-
}
|
|
2301
|
-
}
|
|
2302
|
-
return minItem;
|
|
2303
|
-
});
|
|
2304
|
-
|
|
2305
|
-
/***/ }),
|
|
2306
|
-
/* 73 */
|
|
2307
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2308
|
-
|
|
2309
|
-
"use strict";
|
|
2310
|
-
var mod = function (n, m) {
|
|
2311
|
-
return (n % m + m) % m;
|
|
2312
|
-
};
|
|
2313
|
-
/* harmony default export */ __webpack_exports__["a"] = (mod);
|
|
2314
|
-
|
|
2315
|
-
/***/ }),
|
|
2316
|
-
/* 74 */
|
|
2317
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2318
|
-
|
|
2319
|
-
"use strict";
|
|
2320
|
-
var DEGREE = 180 / Math.PI;
|
|
2321
|
-
var toDegree = function (radian) {
|
|
2322
|
-
return DEGREE * radian;
|
|
2323
|
-
};
|
|
2324
|
-
/* harmony default export */ __webpack_exports__["a"] = (toDegree);
|
|
2325
|
-
|
|
2326
|
-
/***/ }),
|
|
2327
|
-
/* 75 */
|
|
2328
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2329
|
-
|
|
2330
|
-
"use strict";
|
|
2331
|
-
/* harmony default export */ __webpack_exports__["a"] = (parseInt);
|
|
2332
|
-
|
|
2333
|
-
/***/ }),
|
|
2334
|
-
/* 76 */
|
|
2335
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2336
|
-
|
|
2337
|
-
"use strict";
|
|
2338
|
-
var RADIAN = Math.PI / 180;
|
|
2339
|
-
var toRadian = function (degree) {
|
|
2340
|
-
return RADIAN * degree;
|
|
2341
|
-
};
|
|
2342
|
-
/* harmony default export */ __webpack_exports__["a"] = (toRadian);
|
|
2343
|
-
|
|
2344
|
-
/***/ }),
|
|
2345
|
-
/* 77 */
|
|
2346
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2347
|
-
|
|
2348
|
-
"use strict";
|
|
2349
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__each__ = __webpack_require__(8);
|
|
2350
|
-
|
|
2351
|
-
/* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0__each__["a" /* default */]);
|
|
2352
|
-
|
|
2353
|
-
/***/ }),
|
|
2354
|
-
/* 78 */
|
|
2355
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2356
|
-
|
|
2357
|
-
"use strict";
|
|
2358
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__has__ = __webpack_require__(29);
|
|
2359
|
-
|
|
2360
|
-
/* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0__has__["a" /* default */]);
|
|
2361
|
-
|
|
2362
|
-
/***/ }),
|
|
2363
|
-
/* 79 */
|
|
2364
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2365
|
-
|
|
2366
|
-
"use strict";
|
|
2367
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__contains__ = __webpack_require__(13);
|
|
2368
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__values__ = __webpack_require__(15);
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (obj, value) {
|
|
2372
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__contains__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__values__["a" /* default */])(obj), value);
|
|
2373
|
-
});
|
|
2374
|
-
|
|
2375
|
-
/***/ }),
|
|
2376
|
-
/* 80 */
|
|
2377
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2378
|
-
|
|
2379
|
-
"use strict";
|
|
2380
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__to_string__ = __webpack_require__(9);
|
|
2381
|
-
|
|
2382
|
-
var lowerCase = function (str) {
|
|
2383
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__to_string__["a" /* default */])(str).toLowerCase();
|
|
2384
|
-
};
|
|
2385
|
-
/* harmony default export */ __webpack_exports__["a"] = (lowerCase);
|
|
2386
|
-
|
|
2387
|
-
/***/ }),
|
|
2388
|
-
/* 81 */
|
|
2389
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2390
|
-
|
|
2391
|
-
"use strict";
|
|
2392
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__to_string__ = __webpack_require__(9);
|
|
2393
|
-
|
|
2394
|
-
var lowerFirst = function (value) {
|
|
2395
|
-
var str = Object(__WEBPACK_IMPORTED_MODULE_0__to_string__["a" /* default */])(value);
|
|
2396
|
-
return str.charAt(0).toLowerCase() + str.substring(1);
|
|
2397
|
-
};
|
|
2398
|
-
/* harmony default export */ __webpack_exports__["a"] = (lowerFirst);
|
|
2399
|
-
|
|
2400
|
-
/***/ }),
|
|
2401
|
-
/* 82 */
|
|
2402
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2403
|
-
|
|
2404
|
-
"use strict";
|
|
2405
|
-
function substitute(str, o) {
|
|
2406
|
-
if (!str || !o) {
|
|
2407
|
-
return str;
|
|
2408
|
-
}
|
|
2409
|
-
return str.replace(/\\?\{([^{}]+)\}/g, function (match, name) {
|
|
2410
|
-
if (match.charAt(0) === '\\') {
|
|
2411
|
-
return match.slice(1);
|
|
2412
|
-
}
|
|
2413
|
-
return o[name] === undefined ? '' : o[name];
|
|
2414
|
-
});
|
|
2415
|
-
}
|
|
2416
|
-
/* harmony default export */ __webpack_exports__["a"] = (substitute);
|
|
2417
|
-
|
|
2418
|
-
/***/ }),
|
|
2419
|
-
/* 83 */
|
|
2420
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2421
|
-
|
|
2422
|
-
"use strict";
|
|
2423
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__to_string__ = __webpack_require__(9);
|
|
2424
|
-
|
|
2425
|
-
var upperCase = function (str) {
|
|
2426
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__to_string__["a" /* default */])(str).toUpperCase();
|
|
2427
|
-
};
|
|
2428
|
-
/* harmony default export */ __webpack_exports__["a"] = (upperCase);
|
|
2429
|
-
|
|
2430
|
-
/***/ }),
|
|
2431
|
-
/* 84 */
|
|
2432
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2433
|
-
|
|
2434
|
-
"use strict";
|
|
2435
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__to_string__ = __webpack_require__(9);
|
|
2436
|
-
|
|
2437
|
-
var upperFirst = function (value) {
|
|
2438
|
-
var str = Object(__WEBPACK_IMPORTED_MODULE_0__to_string__["a" /* default */])(value);
|
|
2439
|
-
return str.charAt(0).toUpperCase() + str.substring(1);
|
|
2440
|
-
};
|
|
2441
|
-
/* harmony default export */ __webpack_exports__["a"] = (upperFirst);
|
|
2442
|
-
|
|
2443
|
-
/***/ }),
|
|
2444
|
-
/* 85 */
|
|
2445
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2446
|
-
|
|
2447
|
-
"use strict";
|
|
2448
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);
|
|
2449
|
-
/**
|
|
2450
|
-
* 是否是参数类型
|
|
2451
|
-
*
|
|
2452
|
-
* @param {Object} value 测试的值
|
|
2453
|
-
* @return {Boolean}
|
|
2454
|
-
*/
|
|
2455
|
-
|
|
2456
|
-
var isArguments = function (value) {
|
|
2457
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__["a" /* default */])(value, 'Arguments');
|
|
2458
|
-
};
|
|
2459
|
-
/* harmony default export */ __webpack_exports__["a"] = (isArguments);
|
|
2460
|
-
|
|
2461
|
-
/***/ }),
|
|
2462
|
-
/* 86 */
|
|
2463
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2464
|
-
|
|
2465
|
-
"use strict";
|
|
2466
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);
|
|
2467
|
-
/**
|
|
2468
|
-
* 是否是布尔类型
|
|
2469
|
-
*
|
|
2470
|
-
* @param {Object} value 测试的值
|
|
2471
|
-
* @return {Boolean}
|
|
2472
|
-
*/
|
|
2473
|
-
|
|
2474
|
-
var isBoolean = function (value) {
|
|
2475
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__["a" /* default */])(value, 'Boolean');
|
|
2476
|
-
};
|
|
2477
|
-
/* harmony default export */ __webpack_exports__["a"] = (isBoolean);
|
|
2478
|
-
|
|
2479
|
-
/***/ }),
|
|
2480
|
-
/* 87 */
|
|
2481
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2482
|
-
|
|
2483
|
-
"use strict";
|
|
2484
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);
|
|
2485
|
-
|
|
2486
|
-
var isDate = function (value) {
|
|
2487
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__["a" /* default */])(value, 'Date');
|
|
2488
|
-
};
|
|
2489
|
-
/* harmony default export */ __webpack_exports__["a"] = (isDate);
|
|
2490
|
-
|
|
2491
|
-
/***/ }),
|
|
2492
|
-
/* 88 */
|
|
2493
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2494
|
-
|
|
2495
|
-
"use strict";
|
|
2496
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);
|
|
2497
|
-
/**
|
|
2498
|
-
* 是否是参数类型
|
|
2499
|
-
*
|
|
2500
|
-
* @param {Object} value 测试的值
|
|
2501
|
-
* @return {Boolean}
|
|
2502
|
-
*/
|
|
2503
|
-
|
|
2504
|
-
var isError = function (value) {
|
|
2505
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__["a" /* default */])(value, 'Error');
|
|
2506
|
-
};
|
|
2507
|
-
/* harmony default export */ __webpack_exports__["a"] = (isError);
|
|
2508
|
-
|
|
2509
|
-
/***/ }),
|
|
2510
|
-
/* 89 */
|
|
2511
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2512
|
-
|
|
2513
|
-
"use strict";
|
|
2514
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__(5);
|
|
2515
|
-
/**
|
|
2516
|
-
* 判断是否为有限数
|
|
2517
|
-
* @return {Boolean}
|
|
2518
|
-
*/
|
|
2519
|
-
|
|
2520
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (value) {
|
|
2521
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__["a" /* default */])(value) && isFinite(value);
|
|
2522
|
-
});
|
|
2523
|
-
|
|
2524
|
-
/***/ }),
|
|
2525
|
-
/* 90 */
|
|
2526
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2527
|
-
|
|
2528
|
-
"use strict";
|
|
2529
|
-
var isNull = function (value) {
|
|
2530
|
-
return value === null;
|
|
2531
|
-
};
|
|
2532
|
-
/* harmony default export */ __webpack_exports__["a"] = (isNull);
|
|
2533
|
-
|
|
2534
|
-
/***/ }),
|
|
2535
|
-
/* 91 */
|
|
2536
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2537
|
-
|
|
2538
|
-
"use strict";
|
|
2539
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);
|
|
2540
|
-
|
|
2541
|
-
var isRegExp = function (str) {
|
|
2542
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__["a" /* default */])(str, 'RegExp');
|
|
2543
|
-
};
|
|
2544
|
-
/* harmony default export */ __webpack_exports__["a"] = (isRegExp);
|
|
2545
|
-
|
|
2546
|
-
/***/ }),
|
|
2547
|
-
/* 92 */
|
|
2548
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2549
|
-
|
|
2550
|
-
"use strict";
|
|
2551
|
-
var isUndefined = function (value) {
|
|
2552
|
-
return value === undefined;
|
|
2553
|
-
};
|
|
2554
|
-
/* harmony default export */ __webpack_exports__["a"] = (isUndefined);
|
|
2555
|
-
|
|
2556
|
-
/***/ }),
|
|
2557
|
-
/* 93 */
|
|
2558
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2559
|
-
|
|
2560
|
-
"use strict";
|
|
2561
|
-
/**
|
|
2562
|
-
* 判断是否HTML元素
|
|
2563
|
-
* @return {Boolean} 是否HTML元素
|
|
2564
|
-
*/
|
|
2565
|
-
var isElement = function (o) {
|
|
2566
|
-
return o instanceof Element || o instanceof HTMLDocument;
|
|
2567
|
-
};
|
|
2568
|
-
/* harmony default export */ __webpack_exports__["a"] = (isElement);
|
|
2569
|
-
|
|
2570
|
-
/***/ }),
|
|
2571
|
-
/* 94 */
|
|
2572
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2573
|
-
|
|
2574
|
-
"use strict";
|
|
2575
|
-
/* harmony export (immutable) */ __webpack_exports__["a"] = requestAnimationFrame;
|
|
2576
|
-
function requestAnimationFrame(fn) {
|
|
2577
|
-
var method = window.requestAnimationFrame || window.webkitRequestAnimationFrame ||
|
|
2578
|
-
// @ts-ignore
|
|
2579
|
-
window.mozRequestAnimationFrame ||
|
|
2580
|
-
// @ts-ignore
|
|
2581
|
-
window.msRequestAnimationFrame || function (f) {
|
|
2582
|
-
return setTimeout(f, 16);
|
|
2583
|
-
};
|
|
2584
|
-
return method(fn);
|
|
2585
|
-
}
|
|
2586
|
-
;
|
|
2587
|
-
|
|
2588
|
-
/***/ }),
|
|
2589
|
-
/* 95 */
|
|
2590
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2591
|
-
|
|
2592
|
-
"use strict";
|
|
2593
|
-
/* harmony export (immutable) */ __webpack_exports__["a"] = cancelAnimationFrame;
|
|
2594
|
-
function cancelAnimationFrame(handler) {
|
|
2595
|
-
var method = window.cancelAnimationFrame || window.webkitCancelAnimationFrame ||
|
|
2596
|
-
// @ts-ignore
|
|
2597
|
-
window.mozCancelAnimationFrame ||
|
|
2598
|
-
// @ts-ignore
|
|
2599
|
-
window.msCancelAnimationFrame || clearTimeout;
|
|
2600
|
-
method(handler);
|
|
2601
|
-
}
|
|
2602
|
-
;
|
|
2603
|
-
|
|
2604
|
-
/***/ }),
|
|
2605
|
-
/* 96 */
|
|
2606
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2607
|
-
|
|
2608
|
-
"use strict";
|
|
2609
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mix__ = __webpack_require__(16);
|
|
2610
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
var augment = function () {
|
|
2614
|
-
var args = [];
|
|
2615
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2616
|
-
args[_i] = arguments[_i];
|
|
2617
|
-
}
|
|
2618
|
-
var c = args[0];
|
|
2619
|
-
for (var i = 1; i < args.length; i++) {
|
|
2620
|
-
var obj = args[i];
|
|
2621
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_1__is_function__["a" /* default */])(obj)) {
|
|
2622
|
-
obj = obj.prototype;
|
|
2623
|
-
}
|
|
2624
|
-
Object(__WEBPACK_IMPORTED_MODULE_0__mix__["a" /* default */])(c.prototype, obj);
|
|
2625
|
-
}
|
|
2626
|
-
};
|
|
2627
|
-
/* harmony default export */ __webpack_exports__["a"] = (augment);
|
|
2628
|
-
|
|
2629
|
-
/***/ }),
|
|
2630
|
-
/* 97 */
|
|
2631
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2632
|
-
|
|
2633
|
-
"use strict";
|
|
2634
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);
|
|
2635
|
-
|
|
2636
|
-
var clone = function (obj) {
|
|
2637
|
-
if (typeof obj !== 'object' || obj === null) {
|
|
2638
|
-
return obj;
|
|
2639
|
-
}
|
|
2640
|
-
var rst;
|
|
2641
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array__["a" /* default */])(obj)) {
|
|
2642
|
-
rst = [];
|
|
2643
|
-
for (var i = 0, l = obj.length; i < l; i++) {
|
|
2644
|
-
if (typeof obj[i] === 'object' && obj[i] != null) {
|
|
2645
|
-
rst[i] = clone(obj[i]);
|
|
2646
|
-
} else {
|
|
2647
|
-
rst[i] = obj[i];
|
|
2648
|
-
}
|
|
2649
|
-
}
|
|
2650
|
-
} else {
|
|
2651
|
-
rst = {};
|
|
2652
|
-
for (var k in obj) {
|
|
2653
|
-
if (typeof obj[k] === 'object' && obj[k] != null) {
|
|
2654
|
-
rst[k] = clone(obj[k]);
|
|
2655
|
-
} else {
|
|
2656
|
-
rst[k] = obj[k];
|
|
2657
|
-
}
|
|
2658
|
-
}
|
|
2659
|
-
}
|
|
2660
|
-
return rst;
|
|
2661
|
-
};
|
|
2662
|
-
/* harmony default export */ __webpack_exports__["a"] = (clone);
|
|
2663
|
-
|
|
2664
|
-
/***/ }),
|
|
2665
|
-
/* 98 */
|
|
2666
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2667
|
-
|
|
2668
|
-
"use strict";
|
|
2669
|
-
function debounce(func, wait, immediate) {
|
|
2670
|
-
var timeout;
|
|
2671
|
-
return function () {
|
|
2672
|
-
var context = this,
|
|
2673
|
-
args = arguments;
|
|
2674
|
-
var later = function () {
|
|
2675
|
-
timeout = null;
|
|
2676
|
-
if (!immediate) {
|
|
2677
|
-
func.apply(context, args);
|
|
2678
|
-
}
|
|
2679
|
-
};
|
|
2680
|
-
var callNow = immediate && !timeout;
|
|
2681
|
-
clearTimeout(timeout);
|
|
2682
|
-
timeout = setTimeout(later, wait);
|
|
2683
|
-
if (callNow) {
|
|
2684
|
-
func.apply(context, args);
|
|
2685
|
-
}
|
|
2686
|
-
};
|
|
2687
|
-
}
|
|
2688
|
-
/* harmony default export */ __webpack_exports__["a"] = (debounce);
|
|
2689
|
-
|
|
2690
|
-
/***/ }),
|
|
2691
|
-
/* 99 */
|
|
2692
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2693
|
-
|
|
2694
|
-
"use strict";
|
|
2695
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);
|
|
2696
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_plain_object__ = __webpack_require__(10);
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
var MAX_MIX_LEVEL = 5;
|
|
2700
|
-
function _deepMix(dist, src, level, maxLevel) {
|
|
2701
|
-
level = level || 0;
|
|
2702
|
-
maxLevel = maxLevel || MAX_MIX_LEVEL;
|
|
2703
|
-
for (var key in src) {
|
|
2704
|
-
if (src.hasOwnProperty(key)) {
|
|
2705
|
-
var value = src[key];
|
|
2706
|
-
if (value !== null && Object(__WEBPACK_IMPORTED_MODULE_1__is_plain_object__["a" /* default */])(value)) {
|
|
2707
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_1__is_plain_object__["a" /* default */])(dist[key])) {
|
|
2708
|
-
dist[key] = {};
|
|
2709
|
-
}
|
|
2710
|
-
if (level < maxLevel) {
|
|
2711
|
-
_deepMix(dist[key], value, level + 1, maxLevel);
|
|
2712
|
-
} else {
|
|
2713
|
-
dist[key] = src[key];
|
|
2714
|
-
}
|
|
2715
|
-
} else if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array__["a" /* default */])(value)) {
|
|
2716
|
-
dist[key] = [];
|
|
2717
|
-
dist[key] = dist[key].concat(value);
|
|
2718
|
-
} else if (value !== undefined) {
|
|
2719
|
-
dist[key] = value;
|
|
2720
|
-
}
|
|
2721
|
-
}
|
|
2722
|
-
}
|
|
2723
|
-
}
|
|
2724
|
-
// todo 重写
|
|
2725
|
-
var deepMix = function (rst) {
|
|
2726
|
-
var args = [];
|
|
2727
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
2728
|
-
args[_i - 1] = arguments[_i];
|
|
2729
|
-
}
|
|
2730
|
-
for (var i = 0; i < args.length; i += 1) {
|
|
2731
|
-
_deepMix(rst, args[i]);
|
|
2732
|
-
}
|
|
2733
|
-
return rst;
|
|
2734
|
-
};
|
|
2735
|
-
/* harmony default export */ __webpack_exports__["a"] = (deepMix);
|
|
2736
|
-
|
|
2737
|
-
/***/ }),
|
|
2738
|
-
/* 100 */
|
|
2739
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2740
|
-
|
|
2741
|
-
"use strict";
|
|
2742
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mix__ = __webpack_require__(16);
|
|
2743
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
var extend = function (subclass, superclass, overrides, staticOverrides) {
|
|
2747
|
-
// 如果只提供父类构造函数,则自动生成子类构造函数
|
|
2748
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_1__is_function__["a" /* default */])(superclass)) {
|
|
2749
|
-
overrides = superclass;
|
|
2750
|
-
superclass = subclass;
|
|
2751
|
-
subclass = function () {};
|
|
2752
|
-
}
|
|
2753
|
-
var create = Object.create ? function (proto, c) {
|
|
2754
|
-
return Object.create(proto, {
|
|
2755
|
-
constructor: {
|
|
2756
|
-
value: c
|
|
2757
|
-
}
|
|
2758
|
-
});
|
|
2759
|
-
} : function (proto, c) {
|
|
2760
|
-
function Tmp() {}
|
|
2761
|
-
Tmp.prototype = proto;
|
|
2762
|
-
var o = new Tmp();
|
|
2763
|
-
o.constructor = c;
|
|
2764
|
-
return o;
|
|
2765
|
-
};
|
|
2766
|
-
var superObj = create(superclass.prototype, subclass); // new superclass(),//实例化父类作为子类的prototype
|
|
2767
|
-
subclass.prototype = Object(__WEBPACK_IMPORTED_MODULE_0__mix__["a" /* default */])(superObj, subclass.prototype); // 指定子类的prototype
|
|
2768
|
-
subclass.superclass = create(superclass.prototype, superclass);
|
|
2769
|
-
Object(__WEBPACK_IMPORTED_MODULE_0__mix__["a" /* default */])(superObj, overrides);
|
|
2770
|
-
Object(__WEBPACK_IMPORTED_MODULE_0__mix__["a" /* default */])(subclass, staticOverrides);
|
|
2771
|
-
return subclass;
|
|
2772
|
-
};
|
|
2773
|
-
/* harmony default export */ __webpack_exports__["a"] = (extend);
|
|
2774
|
-
|
|
2775
|
-
/***/ }),
|
|
2776
|
-
/* 101 */
|
|
2777
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2778
|
-
|
|
2779
|
-
"use strict";
|
|
2780
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);
|
|
2781
|
-
|
|
2782
|
-
var indexOf = function (arr, obj) {
|
|
2783
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__["a" /* default */])(arr)) {
|
|
2784
|
-
return -1;
|
|
2785
|
-
}
|
|
2786
|
-
var m = Array.prototype.indexOf;
|
|
2787
|
-
if (m) {
|
|
2788
|
-
return m.call(arr, obj);
|
|
2789
|
-
}
|
|
2790
|
-
var index = -1;
|
|
2791
|
-
for (var i = 0; i < arr.length; i++) {
|
|
2792
|
-
if (arr[i] === obj) {
|
|
2793
|
-
index = i;
|
|
2794
|
-
break;
|
|
2795
|
-
}
|
|
2796
|
-
}
|
|
2797
|
-
return index;
|
|
2798
|
-
};
|
|
2799
|
-
/* harmony default export */ __webpack_exports__["a"] = (indexOf);
|
|
2800
|
-
|
|
2801
|
-
/***/ }),
|
|
2802
|
-
/* 102 */
|
|
2803
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2804
|
-
|
|
2805
|
-
"use strict";
|
|
2806
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_nil__ = __webpack_require__(7);
|
|
2807
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_array_like__ = __webpack_require__(1);
|
|
2808
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__get_type__ = __webpack_require__(30);
|
|
2809
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__is_prototype__ = __webpack_require__(31);
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
2815
|
-
function isEmpty(value) {
|
|
2816
|
-
/**
|
|
2817
|
-
* isEmpty(null) => true
|
|
2818
|
-
* isEmpty() => true
|
|
2819
|
-
* isEmpty(true) => true
|
|
2820
|
-
* isEmpty(1) => true
|
|
2821
|
-
* isEmpty([1, 2, 3]) => false
|
|
2822
|
-
* isEmpty('abc') => false
|
|
2823
|
-
* isEmpty({ a: 1 }) => false
|
|
2824
|
-
*/
|
|
2825
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_0__is_nil__["a" /* default */])(value)) {
|
|
2826
|
-
return true;
|
|
2827
|
-
}
|
|
2828
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_1__is_array_like__["a" /* default */])(value)) {
|
|
2829
|
-
return !value.length;
|
|
2830
|
-
}
|
|
2831
|
-
var type = Object(__WEBPACK_IMPORTED_MODULE_2__get_type__["a" /* default */])(value);
|
|
2832
|
-
if (type === 'Map' || type === 'Set') {
|
|
2833
|
-
return !value.size;
|
|
2834
|
-
}
|
|
2835
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_3__is_prototype__["a" /* default */])(value)) {
|
|
2836
|
-
return !Object.keys(value).length;
|
|
2837
|
-
}
|
|
2838
|
-
for (var key in value) {
|
|
2839
|
-
if (hasOwnProperty.call(value, key)) {
|
|
2840
|
-
return false;
|
|
2841
|
-
}
|
|
2842
|
-
}
|
|
2843
|
-
return true;
|
|
2844
|
-
}
|
|
2845
|
-
/* harmony default export */ __webpack_exports__["a"] = (isEmpty);
|
|
2846
|
-
|
|
2847
|
-
/***/ }),
|
|
2848
|
-
/* 103 */
|
|
2849
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2850
|
-
|
|
2851
|
-
"use strict";
|
|
2852
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_function__ = __webpack_require__(2);
|
|
2853
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_equal__ = __webpack_require__(33);
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
/**
|
|
2857
|
-
* @param {*} value The value to compare.
|
|
2858
|
-
* @param {*} other The other value to compare.
|
|
2859
|
-
* @param {Function} [fn] The function to customize comparisons.
|
|
2860
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
2861
|
-
* @example
|
|
2862
|
-
*
|
|
2863
|
-
* function isGreeting(value) {
|
|
2864
|
-
* return /^h(?:i|ello)$/.test(value);
|
|
2865
|
-
* }
|
|
2866
|
-
*
|
|
2867
|
-
* function customizer(objValue, othValue) {
|
|
2868
|
-
* if (isGreeting(objValue) && isGreeting(othValue)) {
|
|
2869
|
-
* return true;
|
|
2870
|
-
* }
|
|
2871
|
-
* }
|
|
2872
|
-
*
|
|
2873
|
-
* var array = ['hello', 'goodbye'];
|
|
2874
|
-
* var other = ['hi', 'goodbye'];
|
|
2875
|
-
*
|
|
2876
|
-
* isEqualWith(array, other, customizer); // => true
|
|
2877
|
-
*/
|
|
2878
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (value, other, fn) {
|
|
2879
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_function__["a" /* default */])(fn)) {
|
|
2880
|
-
return Object(__WEBPACK_IMPORTED_MODULE_1__is_equal__["a" /* default */])(value, other);
|
|
2881
|
-
}
|
|
2882
|
-
return !!fn(value, other);
|
|
2883
|
-
});
|
|
2884
|
-
|
|
2885
|
-
/***/ }),
|
|
2886
|
-
/* 104 */
|
|
2887
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2888
|
-
|
|
2889
|
-
"use strict";
|
|
2890
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);
|
|
2891
|
-
|
|
2892
|
-
var map = function (arr, func) {
|
|
2893
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__["a" /* default */])(arr)) {
|
|
2894
|
-
// @ts-ignore
|
|
2895
|
-
return arr;
|
|
2896
|
-
}
|
|
2897
|
-
var result = [];
|
|
2898
|
-
for (var index = 0; index < arr.length; index++) {
|
|
2899
|
-
var value = arr[index];
|
|
2900
|
-
result.push(func(value, index));
|
|
2901
|
-
}
|
|
2902
|
-
return result;
|
|
2903
|
-
};
|
|
2904
|
-
/* harmony default export */ __webpack_exports__["a"] = (map);
|
|
2905
|
-
|
|
2906
|
-
/***/ }),
|
|
2907
|
-
/* 105 */
|
|
2908
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2909
|
-
|
|
2910
|
-
"use strict";
|
|
2911
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_nil__ = __webpack_require__(7);
|
|
2912
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_object__ = __webpack_require__(12);
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
var identity = function (v) {
|
|
2916
|
-
return v;
|
|
2917
|
-
};
|
|
2918
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (object, func) {
|
|
2919
|
-
if (func === void 0) {
|
|
2920
|
-
func = identity;
|
|
2921
|
-
}
|
|
2922
|
-
var r = {};
|
|
2923
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_1__is_object__["a" /* default */])(object) && !Object(__WEBPACK_IMPORTED_MODULE_0__is_nil__["a" /* default */])(object)) {
|
|
2924
|
-
Object.keys(object).forEach(function (key) {
|
|
2925
|
-
// @ts-ignore
|
|
2926
|
-
r[key] = func(object[key], key);
|
|
2927
|
-
});
|
|
2928
|
-
}
|
|
2929
|
-
return r;
|
|
2930
|
-
});
|
|
2931
|
-
|
|
2932
|
-
/***/ }),
|
|
2933
|
-
/* 106 */
|
|
2934
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2935
|
-
|
|
2936
|
-
"use strict";
|
|
2937
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_string__ = __webpack_require__(4);
|
|
2938
|
-
|
|
2939
|
-
/**
|
|
2940
|
-
* https://github.com/developit/dlv/blob/master/index.js
|
|
2941
|
-
* @param obj
|
|
2942
|
-
* @param key
|
|
2943
|
-
* @param defaultValue
|
|
2944
|
-
*/
|
|
2945
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (obj, key, defaultValue) {
|
|
2946
|
-
var p = 0;
|
|
2947
|
-
var keyArr = Object(__WEBPACK_IMPORTED_MODULE_0__is_string__["a" /* default */])(key) ? key.split('.') : key;
|
|
2948
|
-
while (obj && p < keyArr.length) {
|
|
2949
|
-
obj = obj[keyArr[p++]];
|
|
2950
|
-
}
|
|
2951
|
-
return obj === undefined || p < keyArr.length ? defaultValue : obj;
|
|
2952
|
-
});
|
|
2953
|
-
|
|
2954
|
-
/***/ }),
|
|
2955
|
-
/* 107 */
|
|
2956
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2957
|
-
|
|
2958
|
-
"use strict";
|
|
2959
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_object__ = __webpack_require__(12);
|
|
2960
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_string__ = __webpack_require__(4);
|
|
2961
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__is_number__ = __webpack_require__(5);
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
/**
|
|
2966
|
-
* https://github.com/developit/dlv/blob/master/index.js
|
|
2967
|
-
* @param obj
|
|
2968
|
-
* @param path
|
|
2969
|
-
* @param value
|
|
2970
|
-
*/
|
|
2971
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (obj, path, value) {
|
|
2972
|
-
var o = obj;
|
|
2973
|
-
var keyArr = Object(__WEBPACK_IMPORTED_MODULE_1__is_string__["a" /* default */])(path) ? path.split('.') : path;
|
|
2974
|
-
keyArr.forEach(function (key, idx) {
|
|
2975
|
-
// 不是最后一个
|
|
2976
|
-
if (idx < keyArr.length - 1) {
|
|
2977
|
-
if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_object__["a" /* default */])(o[key])) {
|
|
2978
|
-
o[key] = Object(__WEBPACK_IMPORTED_MODULE_2__is_number__["a" /* default */])(keyArr[idx + 1]) ? [] : {};
|
|
2979
|
-
}
|
|
2980
|
-
o = o[key];
|
|
2981
|
-
} else {
|
|
2982
|
-
o[key] = value;
|
|
2983
|
-
}
|
|
2984
|
-
});
|
|
2985
|
-
return obj;
|
|
2986
|
-
});
|
|
2987
|
-
|
|
2988
|
-
/***/ }),
|
|
2989
|
-
/* 108 */
|
|
2990
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2991
|
-
|
|
2992
|
-
"use strict";
|
|
2993
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__each__ = __webpack_require__(8);
|
|
2994
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_plain_object__ = __webpack_require__(10);
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
2998
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (object, keys) {
|
|
2999
|
-
if (object === null || !Object(__WEBPACK_IMPORTED_MODULE_1__is_plain_object__["a" /* default */])(object)) {
|
|
3000
|
-
return {};
|
|
3001
|
-
}
|
|
3002
|
-
var result = {};
|
|
3003
|
-
Object(__WEBPACK_IMPORTED_MODULE_0__each__["a" /* default */])(keys, function (key) {
|
|
3004
|
-
if (hasOwnProperty.call(object, key)) {
|
|
3005
|
-
result[key] = object[key];
|
|
3006
|
-
}
|
|
3007
|
-
});
|
|
3008
|
-
return result;
|
|
3009
|
-
});
|
|
3010
|
-
|
|
3011
|
-
/***/ }),
|
|
3012
|
-
/* 109 */
|
|
3013
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3014
|
-
|
|
3015
|
-
"use strict";
|
|
3016
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__reduce__ = __webpack_require__(25);
|
|
3017
|
-
|
|
3018
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (obj, keys) {
|
|
3019
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__reduce__["a" /* default */])(obj, function (r, curr, key) {
|
|
3020
|
-
if (!keys.includes(key)) {
|
|
3021
|
-
r[key] = curr;
|
|
3022
|
-
}
|
|
3023
|
-
return r;
|
|
3024
|
-
}, {});
|
|
3025
|
-
});
|
|
3026
|
-
|
|
3027
|
-
/***/ }),
|
|
3028
|
-
/* 110 */
|
|
3029
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3030
|
-
|
|
3031
|
-
"use strict";
|
|
3032
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (func, wait, options) {
|
|
3033
|
-
var timeout, context, args, result;
|
|
3034
|
-
var previous = 0;
|
|
3035
|
-
if (!options) options = {};
|
|
3036
|
-
var later = function () {
|
|
3037
|
-
previous = options.leading === false ? 0 : Date.now();
|
|
3038
|
-
timeout = null;
|
|
3039
|
-
result = func.apply(context, args);
|
|
3040
|
-
if (!timeout) context = args = null;
|
|
3041
|
-
};
|
|
3042
|
-
var throttled = function () {
|
|
3043
|
-
var now = Date.now();
|
|
3044
|
-
if (!previous && options.leading === false) previous = now;
|
|
3045
|
-
var remaining = wait - (now - previous);
|
|
3046
|
-
context = this;
|
|
3047
|
-
args = arguments;
|
|
3048
|
-
if (remaining <= 0 || remaining > wait) {
|
|
3049
|
-
if (timeout) {
|
|
3050
|
-
clearTimeout(timeout);
|
|
3051
|
-
timeout = null;
|
|
3052
|
-
}
|
|
3053
|
-
previous = now;
|
|
3054
|
-
result = func.apply(context, args);
|
|
3055
|
-
if (!timeout) context = args = null;
|
|
3056
|
-
} else if (!timeout && options.trailing !== false) {
|
|
3057
|
-
timeout = setTimeout(later, remaining);
|
|
3058
|
-
}
|
|
3059
|
-
return result;
|
|
3060
|
-
};
|
|
3061
|
-
throttled.cancel = function () {
|
|
3062
|
-
clearTimeout(timeout);
|
|
3063
|
-
previous = 0;
|
|
3064
|
-
timeout = context = args = null;
|
|
3065
|
-
};
|
|
3066
|
-
return throttled;
|
|
3067
|
-
});
|
|
3068
|
-
|
|
3069
|
-
/***/ }),
|
|
3070
|
-
/* 111 */
|
|
3071
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3072
|
-
|
|
3073
|
-
"use strict";
|
|
3074
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);
|
|
3075
|
-
|
|
3076
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (value) {
|
|
3077
|
-
return Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__["a" /* default */])(value) ? Array.prototype.slice.call(value) : [];
|
|
3078
|
-
});
|
|
3079
|
-
|
|
3080
|
-
/***/ }),
|
|
3081
|
-
/* 112 */
|
|
3082
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3083
|
-
|
|
3084
|
-
"use strict";
|
|
3085
|
-
var map = {};
|
|
3086
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (prefix) {
|
|
3087
|
-
prefix = prefix || 'g';
|
|
3088
|
-
if (!map[prefix]) {
|
|
3089
|
-
map[prefix] = 1;
|
|
3090
|
-
} else {
|
|
3091
|
-
map[prefix] += 1;
|
|
3092
|
-
}
|
|
3093
|
-
return prefix + map[prefix];
|
|
3094
|
-
});
|
|
3095
|
-
|
|
3096
|
-
/***/ }),
|
|
3097
|
-
/* 113 */
|
|
3098
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3099
|
-
|
|
3100
|
-
"use strict";
|
|
3101
|
-
/* harmony default export */ __webpack_exports__["a"] = (function () {});
|
|
3102
|
-
|
|
3103
|
-
/***/ }),
|
|
3104
|
-
/* 114 */
|
|
3105
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3106
|
-
|
|
3107
|
-
"use strict";
|
|
3108
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (v) {
|
|
3109
|
-
return v;
|
|
3110
|
-
});
|
|
3111
|
-
|
|
3112
|
-
/***/ }),
|
|
3113
|
-
/* 115 */
|
|
3114
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3115
|
-
|
|
3116
|
-
"use strict";
|
|
3117
|
-
/* harmony export (immutable) */ __webpack_exports__["a"] = size;
|
|
3118
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_nil__ = __webpack_require__(7);
|
|
3119
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_array_like__ = __webpack_require__(1);
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
function size(o) {
|
|
3123
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_0__is_nil__["a" /* default */])(o)) {
|
|
3124
|
-
return 0;
|
|
3125
|
-
}
|
|
3126
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_1__is_array_like__["a" /* default */])(o)) {
|
|
3127
|
-
return o.length;
|
|
3128
|
-
}
|
|
3129
|
-
return Object.keys(o).length;
|
|
3130
|
-
}
|
|
3131
|
-
|
|
3132
|
-
/***/ }),
|
|
3133
|
-
/* 116 */
|
|
3134
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3135
|
-
|
|
3136
|
-
"use strict";
|
|
3137
|
-
/* unused harmony export __extends */
|
|
3138
|
-
/* unused harmony export __assign */
|
|
3139
|
-
/* unused harmony export __rest */
|
|
3140
|
-
/* unused harmony export __decorate */
|
|
3141
|
-
/* unused harmony export __param */
|
|
3142
|
-
/* unused harmony export __metadata */
|
|
3143
|
-
/* unused harmony export __awaiter */
|
|
3144
|
-
/* unused harmony export __generator */
|
|
3145
|
-
/* unused harmony export __createBinding */
|
|
3146
|
-
/* unused harmony export __exportStar */
|
|
3147
|
-
/* unused harmony export __values */
|
|
3148
|
-
/* unused harmony export __read */
|
|
3149
|
-
/* unused harmony export __spread */
|
|
3150
|
-
/* harmony export (immutable) */ __webpack_exports__["a"] = __spreadArrays;
|
|
3151
|
-
/* unused harmony export __spreadArray */
|
|
3152
|
-
/* unused harmony export __await */
|
|
3153
|
-
/* unused harmony export __asyncGenerator */
|
|
3154
|
-
/* unused harmony export __asyncDelegator */
|
|
3155
|
-
/* unused harmony export __asyncValues */
|
|
3156
|
-
/* unused harmony export __makeTemplateObject */
|
|
3157
|
-
/* unused harmony export __importStar */
|
|
3158
|
-
/* unused harmony export __importDefault */
|
|
3159
|
-
/* unused harmony export __classPrivateFieldGet */
|
|
3160
|
-
/* unused harmony export __classPrivateFieldSet */
|
|
3161
|
-
/* unused harmony export __classPrivateFieldIn */
|
|
3162
|
-
/******************************************************************************
|
|
3163
|
-
Copyright (c) Microsoft Corporation.
|
|
3164
|
-
|
|
3165
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
3166
|
-
purpose with or without fee is hereby granted.
|
|
3167
|
-
|
|
3168
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
3169
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
3170
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
3171
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
3172
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
3173
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
3174
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
3175
|
-
***************************************************************************** */
|
|
3176
|
-
/* global Reflect, Promise */
|
|
3177
|
-
|
|
3178
|
-
var extendStatics = function (d, b) {
|
|
3179
|
-
extendStatics = Object.setPrototypeOf || {
|
|
3180
|
-
__proto__: []
|
|
3181
|
-
} instanceof Array && function (d, b) {
|
|
3182
|
-
d.__proto__ = b;
|
|
3183
|
-
} || function (d, b) {
|
|
3184
|
-
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
3185
|
-
};
|
|
3186
|
-
return extendStatics(d, b);
|
|
3187
|
-
};
|
|
3188
|
-
function __extends(d, b) {
|
|
3189
|
-
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
3190
|
-
extendStatics(d, b);
|
|
3191
|
-
function __() {
|
|
3192
|
-
this.constructor = d;
|
|
3193
|
-
}
|
|
3194
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
3195
|
-
}
|
|
3196
|
-
var __assign = function () {
|
|
3197
|
-
__assign = Object.assign || function __assign(t) {
|
|
3198
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3199
|
-
s = arguments[i];
|
|
3200
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
288
|
+
while (current = nodes.shift()) {
|
|
289
|
+
callback(current);
|
|
290
|
+
nodes = current.children.concat(nodes);
|
|
3201
291
|
}
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
var c = arguments.length,
|
|
3216
|
-
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
3217
|
-
d;
|
|
3218
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3219
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3220
|
-
}
|
|
3221
|
-
function __param(paramIndex, decorator) {
|
|
3222
|
-
return function (target, key) {
|
|
3223
|
-
decorator(target, key, paramIndex);
|
|
3224
|
-
};
|
|
3225
|
-
}
|
|
3226
|
-
function __metadata(metadataKey, metadataValue) {
|
|
3227
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
3228
|
-
}
|
|
3229
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
3230
|
-
function adopt(value) {
|
|
3231
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
3232
|
-
resolve(value);
|
|
3233
|
-
});
|
|
3234
|
-
}
|
|
3235
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3236
|
-
function fulfilled(value) {
|
|
3237
|
-
try {
|
|
3238
|
-
step(generator.next(value));
|
|
3239
|
-
} catch (e) {
|
|
3240
|
-
reject(e);
|
|
3241
|
-
}
|
|
292
|
+
},
|
|
293
|
+
DFTraverse: function DFTraverse(callback) {
|
|
294
|
+
// Depth First traverse
|
|
295
|
+
this.eachNode(callback);
|
|
296
|
+
},
|
|
297
|
+
BFTraverse: function BFTraverse(callback) {
|
|
298
|
+
// Breadth First traverse
|
|
299
|
+
var me = this;
|
|
300
|
+
var nodes = [me];
|
|
301
|
+
var current;
|
|
302
|
+
while (current = nodes.shift()) {
|
|
303
|
+
callback(current);
|
|
304
|
+
nodes = nodes.concat(current.children);
|
|
3242
305
|
}
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
306
|
+
},
|
|
307
|
+
getBoundingBox: function getBoundingBox() {
|
|
308
|
+
// BBox for just one tree node
|
|
309
|
+
var bb = {
|
|
310
|
+
left: Number.MAX_VALUE,
|
|
311
|
+
top: Number.MAX_VALUE,
|
|
312
|
+
width: 0,
|
|
313
|
+
height: 0
|
|
314
|
+
};
|
|
315
|
+
this.eachNode(function (node) {
|
|
316
|
+
bb.left = Math.min(bb.left, node.x);
|
|
317
|
+
bb.top = Math.min(bb.top, node.y);
|
|
318
|
+
bb.width = Math.max(bb.width, node.x + node.width);
|
|
319
|
+
bb.height = Math.max(bb.height, node.y + node.height);
|
|
320
|
+
});
|
|
321
|
+
return bb;
|
|
322
|
+
},
|
|
323
|
+
// translate
|
|
324
|
+
translate: function translate(tx, ty) {
|
|
325
|
+
if (tx === void 0) {
|
|
326
|
+
tx = 0;
|
|
3249
327
|
}
|
|
3250
|
-
|
|
3251
|
-
|
|
328
|
+
if (ty === void 0) {
|
|
329
|
+
ty = 0;
|
|
3252
330
|
}
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
function verb(n) {
|
|
3278
|
-
return function (v) {
|
|
3279
|
-
return step([n, v]);
|
|
3280
|
-
};
|
|
331
|
+
this.eachNode(function (node) {
|
|
332
|
+
node.x += tx;
|
|
333
|
+
node.y += ty;
|
|
334
|
+
node.x += node.preH;
|
|
335
|
+
node.y += node.preV;
|
|
336
|
+
});
|
|
337
|
+
},
|
|
338
|
+
right2left: function right2left() {
|
|
339
|
+
var me = this;
|
|
340
|
+
var bb = me.getBoundingBox();
|
|
341
|
+
me.eachNode(function (node) {
|
|
342
|
+
node.x = node.x - (node.x - bb.left) * 2 - node.width;
|
|
343
|
+
// node.x = - node.x;
|
|
344
|
+
});
|
|
345
|
+
me.translate(bb.width, 0);
|
|
346
|
+
},
|
|
347
|
+
bottom2top: function bottom2top() {
|
|
348
|
+
var me = this;
|
|
349
|
+
var bb = me.getBoundingBox();
|
|
350
|
+
me.eachNode(function (node) {
|
|
351
|
+
node.y = node.y - (node.y - bb.top) * 2 - node.height;
|
|
352
|
+
// node.y = - node.y;
|
|
353
|
+
});
|
|
354
|
+
me.translate(0, bb.height);
|
|
3281
355
|
}
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
op = _.ops.pop();
|
|
3305
|
-
_.trys.pop();
|
|
3306
|
-
continue;
|
|
3307
|
-
default:
|
|
3308
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
3309
|
-
_ = 0;
|
|
3310
|
-
continue;
|
|
3311
|
-
}
|
|
3312
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
3313
|
-
_.label = op[1];
|
|
3314
|
-
break;
|
|
3315
|
-
}
|
|
3316
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
3317
|
-
_.label = t[1];
|
|
3318
|
-
t = op;
|
|
3319
|
-
break;
|
|
3320
|
-
}
|
|
3321
|
-
if (t && _.label < t[2]) {
|
|
3322
|
-
_.label = t[2];
|
|
3323
|
-
_.ops.push(op);
|
|
3324
|
-
break;
|
|
356
|
+
});
|
|
357
|
+
function hierarchy(data, options, isolated) {
|
|
358
|
+
if (options === void 0) {
|
|
359
|
+
options = {};
|
|
360
|
+
}
|
|
361
|
+
options = util.assign({}, DEFAULT_OPTIONS, options);
|
|
362
|
+
var root = new Node(data, options);
|
|
363
|
+
var nodes = [root];
|
|
364
|
+
var node;
|
|
365
|
+
if (!isolated && !data.collapsed) {
|
|
366
|
+
while (node = nodes.shift()) {
|
|
367
|
+
if (!node.data.collapsed) {
|
|
368
|
+
var children = options.getChildren(node.data);
|
|
369
|
+
var length = children ? children.length : 0;
|
|
370
|
+
node.children = new Array(length);
|
|
371
|
+
if (children && length) {
|
|
372
|
+
for (var i = 0; i < length; i++) {
|
|
373
|
+
var child = new Node(children[i], options);
|
|
374
|
+
node.children[i] = child;
|
|
375
|
+
nodes.push(child);
|
|
376
|
+
child.parent = node;
|
|
377
|
+
child.depth = node.depth + 1;
|
|
3325
378
|
}
|
|
3326
|
-
|
|
3327
|
-
_.trys.pop();
|
|
3328
|
-
continue;
|
|
379
|
+
}
|
|
3329
380
|
}
|
|
3330
|
-
op = body.call(thisArg, _);
|
|
3331
|
-
} catch (e) {
|
|
3332
|
-
op = [6, e];
|
|
3333
|
-
y = 0;
|
|
3334
|
-
} finally {
|
|
3335
|
-
f = t = 0;
|
|
3336
381
|
}
|
|
3337
|
-
if (op[0] & 5) throw op[1];
|
|
3338
|
-
return {
|
|
3339
|
-
value: op[0] ? op[1] : void 0,
|
|
3340
|
-
done: true
|
|
3341
|
-
};
|
|
3342
|
-
}
|
|
3343
|
-
}
|
|
3344
|
-
var __createBinding = Object.create ? function (o, m, k, k2) {
|
|
3345
|
-
if (k2 === undefined) k2 = k;
|
|
3346
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
3347
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
3348
|
-
desc = {
|
|
3349
|
-
enumerable: true,
|
|
3350
|
-
get: function () {
|
|
3351
|
-
return m[k];
|
|
3352
|
-
}
|
|
3353
|
-
};
|
|
3354
382
|
}
|
|
3355
|
-
|
|
3356
|
-
} : function (o, m, k, k2) {
|
|
3357
|
-
if (k2 === undefined) k2 = k;
|
|
3358
|
-
o[k2] = m[k];
|
|
3359
|
-
};
|
|
3360
|
-
function __exportStar(m, o) {
|
|
3361
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
|
|
383
|
+
return root;
|
|
3362
384
|
}
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
385
|
+
module.exports = hierarchy;
|
|
386
|
+
|
|
387
|
+
/***/ }),
|
|
388
|
+
/* 4 */
|
|
389
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
390
|
+
|
|
391
|
+
var hierarchy = __webpack_require__(3);
|
|
392
|
+
module.exports = function (root, options) {
|
|
393
|
+
// separate into left and right trees
|
|
394
|
+
var left = hierarchy(root.data, options, true); // root only
|
|
395
|
+
var right = hierarchy(root.data, options, true); // root only
|
|
396
|
+
// automatically
|
|
397
|
+
var treeSize = root.children.length;
|
|
398
|
+
var rightTreeSize = Math.round(treeSize / 2);
|
|
399
|
+
// separate left and right tree by meta data
|
|
400
|
+
var getSide = options.getSide || function (child, index) {
|
|
401
|
+
if (index < rightTreeSize) {
|
|
402
|
+
return 'right';
|
|
3375
403
|
}
|
|
404
|
+
return 'left';
|
|
3376
405
|
};
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
ar = [],
|
|
3385
|
-
e;
|
|
3386
|
-
try {
|
|
3387
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
3388
|
-
} catch (error) {
|
|
3389
|
-
e = {
|
|
3390
|
-
error: error
|
|
3391
|
-
};
|
|
3392
|
-
} finally {
|
|
3393
|
-
try {
|
|
3394
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
3395
|
-
} finally {
|
|
3396
|
-
if (e) throw e.error;
|
|
406
|
+
for (var i = 0; i < treeSize; i++) {
|
|
407
|
+
var child = root.children[i];
|
|
408
|
+
var side = getSide(child, i);
|
|
409
|
+
if (side === 'right') {
|
|
410
|
+
right.children.push(child);
|
|
411
|
+
} else {
|
|
412
|
+
left.children.push(child);
|
|
3397
413
|
}
|
|
3398
414
|
}
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
/** @deprecated */
|
|
3403
|
-
function __spread() {
|
|
3404
|
-
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
3405
|
-
return ar;
|
|
3406
|
-
}
|
|
3407
|
-
|
|
3408
|
-
/** @deprecated */
|
|
3409
|
-
function __spreadArrays() {
|
|
3410
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
3411
|
-
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];
|
|
3412
|
-
return r;
|
|
3413
|
-
}
|
|
3414
|
-
function __spreadArray(to, from, pack) {
|
|
3415
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3416
|
-
if (ar || !(i in from)) {
|
|
3417
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
3418
|
-
ar[i] = from[i];
|
|
415
|
+
left.eachNode(function (node) {
|
|
416
|
+
if (!node.isRoot()) {
|
|
417
|
+
node.side = 'left';
|
|
3419
418
|
}
|
|
3420
|
-
}
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
3425
|
-
}
|
|
3426
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
3427
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
3428
|
-
var g = generator.apply(thisArg, _arguments || []),
|
|
3429
|
-
i,
|
|
3430
|
-
q = [];
|
|
3431
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
|
|
3432
|
-
return this;
|
|
3433
|
-
}, i;
|
|
3434
|
-
function verb(n) {
|
|
3435
|
-
if (g[n]) i[n] = function (v) {
|
|
3436
|
-
return new Promise(function (a, b) {
|
|
3437
|
-
q.push([n, v, a, b]) > 1 || resume(n, v);
|
|
3438
|
-
});
|
|
3439
|
-
};
|
|
3440
|
-
}
|
|
3441
|
-
function resume(n, v) {
|
|
3442
|
-
try {
|
|
3443
|
-
step(g[n](v));
|
|
3444
|
-
} catch (e) {
|
|
3445
|
-
settle(q[0][3], e);
|
|
419
|
+
});
|
|
420
|
+
right.eachNode(function (node) {
|
|
421
|
+
if (!node.isRoot()) {
|
|
422
|
+
node.side = 'right';
|
|
3446
423
|
}
|
|
3447
|
-
}
|
|
3448
|
-
function step(r) {
|
|
3449
|
-
r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
|
|
3450
|
-
}
|
|
3451
|
-
function fulfill(value) {
|
|
3452
|
-
resume("next", value);
|
|
3453
|
-
}
|
|
3454
|
-
function reject(value) {
|
|
3455
|
-
resume("throw", value);
|
|
3456
|
-
}
|
|
3457
|
-
function settle(f, v) {
|
|
3458
|
-
if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
|
|
3459
|
-
}
|
|
3460
|
-
}
|
|
3461
|
-
function __asyncDelegator(o) {
|
|
3462
|
-
var i, p;
|
|
3463
|
-
return i = {}, verb("next"), verb("throw", function (e) {
|
|
3464
|
-
throw e;
|
|
3465
|
-
}), verb("return"), i[Symbol.iterator] = function () {
|
|
3466
|
-
return this;
|
|
3467
|
-
}, i;
|
|
3468
|
-
function verb(n, f) {
|
|
3469
|
-
i[n] = o[n] ? function (v) {
|
|
3470
|
-
return (p = !p) ? {
|
|
3471
|
-
value: __await(o[n](v)),
|
|
3472
|
-
done: n === "return"
|
|
3473
|
-
} : f ? f(v) : v;
|
|
3474
|
-
} : f;
|
|
3475
|
-
}
|
|
3476
|
-
}
|
|
3477
|
-
function __asyncValues(o) {
|
|
3478
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
3479
|
-
var m = o[Symbol.asyncIterator],
|
|
3480
|
-
i;
|
|
3481
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
|
|
3482
|
-
return this;
|
|
3483
|
-
}, i);
|
|
3484
|
-
function verb(n) {
|
|
3485
|
-
i[n] = o[n] && function (v) {
|
|
3486
|
-
return new Promise(function (resolve, reject) {
|
|
3487
|
-
v = o[n](v), settle(resolve, reject, v.done, v.value);
|
|
3488
|
-
});
|
|
3489
|
-
};
|
|
3490
|
-
}
|
|
3491
|
-
function settle(resolve, reject, d, v) {
|
|
3492
|
-
Promise.resolve(v).then(function (v) {
|
|
3493
|
-
resolve({
|
|
3494
|
-
value: v,
|
|
3495
|
-
done: d
|
|
3496
|
-
});
|
|
3497
|
-
}, reject);
|
|
3498
|
-
}
|
|
3499
|
-
}
|
|
3500
|
-
function __makeTemplateObject(cooked, raw) {
|
|
3501
|
-
if (Object.defineProperty) {
|
|
3502
|
-
Object.defineProperty(cooked, "raw", {
|
|
3503
|
-
value: raw
|
|
3504
|
-
});
|
|
3505
|
-
} else {
|
|
3506
|
-
cooked.raw = raw;
|
|
3507
|
-
}
|
|
3508
|
-
return cooked;
|
|
3509
|
-
}
|
|
3510
|
-
;
|
|
3511
|
-
var __setModuleDefault = Object.create ? function (o, v) {
|
|
3512
|
-
Object.defineProperty(o, "default", {
|
|
3513
|
-
enumerable: true,
|
|
3514
|
-
value: v
|
|
3515
424
|
});
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
function __importStar(mod) {
|
|
3520
|
-
if (mod && mod.__esModule) return mod;
|
|
3521
|
-
var result = {};
|
|
3522
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
3523
|
-
__setModuleDefault(result, mod);
|
|
3524
|
-
return result;
|
|
3525
|
-
}
|
|
3526
|
-
function __importDefault(mod) {
|
|
3527
|
-
return mod && mod.__esModule ? mod : {
|
|
3528
|
-
default: mod
|
|
425
|
+
return {
|
|
426
|
+
left: left,
|
|
427
|
+
right: right
|
|
3529
428
|
};
|
|
3530
|
-
}
|
|
3531
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
3532
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3533
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
3534
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
3535
|
-
}
|
|
3536
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
3537
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3538
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
3539
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
3540
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
3541
|
-
}
|
|
3542
|
-
function __classPrivateFieldIn(state, receiver) {
|
|
3543
|
-
if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object");
|
|
3544
|
-
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
3545
|
-
}
|
|
429
|
+
};
|
|
3546
430
|
|
|
3547
431
|
/***/ }),
|
|
3548
|
-
/*
|
|
3549
|
-
/***/ (function(module,
|
|
3550
|
-
|
|
3551
|
-
"use strict";
|
|
3552
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_string__ = __webpack_require__(4);
|
|
3553
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__to_string__ = __webpack_require__(9);
|
|
3554
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__measure_text_width__ = __webpack_require__(34);
|
|
3555
|
-
|
|
3556
|
-
|
|
432
|
+
/* 5 */
|
|
433
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
3557
434
|
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
* @param font 字体
|
|
3566
|
-
* @param str 要替换的文本
|
|
3567
|
-
*/
|
|
3568
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (text, maxWidth, font, str) {
|
|
3569
|
-
if (str === void 0) {
|
|
3570
|
-
str = '...';
|
|
3571
|
-
}
|
|
3572
|
-
var STEP = 16; // 每次 16,调参工程师
|
|
3573
|
-
var PLACEHOLDER_WIDTH = Object(__WEBPACK_IMPORTED_MODULE_2__measure_text_width__["a" /* default */])(str, font);
|
|
3574
|
-
var leftText = !Object(__WEBPACK_IMPORTED_MODULE_0__is_string__["a" /* default */])(text) ? Object(__WEBPACK_IMPORTED_MODULE_1__to_string__["a" /* default */])(text) : text;
|
|
3575
|
-
var leftWidth = maxWidth;
|
|
3576
|
-
var r = []; // 最终的分段字符串
|
|
3577
|
-
var currentText;
|
|
3578
|
-
var currentWidth;
|
|
3579
|
-
if (Object(__WEBPACK_IMPORTED_MODULE_2__measure_text_width__["a" /* default */])(text, font) <= maxWidth) {
|
|
3580
|
-
return text;
|
|
3581
|
-
}
|
|
3582
|
-
// 首先通过 step 计算,找出最大的未超出长度的
|
|
3583
|
-
// eslint-disable-next-line no-constant-condition
|
|
3584
|
-
while (true) {
|
|
3585
|
-
// 更新字符串
|
|
3586
|
-
currentText = leftText.substr(0, STEP);
|
|
3587
|
-
// 计算宽度
|
|
3588
|
-
currentWidth = Object(__WEBPACK_IMPORTED_MODULE_2__measure_text_width__["a" /* default */])(currentText, font);
|
|
3589
|
-
// 超出剩余宽度,则停止
|
|
3590
|
-
if (currentWidth + PLACEHOLDER_WIDTH > leftWidth) {
|
|
3591
|
-
if (currentWidth > leftWidth) {
|
|
3592
|
-
break;
|
|
3593
|
-
}
|
|
3594
|
-
}
|
|
3595
|
-
r.push(currentText);
|
|
3596
|
-
// 没有超出,则计算剩余宽度
|
|
3597
|
-
leftWidth -= currentWidth;
|
|
3598
|
-
leftText = leftText.substr(STEP);
|
|
3599
|
-
// 字符串整体没有超出
|
|
3600
|
-
if (!leftText) {
|
|
3601
|
-
return r.join('');
|
|
3602
|
-
}
|
|
3603
|
-
}
|
|
3604
|
-
// 最下的最后一个 STEP,使用 1 递增(用二分效果更高)
|
|
3605
|
-
// eslint-disable-next-line no-constant-condition
|
|
3606
|
-
while (true) {
|
|
3607
|
-
// 更新字符串
|
|
3608
|
-
currentText = leftText.substr(0, 1);
|
|
3609
|
-
// 计算宽度
|
|
3610
|
-
currentWidth = Object(__WEBPACK_IMPORTED_MODULE_2__measure_text_width__["a" /* default */])(currentText, font);
|
|
3611
|
-
// 超出剩余宽度,则停止
|
|
3612
|
-
if (currentWidth + PLACEHOLDER_WIDTH > leftWidth) {
|
|
3613
|
-
break;
|
|
3614
|
-
}
|
|
3615
|
-
r.push(currentText);
|
|
3616
|
-
// 没有超出,则计算剩余宽度
|
|
3617
|
-
leftWidth -= currentWidth;
|
|
3618
|
-
leftText = leftText.substr(1);
|
|
3619
|
-
if (!leftText) {
|
|
3620
|
-
return r.join('');
|
|
3621
|
-
}
|
|
3622
|
-
}
|
|
3623
|
-
return "" + r.join('') + str;
|
|
3624
|
-
});
|
|
435
|
+
var hierarchy = {
|
|
436
|
+
compactBox: __webpack_require__(6),
|
|
437
|
+
dendrogram: __webpack_require__(8),
|
|
438
|
+
indented: __webpack_require__(10),
|
|
439
|
+
mindmap: __webpack_require__(12)
|
|
440
|
+
};
|
|
441
|
+
module.exports = hierarchy;
|
|
3625
442
|
|
|
3626
443
|
/***/ }),
|
|
3627
|
-
/*
|
|
3628
|
-
/***/ (function(module,
|
|
444
|
+
/* 6 */
|
|
445
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
3629
446
|
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
var
|
|
3635
|
-
|
|
3636
|
-
|
|
447
|
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
448
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
449
|
+
var TreeLayout = __webpack_require__(1);
|
|
450
|
+
var nonLayeredTidyTree = __webpack_require__(7);
|
|
451
|
+
var doTreeLayout = __webpack_require__(2);
|
|
452
|
+
var util = __webpack_require__(0);
|
|
453
|
+
var CompactBoxTreeLayout = /*#__PURE__*/function (_TreeLayout) {
|
|
454
|
+
function CompactBoxTreeLayout() {
|
|
455
|
+
return _TreeLayout.apply(this, arguments) || this;
|
|
3637
456
|
}
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
return v === undefined ? def : v;
|
|
3644
|
-
};
|
|
3645
|
-
default_1.prototype.set = function (key, value) {
|
|
3646
|
-
this.map[key] = value;
|
|
3647
|
-
};
|
|
3648
|
-
default_1.prototype.clear = function () {
|
|
3649
|
-
this.map = {};
|
|
3650
|
-
};
|
|
3651
|
-
default_1.prototype.delete = function (key) {
|
|
3652
|
-
delete this.map[key];
|
|
3653
|
-
};
|
|
3654
|
-
default_1.prototype.size = function () {
|
|
3655
|
-
return Object.keys(this.map).length;
|
|
457
|
+
_inheritsLoose(CompactBoxTreeLayout, _TreeLayout);
|
|
458
|
+
var _proto = CompactBoxTreeLayout.prototype;
|
|
459
|
+
_proto.execute = function execute() {
|
|
460
|
+
var me = this;
|
|
461
|
+
return doTreeLayout(me.rootNode, me.options, nonLayeredTidyTree);
|
|
3656
462
|
};
|
|
3657
|
-
return
|
|
3658
|
-
}();
|
|
3659
|
-
|
|
463
|
+
return CompactBoxTreeLayout;
|
|
464
|
+
}(TreeLayout);
|
|
465
|
+
var DEFAULT_OPTIONS = {};
|
|
466
|
+
function compactBoxLayout(root, options) {
|
|
467
|
+
options = util.assign({}, DEFAULT_OPTIONS, options);
|
|
468
|
+
return new CompactBoxTreeLayout(root, options).execute();
|
|
469
|
+
}
|
|
470
|
+
module.exports = compactBoxLayout;
|
|
3660
471
|
|
|
3661
472
|
/***/ }),
|
|
3662
|
-
/*
|
|
473
|
+
/* 7 */
|
|
3663
474
|
/***/ (function(module, exports) {
|
|
3664
475
|
|
|
3665
476
|
// wrap tree node
|
|
@@ -3900,20 +711,20 @@ module.exports = function (root, options) {
|
|
|
3900
711
|
};
|
|
3901
712
|
|
|
3902
713
|
/***/ }),
|
|
3903
|
-
/*
|
|
714
|
+
/* 8 */
|
|
3904
715
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3905
716
|
|
|
3906
717
|
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
3907
718
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
3908
|
-
var TreeLayout = __webpack_require__(
|
|
3909
|
-
var dendrogram = __webpack_require__(
|
|
3910
|
-
var doTreeLayout = __webpack_require__(
|
|
3911
|
-
var util = __webpack_require__(
|
|
719
|
+
var TreeLayout = __webpack_require__(1);
|
|
720
|
+
var dendrogram = __webpack_require__(9);
|
|
721
|
+
var doTreeLayout = __webpack_require__(2);
|
|
722
|
+
var util = __webpack_require__(0);
|
|
3912
723
|
var DendrogramLayout = /*#__PURE__*/function (_TreeLayout) {
|
|
3913
|
-
_inheritsLoose(DendrogramLayout, _TreeLayout);
|
|
3914
724
|
function DendrogramLayout() {
|
|
3915
725
|
return _TreeLayout.apply(this, arguments) || this;
|
|
3916
726
|
}
|
|
727
|
+
_inheritsLoose(DendrogramLayout, _TreeLayout);
|
|
3917
728
|
var _proto = DendrogramLayout.prototype;
|
|
3918
729
|
_proto.execute = function execute() {
|
|
3919
730
|
var me = this;
|
|
@@ -3930,12 +741,12 @@ function dendrogramLayout(root, options) {
|
|
|
3930
741
|
module.exports = dendrogramLayout;
|
|
3931
742
|
|
|
3932
743
|
/***/ }),
|
|
3933
|
-
/*
|
|
744
|
+
/* 9 */
|
|
3934
745
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3935
746
|
|
|
3936
747
|
// wrap tree node
|
|
3937
748
|
// TODO considering size
|
|
3938
|
-
var util = __webpack_require__(
|
|
749
|
+
var util = __webpack_require__(0);
|
|
3939
750
|
function WrappedTree(height, children) {
|
|
3940
751
|
if (height === void 0) {
|
|
3941
752
|
height = 0;
|
|
@@ -3980,7 +791,6 @@ module.exports = function (root, options) {
|
|
|
3980
791
|
if (n.depth && n.depth > maxDepth) {
|
|
3981
792
|
maxDepth = n.depth; // get the max depth
|
|
3982
793
|
}
|
|
3983
|
-
|
|
3984
794
|
var children = n.children;
|
|
3985
795
|
var childrenCount = children.length;
|
|
3986
796
|
var t = new WrappedTree(n.height, []);
|
|
@@ -4044,28 +854,27 @@ module.exports = function (root, options) {
|
|
|
4044
854
|
};
|
|
4045
855
|
|
|
4046
856
|
/***/ }),
|
|
4047
|
-
/*
|
|
857
|
+
/* 10 */
|
|
4048
858
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4049
859
|
|
|
4050
860
|
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
4051
861
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
4052
|
-
var TreeLayout = __webpack_require__(
|
|
4053
|
-
var indentedTree = __webpack_require__(
|
|
4054
|
-
var separateTree = __webpack_require__(
|
|
4055
|
-
var util = __webpack_require__(
|
|
862
|
+
var TreeLayout = __webpack_require__(1);
|
|
863
|
+
var indentedTree = __webpack_require__(11);
|
|
864
|
+
var separateTree = __webpack_require__(4);
|
|
865
|
+
var util = __webpack_require__(0);
|
|
4056
866
|
var VALID_DIRECTIONS = ['LR',
|
|
4057
867
|
// left to right
|
|
4058
868
|
'RL',
|
|
4059
869
|
// right to left
|
|
4060
870
|
'H' // horizontal
|
|
4061
871
|
];
|
|
4062
|
-
|
|
4063
872
|
var DEFAULT_DIRECTION = VALID_DIRECTIONS[0];
|
|
4064
873
|
var IndentedLayout = /*#__PURE__*/function (_TreeLayout) {
|
|
4065
|
-
_inheritsLoose(IndentedLayout, _TreeLayout);
|
|
4066
874
|
function IndentedLayout() {
|
|
4067
875
|
return _TreeLayout.apply(this, arguments) || this;
|
|
4068
876
|
}
|
|
877
|
+
_inheritsLoose(IndentedLayout, _TreeLayout);
|
|
4069
878
|
var _proto = IndentedLayout.prototype;
|
|
4070
879
|
_proto.execute = function execute() {
|
|
4071
880
|
var me = this;
|
|
@@ -4115,13 +924,13 @@ function indentedLayout(root, options) {
|
|
|
4115
924
|
module.exports = indentedLayout;
|
|
4116
925
|
|
|
4117
926
|
/***/ }),
|
|
4118
|
-
/*
|
|
927
|
+
/* 11 */
|
|
4119
928
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4120
929
|
|
|
4121
|
-
var util = __webpack_require__(
|
|
930
|
+
var util = __webpack_require__(0);
|
|
4122
931
|
function positionNode(node, previousNode, indent, dropCap, align) {
|
|
4123
932
|
// caculate the node's horizontal offset DX, dx's type might be number or function
|
|
4124
|
-
var displacementX = typeof indent ===
|
|
933
|
+
var displacementX = typeof indent === "function" ? indent(node) : indent * node.depth;
|
|
4125
934
|
if (!dropCap) {
|
|
4126
935
|
try {
|
|
4127
936
|
if (node.id === node.parent.children[0].id) {
|
|
@@ -4135,18 +944,12 @@ function positionNode(node, previousNode, indent, dropCap, align) {
|
|
|
4135
944
|
}
|
|
4136
945
|
node.x += displacementX;
|
|
4137
946
|
if (previousNode) {
|
|
4138
|
-
var _previousNode$parent;
|
|
4139
947
|
node.y = previousNode.y + util.getHeight(previousNode, node, align);
|
|
4140
|
-
if (node.parent.id !==
|
|
948
|
+
if (previousNode.parent && node.parent.id !== previousNode.parent.id) {
|
|
4141
949
|
// previous node has different parent
|
|
4142
|
-
var
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
var preNode = node.parent.children[index - 1];
|
|
4146
|
-
if (preNode) {
|
|
4147
|
-
var preY = preNode.y + util.getHeight(preNode, node, align);
|
|
4148
|
-
node.y = preY > node.y ? preY : node.y;
|
|
4149
|
-
}
|
|
950
|
+
var prevParent = previousNode.parent;
|
|
951
|
+
var preY = prevParent.y + util.getHeight(prevParent, node, align);
|
|
952
|
+
node.y = preY > node.y ? preY : node.y;
|
|
4150
953
|
}
|
|
4151
954
|
} else {
|
|
4152
955
|
node.y = 0;
|
|
@@ -4162,20 +965,20 @@ module.exports = function (root, indent, dropCap, align) {
|
|
|
4162
965
|
};
|
|
4163
966
|
|
|
4164
967
|
/***/ }),
|
|
4165
|
-
/*
|
|
968
|
+
/* 12 */
|
|
4166
969
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4167
970
|
|
|
4168
971
|
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
4169
972
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
4170
|
-
var TreeLayout = __webpack_require__(
|
|
4171
|
-
var mindmap = __webpack_require__(
|
|
4172
|
-
var doTreeLayout = __webpack_require__(
|
|
4173
|
-
var util = __webpack_require__(
|
|
973
|
+
var TreeLayout = __webpack_require__(1);
|
|
974
|
+
var mindmap = __webpack_require__(13);
|
|
975
|
+
var doTreeLayout = __webpack_require__(2);
|
|
976
|
+
var util = __webpack_require__(0);
|
|
4174
977
|
var MindmapLayout = /*#__PURE__*/function (_TreeLayout) {
|
|
4175
|
-
_inheritsLoose(MindmapLayout, _TreeLayout);
|
|
4176
978
|
function MindmapLayout() {
|
|
4177
979
|
return _TreeLayout.apply(this, arguments) || this;
|
|
4178
980
|
}
|
|
981
|
+
_inheritsLoose(MindmapLayout, _TreeLayout);
|
|
4179
982
|
var _proto = MindmapLayout.prototype;
|
|
4180
983
|
_proto.execute = function execute() {
|
|
4181
984
|
var me = this;
|
|
@@ -4191,10 +994,10 @@ function mindmapLayout(root, options) {
|
|
|
4191
994
|
module.exports = mindmapLayout;
|
|
4192
995
|
|
|
4193
996
|
/***/ }),
|
|
4194
|
-
/*
|
|
997
|
+
/* 13 */
|
|
4195
998
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4196
999
|
|
|
4197
|
-
var util = __webpack_require__(
|
|
1000
|
+
var util = __webpack_require__(0);
|
|
4198
1001
|
function secondWalk(node, options) {
|
|
4199
1002
|
var totalHeight = 0;
|
|
4200
1003
|
if (!node.children.length) {
|
|
@@ -4257,7 +1060,6 @@ module.exports = function (root, options) {
|
|
|
4257
1060
|
root.BFTraverse(function (node) {
|
|
4258
1061
|
node.x = node.parent.x + node.parent.width; // simply get x
|
|
4259
1062
|
});
|
|
4260
|
-
|
|
4261
1063
|
root.parent = null;
|
|
4262
1064
|
// second walk
|
|
4263
1065
|
secondWalk(root, options); // assign sub tree totalHeight
|