@tarojs/taro 2.2.17 → 2.2.19

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/dist/index.js CHANGED
@@ -2,28 +2,41 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ function ownKeys(object, enumerableOnly) {
6
+ var keys = Object.keys(object);
7
+ if (Object.getOwnPropertySymbols) {
8
+ var symbols = Object.getOwnPropertySymbols(object);
9
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
10
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
11
+ })), keys.push.apply(keys, symbols);
12
+ }
13
+ return keys;
14
+ }
15
+ function _objectSpread2(target) {
16
+ for (var i = 1; i < arguments.length; i++) {
17
+ var source = null != arguments[i] ? arguments[i] : {};
18
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
19
+ _defineProperty(target, key, source[key]);
20
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
21
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
22
+ });
23
+ }
24
+ return target;
25
+ }
5
26
  function _typeof(obj) {
6
27
  "@babel/helpers - typeof";
7
28
 
8
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
9
- _typeof = function (obj) {
10
- return typeof obj;
11
- };
12
- } else {
13
- _typeof = function (obj) {
14
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
15
- };
16
- }
17
-
18
- return _typeof(obj);
29
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
30
+ return typeof obj;
31
+ } : function (obj) {
32
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
33
+ }, _typeof(obj);
19
34
  }
20
-
21
35
  function _classCallCheck(instance, Constructor) {
22
36
  if (!(instance instanceof Constructor)) {
23
37
  throw new TypeError("Cannot call a class as a function");
24
38
  }
25
39
  }
26
-
27
40
  function _defineProperties(target, props) {
28
41
  for (var i = 0; i < props.length; i++) {
29
42
  var descriptor = props[i];
@@ -33,13 +46,14 @@ function _defineProperties(target, props) {
33
46
  Object.defineProperty(target, descriptor.key, descriptor);
34
47
  }
35
48
  }
36
-
37
49
  function _createClass(Constructor, protoProps, staticProps) {
38
50
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
39
51
  if (staticProps) _defineProperties(Constructor, staticProps);
52
+ Object.defineProperty(Constructor, "prototype", {
53
+ writable: false
54
+ });
40
55
  return Constructor;
41
56
  }
42
-
43
57
  function _defineProperty(obj, key, value) {
44
58
  if (key in obj) {
45
59
  Object.defineProperty(obj, key, {
@@ -51,49 +65,12 @@ function _defineProperty(obj, key, value) {
51
65
  } else {
52
66
  obj[key] = value;
53
67
  }
54
-
55
68
  return obj;
56
69
  }
57
-
58
- function ownKeys(object, enumerableOnly) {
59
- var keys = Object.keys(object);
60
-
61
- if (Object.getOwnPropertySymbols) {
62
- var symbols = Object.getOwnPropertySymbols(object);
63
- if (enumerableOnly) symbols = symbols.filter(function (sym) {
64
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
65
- });
66
- keys.push.apply(keys, symbols);
67
- }
68
-
69
- return keys;
70
- }
71
-
72
- function _objectSpread2(target) {
73
- for (var i = 1; i < arguments.length; i++) {
74
- var source = arguments[i] != null ? arguments[i] : {};
75
-
76
- if (i % 2) {
77
- ownKeys(Object(source), true).forEach(function (key) {
78
- _defineProperty(target, key, source[key]);
79
- });
80
- } else if (Object.getOwnPropertyDescriptors) {
81
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
82
- } else {
83
- ownKeys(Object(source)).forEach(function (key) {
84
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
85
- });
86
- }
87
- }
88
-
89
- return target;
90
- }
91
-
92
70
  function _inherits(subClass, superClass) {
93
71
  if (typeof superClass !== "function" && superClass !== null) {
94
72
  throw new TypeError("Super expression must either be null or a function");
95
73
  }
96
-
97
74
  subClass.prototype = Object.create(superClass && superClass.prototype, {
98
75
  constructor: {
99
76
  value: subClass,
@@ -101,30 +78,28 @@ function _inherits(subClass, superClass) {
101
78
  configurable: true
102
79
  }
103
80
  });
81
+ Object.defineProperty(subClass, "prototype", {
82
+ writable: false
83
+ });
104
84
  if (superClass) _setPrototypeOf(subClass, superClass);
105
85
  }
106
-
107
86
  function _getPrototypeOf(o) {
108
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
87
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
109
88
  return o.__proto__ || Object.getPrototypeOf(o);
110
89
  };
111
90
  return _getPrototypeOf(o);
112
91
  }
113
-
114
92
  function _setPrototypeOf(o, p) {
115
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
93
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
116
94
  o.__proto__ = p;
117
95
  return o;
118
96
  };
119
-
120
97
  return _setPrototypeOf(o, p);
121
98
  }
122
-
123
99
  function _isNativeReflectConstruct() {
124
100
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
125
101
  if (Reflect.construct.sham) return false;
126
102
  if (typeof Proxy === "function") return true;
127
-
128
103
  try {
129
104
  Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
130
105
  return true;
@@ -132,10 +107,9 @@ function _isNativeReflectConstruct() {
132
107
  return false;
133
108
  }
134
109
  }
135
-
136
110
  function _construct(Parent, args, Class) {
137
111
  if (_isNativeReflectConstruct()) {
138
- _construct = Reflect.construct;
112
+ _construct = Reflect.construct.bind();
139
113
  } else {
140
114
  _construct = function _construct(Parent, args, Class) {
141
115
  var a = [null];
@@ -146,34 +120,25 @@ function _construct(Parent, args, Class) {
146
120
  return instance;
147
121
  };
148
122
  }
149
-
150
123
  return _construct.apply(null, arguments);
151
124
  }
152
-
153
125
  function _isNativeFunction(fn) {
154
126
  return Function.toString.call(fn).indexOf("[native code]") !== -1;
155
127
  }
156
-
157
128
  function _wrapNativeSuper(Class) {
158
129
  var _cache = typeof Map === "function" ? new Map() : undefined;
159
-
160
130
  _wrapNativeSuper = function _wrapNativeSuper(Class) {
161
131
  if (Class === null || !_isNativeFunction(Class)) return Class;
162
-
163
132
  if (typeof Class !== "function") {
164
133
  throw new TypeError("Super expression must either be null or a function");
165
134
  }
166
-
167
135
  if (typeof _cache !== "undefined") {
168
136
  if (_cache.has(Class)) return _cache.get(Class);
169
-
170
137
  _cache.set(Class, Wrapper);
171
138
  }
172
-
173
139
  function Wrapper() {
174
140
  return _construct(Class, arguments, _getPrototypeOf(this).constructor);
175
141
  }
176
-
177
142
  Wrapper.prototype = Object.create(Class.prototype, {
178
143
  constructor: {
179
144
  value: Wrapper,
@@ -184,57 +149,45 @@ function _wrapNativeSuper(Class) {
184
149
  });
185
150
  return _setPrototypeOf(Wrapper, Class);
186
151
  };
187
-
188
152
  return _wrapNativeSuper(Class);
189
153
  }
190
-
191
154
  function _assertThisInitialized(self) {
192
155
  if (self === void 0) {
193
156
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
194
157
  }
195
-
196
158
  return self;
197
159
  }
198
-
199
160
  function _possibleConstructorReturn(self, call) {
200
161
  if (call && (typeof call === "object" || typeof call === "function")) {
201
162
  return call;
163
+ } else if (call !== void 0) {
164
+ throw new TypeError("Derived constructors may only return object or undefined");
202
165
  }
203
-
204
166
  return _assertThisInitialized(self);
205
167
  }
206
-
207
168
  function _createSuper(Derived) {
208
169
  var hasNativeReflectConstruct = _isNativeReflectConstruct();
209
-
210
170
  return function _createSuperInternal() {
211
171
  var Super = _getPrototypeOf(Derived),
212
- result;
213
-
172
+ result;
214
173
  if (hasNativeReflectConstruct) {
215
174
  var NewTarget = _getPrototypeOf(this).constructor;
216
-
217
175
  result = Reflect.construct(Super, arguments, NewTarget);
218
176
  } else {
219
177
  result = Super.apply(this, arguments);
220
178
  }
221
-
222
179
  return _possibleConstructorReturn(this, result);
223
180
  };
224
181
  }
225
-
226
182
  function _toConsumableArray(arr) {
227
183
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
228
184
  }
229
-
230
185
  function _arrayWithoutHoles(arr) {
231
186
  if (Array.isArray(arr)) return _arrayLikeToArray(arr);
232
187
  }
233
-
234
188
  function _iterableToArray(iter) {
235
- if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
189
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
236
190
  }
237
-
238
191
  function _unsupportedIterableToArray(o, minLen) {
239
192
  if (!o) return;
240
193
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
@@ -243,15 +196,11 @@ function _unsupportedIterableToArray(o, minLen) {
243
196
  if (n === "Map" || n === "Set") return Array.from(o);
244
197
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
245
198
  }
246
-
247
199
  function _arrayLikeToArray(arr, len) {
248
200
  if (len == null || len > arr.length) len = arr.length;
249
-
250
201
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
251
-
252
202
  return arr2;
253
203
  }
254
-
255
204
  function _nonIterableSpread() {
256
205
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
257
206
  }
@@ -264,12 +213,9 @@ if (typeof Object.assign !== 'function') {
264
213
  // TypeError if undefined or null
265
214
  throw new TypeError('Cannot convert undefined or null to object');
266
215
  }
267
-
268
216
  var to = Object(target);
269
-
270
217
  for (var index = 1; index < arguments.length; index++) {
271
218
  var nextSource = arguments[index];
272
-
273
219
  if (nextSource != null) {
274
220
  // Skip over if undefined or null
275
221
  for (var nextKey in nextSource) {
@@ -280,90 +226,69 @@ if (typeof Object.assign !== 'function') {
280
226
  }
281
227
  }
282
228
  }
283
-
284
229
  return to;
285
230
  };
286
231
  }
287
-
288
232
  if (typeof Object.defineProperties !== 'function') {
289
233
  Object.defineProperties = function (obj, properties) {
290
234
  function convertToDescriptor(desc) {
291
235
  function hasProperty(obj, prop) {
292
236
  return Object.prototype.hasOwnProperty.call(obj, prop);
293
237
  }
294
-
295
238
  function isCallable(v) {
296
239
  // NB: modify as necessary if other values than functions are callable.
297
240
  return typeof v === 'function';
298
241
  }
299
-
300
242
  if (_typeof(desc) !== 'object' || desc === null) {
301
243
  throw new TypeError('bad desc');
302
244
  }
303
-
304
245
  var d = {};
305
246
  if (hasProperty(desc, 'enumerable')) d.enumerable = !!desc.enumerable;
306
-
307
247
  if (hasProperty(desc, 'configurable')) {
308
248
  d.configurable = !!desc.configurable;
309
249
  }
310
-
311
250
  if (hasProperty(desc, 'value')) d.value = desc.value;
312
251
  if (hasProperty(desc, 'writable')) d.writable = !!desc.writable;
313
-
314
252
  if (hasProperty(desc, 'get')) {
315
253
  var g = desc.get;
316
-
317
254
  if (!isCallable(g) && typeof g !== 'undefined') {
318
255
  throw new TypeError('bad get');
319
256
  }
320
-
321
257
  d.get = g;
322
258
  }
323
-
324
259
  if (hasProperty(desc, 'set')) {
325
260
  var s = desc.set;
326
-
327
261
  if (!isCallable(s) && typeof s !== 'undefined') {
328
262
  throw new TypeError('bad set');
329
263
  }
330
-
331
264
  d.set = s;
332
265
  }
333
-
334
266
  if (('get' in d || 'set' in d) && ('value' in d || 'writable' in d)) {
335
267
  throw new TypeError('identity-confused descriptor');
336
268
  }
337
-
338
269
  return d;
339
270
  }
340
-
341
271
  if (_typeof(obj) !== 'object' || obj === null) throw new TypeError('bad obj');
342
272
  properties = Object(properties);
343
273
  var keys = Object.keys(properties);
344
274
  var descs = [];
345
-
346
275
  for (var i = 0; i < keys.length; i++) {
347
276
  descs.push([keys[i], convertToDescriptor(properties[keys[i]])]);
348
277
  }
349
-
350
278
  for (var i = 0; i < descs.length; i++) {
351
279
  Object.defineProperty(obj, descs[i][0], descs[i][1]);
352
280
  }
353
-
354
281
  return obj;
355
282
  };
356
283
  }
357
284
 
358
- var Component = function Component(props) {
285
+ var Component = /*#__PURE__*/_createClass(function Component(props) {
359
286
  _classCallCheck(this, Component);
360
-
361
287
  this.state = {};
362
288
  this.props = props || {};
363
- };
289
+ });
364
290
 
365
291
  /* eslint-disable */
366
-
367
292
  /**
368
293
  * lodash (Custom Build) <https://lodash.com/>
369
294
  * Build: `lodash modularize exports="npm" -o ./`
@@ -374,50 +299,51 @@ var Component = function Component(props) {
374
299
 
375
300
  /** Used as the `TypeError` message for "Functions" methods. */
376
301
  var FUNC_ERROR_TEXT = 'Expected a function';
377
- /** Used to stand-in for `undefined` hash values. */
378
302
 
303
+ /** Used to stand-in for `undefined` hash values. */
379
304
  var HASH_UNDEFINED = '__lodash_hash_undefined__';
380
- /** Used as references for various `Number` constants. */
381
305
 
306
+ /** Used as references for various `Number` constants. */
382
307
  var INFINITY = 1 / 0;
383
- /** `Object#toString` result references. */
384
308
 
309
+ /** `Object#toString` result references. */
385
310
  var funcTag = '[object Function]',
386
- genTag = '[object GeneratorFunction]',
387
- symbolTag = '[object Symbol]';
388
- /** Used to match property names within property paths. */
311
+ genTag = '[object GeneratorFunction]',
312
+ symbolTag = '[object Symbol]';
389
313
 
314
+ /** Used to match property names within property paths. */
390
315
  var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
391
- reIsPlainProp = /^\w*$/,
392
- reLeadingDot = /^\./,
393
- rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
316
+ reIsPlainProp = /^\w*$/,
317
+ reLeadingDot = /^\./,
318
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
319
+
394
320
  /**
395
321
  * Used to match `RegExp`
396
322
  * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
397
323
  */
398
-
399
324
  var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
400
- /** Used to match backslashes in property paths. */
401
325
 
326
+ /** Used to match backslashes in property paths. */
402
327
  var reEscapeChar = /\\(\\)?/g;
403
- /** Used to detect host constructors (Safari). */
404
328
 
329
+ /** Used to detect host constructors (Safari). */
405
330
  var reIsHostCtor = /^\[object .+?Constructor\]$/;
406
- /** Detect free variable `global` from Node.js. */
407
331
 
332
+ /** Detect free variable `global` from Node.js. */
408
333
  var freeGlobal = (typeof global === "undefined" ? "undefined" : _typeof(global)) === 'object' && global && global.Object === Object && global;
409
- /** Detect free variable `self`. */
410
334
 
335
+ /** Detect free variable `self`. */
411
336
  var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof(self)) === 'object' && self && self.Object === Object && self;
412
- /** Used as a reference to the global object. */
413
337
 
338
+ /** Used as a reference to the global object. */
414
339
  var root = freeGlobal || freeSelf || Function('return this')();
415
- /** Used as references for various `Number` constants. */
416
340
 
341
+ /** Used as references for various `Number` constants. */
417
342
  var MAX_SAFE_INTEGER = 9007199254740991;
418
- /** Used to detect unsigned integer values. */
419
343
 
344
+ /** Used to detect unsigned integer values. */
420
345
  var reIsUint = /^(?:0|[1-9]\d*)$/;
346
+
421
347
  /**
422
348
  * Gets the value at `key` of `object`.
423
349
  *
@@ -426,10 +352,10 @@ var reIsUint = /^(?:0|[1-9]\d*)$/;
426
352
  * @param {string} key The key of the property to get.
427
353
  * @returns {*} Returns the property value.
428
354
  */
429
-
430
355
  function getValue(object, key) {
431
356
  return object == null ? undefined : object[key];
432
357
  }
358
+
433
359
  /**
434
360
  * Checks if `value` is a host object in IE < 9.
435
361
  *
@@ -437,65 +363,60 @@ function getValue(object, key) {
437
363
  * @param {*} value The value to check.
438
364
  * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
439
365
  */
440
-
441
-
442
366
  function isHostObject(value) {
443
367
  // Many host objects are `Object` objects that can coerce to strings
444
368
  // despite having improperly defined `toString` methods.
445
369
  var result = false;
446
-
447
370
  if (value != null && typeof value.toString !== 'function') {
448
371
  try {
449
372
  result = !!(value + '');
450
373
  } catch (e) {}
451
374
  }
452
-
453
375
  return result;
454
376
  }
455
- /** Used for built-in method references. */
456
-
457
377
 
378
+ /** Used for built-in method references. */
458
379
  var arrayProto = Array.prototype,
459
- funcProto = Function.prototype,
460
- objectProto = Object.prototype;
461
- /** Used to detect overreaching core-js shims. */
380
+ funcProto = Function.prototype,
381
+ objectProto = Object.prototype;
462
382
 
383
+ /** Used to detect overreaching core-js shims. */
463
384
  var coreJsData = root['__core-js_shared__'];
464
- /** Used to detect methods masquerading as native. */
465
385
 
386
+ /** Used to detect methods masquerading as native. */
466
387
  var maskSrcKey = function () {
467
388
  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
468
389
  return uid ? 'Symbol(src)_1.' + uid : '';
469
390
  }();
470
- /** Used to resolve the decompiled source of functions. */
471
-
472
391
 
392
+ /** Used to resolve the decompiled source of functions. */
473
393
  var funcToString = funcProto.toString;
474
- /** Used to check objects for own properties. */
475
394
 
395
+ /** Used to check objects for own properties. */
476
396
  var hasOwnProperty = objectProto.hasOwnProperty;
397
+
477
398
  /**
478
399
  * Used to resolve the
479
400
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
480
401
  * of values.
481
402
  */
482
-
483
403
  var objectToString = objectProto.toString;
484
- /** Used to detect if a method is native. */
485
404
 
405
+ /** Used to detect if a method is native. */
486
406
  var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
487
- /** Built-in value references. */
488
407
 
408
+ /** Built-in value references. */
489
409
  var _Symbol = root.Symbol,
490
- splice = arrayProto.splice;
491
- /* Built-in method references that are verified to be native. */
410
+ splice = arrayProto.splice;
492
411
 
412
+ /* Built-in method references that are verified to be native. */
493
413
  var Map$1 = getNative(root, 'Map'),
494
- nativeCreate = getNative(Object, 'create');
495
- /** Used to convert symbols to primitives and strings. */
414
+ nativeCreate = getNative(Object, 'create');
496
415
 
416
+ /** Used to convert symbols to primitives and strings. */
497
417
  var symbolProto = _Symbol ? _Symbol.prototype : undefined,
498
- symbolToString = symbolProto ? symbolProto.toString : undefined;
418
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
419
+
499
420
  /**
500
421
  * Creates a hash object.
501
422
  *
@@ -503,17 +424,16 @@ var symbolProto = _Symbol ? _Symbol.prototype : undefined,
503
424
  * @constructor
504
425
  * @param {Array} [entries] The key-value pairs to cache.
505
426
  */
506
-
507
427
  function Hash(entries) {
508
428
  var index = -1,
509
- length = entries ? entries.length : 0;
429
+ length = entries ? entries.length : 0;
510
430
  this.clear();
511
-
512
431
  while (++index < length) {
513
432
  var entry = entries[index];
514
433
  this.set(entry[0], entry[1]);
515
434
  }
516
435
  }
436
+
517
437
  /**
518
438
  * Removes all key-value entries from the hash.
519
439
  *
@@ -521,11 +441,10 @@ function Hash(entries) {
521
441
  * @name clear
522
442
  * @memberOf Hash
523
443
  */
524
-
525
-
526
444
  function hashClear() {
527
445
  this.__data__ = nativeCreate ? nativeCreate(null) : {};
528
446
  }
447
+
529
448
  /**
530
449
  * Removes `key` and its value from the hash.
531
450
  *
@@ -536,11 +455,10 @@ function hashClear() {
536
455
  * @param {string} key The key of the value to remove.
537
456
  * @returns {boolean} Returns `true` if the entry was removed, else `false`.
538
457
  */
539
-
540
-
541
458
  function hashDelete(key) {
542
459
  return this.has(key) && delete this.__data__[key];
543
460
  }
461
+
544
462
  /**
545
463
  * Gets the hash value for `key`.
546
464
  *
@@ -550,18 +468,15 @@ function hashDelete(key) {
550
468
  * @param {string} key The key of the value to get.
551
469
  * @returns {*} Returns the entry value.
552
470
  */
553
-
554
-
555
471
  function hashGet(key) {
556
472
  var data = this.__data__;
557
-
558
473
  if (nativeCreate) {
559
474
  var result = data[key];
560
475
  return result === HASH_UNDEFINED ? undefined : result;
561
476
  }
562
-
563
477
  return hasOwnProperty.call(data, key) ? data[key] : undefined;
564
478
  }
479
+
565
480
  /**
566
481
  * Checks if a hash value for `key` exists.
567
482
  *
@@ -571,12 +486,11 @@ function hashGet(key) {
571
486
  * @param {string} key The key of the entry to check.
572
487
  * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
573
488
  */
574
-
575
-
576
489
  function hashHas(key) {
577
490
  var data = this.__data__;
578
491
  return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
579
492
  }
493
+
580
494
  /**
581
495
  * Sets the hash `key` to `value`.
582
496
  *
@@ -587,20 +501,19 @@ function hashHas(key) {
587
501
  * @param {*} value The value to set.
588
502
  * @returns {Object} Returns the hash instance.
589
503
  */
590
-
591
-
592
504
  function hashSet(key, value) {
593
505
  var data = this.__data__;
594
506
  data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
595
507
  return this;
596
- } // Add methods to `Hash`.
597
-
508
+ }
598
509
 
510
+ // Add methods to `Hash`.
599
511
  Hash.prototype.clear = hashClear;
600
512
  Hash.prototype['delete'] = hashDelete;
601
513
  Hash.prototype.get = hashGet;
602
514
  Hash.prototype.has = hashHas;
603
515
  Hash.prototype.set = hashSet;
516
+
604
517
  /**
605
518
  * Creates an list cache object.
606
519
  *
@@ -608,17 +521,16 @@ Hash.prototype.set = hashSet;
608
521
  * @constructor
609
522
  * @param {Array} [entries] The key-value pairs to cache.
610
523
  */
611
-
612
524
  function ListCache(entries) {
613
525
  var index = -1,
614
- length = entries ? entries.length : 0;
526
+ length = entries ? entries.length : 0;
615
527
  this.clear();
616
-
617
528
  while (++index < length) {
618
529
  var entry = entries[index];
619
530
  this.set(entry[0], entry[1]);
620
531
  }
621
532
  }
533
+
622
534
  /**
623
535
  * Removes all key-value entries from the list cache.
624
536
  *
@@ -626,11 +538,10 @@ function ListCache(entries) {
626
538
  * @name clear
627
539
  * @memberOf ListCache
628
540
  */
629
-
630
-
631
541
  function listCacheClear() {
632
542
  this.__data__ = [];
633
543
  }
544
+
634
545
  /**
635
546
  * Removes `key` and its value from the list cache.
636
547
  *
@@ -640,26 +551,21 @@ function listCacheClear() {
640
551
  * @param {string} key The key of the value to remove.
641
552
  * @returns {boolean} Returns `true` if the entry was removed, else `false`.
642
553
  */
643
-
644
-
645
554
  function listCacheDelete(key) {
646
555
  var data = this.__data__,
647
- index = assocIndexOf(data, key);
648
-
556
+ index = assocIndexOf(data, key);
649
557
  if (index < 0) {
650
558
  return false;
651
559
  }
652
-
653
560
  var lastIndex = data.length - 1;
654
-
655
561
  if (index == lastIndex) {
656
562
  data.pop();
657
563
  } else {
658
564
  splice.call(data, index, 1);
659
565
  }
660
-
661
566
  return true;
662
567
  }
568
+
663
569
  /**
664
570
  * Gets the list cache value for `key`.
665
571
  *
@@ -669,13 +575,12 @@ function listCacheDelete(key) {
669
575
  * @param {string} key The key of the value to get.
670
576
  * @returns {*} Returns the entry value.
671
577
  */
672
-
673
-
674
578
  function listCacheGet(key) {
675
579
  var data = this.__data__,
676
- index = assocIndexOf(data, key);
580
+ index = assocIndexOf(data, key);
677
581
  return index < 0 ? undefined : data[index][1];
678
582
  }
583
+
679
584
  /**
680
585
  * Checks if a list cache value for `key` exists.
681
586
  *
@@ -685,11 +590,10 @@ function listCacheGet(key) {
685
590
  * @param {string} key The key of the entry to check.
686
591
  * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
687
592
  */
688
-
689
-
690
593
  function listCacheHas(key) {
691
594
  return assocIndexOf(this.__data__, key) > -1;
692
595
  }
596
+
693
597
  /**
694
598
  * Sets the list cache `key` to `value`.
695
599
  *
@@ -700,27 +604,24 @@ function listCacheHas(key) {
700
604
  * @param {*} value The value to set.
701
605
  * @returns {Object} Returns the list cache instance.
702
606
  */
703
-
704
-
705
607
  function listCacheSet(key, value) {
706
608
  var data = this.__data__,
707
- index = assocIndexOf(data, key);
708
-
609
+ index = assocIndexOf(data, key);
709
610
  if (index < 0) {
710
611
  data.push([key, value]);
711
612
  } else {
712
613
  data[index][1] = value;
713
614
  }
714
-
715
615
  return this;
716
- } // Add methods to `ListCache`.
717
-
616
+ }
718
617
 
618
+ // Add methods to `ListCache`.
719
619
  ListCache.prototype.clear = listCacheClear;
720
620
  ListCache.prototype['delete'] = listCacheDelete;
721
621
  ListCache.prototype.get = listCacheGet;
722
622
  ListCache.prototype.has = listCacheHas;
723
623
  ListCache.prototype.set = listCacheSet;
624
+
724
625
  /**
725
626
  * Creates a map cache object to store key-value pairs.
726
627
  *
@@ -728,17 +629,16 @@ ListCache.prototype.set = listCacheSet;
728
629
  * @constructor
729
630
  * @param {Array} [entries] The key-value pairs to cache.
730
631
  */
731
-
732
632
  function MapCache(entries) {
733
633
  var index = -1,
734
- length = entries ? entries.length : 0;
634
+ length = entries ? entries.length : 0;
735
635
  this.clear();
736
-
737
636
  while (++index < length) {
738
637
  var entry = entries[index];
739
638
  this.set(entry[0], entry[1]);
740
639
  }
741
640
  }
641
+
742
642
  /**
743
643
  * Removes all key-value entries from the map.
744
644
  *
@@ -746,8 +646,6 @@ function MapCache(entries) {
746
646
  * @name clear
747
647
  * @memberOf MapCache
748
648
  */
749
-
750
-
751
649
  function mapCacheClear() {
752
650
  this.__data__ = {
753
651
  hash: new Hash(),
@@ -755,6 +653,7 @@ function mapCacheClear() {
755
653
  string: new Hash()
756
654
  };
757
655
  }
656
+
758
657
  /**
759
658
  * Removes `key` and its value from the map.
760
659
  *
@@ -764,11 +663,10 @@ function mapCacheClear() {
764
663
  * @param {string} key The key of the value to remove.
765
664
  * @returns {boolean} Returns `true` if the entry was removed, else `false`.
766
665
  */
767
-
768
-
769
666
  function mapCacheDelete(key) {
770
667
  return getMapData(this, key)['delete'](key);
771
668
  }
669
+
772
670
  /**
773
671
  * Gets the map value for `key`.
774
672
  *
@@ -778,11 +676,10 @@ function mapCacheDelete(key) {
778
676
  * @param {string} key The key of the value to get.
779
677
  * @returns {*} Returns the entry value.
780
678
  */
781
-
782
-
783
679
  function mapCacheGet(key) {
784
680
  return getMapData(this, key).get(key);
785
681
  }
682
+
786
683
  /**
787
684
  * Checks if a map value for `key` exists.
788
685
  *
@@ -792,11 +689,10 @@ function mapCacheGet(key) {
792
689
  * @param {string} key The key of the entry to check.
793
690
  * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
794
691
  */
795
-
796
-
797
692
  function mapCacheHas(key) {
798
693
  return getMapData(this, key).has(key);
799
694
  }
695
+
800
696
  /**
801
697
  * Sets the map `key` to `value`.
802
698
  *
@@ -807,19 +703,18 @@ function mapCacheHas(key) {
807
703
  * @param {*} value The value to set.
808
704
  * @returns {Object} Returns the map cache instance.
809
705
  */
810
-
811
-
812
706
  function mapCacheSet(key, value) {
813
707
  getMapData(this, key).set(key, value);
814
708
  return this;
815
- } // Add methods to `MapCache`.
816
-
709
+ }
817
710
 
711
+ // Add methods to `MapCache`.
818
712
  MapCache.prototype.clear = mapCacheClear;
819
713
  MapCache.prototype['delete'] = mapCacheDelete;
820
714
  MapCache.prototype.get = mapCacheGet;
821
715
  MapCache.prototype.has = mapCacheHas;
822
716
  MapCache.prototype.set = mapCacheSet;
717
+
823
718
  /**
824
719
  * Gets the index at which the `key` is found in `array` of key-value pairs.
825
720
  *
@@ -828,18 +723,16 @@ MapCache.prototype.set = mapCacheSet;
828
723
  * @param {*} key The key to search for.
829
724
  * @returns {number} Returns the index of the matched value, else `-1`.
830
725
  */
831
-
832
726
  function assocIndexOf(array, key) {
833
727
  var length = array.length;
834
-
835
728
  while (length--) {
836
729
  if (eq(array[length][0], key)) {
837
730
  return length;
838
731
  }
839
732
  }
840
-
841
733
  return -1;
842
734
  }
735
+
843
736
  /**
844
737
  * The base implementation of `_.get` without support for default values.
845
738
  *
@@ -848,19 +741,16 @@ function assocIndexOf(array, key) {
848
741
  * @param {Array|string} path The path of the property to get.
849
742
  * @returns {*} Returns the resolved value.
850
743
  */
851
-
852
-
853
744
  function baseGet(object, path) {
854
745
  path = isKey(path, object) ? [path] : castPath(path);
855
746
  var index = 0,
856
- length = path.length;
857
-
747
+ length = path.length;
858
748
  while (object != null && index < length) {
859
749
  object = object[toKey(path[index++])];
860
750
  }
861
-
862
751
  return index && index == length ? object : undefined;
863
752
  }
753
+
864
754
  /**
865
755
  * The base implementation of `_.isNative` without bad shim checks.
866
756
  *
@@ -869,15 +759,14 @@ function baseGet(object, path) {
869
759
  * @returns {boolean} Returns `true` if `value` is a native function,
870
760
  * else `false`.
871
761
  */
872
-
873
762
  function baseIsNative(value) {
874
763
  if (!isObject(value) || isMasked(value)) {
875
764
  return false;
876
765
  }
877
-
878
766
  var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
879
767
  return pattern.test(toSource(value));
880
768
  }
769
+
881
770
  /**
882
771
  * The base implementation of `_.toString` which doesn't convert nullish
883
772
  * values to empty strings.
@@ -886,21 +775,18 @@ function baseIsNative(value) {
886
775
  * @param {*} value The value to process.
887
776
  * @returns {string} Returns the string.
888
777
  */
889
-
890
-
891
778
  function baseToString(value) {
892
779
  // Exit early for strings to avoid a performance hit in some environments.
893
780
  if (typeof value === 'string') {
894
781
  return value;
895
782
  }
896
-
897
783
  if (isSymbol(value)) {
898
784
  return symbolToString ? symbolToString.call(value) : '';
899
785
  }
900
-
901
786
  var result = value + '';
902
787
  return result == '0' && 1 / value == -INFINITY ? '-0' : result;
903
788
  }
789
+
904
790
  /**
905
791
  * Casts `value` to a path array if it's not one.
906
792
  *
@@ -908,11 +794,10 @@ function baseToString(value) {
908
794
  * @param {*} value The value to inspect.
909
795
  * @returns {Array} Returns the cast property path array.
910
796
  */
911
-
912
-
913
797
  function castPath(value) {
914
798
  return isArray(value) ? value : stringToPath(value);
915
799
  }
800
+
916
801
  /**
917
802
  * Gets the data for `map`.
918
803
  *
@@ -921,12 +806,11 @@ function castPath(value) {
921
806
  * @param {string} key The reference key.
922
807
  * @returns {*} Returns the map data.
923
808
  */
924
-
925
-
926
809
  function getMapData(map, key) {
927
810
  var data = map.__data__;
928
811
  return isKeyable(key) ? data[typeof key === 'string' ? 'string' : 'hash'] : data.map;
929
812
  }
813
+
930
814
  /**
931
815
  * Gets the native function at `key` of `object`.
932
816
  *
@@ -935,12 +819,11 @@ function getMapData(map, key) {
935
819
  * @param {string} key The key of the method to get.
936
820
  * @returns {*} Returns the function if it's native, else `undefined`.
937
821
  */
938
-
939
-
940
822
  function getNative(object, key) {
941
823
  var value = getValue(object, key);
942
824
  return baseIsNative(value) ? value : undefined;
943
825
  }
826
+
944
827
  /**
945
828
  * Checks if `value` is a property name and not a property path.
946
829
  *
@@ -949,21 +832,17 @@ function getNative(object, key) {
949
832
  * @param {Object} [object] The object to query keys on.
950
833
  * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
951
834
  */
952
-
953
-
954
835
  function isKey(value, object) {
955
836
  if (isArray(value)) {
956
837
  return false;
957
838
  }
958
-
959
839
  var type = _typeof(value);
960
-
961
840
  if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) {
962
841
  return true;
963
842
  }
964
-
965
843
  return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
966
844
  }
845
+
967
846
  /**
968
847
  * Checks if `value` is suitable for use as unique object key.
969
848
  *
@@ -971,13 +850,11 @@ function isKey(value, object) {
971
850
  * @param {*} value The value to check.
972
851
  * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
973
852
  */
974
-
975
-
976
853
  function isKeyable(value) {
977
854
  var type = _typeof(value);
978
-
979
855
  return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
980
856
  }
857
+
981
858
  /**
982
859
  * Checks if `func` has its source masked.
983
860
  *
@@ -985,11 +862,10 @@ function isKeyable(value) {
985
862
  * @param {Function} func The function to check.
986
863
  * @returns {boolean} Returns `true` if `func` is masked, else `false`.
987
864
  */
988
-
989
-
990
865
  function isMasked(func) {
991
866
  return !!maskSrcKey && maskSrcKey in func;
992
867
  }
868
+
993
869
  /**
994
870
  * Converts `string` to a property path array.
995
871
  *
@@ -997,21 +873,18 @@ function isMasked(func) {
997
873
  * @param {string} string The string to convert.
998
874
  * @returns {Array} Returns the property path array.
999
875
  */
1000
-
1001
-
1002
876
  var stringToPath = memoize(function (string) {
1003
877
  string = toString(string);
1004
878
  var result = [];
1005
-
1006
879
  if (reLeadingDot.test(string)) {
1007
880
  result.push('');
1008
881
  }
1009
-
1010
882
  string.replace(rePropName, function (match, number, quote, string) {
1011
883
  result.push(quote ? string.replace(reEscapeChar, '$1') : number || match);
1012
884
  });
1013
885
  return result;
1014
886
  });
887
+
1015
888
  /**
1016
889
  * Converts `value` to a string key if it's not a string or symbol.
1017
890
  *
@@ -1019,15 +892,14 @@ var stringToPath = memoize(function (string) {
1019
892
  * @param {*} value The value to inspect.
1020
893
  * @returns {string|symbol} Returns the key.
1021
894
  */
1022
-
1023
895
  function toKey(value) {
1024
896
  if (typeof value === 'string' || isSymbol(value)) {
1025
897
  return value;
1026
898
  }
1027
-
1028
899
  var result = value + '';
1029
900
  return result == '0' && 1 / value == -INFINITY ? '-0' : result;
1030
901
  }
902
+
1031
903
  /**
1032
904
  * Converts `func` to its source code.
1033
905
  *
@@ -1035,21 +907,18 @@ function toKey(value) {
1035
907
  * @param {Function} func The function to process.
1036
908
  * @returns {string} Returns the source code.
1037
909
  */
1038
-
1039
-
1040
910
  function toSource(func) {
1041
911
  if (func != null) {
1042
912
  try {
1043
913
  return funcToString.call(func);
1044
914
  } catch (e) {}
1045
-
1046
915
  try {
1047
916
  return func + '';
1048
917
  } catch (e) {}
1049
918
  }
1050
-
1051
919
  return '';
1052
920
  }
921
+
1053
922
  /**
1054
923
  * Creates a function that memoizes the result of `func`. If `resolver` is
1055
924
  * provided, it determines the cache key for storing the result based on the
@@ -1094,33 +963,28 @@ function toSource(func) {
1094
963
  * // Replace `_.memoize.Cache`.
1095
964
  * _.memoize.Cache = WeakMap;
1096
965
  */
1097
-
1098
-
1099
966
  function memoize(func, resolver) {
1100
967
  if (typeof func !== 'function' || resolver && typeof resolver !== 'function') {
1101
968
  throw new TypeError(FUNC_ERROR_TEXT);
1102
969
  }
1103
-
1104
970
  var memoized = function memoized() {
1105
971
  var args = arguments,
1106
- key = resolver ? resolver.apply(this, args) : args[0],
1107
- cache = memoized.cache;
1108
-
972
+ key = resolver ? resolver.apply(this, args) : args[0],
973
+ cache = memoized.cache;
1109
974
  if (cache.has(key)) {
1110
975
  return cache.get(key);
1111
976
  }
1112
-
1113
977
  var result = func.apply(this, args);
1114
978
  memoized.cache = cache.set(key, result);
1115
979
  return result;
1116
980
  };
1117
-
1118
981
  memoized.cache = new (memoize.Cache || MapCache)();
1119
982
  return memoized;
1120
- } // Assign cache to `_.memoize`.
1121
-
983
+ }
1122
984
 
985
+ // Assign cache to `_.memoize`.
1123
986
  memoize.Cache = MapCache;
987
+
1124
988
  /**
1125
989
  * Performs a
1126
990
  * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
@@ -1153,10 +1017,10 @@ memoize.Cache = MapCache;
1153
1017
  * _.eq(NaN, NaN);
1154
1018
  * // => true
1155
1019
  */
1156
-
1157
1020
  function eq(value, other) {
1158
1021
  return value === other || value !== value && other !== other;
1159
1022
  }
1023
+
1160
1024
  /**
1161
1025
  * Checks if `value` is classified as an `Array` object.
1162
1026
  *
@@ -1180,9 +1044,8 @@ function eq(value, other) {
1180
1044
  * _.isArray(_.noop);
1181
1045
  * // => false
1182
1046
  */
1183
-
1184
-
1185
1047
  var isArray = Array.isArray;
1048
+
1186
1049
  /**
1187
1050
  * Checks if `value` is classified as a `Function` object.
1188
1051
  *
@@ -1200,13 +1063,13 @@ var isArray = Array.isArray;
1200
1063
  * _.isFunction(/abc/);
1201
1064
  * // => false
1202
1065
  */
1203
-
1204
1066
  function isFunction(value) {
1205
1067
  // The use of `Object#toString` avoids issues with the `typeof` operator
1206
1068
  // in Safari 8-9 which returns 'object' for typed array and other constructors.
1207
1069
  var tag = isObject(value) ? objectToString.call(value) : '';
1208
1070
  return tag == funcTag || tag == genTag;
1209
1071
  }
1072
+
1210
1073
  /**
1211
1074
  * Checks if `value` is the
1212
1075
  * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
@@ -1232,13 +1095,11 @@ function isFunction(value) {
1232
1095
  * _.isObject(null);
1233
1096
  * // => false
1234
1097
  */
1235
-
1236
-
1237
1098
  function isObject(value) {
1238
1099
  var type = _typeof(value);
1239
-
1240
1100
  return !!value && (type == 'object' || type == 'function');
1241
1101
  }
1102
+
1242
1103
  /**
1243
1104
  * Checks if `value` is object-like. A value is object-like if it's not `null`
1244
1105
  * and has a `typeof` result of "object".
@@ -1263,11 +1124,10 @@ function isObject(value) {
1263
1124
  * _.isObjectLike(null);
1264
1125
  * // => false
1265
1126
  */
1266
-
1267
-
1268
1127
  function isObjectLike(value) {
1269
1128
  return !!value && _typeof(value) === 'object';
1270
1129
  }
1130
+
1271
1131
  /**
1272
1132
  * Checks if `value` is classified as a `Symbol` primitive or object.
1273
1133
  *
@@ -1285,11 +1145,10 @@ function isObjectLike(value) {
1285
1145
  * _.isSymbol('abc');
1286
1146
  * // => false
1287
1147
  */
1288
-
1289
-
1290
1148
  function isSymbol(value) {
1291
1149
  return _typeof(value) === 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag;
1292
1150
  }
1151
+
1293
1152
  /**
1294
1153
  * Converts `value` to a string. An empty string is returned for `null`
1295
1154
  * and `undefined` values. The sign of `-0` is preserved.
@@ -1311,11 +1170,10 @@ function isSymbol(value) {
1311
1170
  * _.toString([1, 2, 3]);
1312
1171
  * // => '1,2,3'
1313
1172
  */
1314
-
1315
-
1316
1173
  function toString(value) {
1317
1174
  return value == null ? '' : baseToString(value);
1318
1175
  }
1176
+
1319
1177
  /**
1320
1178
  * Checks if `value` is a valid array-like index.
1321
1179
  *
@@ -1324,14 +1182,12 @@ function toString(value) {
1324
1182
  * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
1325
1183
  * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
1326
1184
  */
1327
-
1328
-
1329
1185
  function isIndex(value, length) {
1330
1186
  var type = _typeof(value);
1331
-
1332
1187
  length = length == null ? MAX_SAFE_INTEGER : length;
1333
1188
  return !!length && (type == 'number' || type != 'symbol' && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
1334
1189
  }
1190
+
1335
1191
  /**
1336
1192
  * The base implementation of `assignValue` and `assignMergeValue` without
1337
1193
  * value checks.
@@ -1341,8 +1197,6 @@ function isIndex(value, length) {
1341
1197
  * @param {string} key The key of the property to assign.
1342
1198
  * @param {*} value The value to assign.
1343
1199
  */
1344
-
1345
-
1346
1200
  function baseAssignValue(object, key, value) {
1347
1201
  if (key == '__proto__') {
1348
1202
  Object.defineProperty(object, key, {
@@ -1355,10 +1209,10 @@ function baseAssignValue(object, key, value) {
1355
1209
  object[key] = value;
1356
1210
  }
1357
1211
  }
1358
- /** Used to check objects for own properties. */
1359
-
1360
1212
 
1213
+ /** Used to check objects for own properties. */
1361
1214
  var hasOwnProperty = Object.prototype.hasOwnProperty;
1215
+
1362
1216
  /**
1363
1217
  * Assigns `value` to `key` of `object` if the existing value is not equivalent
1364
1218
  * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
@@ -1369,14 +1223,13 @@ var hasOwnProperty = Object.prototype.hasOwnProperty;
1369
1223
  * @param {string} key The key of the property to assign.
1370
1224
  * @param {*} value The value to assign.
1371
1225
  */
1372
-
1373
1226
  function assignValue(object, key, value) {
1374
1227
  var objValue = object[key];
1375
-
1376
1228
  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) {
1377
1229
  baseAssignValue(object, key, value);
1378
1230
  }
1379
1231
  }
1232
+
1380
1233
  /**
1381
1234
  * The base implementation of `set`.
1382
1235
  *
@@ -1387,36 +1240,28 @@ function assignValue(object, key, value) {
1387
1240
  * @param {Function} [customizer] The function to customize path creation.
1388
1241
  * @returns {Object} Returns `object`.
1389
1242
  */
1390
-
1391
-
1392
1243
  function baseSet(object, path, value, customizer) {
1393
1244
  if (!isObject(object)) {
1394
1245
  return object;
1395
1246
  }
1396
-
1397
1247
  path = castPath(path, object);
1398
1248
  var length = path.length;
1399
1249
  var lastIndex = length - 1;
1400
1250
  var index = -1;
1401
1251
  var nested = object;
1402
-
1403
1252
  while (nested != null && ++index < length) {
1404
1253
  var key = toKey(path[index]);
1405
1254
  var newValue = value;
1406
-
1407
1255
  if (index != lastIndex) {
1408
1256
  var objValue = nested[key];
1409
1257
  newValue = customizer ? customizer(objValue, key, nested) : undefined;
1410
-
1411
1258
  if (newValue === undefined) {
1412
1259
  newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
1413
1260
  }
1414
1261
  }
1415
-
1416
1262
  assignValue(nested, key, newValue);
1417
1263
  nested = nested[key];
1418
1264
  }
1419
-
1420
1265
  return object;
1421
1266
  }
1422
1267
 
@@ -1445,7 +1290,6 @@ function baseSet(object, path, value, customizer) {
1445
1290
  * _.get(object, 'a.b.c', 'default');
1446
1291
  * // => 'default'
1447
1292
  */
1448
-
1449
1293
  function get(object, path, defaultValue) {
1450
1294
  var result = object == null ? undefined : baseGet(object, path);
1451
1295
  return result === undefined ? defaultValue : result;
@@ -1478,42 +1322,33 @@ function get(object, path, defaultValue) {
1478
1322
  * console.log(object.x[0].y.z)
1479
1323
  * // => 5
1480
1324
  */
1481
-
1482
1325
  function set$1(object, path, value) {
1483
1326
  return object == null ? object : baseSet(object, path, value);
1484
1327
  }
1485
1328
 
1486
1329
  var upperCasePattern = /([A-Z])/g;
1487
-
1488
1330
  function dashify(str) {
1489
1331
  return str.replace(upperCasePattern, dashLower);
1490
1332
  }
1491
-
1492
1333
  function dashLower(c) {
1493
1334
  return '-' + c.toLowerCase();
1494
1335
  }
1495
-
1496
1336
  function isObject$1(val) {
1497
1337
  return val != null && _typeof(val) === 'object' && Array.isArray(val) === false;
1498
1338
  }
1499
-
1500
1339
  function inlineStyle(obj) {
1501
1340
  if (obj == null) {
1502
1341
  return '';
1503
1342
  }
1504
-
1505
1343
  if (typeof obj === 'string') {
1506
1344
  return obj;
1507
1345
  }
1508
-
1509
1346
  if (obj === null || obj === undefined) {
1510
1347
  return '';
1511
1348
  }
1512
-
1513
1349
  if (!isObject$1(obj)) {
1514
1350
  throw new TypeError('style 只能是一个对象或字符串。');
1515
1351
  }
1516
-
1517
1352
  return Object.keys(obj).map(function (key) {
1518
1353
  return dashify(key).concat(':').concat(obj[key]);
1519
1354
  }).join(';');
@@ -1530,99 +1365,82 @@ var ENV_TYPE = {
1530
1365
  QQ: 'QQ',
1531
1366
  JD: 'JD'
1532
1367
  };
1533
- var _env = null; // 一个taro项目肯定运行同样的环境
1368
+ var _env = null;
1534
1369
 
1370
+ // 一个taro项目肯定运行同样的环境
1535
1371
  function getEnv() {
1536
1372
  if (_env) return _env;
1537
-
1538
1373
  if (typeof jd !== 'undefined' && jd.getSystemInfo) {
1539
1374
  _env = ENV_TYPE.JD;
1540
1375
  return ENV_TYPE.JD;
1541
1376
  }
1542
-
1543
1377
  if (typeof qq !== 'undefined' && qq.getSystemInfo) {
1544
1378
  _env = ENV_TYPE.QQ;
1545
1379
  return ENV_TYPE.QQ;
1546
1380
  }
1547
-
1548
1381
  if (typeof tt !== 'undefined' && tt.getSystemInfo) {
1549
1382
  _env = ENV_TYPE.TT;
1550
1383
  return ENV_TYPE.TT;
1551
1384
  }
1552
-
1553
1385
  if (typeof wx !== 'undefined' && wx.getSystemInfo) {
1554
1386
  _env = ENV_TYPE.WEAPP;
1555
1387
  return ENV_TYPE.WEAPP;
1556
1388
  }
1557
-
1558
1389
  if (typeof swan !== 'undefined' && swan.getSystemInfo) {
1559
1390
  _env = ENV_TYPE.SWAN;
1560
1391
  return ENV_TYPE.SWAN;
1561
1392
  }
1562
-
1563
1393
  if (typeof my !== 'undefined' && my.getSystemInfo) {
1564
1394
  _env = ENV_TYPE.ALIPAY;
1565
1395
  return ENV_TYPE.ALIPAY;
1566
1396
  }
1567
-
1568
1397
  if (typeof global !== 'undefined' && global.__fbGenNativeModule) {
1569
1398
  _env = ENV_TYPE.RN;
1570
1399
  return ENV_TYPE.RN;
1571
1400
  }
1572
-
1573
1401
  if (typeof global !== 'undefined' && global.getManifestField) {
1574
1402
  _env = ENV_TYPE.QUICKAPP;
1575
1403
  return ENV_TYPE.QUICKAPP;
1576
1404
  }
1577
-
1578
1405
  if (typeof window !== 'undefined') {
1579
1406
  _env = ENV_TYPE.WEB;
1580
1407
  return ENV_TYPE.WEB;
1581
1408
  }
1582
-
1583
1409
  return 'Unknown environment';
1584
1410
  }
1585
1411
 
1586
1412
  function isObject$2(arg) {
1587
1413
  return arg === Object(arg) && typeof arg !== 'function';
1588
1414
  }
1589
-
1590
1415
  var env = null;
1591
1416
  function getOriginal(item) {
1592
1417
  if (env === null) {
1593
1418
  env = getEnv();
1594
1419
  }
1595
-
1596
1420
  if (isObject$2(item)) {
1597
1421
  return item[env === ENV_TYPE.SWAN ? 'privateOriginal' : '$original'] || item;
1598
1422
  }
1599
-
1600
1423
  return item;
1601
1424
  }
1602
1425
 
1603
1426
  var Events = /*#__PURE__*/function () {
1604
1427
  function Events(opts) {
1605
1428
  _classCallCheck(this, Events);
1606
-
1607
1429
  if (typeof opts !== 'undefined' && opts.callbacks) {
1608
1430
  this.callbacks = opts.callbacks;
1609
1431
  } else {
1610
1432
  this.callbacks = {};
1611
1433
  }
1612
1434
  }
1613
-
1614
1435
  _createClass(Events, [{
1615
1436
  key: "on",
1616
1437
  value: function on(events, callback, context) {
1617
1438
  var calls, event, node, tail, list;
1618
-
1619
1439
  if (!callback) {
1620
1440
  return this;
1621
1441
  }
1622
-
1623
1442
  events = events.split(Events.eventSplitter);
1624
1443
  calls = this.callbacks;
1625
-
1626
1444
  while (event = events.shift()) {
1627
1445
  list = calls[event];
1628
1446
  node = list ? list.tail : {};
@@ -1634,24 +1452,19 @@ var Events = /*#__PURE__*/function () {
1634
1452
  next: list ? list.next : node
1635
1453
  };
1636
1454
  }
1637
-
1638
1455
  return this;
1639
1456
  }
1640
1457
  }, {
1641
1458
  key: "once",
1642
1459
  value: function once(events, callback, context) {
1643
1460
  var _this = this;
1644
-
1645
1461
  var wrapper = function wrapper() {
1646
1462
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1647
1463
  args[_key] = arguments[_key];
1648
1464
  }
1649
-
1650
1465
  callback.apply(_this, args);
1651
-
1652
1466
  _this.off(events, wrapper, context);
1653
1467
  };
1654
-
1655
1468
  this.on(events, wrapper, context);
1656
1469
  return this;
1657
1470
  }
@@ -1659,69 +1472,53 @@ var Events = /*#__PURE__*/function () {
1659
1472
  key: "off",
1660
1473
  value: function off(events, callback, context) {
1661
1474
  var event, calls, node, tail, cb, ctx;
1662
-
1663
1475
  if (!(calls = this.callbacks)) {
1664
1476
  return this;
1665
1477
  }
1666
-
1667
1478
  if (!(events || callback || context)) {
1668
1479
  delete this.callbacks;
1669
1480
  return this;
1670
1481
  }
1671
-
1672
1482
  events = events ? events.split(Events.eventSplitter) : Object.keys(calls);
1673
-
1674
1483
  while (event = events.shift()) {
1675
1484
  node = calls[event];
1676
1485
  delete calls[event];
1677
-
1678
1486
  if (!node || !(callback || context)) {
1679
1487
  continue;
1680
1488
  }
1681
-
1682
1489
  tail = node.tail;
1683
-
1684
1490
  while ((node = node.next) !== tail) {
1685
1491
  cb = node.callback;
1686
1492
  ctx = node.context;
1687
-
1688
1493
  if (callback && cb !== callback || context && ctx !== context) {
1689
1494
  this.on(event, cb, ctx);
1690
1495
  }
1691
1496
  }
1692
1497
  }
1693
-
1694
1498
  return this;
1695
1499
  }
1696
1500
  }, {
1697
1501
  key: "trigger",
1698
1502
  value: function trigger(events) {
1699
1503
  var event, node, calls, tail, rest;
1700
-
1701
1504
  if (!(calls = this.callbacks)) {
1702
1505
  return this;
1703
1506
  }
1704
-
1705
1507
  events = events.split(Events.eventSplitter);
1706
1508
  rest = [].slice.call(arguments, 1);
1707
-
1708
1509
  while (event = events.shift()) {
1709
1510
  if (node = calls[event]) {
1710
1511
  tail = node.tail;
1711
-
1712
1512
  while ((node = node.next) !== tail) {
1713
1513
  node.callback.apply(node.context || this, rest);
1714
1514
  }
1715
1515
  }
1716
1516
  }
1717
-
1718
1517
  return this;
1719
1518
  }
1720
1519
  }]);
1721
-
1722
1520
  return Events;
1723
1521
  }();
1724
-
1725
1522
  Events.eventSplitter = /\s+/;
1726
1523
 
1727
1524
  function render() {}
@@ -1731,6 +1528,7 @@ function createRef() {
1731
1528
  current: null
1732
1529
  };
1733
1530
  }
1531
+
1734
1532
  /**
1735
1533
  * 赋值 ref
1736
1534
  * @param {Object} ref ref 对象/ref 函数/ref 字符串
@@ -1738,11 +1536,9 @@ function createRef() {
1738
1536
  * @param {Object} component 组件实例
1739
1537
  * @param {Object} refs 字符串 ref 搜集器
1740
1538
  */
1741
-
1742
1539
  function commitAttachRef(ref, target, component, refs) {
1743
1540
  var isInit = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
1744
1541
  if (isInit && !target) return;
1745
-
1746
1542
  if ('refName' in ref && ref['refName']) {
1747
1543
  refs[ref.refName] = target;
1748
1544
  } else if ('fn' in ref && typeof ref['fn'] === 'function') {
@@ -1759,7 +1555,6 @@ function detachAllRef(component) {
1759
1555
  } else if (ref['fn'] && _typeof(ref['fn']) === 'object' && 'current' in ref['fn']) {
1760
1556
  ref['fn'].current = null;
1761
1557
  }
1762
-
1763
1558
  if ('target' in ref) delete ref['target'];
1764
1559
  });
1765
1560
  component.refs = {};
@@ -1767,29 +1562,22 @@ function detachAllRef(component) {
1767
1562
  }
1768
1563
  var RefsArray = /*#__PURE__*/function (_Array) {
1769
1564
  _inherits(RefsArray, _Array);
1770
-
1771
1565
  var _super = _createSuper(RefsArray);
1772
-
1773
1566
  /**
1774
1567
  * @param {Array} initList
1775
1568
  */
1776
1569
  function RefsArray() {
1777
1570
  var _this;
1778
-
1779
1571
  var initList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
1780
-
1781
1572
  _classCallCheck(this, RefsArray);
1782
-
1783
1573
  _this = _super.call.apply(_super, [this].concat(_toConsumableArray(initList)));
1784
1574
  _this.inited = false;
1785
1575
  return _this;
1786
1576
  }
1787
-
1788
1577
  _createClass(RefsArray, [{
1789
1578
  key: "pushRefs",
1790
1579
  value: function pushRefs($$refs) {
1791
1580
  var _this2 = this;
1792
-
1793
1581
  if (this.inited) return;
1794
1582
  $$refs.forEach(function (ref) {
1795
1583
  return _this2.pushRef(ref);
@@ -1805,20 +1593,16 @@ var RefsArray = /*#__PURE__*/function (_Array) {
1805
1593
  !isExist && this.push(ref);
1806
1594
  }
1807
1595
  }]);
1808
-
1809
1596
  return RefsArray;
1810
1597
  }( /*#__PURE__*/_wrapNativeSuper(Array));
1811
1598
  function handleLoopRef(getElementById) {
1812
1599
  return function (component, id, type, handler) {
1813
1600
  if (!component) return null;
1814
1601
  var dom = getElementById(component, id, type);
1815
-
1816
1602
  var handlerType = _typeof(handler);
1817
-
1818
1603
  if (handlerType !== 'function' && handlerType !== 'object') {
1819
1604
  return console.warn("\u5FAA\u73AF Ref \u53EA\u652F\u6301\u51FD\u6570\u6216 createRef()\uFF0C\u5F53\u524D\u7C7B\u578B\u4E3A\uFF1A".concat(handlerType));
1820
1605
  }
1821
-
1822
1606
  if (handlerType === 'object') {
1823
1607
  handler.current = dom;
1824
1608
  } else if (handlerType === 'function') {
@@ -1831,27 +1615,20 @@ var Chain = /*#__PURE__*/function () {
1831
1615
  function Chain(requestParams) {
1832
1616
  var interceptors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
1833
1617
  var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
1834
-
1835
1618
  _classCallCheck(this, Chain);
1836
-
1837
1619
  this.index = index;
1838
1620
  this.requestParams = requestParams;
1839
1621
  this.interceptors = interceptors;
1840
1622
  }
1841
-
1842
1623
  _createClass(Chain, [{
1843
1624
  key: "proceed",
1844
1625
  value: function proceed(requestParams) {
1845
1626
  this.requestParams = requestParams;
1846
-
1847
1627
  if (this.index >= this.interceptors.length) {
1848
1628
  throw new Error('chain 参数错误, 请勿直接修改 request.chain');
1849
1629
  }
1850
-
1851
1630
  var nextInterceptor = this._getNextInterceptor();
1852
-
1853
1631
  var nextChain = this._getNextChain();
1854
-
1855
1632
  var p = nextInterceptor(nextChain);
1856
1633
  var res = p["catch"](function (err) {
1857
1634
  return Promise.reject(err);
@@ -1872,23 +1649,19 @@ var Chain = /*#__PURE__*/function () {
1872
1649
  return new Chain(this.requestParams, this.interceptors, this.index + 1);
1873
1650
  }
1874
1651
  }]);
1875
-
1876
1652
  return Chain;
1877
1653
  }();
1878
1654
 
1879
1655
  var Link = /*#__PURE__*/function () {
1880
1656
  function Link(interceptor) {
1881
1657
  _classCallCheck(this, Link);
1882
-
1883
1658
  this.taroInterceptor = interceptor;
1884
1659
  this.chain = new Chain();
1885
1660
  }
1886
-
1887
1661
  _createClass(Link, [{
1888
1662
  key: "request",
1889
1663
  value: function request(requestParams) {
1890
1664
  var _this = this;
1891
-
1892
1665
  this.chain.interceptors = this.chain.interceptors.filter(function (interceptor) {
1893
1666
  return interceptor !== _this.taroInterceptor;
1894
1667
  });
@@ -1906,7 +1679,6 @@ var Link = /*#__PURE__*/function () {
1906
1679
  this.chain = new Chain();
1907
1680
  }
1908
1681
  }]);
1909
-
1910
1682
  return Link;
1911
1683
  }();
1912
1684
 
@@ -1934,8 +1706,8 @@ function timeoutInterceptor(chain) {
1934
1706
  function logInterceptor(chain) {
1935
1707
  var requestParams = chain.requestParams;
1936
1708
  var method = requestParams.method,
1937
- data = requestParams.data,
1938
- url = requestParams.url;
1709
+ data = requestParams.data,
1710
+ url = requestParams.url;
1939
1711
  console.log("http ".concat(method || 'GET', " --> ").concat(url, " data: "), data);
1940
1712
  var p = chain.proceed(requestParams);
1941
1713
  var res = p.then(function (res) {
@@ -2251,31 +2023,29 @@ var otherApis = {
2251
2023
  navigateBackSmartProgram: true,
2252
2024
  preloadSubPackage: true
2253
2025
  };
2254
-
2255
2026
  function initPxTransform(config) {
2256
2027
  var _config$designWidth = config.designWidth,
2257
- designWidth = _config$designWidth === void 0 ? 700 : _config$designWidth,
2258
- _config$deviceRatio = config.deviceRatio,
2259
- deviceRatio = _config$deviceRatio === void 0 ? {
2260
- '640': 2.34 / 2,
2261
- '750': 1,
2262
- '828': 1.81 / 2
2263
- } : _config$deviceRatio;
2028
+ designWidth = _config$designWidth === void 0 ? 700 : _config$designWidth,
2029
+ _config$deviceRatio = config.deviceRatio,
2030
+ deviceRatio = _config$deviceRatio === void 0 ? {
2031
+ '640': 2.34 / 2,
2032
+ '750': 1,
2033
+ '828': 1.81 / 2
2034
+ } : _config$deviceRatio;
2264
2035
  this.config = this.config || {};
2265
2036
  this.config.designWidth = designWidth;
2266
2037
  this.config.deviceRatio = deviceRatio;
2267
2038
  }
2268
2039
 
2040
+ // Object.is polyfill
2269
2041
  // https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object/is
2270
-
2271
2042
  function objectIs(x, y) {
2272
2043
  if (x === y) {
2273
2044
  // Steps 1-5, 7-10
2274
2045
  // Steps 6.b-6.e: +0 != -0
2275
2046
  return x !== 0 || 1 / x === 1 / y;
2276
- } // eslint-disable-next-line no-self-compare
2277
-
2278
-
2047
+ }
2048
+ // eslint-disable-next-line no-self-compare
2279
2049
  return x !== x && y !== y;
2280
2050
  }
2281
2051
  function isFunction$1(arg) {
@@ -2306,7 +2076,6 @@ if (process.env.TARO_ENV === 'alipay') {
2306
2076
  index: 0
2307
2077
  };
2308
2078
  }
2309
-
2310
2079
  exports.Current = my.Current;
2311
2080
  } else {
2312
2081
  exports.Current = {
@@ -2315,30 +2084,24 @@ if (process.env.TARO_ENV === 'alipay') {
2315
2084
  };
2316
2085
  }
2317
2086
 
2318
- function forceUpdateCallback() {//
2087
+ function forceUpdateCallback() {
2088
+ //
2319
2089
  }
2320
-
2321
2090
  function getHooks(index) {
2322
2091
  if (exports.Current.current === null) {
2323
2092
  throw new Error("invalid hooks call: hooks can only be called in a stateless component.");
2324
2093
  }
2325
-
2326
2094
  var hooks = exports.Current.current.hooks;
2327
-
2328
2095
  if (index >= hooks.length) {
2329
2096
  hooks.push({});
2330
2097
  }
2331
-
2332
2098
  return hooks[index];
2333
2099
  }
2334
-
2335
2100
  function useState(initialState) {
2336
2101
  if (isFunction$1(initialState)) {
2337
2102
  initialState = initialState();
2338
2103
  }
2339
-
2340
2104
  var hook = getHooks(exports.Current.index++);
2341
-
2342
2105
  if (!hook.state) {
2343
2106
  hook.component = exports.Current.current;
2344
2107
  hook.state = [initialState, function (action) {
@@ -2349,20 +2112,16 @@ function useState(initialState) {
2349
2112
  hook.component.setState({}, forceUpdateCallback);
2350
2113
  }];
2351
2114
  }
2352
-
2353
2115
  return hook.state;
2354
2116
  }
2355
-
2356
2117
  function usePageLifecycle(callback, lifecycle) {
2357
2118
  var hook = getHooks(exports.Current.index++);
2358
-
2359
2119
  if (!hook.marked) {
2360
2120
  hook.marked = true;
2361
2121
  hook.component = exports.Current.current;
2362
2122
  hook.callback = callback;
2363
2123
  var component = hook.component;
2364
2124
  var originalLifecycle = component[lifecycle];
2365
-
2366
2125
  hook.component[lifecycle] = function () {
2367
2126
  var callback = hook.callback;
2368
2127
  originalLifecycle && originalLifecycle.call.apply(originalLifecycle, [component].concat(Array.prototype.slice.call(arguments)));
@@ -2372,7 +2131,6 @@ function usePageLifecycle(callback, lifecycle) {
2372
2131
  hook.callback = callback;
2373
2132
  }
2374
2133
  }
2375
-
2376
2134
  function useDidShow(callback) {
2377
2135
  usePageLifecycle(callback, 'componentDidShow');
2378
2136
  }
@@ -2405,31 +2163,25 @@ function useAddToFavorites(callback) {
2405
2163
  }
2406
2164
  function useRouter() {
2407
2165
  var hook = getHooks(exports.Current.index++);
2408
-
2409
2166
  if (!hook.router) {
2410
2167
  hook.component = exports.Current.current;
2411
2168
  hook.router = hook.component.$router;
2412
2169
  }
2413
-
2414
2170
  return hook.router;
2415
2171
  }
2416
2172
  function useScope() {
2417
2173
  var hook = getHooks(exports.Current.index++);
2418
-
2419
2174
  if (!hook.scope) {
2420
2175
  hook.component = exports.Current.current;
2421
2176
  hook.scope = hook.component.$scope;
2422
2177
  }
2423
-
2424
2178
  return hook.scope;
2425
2179
  }
2426
2180
  function useReducer(reducer, initialState, initializer) {
2427
2181
  if (isFunction$1(initialState)) {
2428
2182
  initialState = initialState();
2429
2183
  }
2430
-
2431
2184
  var hook = getHooks(exports.Current.index++);
2432
-
2433
2185
  if (!hook.state) {
2434
2186
  hook.component = exports.Current.current;
2435
2187
  hook.state = [isUndefined(initializer) ? initialState : initializer(initialState), function (action) {
@@ -2438,34 +2190,27 @@ function useReducer(reducer, initialState, initializer) {
2438
2190
  hook.component.setState({}, forceUpdateCallback);
2439
2191
  }];
2440
2192
  }
2441
-
2442
2193
  return hook.state;
2443
2194
  }
2444
-
2445
2195
  function areDepsChanged(prevDeps, deps) {
2446
2196
  if (isNullOrUndef(prevDeps) || isNullOrUndef(deps)) {
2447
2197
  return true;
2448
2198
  }
2449
-
2450
2199
  return deps.some(function (d, i) {
2451
2200
  return !objectIs(d, prevDeps[i]);
2452
2201
  });
2453
2202
  }
2454
-
2455
2203
  function invokeEffects(component, delay) {
2456
2204
  var effects = delay ? component.effects : component.layoutEffects;
2457
2205
  effects.forEach(function (hook) {
2458
2206
  if (isFunction$1(hook.cleanup)) {
2459
2207
  hook.cleanup();
2460
2208
  }
2461
-
2462
2209
  var result = hook.effect();
2463
-
2464
2210
  if (isFunction$1(result)) {
2465
2211
  hook.cleanup = result;
2466
2212
  }
2467
2213
  });
2468
-
2469
2214
  if (delay) {
2470
2215
  component.effects = [];
2471
2216
  } else {
@@ -2473,12 +2218,10 @@ function invokeEffects(component, delay) {
2473
2218
  }
2474
2219
  }
2475
2220
  var scheduleEffectComponents = [];
2476
-
2477
2221
  function invokeScheduleEffects(component) {
2478
2222
  if (!component._afterScheduleEffect) {
2479
2223
  component._afterScheduleEffect = true;
2480
2224
  scheduleEffectComponents.push(component);
2481
-
2482
2225
  if (scheduleEffectComponents.length === 1) {
2483
2226
  defer(function () {
2484
2227
  setTimeout(function () {
@@ -2492,18 +2235,14 @@ function invokeScheduleEffects(component) {
2492
2235
  }
2493
2236
  }
2494
2237
  }
2495
-
2496
2238
  function useEffectImpl(effect, deps, delay) {
2497
2239
  var hook = getHooks(exports.Current.index++);
2498
-
2499
2240
  if (exports.Current.current._disableEffect || !exports.Current.current.__isReady) {
2500
2241
  return;
2501
2242
  }
2502
-
2503
2243
  if (areDepsChanged(hook.deps, deps)) {
2504
2244
  hook.effect = effect;
2505
2245
  hook.deps = deps;
2506
-
2507
2246
  if (delay) {
2508
2247
  exports.Current.current.effects = exports.Current.current.effects.concat(hook);
2509
2248
  invokeScheduleEffects(exports.Current.current);
@@ -2512,7 +2251,6 @@ function useEffectImpl(effect, deps, delay) {
2512
2251
  }
2513
2252
  }
2514
2253
  }
2515
-
2516
2254
  function useEffect(effect, deps) {
2517
2255
  useEffectImpl(effect, deps, true);
2518
2256
  }
@@ -2521,24 +2259,20 @@ function useLayoutEffect(effect, deps) {
2521
2259
  }
2522
2260
  function useRef(initialValue) {
2523
2261
  var hook = getHooks(exports.Current.index++);
2524
-
2525
2262
  if (!hook.ref) {
2526
2263
  hook.ref = {
2527
2264
  current: initialValue
2528
2265
  };
2529
2266
  }
2530
-
2531
2267
  return hook.ref;
2532
2268
  }
2533
2269
  function useMemo(factory, deps) {
2534
2270
  var hook = getHooks(exports.Current.index++);
2535
-
2536
2271
  if (areDepsChanged(hook.deps, deps)) {
2537
2272
  hook.deps = deps;
2538
2273
  hook.callback = factory;
2539
2274
  hook.value = factory();
2540
2275
  }
2541
-
2542
2276
  return hook.value;
2543
2277
  }
2544
2278
  function useCallback(callback, deps) {
@@ -2564,13 +2298,10 @@ function useImperativeHandle(ref, init, deps) {
2564
2298
  function useContext(_ref) {
2565
2299
  var context = _ref.context;
2566
2300
  var emitter = context.emitter;
2567
-
2568
2301
  if (emitter === null) {
2569
2302
  return context._defaultValue;
2570
2303
  }
2571
-
2572
2304
  var hook = getHooks(exports.Current.index++);
2573
-
2574
2305
  if (isUndefined(hook.context)) {
2575
2306
  hook.context = true;
2576
2307
  hook.component = exports.Current.current;
@@ -2581,20 +2312,16 @@ function useContext(_ref) {
2581
2312
  }
2582
2313
  });
2583
2314
  }
2584
-
2585
2315
  return emitter.value;
2586
2316
  }
2587
2317
 
2588
2318
  var Emitter = /*#__PURE__*/function () {
2589
2319
  function Emitter() {
2590
2320
  var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2591
-
2592
2321
  _classCallCheck(this, Emitter);
2593
-
2594
2322
  this.value = value;
2595
2323
  this.handlers = [];
2596
2324
  }
2597
-
2598
2325
  _createClass(Emitter, [{
2599
2326
  key: "on",
2600
2327
  value: function on(handler) {
@@ -2611,18 +2338,15 @@ var Emitter = /*#__PURE__*/function () {
2611
2338
  key: "set",
2612
2339
  value: function set(value) {
2613
2340
  var _this = this;
2614
-
2615
2341
  if (objectIs(value, this.value)) {
2616
2342
  return;
2617
2343
  }
2618
-
2619
2344
  this.value = value;
2620
2345
  this.handlers.forEach(function (h) {
2621
2346
  return h(_this.value);
2622
2347
  });
2623
2348
  }
2624
2349
  }]);
2625
-
2626
2350
  return Emitter;
2627
2351
  }();
2628
2352
 
@@ -2634,17 +2358,14 @@ function createContext(defaultValue) {
2634
2358
  _id: contextId,
2635
2359
  _defaultValue: defaultValue
2636
2360
  };
2637
-
2638
2361
  function Provider(newValue) {
2639
2362
  var emitter = context.emitter;
2640
-
2641
2363
  if (!emitter) {
2642
2364
  context.emitter = new Emitter(defaultValue);
2643
2365
  } else {
2644
2366
  emitter.set(newValue);
2645
2367
  }
2646
2368
  }
2647
-
2648
2369
  return {
2649
2370
  Provider: Provider,
2650
2371
  context: context
@@ -2656,42 +2377,32 @@ var objectIs$1 = Object.is || function (x, y) {
2656
2377
  if (x === y) {
2657
2378
  return x !== 0 || 1 / x === 1 / y;
2658
2379
  }
2659
-
2660
2380
  return x !== x && y !== y;
2661
2381
  };
2662
-
2663
2382
  function shallowEqual(obj1, obj2) {
2664
2383
  if (_typeof(obj1) !== 'object' && _typeof(obj2) !== 'object') {
2665
2384
  return obj1 === obj2;
2666
2385
  }
2667
-
2668
2386
  if (obj1 === null && obj2 === null) {
2669
2387
  return true;
2670
2388
  }
2671
-
2672
2389
  if (obj1 === null || obj2 === null) {
2673
2390
  return false;
2674
2391
  }
2675
-
2676
2392
  if (objectIs$1(obj1, obj2)) {
2677
2393
  return true;
2678
2394
  }
2679
-
2680
2395
  var obj1Keys = obj1 ? Object.keys(obj1) : [];
2681
2396
  var obj2Keys = obj2 ? Object.keys(obj2) : [];
2682
-
2683
2397
  if (obj1Keys.length !== obj2Keys.length) {
2684
2398
  return false;
2685
2399
  }
2686
-
2687
2400
  for (var i = 0; i < obj1Keys.length; i++) {
2688
2401
  var obj1KeyItem = obj1Keys[i];
2689
-
2690
2402
  if (!obj2.hasOwnProperty(obj1KeyItem) || !objectIs$1(obj1[obj1KeyItem], obj2[obj1KeyItem])) {
2691
2403
  return false;
2692
2404
  }
2693
2405
  }
2694
-
2695
2406
  return true;
2696
2407
  }
2697
2408
 
@@ -2699,18 +2410,15 @@ function memo(component, propsAreEqual) {
2699
2410
  component.prototype.shouldComponentUpdate = function (nextProps) {
2700
2411
  return isFunction$1(propsAreEqual) ? !propsAreEqual(this.props, nextProps) : !shallowEqual(this.props, nextProps);
2701
2412
  };
2702
-
2703
2413
  return component;
2704
2414
  }
2705
2415
 
2706
2416
  /* eslint-disable camelcase */
2707
2417
 
2708
-
2709
2418
  if (process.env.TARO_ENV === 'alipay') {
2710
2419
  if (!my.taroEventCenter) {
2711
2420
  my.taroEventCenter = new Events();
2712
2421
  }
2713
-
2714
2422
  exports.eventCenter = my.taroEventCenter;
2715
2423
  } else {
2716
2424
  exports.eventCenter = new Events();