zmp-sdk 2.19.0-rc.7 → 2.19.2
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/browser.min.js +309 -453
- package/dist/index.es.js +44 -16
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/types/src/apis/index.d.ts +1 -0
- package/dist/types/src/services/device.d.ts +8 -0
- package/dist/types/src/services/mock-mp-service.d.ts +1 -0
- package/dist/types/src/services/zalo-mp-service.d.ts +1 -0
- package/dist/types/src/types/callbackData.d.ts +1 -1
- package/dist/types/src/types/inputData.d.ts +18 -2
- package/dist/types/src/types/interface.d.ts +1 -0
- package/package.json +1 -1
package/dist/browser.min.js
CHANGED
|
@@ -60,14 +60,14 @@
|
|
|
60
60
|
* @param {*} value The value to check.
|
|
61
61
|
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
62
62
|
*/
|
|
63
|
-
function isPrototype
|
|
63
|
+
function isPrototype(value) {
|
|
64
64
|
var Ctor = value && value.constructor,
|
|
65
65
|
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$9;
|
|
66
66
|
|
|
67
67
|
return value === proto;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
var _isPrototype = isPrototype
|
|
70
|
+
var _isPrototype = isPrototype;
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* Creates a unary function that invokes `func` with its argument transformed.
|
|
@@ -77,24 +77,18 @@
|
|
|
77
77
|
* @param {Function} transform The argument transform.
|
|
78
78
|
* @returns {Function} Returns the new function.
|
|
79
79
|
*/
|
|
80
|
-
function overArg
|
|
80
|
+
function overArg(func, transform) {
|
|
81
81
|
return function(arg) {
|
|
82
82
|
return func(transform(arg));
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
var _overArg = overArg
|
|
87
|
-
|
|
88
|
-
var overArg = _overArg;
|
|
86
|
+
var _overArg = overArg;
|
|
89
87
|
|
|
90
88
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
91
|
-
var nativeKeys
|
|
92
|
-
|
|
93
|
-
var _nativeKeys = nativeKeys$1;
|
|
89
|
+
var nativeKeys = _overArg(Object.keys, Object);
|
|
94
90
|
|
|
95
|
-
var
|
|
96
|
-
|
|
97
|
-
var nativeKeys = _nativeKeys;
|
|
91
|
+
var _nativeKeys = nativeKeys;
|
|
98
92
|
|
|
99
93
|
/** Used for built-in method references. */
|
|
100
94
|
var objectProto$8 = Object.prototype;
|
|
@@ -109,9 +103,9 @@
|
|
|
109
103
|
* @param {Object} object The object to query.
|
|
110
104
|
* @returns {Array} Returns the array of property names.
|
|
111
105
|
*/
|
|
112
|
-
function baseKeys
|
|
113
|
-
if (!
|
|
114
|
-
return
|
|
106
|
+
function baseKeys(object) {
|
|
107
|
+
if (!_isPrototype(object)) {
|
|
108
|
+
return _nativeKeys(object);
|
|
115
109
|
}
|
|
116
110
|
var result = [];
|
|
117
111
|
for (var key in Object(object)) {
|
|
@@ -122,7 +116,7 @@
|
|
|
122
116
|
return result;
|
|
123
117
|
}
|
|
124
118
|
|
|
125
|
-
var _baseKeys = baseKeys
|
|
119
|
+
var _baseKeys = baseKeys;
|
|
126
120
|
|
|
127
121
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
128
122
|
|
|
@@ -131,28 +125,22 @@
|
|
|
131
125
|
}
|
|
132
126
|
|
|
133
127
|
/** Detect free variable `global` from Node.js. */
|
|
134
|
-
var freeGlobal
|
|
135
|
-
|
|
136
|
-
var _freeGlobal = freeGlobal$1;
|
|
128
|
+
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
137
129
|
|
|
138
|
-
var
|
|
130
|
+
var _freeGlobal = freeGlobal;
|
|
139
131
|
|
|
140
132
|
/** Detect free variable `self`. */
|
|
141
133
|
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
142
134
|
|
|
143
135
|
/** Used as a reference to the global object. */
|
|
144
|
-
var root
|
|
136
|
+
var root = _freeGlobal || freeSelf || Function('return this')();
|
|
145
137
|
|
|
146
|
-
var _root = root
|
|
147
|
-
|
|
148
|
-
var root = _root;
|
|
138
|
+
var _root = root;
|
|
149
139
|
|
|
150
140
|
/** Built-in value references. */
|
|
151
|
-
var Symbol$
|
|
152
|
-
|
|
153
|
-
var _Symbol = Symbol$2;
|
|
141
|
+
var Symbol$1 = _root.Symbol;
|
|
154
142
|
|
|
155
|
-
var Symbol$1
|
|
143
|
+
var _Symbol = Symbol$1;
|
|
156
144
|
|
|
157
145
|
/** Used for built-in method references. */
|
|
158
146
|
var objectProto$7 = Object.prototype;
|
|
@@ -168,7 +156,7 @@
|
|
|
168
156
|
var nativeObjectToString$1 = objectProto$7.toString;
|
|
169
157
|
|
|
170
158
|
/** Built-in value references. */
|
|
171
|
-
var symToStringTag$1 =
|
|
159
|
+
var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
|
|
172
160
|
|
|
173
161
|
/**
|
|
174
162
|
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
@@ -177,7 +165,7 @@
|
|
|
177
165
|
* @param {*} value The value to query.
|
|
178
166
|
* @returns {string} Returns the raw `toStringTag`.
|
|
179
167
|
*/
|
|
180
|
-
function getRawTag
|
|
168
|
+
function getRawTag(value) {
|
|
181
169
|
var isOwn = hasOwnProperty$6.call(value, symToStringTag$1),
|
|
182
170
|
tag = value[symToStringTag$1];
|
|
183
171
|
|
|
@@ -197,7 +185,7 @@
|
|
|
197
185
|
return result;
|
|
198
186
|
}
|
|
199
187
|
|
|
200
|
-
var _getRawTag = getRawTag
|
|
188
|
+
var _getRawTag = getRawTag;
|
|
201
189
|
|
|
202
190
|
/** Used for built-in method references. */
|
|
203
191
|
var objectProto$6 = Object.prototype;
|
|
@@ -216,22 +204,18 @@
|
|
|
216
204
|
* @param {*} value The value to convert.
|
|
217
205
|
* @returns {string} Returns the converted string.
|
|
218
206
|
*/
|
|
219
|
-
function objectToString
|
|
207
|
+
function objectToString(value) {
|
|
220
208
|
return nativeObjectToString.call(value);
|
|
221
209
|
}
|
|
222
210
|
|
|
223
|
-
var _objectToString = objectToString
|
|
224
|
-
|
|
225
|
-
var getRawTag = _getRawTag;
|
|
226
|
-
|
|
227
|
-
var objectToString = _objectToString;
|
|
211
|
+
var _objectToString = objectToString;
|
|
228
212
|
|
|
229
213
|
/** `Object#toString` result references. */
|
|
230
214
|
var nullTag = '[object Null]',
|
|
231
215
|
undefinedTag = '[object Undefined]';
|
|
232
216
|
|
|
233
217
|
/** Built-in value references. */
|
|
234
|
-
var symToStringTag =
|
|
218
|
+
var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
|
|
235
219
|
|
|
236
220
|
/**
|
|
237
221
|
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
@@ -240,16 +224,16 @@
|
|
|
240
224
|
* @param {*} value The value to query.
|
|
241
225
|
* @returns {string} Returns the `toStringTag`.
|
|
242
226
|
*/
|
|
243
|
-
function baseGetTag
|
|
227
|
+
function baseGetTag(value) {
|
|
244
228
|
if (value == null) {
|
|
245
229
|
return value === undefined ? undefinedTag : nullTag;
|
|
246
230
|
}
|
|
247
231
|
return (symToStringTag && symToStringTag in Object(value))
|
|
248
|
-
?
|
|
249
|
-
:
|
|
232
|
+
? _getRawTag(value)
|
|
233
|
+
: _objectToString(value);
|
|
250
234
|
}
|
|
251
235
|
|
|
252
|
-
var _baseGetTag = baseGetTag
|
|
236
|
+
var _baseGetTag = baseGetTag;
|
|
253
237
|
|
|
254
238
|
/**
|
|
255
239
|
* Checks if `value` is the
|
|
@@ -283,10 +267,6 @@
|
|
|
283
267
|
|
|
284
268
|
var isObject_1 = isObject;
|
|
285
269
|
|
|
286
|
-
var isObject$1 = isObject_1;
|
|
287
|
-
|
|
288
|
-
var baseGetTag = _baseGetTag;
|
|
289
|
-
|
|
290
270
|
/** `Object#toString` result references. */
|
|
291
271
|
var asyncTag = '[object AsyncFunction]',
|
|
292
272
|
funcTag$1 = '[object Function]',
|
|
@@ -316,24 +296,20 @@
|
|
|
316
296
|
}
|
|
317
297
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
318
298
|
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
319
|
-
var tag =
|
|
299
|
+
var tag = _baseGetTag(value);
|
|
320
300
|
return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
321
301
|
}
|
|
322
302
|
|
|
323
303
|
var isFunction_1 = isFunction;
|
|
324
304
|
|
|
325
|
-
var isFunction$1 = isFunction_1;
|
|
326
|
-
|
|
327
305
|
/** Used to detect overreaching core-js shims. */
|
|
328
|
-
var coreJsData
|
|
306
|
+
var coreJsData = _root['__core-js_shared__'];
|
|
329
307
|
|
|
330
|
-
var _coreJsData = coreJsData
|
|
331
|
-
|
|
332
|
-
var coreJsData = _coreJsData;
|
|
308
|
+
var _coreJsData = coreJsData;
|
|
333
309
|
|
|
334
310
|
/** Used to detect methods masquerading as native. */
|
|
335
311
|
var maskSrcKey = (function() {
|
|
336
|
-
var uid = /[^.]+$/.exec(
|
|
312
|
+
var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
|
|
337
313
|
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
338
314
|
}());
|
|
339
315
|
|
|
@@ -344,11 +320,11 @@
|
|
|
344
320
|
* @param {Function} func The function to check.
|
|
345
321
|
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
346
322
|
*/
|
|
347
|
-
function isMasked
|
|
323
|
+
function isMasked(func) {
|
|
348
324
|
return !!maskSrcKey && (maskSrcKey in func);
|
|
349
325
|
}
|
|
350
326
|
|
|
351
|
-
var _isMasked = isMasked
|
|
327
|
+
var _isMasked = isMasked;
|
|
352
328
|
|
|
353
329
|
/** Used for built-in method references. */
|
|
354
330
|
var funcProto$1 = Function.prototype;
|
|
@@ -363,7 +339,7 @@
|
|
|
363
339
|
* @param {Function} func The function to convert.
|
|
364
340
|
* @returns {string} Returns the source code.
|
|
365
341
|
*/
|
|
366
|
-
function toSource
|
|
342
|
+
function toSource(func) {
|
|
367
343
|
if (func != null) {
|
|
368
344
|
try {
|
|
369
345
|
return funcToString$1.call(func);
|
|
@@ -375,11 +351,7 @@
|
|
|
375
351
|
return '';
|
|
376
352
|
}
|
|
377
353
|
|
|
378
|
-
var _toSource = toSource
|
|
379
|
-
|
|
380
|
-
var isMasked = _isMasked;
|
|
381
|
-
|
|
382
|
-
var toSource = _toSource;
|
|
354
|
+
var _toSource = toSource;
|
|
383
355
|
|
|
384
356
|
/**
|
|
385
357
|
* Used to match `RegExp`
|
|
@@ -414,15 +386,15 @@
|
|
|
414
386
|
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
415
387
|
* else `false`.
|
|
416
388
|
*/
|
|
417
|
-
function baseIsNative
|
|
418
|
-
if (!isObject_1(value) ||
|
|
389
|
+
function baseIsNative(value) {
|
|
390
|
+
if (!isObject_1(value) || _isMasked(value)) {
|
|
419
391
|
return false;
|
|
420
392
|
}
|
|
421
393
|
var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
|
|
422
|
-
return pattern.test(
|
|
394
|
+
return pattern.test(_toSource(value));
|
|
423
395
|
}
|
|
424
396
|
|
|
425
|
-
var _baseIsNative = baseIsNative
|
|
397
|
+
var _baseIsNative = baseIsNative;
|
|
426
398
|
|
|
427
399
|
/**
|
|
428
400
|
* Gets the value at `key` of `object`.
|
|
@@ -432,15 +404,11 @@
|
|
|
432
404
|
* @param {string} key The key of the property to get.
|
|
433
405
|
* @returns {*} Returns the property value.
|
|
434
406
|
*/
|
|
435
|
-
function getValue
|
|
407
|
+
function getValue(object, key) {
|
|
436
408
|
return object == null ? undefined : object[key];
|
|
437
409
|
}
|
|
438
410
|
|
|
439
|
-
var _getValue = getValue
|
|
440
|
-
|
|
441
|
-
var baseIsNative = _baseIsNative;
|
|
442
|
-
|
|
443
|
-
var getValue = _getValue;
|
|
411
|
+
var _getValue = getValue;
|
|
444
412
|
|
|
445
413
|
/**
|
|
446
414
|
* Gets the native function at `key` of `object`.
|
|
@@ -450,49 +418,37 @@
|
|
|
450
418
|
* @param {string} key The key of the method to get.
|
|
451
419
|
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
452
420
|
*/
|
|
453
|
-
function getNative
|
|
454
|
-
var value =
|
|
455
|
-
return
|
|
421
|
+
function getNative(object, key) {
|
|
422
|
+
var value = _getValue(object, key);
|
|
423
|
+
return _baseIsNative(value) ? value : undefined;
|
|
456
424
|
}
|
|
457
425
|
|
|
458
|
-
var _getNative = getNative
|
|
459
|
-
|
|
460
|
-
var getNative = _getNative;
|
|
426
|
+
var _getNative = getNative;
|
|
461
427
|
|
|
462
428
|
/* Built-in method references that are verified to be native. */
|
|
463
|
-
var DataView
|
|
429
|
+
var DataView = _getNative(_root, 'DataView');
|
|
464
430
|
|
|
465
|
-
var _DataView = DataView
|
|
431
|
+
var _DataView = DataView;
|
|
466
432
|
|
|
467
433
|
/* Built-in method references that are verified to be native. */
|
|
468
|
-
var Map$
|
|
434
|
+
var Map$1 = _getNative(_root, 'Map');
|
|
469
435
|
|
|
470
|
-
var _Map = Map$
|
|
436
|
+
var _Map = Map$1;
|
|
471
437
|
|
|
472
438
|
/* Built-in method references that are verified to be native. */
|
|
473
|
-
var Promise$
|
|
439
|
+
var Promise$1 = _getNative(_root, 'Promise');
|
|
474
440
|
|
|
475
|
-
var _Promise = Promise$
|
|
441
|
+
var _Promise = Promise$1;
|
|
476
442
|
|
|
477
443
|
/* Built-in method references that are verified to be native. */
|
|
478
|
-
var Set$
|
|
444
|
+
var Set$1 = _getNative(_root, 'Set');
|
|
479
445
|
|
|
480
|
-
var _Set = Set$
|
|
446
|
+
var _Set = Set$1;
|
|
481
447
|
|
|
482
448
|
/* Built-in method references that are verified to be native. */
|
|
483
|
-
var WeakMap$
|
|
484
|
-
|
|
485
|
-
var _WeakMap = WeakMap$2;
|
|
486
|
-
|
|
487
|
-
var DataView = _DataView;
|
|
488
|
-
|
|
489
|
-
var Map$1 = _Map;
|
|
490
|
-
|
|
491
|
-
var Promise$1 = _Promise;
|
|
449
|
+
var WeakMap$1 = _getNative(_root, 'WeakMap');
|
|
492
450
|
|
|
493
|
-
var
|
|
494
|
-
|
|
495
|
-
var WeakMap$1 = _WeakMap;
|
|
451
|
+
var _WeakMap = WeakMap$1;
|
|
496
452
|
|
|
497
453
|
/** `Object#toString` result references. */
|
|
498
454
|
var mapTag$2 = '[object Map]',
|
|
@@ -504,11 +460,11 @@
|
|
|
504
460
|
var dataViewTag$1 = '[object DataView]';
|
|
505
461
|
|
|
506
462
|
/** Used to detect maps, sets, and weakmaps. */
|
|
507
|
-
var dataViewCtorString =
|
|
508
|
-
mapCtorString =
|
|
509
|
-
promiseCtorString =
|
|
510
|
-
setCtorString =
|
|
511
|
-
weakMapCtorString =
|
|
463
|
+
var dataViewCtorString = _toSource(_DataView),
|
|
464
|
+
mapCtorString = _toSource(_Map),
|
|
465
|
+
promiseCtorString = _toSource(_Promise),
|
|
466
|
+
setCtorString = _toSource(_Set),
|
|
467
|
+
weakMapCtorString = _toSource(_WeakMap);
|
|
512
468
|
|
|
513
469
|
/**
|
|
514
470
|
* Gets the `toStringTag` of `value`.
|
|
@@ -517,18 +473,18 @@
|
|
|
517
473
|
* @param {*} value The value to query.
|
|
518
474
|
* @returns {string} Returns the `toStringTag`.
|
|
519
475
|
*/
|
|
520
|
-
var getTag
|
|
476
|
+
var getTag = _baseGetTag;
|
|
521
477
|
|
|
522
478
|
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
|
|
523
|
-
if ((
|
|
524
|
-
(
|
|
525
|
-
(
|
|
526
|
-
(
|
|
527
|
-
(
|
|
528
|
-
getTag
|
|
529
|
-
var result =
|
|
479
|
+
if ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag$1) ||
|
|
480
|
+
(_Map && getTag(new _Map) != mapTag$2) ||
|
|
481
|
+
(_Promise && getTag(_Promise.resolve()) != promiseTag) ||
|
|
482
|
+
(_Set && getTag(new _Set) != setTag$2) ||
|
|
483
|
+
(_WeakMap && getTag(new _WeakMap) != weakMapTag$1)) {
|
|
484
|
+
getTag = function(value) {
|
|
485
|
+
var result = _baseGetTag(value),
|
|
530
486
|
Ctor = result == objectTag$1 ? value.constructor : undefined,
|
|
531
|
-
ctorString = Ctor ?
|
|
487
|
+
ctorString = Ctor ? _toSource(Ctor) : '';
|
|
532
488
|
|
|
533
489
|
if (ctorString) {
|
|
534
490
|
switch (ctorString) {
|
|
@@ -543,7 +499,7 @@
|
|
|
543
499
|
};
|
|
544
500
|
}
|
|
545
501
|
|
|
546
|
-
var _getTag = getTag
|
|
502
|
+
var _getTag = getTag;
|
|
547
503
|
|
|
548
504
|
/**
|
|
549
505
|
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
@@ -569,13 +525,11 @@
|
|
|
569
525
|
* _.isObjectLike(null);
|
|
570
526
|
* // => false
|
|
571
527
|
*/
|
|
572
|
-
function isObjectLike
|
|
528
|
+
function isObjectLike(value) {
|
|
573
529
|
return value != null && typeof value == 'object';
|
|
574
530
|
}
|
|
575
531
|
|
|
576
|
-
var isObjectLike_1 = isObjectLike
|
|
577
|
-
|
|
578
|
-
var isObjectLike = isObjectLike_1;
|
|
532
|
+
var isObjectLike_1 = isObjectLike;
|
|
579
533
|
|
|
580
534
|
/** `Object#toString` result references. */
|
|
581
535
|
var argsTag$1 = '[object Arguments]';
|
|
@@ -587,13 +541,11 @@
|
|
|
587
541
|
* @param {*} value The value to check.
|
|
588
542
|
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
589
543
|
*/
|
|
590
|
-
function baseIsArguments
|
|
591
|
-
return
|
|
544
|
+
function baseIsArguments(value) {
|
|
545
|
+
return isObjectLike_1(value) && _baseGetTag(value) == argsTag$1;
|
|
592
546
|
}
|
|
593
547
|
|
|
594
|
-
var _baseIsArguments = baseIsArguments
|
|
595
|
-
|
|
596
|
-
var baseIsArguments = _baseIsArguments;
|
|
548
|
+
var _baseIsArguments = baseIsArguments;
|
|
597
549
|
|
|
598
550
|
/** Used for built-in method references. */
|
|
599
551
|
var objectProto$4 = Object.prototype;
|
|
@@ -622,12 +574,12 @@
|
|
|
622
574
|
* _.isArguments([1, 2, 3]);
|
|
623
575
|
* // => false
|
|
624
576
|
*/
|
|
625
|
-
var isArguments
|
|
626
|
-
return
|
|
577
|
+
var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
|
|
578
|
+
return isObjectLike_1(value) && hasOwnProperty$4.call(value, 'callee') &&
|
|
627
579
|
!propertyIsEnumerable.call(value, 'callee');
|
|
628
580
|
};
|
|
629
581
|
|
|
630
|
-
var isArguments_1 = isArguments
|
|
582
|
+
var isArguments_1 = isArguments;
|
|
631
583
|
|
|
632
584
|
/**
|
|
633
585
|
* Checks if `value` is classified as an `Array` object.
|
|
@@ -656,8 +608,6 @@
|
|
|
656
608
|
|
|
657
609
|
var isArray_1 = isArray$1;
|
|
658
610
|
|
|
659
|
-
var isArray$2 = isArray_1;
|
|
660
|
-
|
|
661
611
|
/** Used as references for various `Number` constants. */
|
|
662
612
|
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
663
613
|
|
|
@@ -687,14 +637,12 @@
|
|
|
687
637
|
* _.isLength('3');
|
|
688
638
|
* // => false
|
|
689
639
|
*/
|
|
690
|
-
function isLength
|
|
640
|
+
function isLength(value) {
|
|
691
641
|
return typeof value == 'number' &&
|
|
692
642
|
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1;
|
|
693
643
|
}
|
|
694
644
|
|
|
695
|
-
var isLength_1 = isLength
|
|
696
|
-
|
|
697
|
-
var isLength = isLength_1;
|
|
645
|
+
var isLength_1 = isLength;
|
|
698
646
|
|
|
699
647
|
/**
|
|
700
648
|
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
@@ -721,11 +669,11 @@
|
|
|
721
669
|
* _.isArrayLike(_.noop);
|
|
722
670
|
* // => false
|
|
723
671
|
*/
|
|
724
|
-
function isArrayLike
|
|
725
|
-
return value != null &&
|
|
672
|
+
function isArrayLike(value) {
|
|
673
|
+
return value != null && isLength_1(value.length) && !isFunction_1(value);
|
|
726
674
|
}
|
|
727
675
|
|
|
728
|
-
var isArrayLike_1 = isArrayLike
|
|
676
|
+
var isArrayLike_1 = isArrayLike;
|
|
729
677
|
|
|
730
678
|
/**
|
|
731
679
|
* This method returns `false`.
|
|
@@ -740,13 +688,11 @@
|
|
|
740
688
|
* _.times(2, _.stubFalse);
|
|
741
689
|
* // => [false, false]
|
|
742
690
|
*/
|
|
743
|
-
function stubFalse
|
|
691
|
+
function stubFalse() {
|
|
744
692
|
return false;
|
|
745
693
|
}
|
|
746
694
|
|
|
747
|
-
var stubFalse_1 = stubFalse
|
|
748
|
-
|
|
749
|
-
var stubFalse = stubFalse_1;
|
|
695
|
+
var stubFalse_1 = stubFalse;
|
|
750
696
|
|
|
751
697
|
var isBuffer_1 = createCommonjsModule(function (module, exports) {
|
|
752
698
|
/** Detect free variable `exports`. */
|
|
@@ -759,7 +705,7 @@
|
|
|
759
705
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
760
706
|
|
|
761
707
|
/** Built-in value references. */
|
|
762
|
-
var Buffer = moduleExports ?
|
|
708
|
+
var Buffer = moduleExports ? _root.Buffer : undefined;
|
|
763
709
|
|
|
764
710
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
765
711
|
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
@@ -781,7 +727,7 @@
|
|
|
781
727
|
* _.isBuffer(new Uint8Array(2));
|
|
782
728
|
* // => false
|
|
783
729
|
*/
|
|
784
|
-
var isBuffer = nativeIsBuffer ||
|
|
730
|
+
var isBuffer = nativeIsBuffer || stubFalse_1;
|
|
785
731
|
|
|
786
732
|
module.exports = isBuffer;
|
|
787
733
|
});
|
|
@@ -836,12 +782,12 @@
|
|
|
836
782
|
* @param {*} value The value to check.
|
|
837
783
|
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
838
784
|
*/
|
|
839
|
-
function baseIsTypedArray
|
|
840
|
-
return
|
|
841
|
-
|
|
785
|
+
function baseIsTypedArray(value) {
|
|
786
|
+
return isObjectLike_1(value) &&
|
|
787
|
+
isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)];
|
|
842
788
|
}
|
|
843
789
|
|
|
844
|
-
var _baseIsTypedArray = baseIsTypedArray
|
|
790
|
+
var _baseIsTypedArray = baseIsTypedArray;
|
|
845
791
|
|
|
846
792
|
/**
|
|
847
793
|
* The base implementation of `_.unary` without support for storing metadata.
|
|
@@ -850,13 +796,13 @@
|
|
|
850
796
|
* @param {Function} func The function to cap arguments for.
|
|
851
797
|
* @returns {Function} Returns the new capped function.
|
|
852
798
|
*/
|
|
853
|
-
function baseUnary
|
|
799
|
+
function baseUnary(func) {
|
|
854
800
|
return function(value) {
|
|
855
801
|
return func(value);
|
|
856
802
|
};
|
|
857
803
|
}
|
|
858
804
|
|
|
859
|
-
var _baseUnary = baseUnary
|
|
805
|
+
var _baseUnary = baseUnary;
|
|
860
806
|
|
|
861
807
|
var _nodeUtil = createCommonjsModule(function (module, exports) {
|
|
862
808
|
/** Detect free variable `exports`. */
|
|
@@ -869,7 +815,7 @@
|
|
|
869
815
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
870
816
|
|
|
871
817
|
/** Detect free variable `process` from Node.js. */
|
|
872
|
-
var freeProcess = moduleExports &&
|
|
818
|
+
var freeProcess = moduleExports && _freeGlobal.process;
|
|
873
819
|
|
|
874
820
|
/** Used to access faster Node.js helpers. */
|
|
875
821
|
var nodeUtil = (function() {
|
|
@@ -889,14 +835,8 @@
|
|
|
889
835
|
module.exports = nodeUtil;
|
|
890
836
|
});
|
|
891
837
|
|
|
892
|
-
var baseIsTypedArray = _baseIsTypedArray;
|
|
893
|
-
|
|
894
|
-
var baseUnary = _baseUnary;
|
|
895
|
-
|
|
896
|
-
var nodeUtil = _nodeUtil;
|
|
897
|
-
|
|
898
838
|
/* Node.js helper references. */
|
|
899
|
-
var nodeIsTypedArray =
|
|
839
|
+
var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;
|
|
900
840
|
|
|
901
841
|
/**
|
|
902
842
|
* Checks if `value` is classified as a typed array.
|
|
@@ -915,21 +855,9 @@
|
|
|
915
855
|
* _.isTypedArray([]);
|
|
916
856
|
* // => false
|
|
917
857
|
*/
|
|
918
|
-
var isTypedArray
|
|
919
|
-
|
|
920
|
-
var isTypedArray_1 = isTypedArray$1;
|
|
921
|
-
|
|
922
|
-
var baseKeys = _baseKeys;
|
|
923
|
-
|
|
924
|
-
var getTag = _getTag;
|
|
925
|
-
|
|
926
|
-
var isArguments = isArguments_1;
|
|
858
|
+
var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;
|
|
927
859
|
|
|
928
|
-
var
|
|
929
|
-
|
|
930
|
-
var isBuffer = isBuffer_1;
|
|
931
|
-
|
|
932
|
-
var isTypedArray = isTypedArray_1;
|
|
860
|
+
var isTypedArray_1 = isTypedArray;
|
|
933
861
|
|
|
934
862
|
/** `Object#toString` result references. */
|
|
935
863
|
var mapTag = '[object Map]',
|
|
@@ -978,17 +906,17 @@
|
|
|
978
906
|
if (value == null) {
|
|
979
907
|
return true;
|
|
980
908
|
}
|
|
981
|
-
if (
|
|
909
|
+
if (isArrayLike_1(value) &&
|
|
982
910
|
(isArray_1(value) || typeof value == 'string' || typeof value.splice == 'function' ||
|
|
983
|
-
|
|
911
|
+
isBuffer_1(value) || isTypedArray_1(value) || isArguments_1(value))) {
|
|
984
912
|
return !value.length;
|
|
985
913
|
}
|
|
986
|
-
var tag =
|
|
914
|
+
var tag = _getTag(value);
|
|
987
915
|
if (tag == mapTag || tag == setTag) {
|
|
988
916
|
return !value.size;
|
|
989
917
|
}
|
|
990
|
-
if (
|
|
991
|
-
return !
|
|
918
|
+
if (_isPrototype(value)) {
|
|
919
|
+
return !_baseKeys(value).length;
|
|
992
920
|
}
|
|
993
921
|
for (var key in value) {
|
|
994
922
|
if (hasOwnProperty$3.call(value, key)) {
|
|
@@ -1000,8 +928,6 @@
|
|
|
1000
928
|
|
|
1001
929
|
var isEmpty_1 = isEmpty;
|
|
1002
930
|
|
|
1003
|
-
var isEmpty$1 = isEmpty_1;
|
|
1004
|
-
|
|
1005
931
|
/**
|
|
1006
932
|
* Checks if `value` is `undefined`.
|
|
1007
933
|
*
|
|
@@ -1025,8 +951,6 @@
|
|
|
1025
951
|
|
|
1026
952
|
var isUndefined_1 = isUndefined;
|
|
1027
953
|
|
|
1028
|
-
var isUndefined$1 = isUndefined_1;
|
|
1029
|
-
|
|
1030
954
|
/**
|
|
1031
955
|
* Checks if `value` is `null`.
|
|
1032
956
|
*
|
|
@@ -1050,8 +974,6 @@
|
|
|
1050
974
|
|
|
1051
975
|
var isNull_1 = isNull;
|
|
1052
976
|
|
|
1053
|
-
var isNull$1 = isNull_1;
|
|
1054
|
-
|
|
1055
977
|
/** `Object#toString` result references. */
|
|
1056
978
|
var stringTag = '[object String]';
|
|
1057
979
|
|
|
@@ -1074,13 +996,11 @@
|
|
|
1074
996
|
*/
|
|
1075
997
|
function isString(value) {
|
|
1076
998
|
return typeof value == 'string' ||
|
|
1077
|
-
(!isArray_1(value) &&
|
|
999
|
+
(!isArray_1(value) && isObjectLike_1(value) && _baseGetTag(value) == stringTag);
|
|
1078
1000
|
}
|
|
1079
1001
|
|
|
1080
1002
|
var isString_1 = isString;
|
|
1081
1003
|
|
|
1082
|
-
var isString$1 = isString_1;
|
|
1083
|
-
|
|
1084
1004
|
/** `Object#toString` result references. */
|
|
1085
1005
|
var numberTag = '[object Number]';
|
|
1086
1006
|
|
|
@@ -1112,13 +1032,11 @@
|
|
|
1112
1032
|
*/
|
|
1113
1033
|
function isNumber(value) {
|
|
1114
1034
|
return typeof value == 'number' ||
|
|
1115
|
-
(
|
|
1035
|
+
(isObjectLike_1(value) && _baseGetTag(value) == numberTag);
|
|
1116
1036
|
}
|
|
1117
1037
|
|
|
1118
1038
|
var isNumber_1 = isNumber;
|
|
1119
1039
|
|
|
1120
|
-
var isNumber$1 = isNumber_1;
|
|
1121
|
-
|
|
1122
1040
|
/** `Object#toString` result references. */
|
|
1123
1041
|
var regexpTag = '[object RegExp]';
|
|
1124
1042
|
|
|
@@ -1129,16 +1047,14 @@
|
|
|
1129
1047
|
* @param {*} value The value to check.
|
|
1130
1048
|
* @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
|
|
1131
1049
|
*/
|
|
1132
|
-
function baseIsRegExp
|
|
1133
|
-
return
|
|
1050
|
+
function baseIsRegExp(value) {
|
|
1051
|
+
return isObjectLike_1(value) && _baseGetTag(value) == regexpTag;
|
|
1134
1052
|
}
|
|
1135
1053
|
|
|
1136
|
-
var _baseIsRegExp = baseIsRegExp
|
|
1137
|
-
|
|
1138
|
-
var baseIsRegExp = _baseIsRegExp;
|
|
1054
|
+
var _baseIsRegExp = baseIsRegExp;
|
|
1139
1055
|
|
|
1140
1056
|
/* Node.js helper references. */
|
|
1141
|
-
var nodeIsRegExp =
|
|
1057
|
+
var nodeIsRegExp = _nodeUtil && _nodeUtil.isRegExp;
|
|
1142
1058
|
|
|
1143
1059
|
/**
|
|
1144
1060
|
* Checks if `value` is classified as a `RegExp` object.
|
|
@@ -1157,12 +1073,10 @@
|
|
|
1157
1073
|
* _.isRegExp('/abc/');
|
|
1158
1074
|
* // => false
|
|
1159
1075
|
*/
|
|
1160
|
-
var isRegExp = nodeIsRegExp ?
|
|
1076
|
+
var isRegExp = nodeIsRegExp ? _baseUnary(nodeIsRegExp) : _baseIsRegExp;
|
|
1161
1077
|
|
|
1162
1078
|
var isRegExp_1 = isRegExp;
|
|
1163
1079
|
|
|
1164
|
-
var isRegExp$1 = isRegExp_1;
|
|
1165
|
-
|
|
1166
1080
|
/** `Object#toString` result references. */
|
|
1167
1081
|
var symbolTag = '[object Symbol]';
|
|
1168
1082
|
|
|
@@ -1183,14 +1097,12 @@
|
|
|
1183
1097
|
* _.isSymbol('abc');
|
|
1184
1098
|
* // => false
|
|
1185
1099
|
*/
|
|
1186
|
-
function isSymbol
|
|
1100
|
+
function isSymbol(value) {
|
|
1187
1101
|
return typeof value == 'symbol' ||
|
|
1188
|
-
(
|
|
1102
|
+
(isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
|
|
1189
1103
|
}
|
|
1190
1104
|
|
|
1191
|
-
var isSymbol_1 = isSymbol
|
|
1192
|
-
|
|
1193
|
-
var isSymbol = isSymbol_1;
|
|
1105
|
+
var isSymbol_1 = isSymbol;
|
|
1194
1106
|
|
|
1195
1107
|
/** Used to match property names within property paths. */
|
|
1196
1108
|
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
@@ -1204,27 +1116,25 @@
|
|
|
1204
1116
|
* @param {Object} [object] The object to query keys on.
|
|
1205
1117
|
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
1206
1118
|
*/
|
|
1207
|
-
function isKey
|
|
1119
|
+
function isKey(value, object) {
|
|
1208
1120
|
if (isArray_1(value)) {
|
|
1209
1121
|
return false;
|
|
1210
1122
|
}
|
|
1211
1123
|
var type = typeof value;
|
|
1212
1124
|
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
|
1213
|
-
value == null ||
|
|
1125
|
+
value == null || isSymbol_1(value)) {
|
|
1214
1126
|
return true;
|
|
1215
1127
|
}
|
|
1216
1128
|
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
1217
1129
|
(object != null && value in Object(object));
|
|
1218
1130
|
}
|
|
1219
1131
|
|
|
1220
|
-
var _isKey = isKey
|
|
1132
|
+
var _isKey = isKey;
|
|
1221
1133
|
|
|
1222
1134
|
/* Built-in method references that are verified to be native. */
|
|
1223
|
-
var nativeCreate
|
|
1135
|
+
var nativeCreate = _getNative(Object, 'create');
|
|
1224
1136
|
|
|
1225
|
-
var _nativeCreate = nativeCreate
|
|
1226
|
-
|
|
1227
|
-
var nativeCreate = _nativeCreate;
|
|
1137
|
+
var _nativeCreate = nativeCreate;
|
|
1228
1138
|
|
|
1229
1139
|
/**
|
|
1230
1140
|
* Removes all key-value entries from the hash.
|
|
@@ -1233,12 +1143,12 @@
|
|
|
1233
1143
|
* @name clear
|
|
1234
1144
|
* @memberOf Hash
|
|
1235
1145
|
*/
|
|
1236
|
-
function hashClear
|
|
1237
|
-
this.__data__ =
|
|
1146
|
+
function hashClear() {
|
|
1147
|
+
this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
|
|
1238
1148
|
this.size = 0;
|
|
1239
1149
|
}
|
|
1240
1150
|
|
|
1241
|
-
var _hashClear = hashClear
|
|
1151
|
+
var _hashClear = hashClear;
|
|
1242
1152
|
|
|
1243
1153
|
/**
|
|
1244
1154
|
* Removes `key` and its value from the hash.
|
|
@@ -1250,13 +1160,13 @@
|
|
|
1250
1160
|
* @param {string} key The key of the value to remove.
|
|
1251
1161
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1252
1162
|
*/
|
|
1253
|
-
function hashDelete
|
|
1163
|
+
function hashDelete(key) {
|
|
1254
1164
|
var result = this.has(key) && delete this.__data__[key];
|
|
1255
1165
|
this.size -= result ? 1 : 0;
|
|
1256
1166
|
return result;
|
|
1257
1167
|
}
|
|
1258
1168
|
|
|
1259
|
-
var _hashDelete = hashDelete
|
|
1169
|
+
var _hashDelete = hashDelete;
|
|
1260
1170
|
|
|
1261
1171
|
/** Used to stand-in for `undefined` hash values. */
|
|
1262
1172
|
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
@@ -1276,16 +1186,16 @@
|
|
|
1276
1186
|
* @param {string} key The key of the value to get.
|
|
1277
1187
|
* @returns {*} Returns the entry value.
|
|
1278
1188
|
*/
|
|
1279
|
-
function hashGet
|
|
1189
|
+
function hashGet(key) {
|
|
1280
1190
|
var data = this.__data__;
|
|
1281
|
-
if (
|
|
1191
|
+
if (_nativeCreate) {
|
|
1282
1192
|
var result = data[key];
|
|
1283
1193
|
return result === HASH_UNDEFINED$1 ? undefined : result;
|
|
1284
1194
|
}
|
|
1285
1195
|
return hasOwnProperty$2.call(data, key) ? data[key] : undefined;
|
|
1286
1196
|
}
|
|
1287
1197
|
|
|
1288
|
-
var _hashGet = hashGet
|
|
1198
|
+
var _hashGet = hashGet;
|
|
1289
1199
|
|
|
1290
1200
|
/** Used for built-in method references. */
|
|
1291
1201
|
var objectProto$1 = Object.prototype;
|
|
@@ -1302,12 +1212,12 @@
|
|
|
1302
1212
|
* @param {string} key The key of the entry to check.
|
|
1303
1213
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1304
1214
|
*/
|
|
1305
|
-
function hashHas
|
|
1215
|
+
function hashHas(key) {
|
|
1306
1216
|
var data = this.__data__;
|
|
1307
|
-
return
|
|
1217
|
+
return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$1.call(data, key);
|
|
1308
1218
|
}
|
|
1309
1219
|
|
|
1310
|
-
var _hashHas = hashHas
|
|
1220
|
+
var _hashHas = hashHas;
|
|
1311
1221
|
|
|
1312
1222
|
/** Used to stand-in for `undefined` hash values. */
|
|
1313
1223
|
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
@@ -1322,24 +1232,14 @@
|
|
|
1322
1232
|
* @param {*} value The value to set.
|
|
1323
1233
|
* @returns {Object} Returns the hash instance.
|
|
1324
1234
|
*/
|
|
1325
|
-
function hashSet
|
|
1235
|
+
function hashSet(key, value) {
|
|
1326
1236
|
var data = this.__data__;
|
|
1327
1237
|
this.size += this.has(key) ? 0 : 1;
|
|
1328
|
-
data[key] = (
|
|
1238
|
+
data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
|
1329
1239
|
return this;
|
|
1330
1240
|
}
|
|
1331
1241
|
|
|
1332
|
-
var _hashSet = hashSet
|
|
1333
|
-
|
|
1334
|
-
var hashClear = _hashClear;
|
|
1335
|
-
|
|
1336
|
-
var hashDelete = _hashDelete;
|
|
1337
|
-
|
|
1338
|
-
var hashGet = _hashGet;
|
|
1339
|
-
|
|
1340
|
-
var hashHas = _hashHas;
|
|
1341
|
-
|
|
1342
|
-
var hashSet = _hashSet;
|
|
1242
|
+
var _hashSet = hashSet;
|
|
1343
1243
|
|
|
1344
1244
|
/**
|
|
1345
1245
|
* Creates a hash object.
|
|
@@ -1348,7 +1248,7 @@
|
|
|
1348
1248
|
* @constructor
|
|
1349
1249
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
1350
1250
|
*/
|
|
1351
|
-
function Hash
|
|
1251
|
+
function Hash(entries) {
|
|
1352
1252
|
var index = -1,
|
|
1353
1253
|
length = entries == null ? 0 : entries.length;
|
|
1354
1254
|
|
|
@@ -1360,13 +1260,13 @@
|
|
|
1360
1260
|
}
|
|
1361
1261
|
|
|
1362
1262
|
// Add methods to `Hash`.
|
|
1363
|
-
Hash
|
|
1364
|
-
Hash
|
|
1365
|
-
Hash
|
|
1366
|
-
Hash
|
|
1367
|
-
Hash
|
|
1263
|
+
Hash.prototype.clear = _hashClear;
|
|
1264
|
+
Hash.prototype['delete'] = _hashDelete;
|
|
1265
|
+
Hash.prototype.get = _hashGet;
|
|
1266
|
+
Hash.prototype.has = _hashHas;
|
|
1267
|
+
Hash.prototype.set = _hashSet;
|
|
1368
1268
|
|
|
1369
|
-
var _Hash = Hash
|
|
1269
|
+
var _Hash = Hash;
|
|
1370
1270
|
|
|
1371
1271
|
/**
|
|
1372
1272
|
* Removes all key-value entries from the list cache.
|
|
@@ -1375,12 +1275,12 @@
|
|
|
1375
1275
|
* @name clear
|
|
1376
1276
|
* @memberOf ListCache
|
|
1377
1277
|
*/
|
|
1378
|
-
function listCacheClear
|
|
1278
|
+
function listCacheClear() {
|
|
1379
1279
|
this.__data__ = [];
|
|
1380
1280
|
this.size = 0;
|
|
1381
1281
|
}
|
|
1382
1282
|
|
|
1383
|
-
var _listCacheClear = listCacheClear
|
|
1283
|
+
var _listCacheClear = listCacheClear;
|
|
1384
1284
|
|
|
1385
1285
|
/**
|
|
1386
1286
|
* Performs a
|
|
@@ -1414,13 +1314,11 @@
|
|
|
1414
1314
|
* _.eq(NaN, NaN);
|
|
1415
1315
|
* // => true
|
|
1416
1316
|
*/
|
|
1417
|
-
function eq
|
|
1317
|
+
function eq(value, other) {
|
|
1418
1318
|
return value === other || (value !== value && other !== other);
|
|
1419
1319
|
}
|
|
1420
1320
|
|
|
1421
|
-
var eq_1 = eq
|
|
1422
|
-
|
|
1423
|
-
var eq = eq_1;
|
|
1321
|
+
var eq_1 = eq;
|
|
1424
1322
|
|
|
1425
1323
|
/**
|
|
1426
1324
|
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
@@ -1430,19 +1328,17 @@
|
|
|
1430
1328
|
* @param {*} key The key to search for.
|
|
1431
1329
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
1432
1330
|
*/
|
|
1433
|
-
function assocIndexOf
|
|
1331
|
+
function assocIndexOf(array, key) {
|
|
1434
1332
|
var length = array.length;
|
|
1435
1333
|
while (length--) {
|
|
1436
|
-
if (
|
|
1334
|
+
if (eq_1(array[length][0], key)) {
|
|
1437
1335
|
return length;
|
|
1438
1336
|
}
|
|
1439
1337
|
}
|
|
1440
1338
|
return -1;
|
|
1441
1339
|
}
|
|
1442
1340
|
|
|
1443
|
-
var _assocIndexOf = assocIndexOf
|
|
1444
|
-
|
|
1445
|
-
var assocIndexOf = _assocIndexOf;
|
|
1341
|
+
var _assocIndexOf = assocIndexOf;
|
|
1446
1342
|
|
|
1447
1343
|
/** Used for built-in method references. */
|
|
1448
1344
|
var arrayProto = Array.prototype;
|
|
@@ -1459,9 +1355,9 @@
|
|
|
1459
1355
|
* @param {string} key The key of the value to remove.
|
|
1460
1356
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1461
1357
|
*/
|
|
1462
|
-
function listCacheDelete
|
|
1358
|
+
function listCacheDelete(key) {
|
|
1463
1359
|
var data = this.__data__,
|
|
1464
|
-
index =
|
|
1360
|
+
index = _assocIndexOf(data, key);
|
|
1465
1361
|
|
|
1466
1362
|
if (index < 0) {
|
|
1467
1363
|
return false;
|
|
@@ -1476,7 +1372,7 @@
|
|
|
1476
1372
|
return true;
|
|
1477
1373
|
}
|
|
1478
1374
|
|
|
1479
|
-
var _listCacheDelete = listCacheDelete
|
|
1375
|
+
var _listCacheDelete = listCacheDelete;
|
|
1480
1376
|
|
|
1481
1377
|
/**
|
|
1482
1378
|
* Gets the list cache value for `key`.
|
|
@@ -1487,14 +1383,14 @@
|
|
|
1487
1383
|
* @param {string} key The key of the value to get.
|
|
1488
1384
|
* @returns {*} Returns the entry value.
|
|
1489
1385
|
*/
|
|
1490
|
-
function listCacheGet
|
|
1386
|
+
function listCacheGet(key) {
|
|
1491
1387
|
var data = this.__data__,
|
|
1492
|
-
index =
|
|
1388
|
+
index = _assocIndexOf(data, key);
|
|
1493
1389
|
|
|
1494
1390
|
return index < 0 ? undefined : data[index][1];
|
|
1495
1391
|
}
|
|
1496
1392
|
|
|
1497
|
-
var _listCacheGet = listCacheGet
|
|
1393
|
+
var _listCacheGet = listCacheGet;
|
|
1498
1394
|
|
|
1499
1395
|
/**
|
|
1500
1396
|
* Checks if a list cache value for `key` exists.
|
|
@@ -1505,11 +1401,11 @@
|
|
|
1505
1401
|
* @param {string} key The key of the entry to check.
|
|
1506
1402
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1507
1403
|
*/
|
|
1508
|
-
function listCacheHas
|
|
1509
|
-
return
|
|
1404
|
+
function listCacheHas(key) {
|
|
1405
|
+
return _assocIndexOf(this.__data__, key) > -1;
|
|
1510
1406
|
}
|
|
1511
1407
|
|
|
1512
|
-
var _listCacheHas = listCacheHas
|
|
1408
|
+
var _listCacheHas = listCacheHas;
|
|
1513
1409
|
|
|
1514
1410
|
/**
|
|
1515
1411
|
* Sets the list cache `key` to `value`.
|
|
@@ -1521,9 +1417,9 @@
|
|
|
1521
1417
|
* @param {*} value The value to set.
|
|
1522
1418
|
* @returns {Object} Returns the list cache instance.
|
|
1523
1419
|
*/
|
|
1524
|
-
function listCacheSet
|
|
1420
|
+
function listCacheSet(key, value) {
|
|
1525
1421
|
var data = this.__data__,
|
|
1526
|
-
index =
|
|
1422
|
+
index = _assocIndexOf(data, key);
|
|
1527
1423
|
|
|
1528
1424
|
if (index < 0) {
|
|
1529
1425
|
++this.size;
|
|
@@ -1534,17 +1430,7 @@
|
|
|
1534
1430
|
return this;
|
|
1535
1431
|
}
|
|
1536
1432
|
|
|
1537
|
-
var _listCacheSet = listCacheSet
|
|
1538
|
-
|
|
1539
|
-
var listCacheClear = _listCacheClear;
|
|
1540
|
-
|
|
1541
|
-
var listCacheDelete = _listCacheDelete;
|
|
1542
|
-
|
|
1543
|
-
var listCacheGet = _listCacheGet;
|
|
1544
|
-
|
|
1545
|
-
var listCacheHas = _listCacheHas;
|
|
1546
|
-
|
|
1547
|
-
var listCacheSet = _listCacheSet;
|
|
1433
|
+
var _listCacheSet = listCacheSet;
|
|
1548
1434
|
|
|
1549
1435
|
/**
|
|
1550
1436
|
* Creates an list cache object.
|
|
@@ -1553,7 +1439,7 @@
|
|
|
1553
1439
|
* @constructor
|
|
1554
1440
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
1555
1441
|
*/
|
|
1556
|
-
function ListCache
|
|
1442
|
+
function ListCache(entries) {
|
|
1557
1443
|
var index = -1,
|
|
1558
1444
|
length = entries == null ? 0 : entries.length;
|
|
1559
1445
|
|
|
@@ -1565,17 +1451,13 @@
|
|
|
1565
1451
|
}
|
|
1566
1452
|
|
|
1567
1453
|
// Add methods to `ListCache`.
|
|
1568
|
-
ListCache
|
|
1569
|
-
ListCache
|
|
1570
|
-
ListCache
|
|
1571
|
-
ListCache
|
|
1572
|
-
ListCache
|
|
1454
|
+
ListCache.prototype.clear = _listCacheClear;
|
|
1455
|
+
ListCache.prototype['delete'] = _listCacheDelete;
|
|
1456
|
+
ListCache.prototype.get = _listCacheGet;
|
|
1457
|
+
ListCache.prototype.has = _listCacheHas;
|
|
1458
|
+
ListCache.prototype.set = _listCacheSet;
|
|
1573
1459
|
|
|
1574
|
-
var _ListCache = ListCache
|
|
1575
|
-
|
|
1576
|
-
var Hash = _Hash;
|
|
1577
|
-
|
|
1578
|
-
var ListCache = _ListCache;
|
|
1460
|
+
var _ListCache = ListCache;
|
|
1579
1461
|
|
|
1580
1462
|
/**
|
|
1581
1463
|
* Removes all key-value entries from the map.
|
|
@@ -1584,16 +1466,16 @@
|
|
|
1584
1466
|
* @name clear
|
|
1585
1467
|
* @memberOf MapCache
|
|
1586
1468
|
*/
|
|
1587
|
-
function mapCacheClear
|
|
1469
|
+
function mapCacheClear() {
|
|
1588
1470
|
this.size = 0;
|
|
1589
1471
|
this.__data__ = {
|
|
1590
|
-
'hash': new
|
|
1591
|
-
'map': new (
|
|
1592
|
-
'string': new
|
|
1472
|
+
'hash': new _Hash,
|
|
1473
|
+
'map': new (_Map || _ListCache),
|
|
1474
|
+
'string': new _Hash
|
|
1593
1475
|
};
|
|
1594
1476
|
}
|
|
1595
1477
|
|
|
1596
|
-
var _mapCacheClear = mapCacheClear
|
|
1478
|
+
var _mapCacheClear = mapCacheClear;
|
|
1597
1479
|
|
|
1598
1480
|
/**
|
|
1599
1481
|
* Checks if `value` is suitable for use as unique object key.
|
|
@@ -1602,16 +1484,14 @@
|
|
|
1602
1484
|
* @param {*} value The value to check.
|
|
1603
1485
|
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
1604
1486
|
*/
|
|
1605
|
-
function isKeyable
|
|
1487
|
+
function isKeyable(value) {
|
|
1606
1488
|
var type = typeof value;
|
|
1607
1489
|
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
1608
1490
|
? (value !== '__proto__')
|
|
1609
1491
|
: (value === null);
|
|
1610
1492
|
}
|
|
1611
1493
|
|
|
1612
|
-
var _isKeyable = isKeyable
|
|
1613
|
-
|
|
1614
|
-
var isKeyable = _isKeyable;
|
|
1494
|
+
var _isKeyable = isKeyable;
|
|
1615
1495
|
|
|
1616
1496
|
/**
|
|
1617
1497
|
* Gets the data for `map`.
|
|
@@ -1621,16 +1501,14 @@
|
|
|
1621
1501
|
* @param {string} key The reference key.
|
|
1622
1502
|
* @returns {*} Returns the map data.
|
|
1623
1503
|
*/
|
|
1624
|
-
function getMapData
|
|
1504
|
+
function getMapData(map, key) {
|
|
1625
1505
|
var data = map.__data__;
|
|
1626
|
-
return
|
|
1506
|
+
return _isKeyable(key)
|
|
1627
1507
|
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
1628
1508
|
: data.map;
|
|
1629
1509
|
}
|
|
1630
1510
|
|
|
1631
|
-
var _getMapData = getMapData
|
|
1632
|
-
|
|
1633
|
-
var getMapData = _getMapData;
|
|
1511
|
+
var _getMapData = getMapData;
|
|
1634
1512
|
|
|
1635
1513
|
/**
|
|
1636
1514
|
* Removes `key` and its value from the map.
|
|
@@ -1641,13 +1519,13 @@
|
|
|
1641
1519
|
* @param {string} key The key of the value to remove.
|
|
1642
1520
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1643
1521
|
*/
|
|
1644
|
-
function mapCacheDelete
|
|
1645
|
-
var result =
|
|
1522
|
+
function mapCacheDelete(key) {
|
|
1523
|
+
var result = _getMapData(this, key)['delete'](key);
|
|
1646
1524
|
this.size -= result ? 1 : 0;
|
|
1647
1525
|
return result;
|
|
1648
1526
|
}
|
|
1649
1527
|
|
|
1650
|
-
var _mapCacheDelete = mapCacheDelete
|
|
1528
|
+
var _mapCacheDelete = mapCacheDelete;
|
|
1651
1529
|
|
|
1652
1530
|
/**
|
|
1653
1531
|
* Gets the map value for `key`.
|
|
@@ -1658,11 +1536,11 @@
|
|
|
1658
1536
|
* @param {string} key The key of the value to get.
|
|
1659
1537
|
* @returns {*} Returns the entry value.
|
|
1660
1538
|
*/
|
|
1661
|
-
function mapCacheGet
|
|
1662
|
-
return
|
|
1539
|
+
function mapCacheGet(key) {
|
|
1540
|
+
return _getMapData(this, key).get(key);
|
|
1663
1541
|
}
|
|
1664
1542
|
|
|
1665
|
-
var _mapCacheGet = mapCacheGet
|
|
1543
|
+
var _mapCacheGet = mapCacheGet;
|
|
1666
1544
|
|
|
1667
1545
|
/**
|
|
1668
1546
|
* Checks if a map value for `key` exists.
|
|
@@ -1673,11 +1551,11 @@
|
|
|
1673
1551
|
* @param {string} key The key of the entry to check.
|
|
1674
1552
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1675
1553
|
*/
|
|
1676
|
-
function mapCacheHas
|
|
1677
|
-
return
|
|
1554
|
+
function mapCacheHas(key) {
|
|
1555
|
+
return _getMapData(this, key).has(key);
|
|
1678
1556
|
}
|
|
1679
1557
|
|
|
1680
|
-
var _mapCacheHas = mapCacheHas
|
|
1558
|
+
var _mapCacheHas = mapCacheHas;
|
|
1681
1559
|
|
|
1682
1560
|
/**
|
|
1683
1561
|
* Sets the map `key` to `value`.
|
|
@@ -1689,8 +1567,8 @@
|
|
|
1689
1567
|
* @param {*} value The value to set.
|
|
1690
1568
|
* @returns {Object} Returns the map cache instance.
|
|
1691
1569
|
*/
|
|
1692
|
-
function mapCacheSet
|
|
1693
|
-
var data =
|
|
1570
|
+
function mapCacheSet(key, value) {
|
|
1571
|
+
var data = _getMapData(this, key),
|
|
1694
1572
|
size = data.size;
|
|
1695
1573
|
|
|
1696
1574
|
data.set(key, value);
|
|
@@ -1698,17 +1576,7 @@
|
|
|
1698
1576
|
return this;
|
|
1699
1577
|
}
|
|
1700
1578
|
|
|
1701
|
-
var _mapCacheSet = mapCacheSet
|
|
1702
|
-
|
|
1703
|
-
var mapCacheClear = _mapCacheClear;
|
|
1704
|
-
|
|
1705
|
-
var mapCacheDelete = _mapCacheDelete;
|
|
1706
|
-
|
|
1707
|
-
var mapCacheGet = _mapCacheGet;
|
|
1708
|
-
|
|
1709
|
-
var mapCacheHas = _mapCacheHas;
|
|
1710
|
-
|
|
1711
|
-
var mapCacheSet = _mapCacheSet;
|
|
1579
|
+
var _mapCacheSet = mapCacheSet;
|
|
1712
1580
|
|
|
1713
1581
|
/**
|
|
1714
1582
|
* Creates a map cache object to store key-value pairs.
|
|
@@ -1717,7 +1585,7 @@
|
|
|
1717
1585
|
* @constructor
|
|
1718
1586
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
1719
1587
|
*/
|
|
1720
|
-
function MapCache
|
|
1588
|
+
function MapCache(entries) {
|
|
1721
1589
|
var index = -1,
|
|
1722
1590
|
length = entries == null ? 0 : entries.length;
|
|
1723
1591
|
|
|
@@ -1729,15 +1597,13 @@
|
|
|
1729
1597
|
}
|
|
1730
1598
|
|
|
1731
1599
|
// Add methods to `MapCache`.
|
|
1732
|
-
MapCache
|
|
1733
|
-
MapCache
|
|
1734
|
-
MapCache
|
|
1735
|
-
MapCache
|
|
1736
|
-
MapCache
|
|
1737
|
-
|
|
1738
|
-
var _MapCache = MapCache$1;
|
|
1600
|
+
MapCache.prototype.clear = _mapCacheClear;
|
|
1601
|
+
MapCache.prototype['delete'] = _mapCacheDelete;
|
|
1602
|
+
MapCache.prototype.get = _mapCacheGet;
|
|
1603
|
+
MapCache.prototype.has = _mapCacheHas;
|
|
1604
|
+
MapCache.prototype.set = _mapCacheSet;
|
|
1739
1605
|
|
|
1740
|
-
var
|
|
1606
|
+
var _MapCache = MapCache;
|
|
1741
1607
|
|
|
1742
1608
|
/** Error message constants. */
|
|
1743
1609
|
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
@@ -1786,7 +1652,7 @@
|
|
|
1786
1652
|
* // Replace `_.memoize.Cache`.
|
|
1787
1653
|
* _.memoize.Cache = WeakMap;
|
|
1788
1654
|
*/
|
|
1789
|
-
function memoize
|
|
1655
|
+
function memoize(func, resolver) {
|
|
1790
1656
|
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
|
1791
1657
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1792
1658
|
}
|
|
@@ -1802,16 +1668,14 @@
|
|
|
1802
1668
|
memoized.cache = cache.set(key, result) || cache;
|
|
1803
1669
|
return result;
|
|
1804
1670
|
};
|
|
1805
|
-
memoized.cache = new (memoize
|
|
1671
|
+
memoized.cache = new (memoize.Cache || _MapCache);
|
|
1806
1672
|
return memoized;
|
|
1807
1673
|
}
|
|
1808
1674
|
|
|
1809
1675
|
// Expose `MapCache`.
|
|
1810
|
-
memoize
|
|
1676
|
+
memoize.Cache = _MapCache;
|
|
1811
1677
|
|
|
1812
|
-
var memoize_1 = memoize
|
|
1813
|
-
|
|
1814
|
-
var memoize = memoize_1;
|
|
1678
|
+
var memoize_1 = memoize;
|
|
1815
1679
|
|
|
1816
1680
|
/** Used as the maximum memoize cache size. */
|
|
1817
1681
|
var MAX_MEMOIZE_SIZE = 500;
|
|
@@ -1824,8 +1688,8 @@
|
|
|
1824
1688
|
* @param {Function} func The function to have its output memoized.
|
|
1825
1689
|
* @returns {Function} Returns the new memoized function.
|
|
1826
1690
|
*/
|
|
1827
|
-
function memoizeCapped
|
|
1828
|
-
var result =
|
|
1691
|
+
function memoizeCapped(func) {
|
|
1692
|
+
var result = memoize_1(func, function(key) {
|
|
1829
1693
|
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
1830
1694
|
cache.clear();
|
|
1831
1695
|
}
|
|
@@ -1836,9 +1700,7 @@
|
|
|
1836
1700
|
return result;
|
|
1837
1701
|
}
|
|
1838
1702
|
|
|
1839
|
-
var _memoizeCapped = memoizeCapped
|
|
1840
|
-
|
|
1841
|
-
var memoizeCapped = _memoizeCapped;
|
|
1703
|
+
var _memoizeCapped = memoizeCapped;
|
|
1842
1704
|
|
|
1843
1705
|
/** Used to match property names within property paths. */
|
|
1844
1706
|
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
@@ -1853,7 +1715,7 @@
|
|
|
1853
1715
|
* @param {string} string The string to convert.
|
|
1854
1716
|
* @returns {Array} Returns the property path array.
|
|
1855
1717
|
*/
|
|
1856
|
-
var stringToPath
|
|
1718
|
+
var stringToPath = _memoizeCapped(function(string) {
|
|
1857
1719
|
var result = [];
|
|
1858
1720
|
if (string.charCodeAt(0) === 46 /* . */) {
|
|
1859
1721
|
result.push('');
|
|
@@ -1864,7 +1726,7 @@
|
|
|
1864
1726
|
return result;
|
|
1865
1727
|
});
|
|
1866
1728
|
|
|
1867
|
-
var _stringToPath = stringToPath
|
|
1729
|
+
var _stringToPath = stringToPath;
|
|
1868
1730
|
|
|
1869
1731
|
/**
|
|
1870
1732
|
* A specialized version of `_.map` for arrays without support for iteratee
|
|
@@ -1875,7 +1737,7 @@
|
|
|
1875
1737
|
* @param {Function} iteratee The function invoked per iteration.
|
|
1876
1738
|
* @returns {Array} Returns the new mapped array.
|
|
1877
1739
|
*/
|
|
1878
|
-
function arrayMap
|
|
1740
|
+
function arrayMap(array, iteratee) {
|
|
1879
1741
|
var index = -1,
|
|
1880
1742
|
length = array == null ? 0 : array.length,
|
|
1881
1743
|
result = Array(length);
|
|
@@ -1886,15 +1748,13 @@
|
|
|
1886
1748
|
return result;
|
|
1887
1749
|
}
|
|
1888
1750
|
|
|
1889
|
-
var _arrayMap = arrayMap
|
|
1890
|
-
|
|
1891
|
-
var arrayMap = _arrayMap;
|
|
1751
|
+
var _arrayMap = arrayMap;
|
|
1892
1752
|
|
|
1893
1753
|
/** Used as references for various `Number` constants. */
|
|
1894
1754
|
var INFINITY$1 = 1 / 0;
|
|
1895
1755
|
|
|
1896
1756
|
/** Used to convert symbols to primitives and strings. */
|
|
1897
|
-
var symbolProto =
|
|
1757
|
+
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
1898
1758
|
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
1899
1759
|
|
|
1900
1760
|
/**
|
|
@@ -1905,25 +1765,23 @@
|
|
|
1905
1765
|
* @param {*} value The value to process.
|
|
1906
1766
|
* @returns {string} Returns the string.
|
|
1907
1767
|
*/
|
|
1908
|
-
function baseToString
|
|
1768
|
+
function baseToString(value) {
|
|
1909
1769
|
// Exit early for strings to avoid a performance hit in some environments.
|
|
1910
1770
|
if (typeof value == 'string') {
|
|
1911
1771
|
return value;
|
|
1912
1772
|
}
|
|
1913
1773
|
if (isArray_1(value)) {
|
|
1914
1774
|
// Recursively convert values (susceptible to call stack limits).
|
|
1915
|
-
return
|
|
1775
|
+
return _arrayMap(value, baseToString) + '';
|
|
1916
1776
|
}
|
|
1917
|
-
if (
|
|
1777
|
+
if (isSymbol_1(value)) {
|
|
1918
1778
|
return symbolToString ? symbolToString.call(value) : '';
|
|
1919
1779
|
}
|
|
1920
1780
|
var result = (value + '');
|
|
1921
1781
|
return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
|
|
1922
1782
|
}
|
|
1923
1783
|
|
|
1924
|
-
var _baseToString = baseToString
|
|
1925
|
-
|
|
1926
|
-
var baseToString = _baseToString;
|
|
1784
|
+
var _baseToString = baseToString;
|
|
1927
1785
|
|
|
1928
1786
|
/**
|
|
1929
1787
|
* Converts `value` to a string. An empty string is returned for `null`
|
|
@@ -1946,17 +1804,11 @@
|
|
|
1946
1804
|
* _.toString([1, 2, 3]);
|
|
1947
1805
|
* // => '1,2,3'
|
|
1948
1806
|
*/
|
|
1949
|
-
function toString
|
|
1950
|
-
return value == null ? '' :
|
|
1807
|
+
function toString(value) {
|
|
1808
|
+
return value == null ? '' : _baseToString(value);
|
|
1951
1809
|
}
|
|
1952
1810
|
|
|
1953
|
-
var toString_1 = toString
|
|
1954
|
-
|
|
1955
|
-
var isKey = _isKey;
|
|
1956
|
-
|
|
1957
|
-
var stringToPath = _stringToPath;
|
|
1958
|
-
|
|
1959
|
-
var toString = toString_1;
|
|
1811
|
+
var toString_1 = toString;
|
|
1960
1812
|
|
|
1961
1813
|
/**
|
|
1962
1814
|
* Casts `value` to a path array if it's not one.
|
|
@@ -1966,14 +1818,14 @@
|
|
|
1966
1818
|
* @param {Object} [object] The object to query keys on.
|
|
1967
1819
|
* @returns {Array} Returns the cast property path array.
|
|
1968
1820
|
*/
|
|
1969
|
-
function castPath
|
|
1821
|
+
function castPath(value, object) {
|
|
1970
1822
|
if (isArray_1(value)) {
|
|
1971
1823
|
return value;
|
|
1972
1824
|
}
|
|
1973
|
-
return
|
|
1825
|
+
return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
|
|
1974
1826
|
}
|
|
1975
1827
|
|
|
1976
|
-
var _castPath = castPath
|
|
1828
|
+
var _castPath = castPath;
|
|
1977
1829
|
|
|
1978
1830
|
/** Used as references for various `Number` constants. */
|
|
1979
1831
|
var INFINITY = 1 / 0;
|
|
@@ -1985,19 +1837,15 @@
|
|
|
1985
1837
|
* @param {*} value The value to inspect.
|
|
1986
1838
|
* @returns {string|symbol} Returns the key.
|
|
1987
1839
|
*/
|
|
1988
|
-
function toKey
|
|
1989
|
-
if (typeof value == 'string' ||
|
|
1840
|
+
function toKey(value) {
|
|
1841
|
+
if (typeof value == 'string' || isSymbol_1(value)) {
|
|
1990
1842
|
return value;
|
|
1991
1843
|
}
|
|
1992
1844
|
var result = (value + '');
|
|
1993
1845
|
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
1994
1846
|
}
|
|
1995
1847
|
|
|
1996
|
-
var _toKey = toKey
|
|
1997
|
-
|
|
1998
|
-
var castPath = _castPath;
|
|
1999
|
-
|
|
2000
|
-
var toKey = _toKey;
|
|
1848
|
+
var _toKey = toKey;
|
|
2001
1849
|
|
|
2002
1850
|
/**
|
|
2003
1851
|
* The base implementation of `_.get` without support for default values.
|
|
@@ -2007,21 +1855,19 @@
|
|
|
2007
1855
|
* @param {Array|string} path The path of the property to get.
|
|
2008
1856
|
* @returns {*} Returns the resolved value.
|
|
2009
1857
|
*/
|
|
2010
|
-
function baseGet
|
|
2011
|
-
path =
|
|
1858
|
+
function baseGet(object, path) {
|
|
1859
|
+
path = _castPath(path, object);
|
|
2012
1860
|
|
|
2013
1861
|
var index = 0,
|
|
2014
1862
|
length = path.length;
|
|
2015
1863
|
|
|
2016
1864
|
while (object != null && index < length) {
|
|
2017
|
-
object = object[
|
|
1865
|
+
object = object[_toKey(path[index++])];
|
|
2018
1866
|
}
|
|
2019
1867
|
return (index && index == length) ? object : undefined;
|
|
2020
1868
|
}
|
|
2021
1869
|
|
|
2022
|
-
var _baseGet = baseGet
|
|
2023
|
-
|
|
2024
|
-
var baseGet = _baseGet;
|
|
1870
|
+
var _baseGet = baseGet;
|
|
2025
1871
|
|
|
2026
1872
|
/**
|
|
2027
1873
|
* Gets the value at `path` of `object`. If the resolved value is
|
|
@@ -2049,25 +1895,21 @@
|
|
|
2049
1895
|
* // => 'default'
|
|
2050
1896
|
*/
|
|
2051
1897
|
function get(object, path, defaultValue) {
|
|
2052
|
-
var result = object == null ? undefined :
|
|
1898
|
+
var result = object == null ? undefined : _baseGet(object, path);
|
|
2053
1899
|
return result === undefined ? defaultValue : result;
|
|
2054
1900
|
}
|
|
2055
1901
|
|
|
2056
1902
|
var get_1 = get;
|
|
2057
1903
|
|
|
2058
|
-
var
|
|
2059
|
-
|
|
2060
|
-
var defineProperty$1 = (function() {
|
|
1904
|
+
var defineProperty = (function() {
|
|
2061
1905
|
try {
|
|
2062
|
-
var func =
|
|
1906
|
+
var func = _getNative(Object, 'defineProperty');
|
|
2063
1907
|
func({}, '', {});
|
|
2064
1908
|
return func;
|
|
2065
1909
|
} catch (e) {}
|
|
2066
1910
|
}());
|
|
2067
1911
|
|
|
2068
|
-
var _defineProperty = defineProperty
|
|
2069
|
-
|
|
2070
|
-
var defineProperty = _defineProperty;
|
|
1912
|
+
var _defineProperty = defineProperty;
|
|
2071
1913
|
|
|
2072
1914
|
/**
|
|
2073
1915
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -2078,9 +1920,9 @@
|
|
|
2078
1920
|
* @param {string} key The key of the property to assign.
|
|
2079
1921
|
* @param {*} value The value to assign.
|
|
2080
1922
|
*/
|
|
2081
|
-
function baseAssignValue
|
|
2082
|
-
if (key == '__proto__' &&
|
|
2083
|
-
|
|
1923
|
+
function baseAssignValue(object, key, value) {
|
|
1924
|
+
if (key == '__proto__' && _defineProperty) {
|
|
1925
|
+
_defineProperty(object, key, {
|
|
2084
1926
|
'configurable': true,
|
|
2085
1927
|
'enumerable': true,
|
|
2086
1928
|
'value': value,
|
|
@@ -2091,9 +1933,7 @@
|
|
|
2091
1933
|
}
|
|
2092
1934
|
}
|
|
2093
1935
|
|
|
2094
|
-
var _baseAssignValue = baseAssignValue
|
|
2095
|
-
|
|
2096
|
-
var baseAssignValue = _baseAssignValue;
|
|
1936
|
+
var _baseAssignValue = baseAssignValue;
|
|
2097
1937
|
|
|
2098
1938
|
/** Used for built-in method references. */
|
|
2099
1939
|
var objectProto = Object.prototype;
|
|
@@ -2111,15 +1951,15 @@
|
|
|
2111
1951
|
* @param {string} key The key of the property to assign.
|
|
2112
1952
|
* @param {*} value The value to assign.
|
|
2113
1953
|
*/
|
|
2114
|
-
function assignValue
|
|
1954
|
+
function assignValue(object, key, value) {
|
|
2115
1955
|
var objValue = object[key];
|
|
2116
|
-
if (!(hasOwnProperty.call(object, key) &&
|
|
1956
|
+
if (!(hasOwnProperty.call(object, key) && eq_1(objValue, value)) ||
|
|
2117
1957
|
(value === undefined && !(key in object))) {
|
|
2118
|
-
|
|
1958
|
+
_baseAssignValue(object, key, value);
|
|
2119
1959
|
}
|
|
2120
1960
|
}
|
|
2121
1961
|
|
|
2122
|
-
var _assignValue = assignValue
|
|
1962
|
+
var _assignValue = assignValue;
|
|
2123
1963
|
|
|
2124
1964
|
/** Used as references for various `Number` constants. */
|
|
2125
1965
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
@@ -2135,7 +1975,7 @@
|
|
|
2135
1975
|
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
2136
1976
|
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
2137
1977
|
*/
|
|
2138
|
-
function isIndex
|
|
1978
|
+
function isIndex(value, length) {
|
|
2139
1979
|
var type = typeof value;
|
|
2140
1980
|
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
2141
1981
|
|
|
@@ -2145,11 +1985,7 @@
|
|
|
2145
1985
|
(value > -1 && value % 1 == 0 && value < length);
|
|
2146
1986
|
}
|
|
2147
1987
|
|
|
2148
|
-
var _isIndex = isIndex
|
|
2149
|
-
|
|
2150
|
-
var assignValue = _assignValue;
|
|
2151
|
-
|
|
2152
|
-
var isIndex = _isIndex;
|
|
1988
|
+
var _isIndex = isIndex;
|
|
2153
1989
|
|
|
2154
1990
|
/**
|
|
2155
1991
|
* The base implementation of `_.set`.
|
|
@@ -2161,11 +1997,11 @@
|
|
|
2161
1997
|
* @param {Function} [customizer] The function to customize path creation.
|
|
2162
1998
|
* @returns {Object} Returns `object`.
|
|
2163
1999
|
*/
|
|
2164
|
-
function baseSet
|
|
2000
|
+
function baseSet(object, path, value, customizer) {
|
|
2165
2001
|
if (!isObject_1(object)) {
|
|
2166
2002
|
return object;
|
|
2167
2003
|
}
|
|
2168
|
-
path =
|
|
2004
|
+
path = _castPath(path, object);
|
|
2169
2005
|
|
|
2170
2006
|
var index = -1,
|
|
2171
2007
|
length = path.length,
|
|
@@ -2173,7 +2009,7 @@
|
|
|
2173
2009
|
nested = object;
|
|
2174
2010
|
|
|
2175
2011
|
while (nested != null && ++index < length) {
|
|
2176
|
-
var key =
|
|
2012
|
+
var key = _toKey(path[index]),
|
|
2177
2013
|
newValue = value;
|
|
2178
2014
|
|
|
2179
2015
|
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
@@ -2186,18 +2022,16 @@
|
|
|
2186
2022
|
if (newValue === undefined) {
|
|
2187
2023
|
newValue = isObject_1(objValue)
|
|
2188
2024
|
? objValue
|
|
2189
|
-
: (
|
|
2025
|
+
: (_isIndex(path[index + 1]) ? [] : {});
|
|
2190
2026
|
}
|
|
2191
2027
|
}
|
|
2192
|
-
|
|
2028
|
+
_assignValue(nested, key, newValue);
|
|
2193
2029
|
nested = nested[key];
|
|
2194
2030
|
}
|
|
2195
2031
|
return object;
|
|
2196
2032
|
}
|
|
2197
2033
|
|
|
2198
|
-
var _baseSet = baseSet
|
|
2199
|
-
|
|
2200
|
-
var baseSet = _baseSet;
|
|
2034
|
+
var _baseSet = baseSet;
|
|
2201
2035
|
|
|
2202
2036
|
/**
|
|
2203
2037
|
* Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
|
|
@@ -2228,25 +2062,23 @@
|
|
|
2228
2062
|
* // => 5
|
|
2229
2063
|
*/
|
|
2230
2064
|
function set(object, path, value) {
|
|
2231
|
-
return object == null ? object :
|
|
2065
|
+
return object == null ? object : _baseSet(object, path, value);
|
|
2232
2066
|
}
|
|
2233
2067
|
|
|
2234
2068
|
var set_1 = set;
|
|
2235
2069
|
|
|
2236
|
-
var set$1 = set_1;
|
|
2237
|
-
|
|
2238
2070
|
var _ = {
|
|
2239
|
-
isEmpty:
|
|
2240
|
-
isNull:
|
|
2241
|
-
isUndefined:
|
|
2242
|
-
isFunction:
|
|
2243
|
-
isObject:
|
|
2244
|
-
isString:
|
|
2245
|
-
isNumber:
|
|
2246
|
-
isArray:
|
|
2247
|
-
isRegExp:
|
|
2248
|
-
get:
|
|
2249
|
-
set:
|
|
2071
|
+
isEmpty: isEmpty_1,
|
|
2072
|
+
isNull: isNull_1,
|
|
2073
|
+
isUndefined: isUndefined_1,
|
|
2074
|
+
isFunction: isFunction_1,
|
|
2075
|
+
isObject: isObject_1,
|
|
2076
|
+
isString: isString_1,
|
|
2077
|
+
isNumber: isNumber_1,
|
|
2078
|
+
isArray: isArray_1,
|
|
2079
|
+
isRegExp: isRegExp_1,
|
|
2080
|
+
get: get_1,
|
|
2081
|
+
set: set_1
|
|
2250
2082
|
};
|
|
2251
2083
|
|
|
2252
2084
|
function Debug(name) {
|
|
@@ -3108,8 +2940,7 @@
|
|
|
3108
2940
|
getParameterByName: getParameterByName,
|
|
3109
2941
|
getParamsAsObject: getParamsAsObject,
|
|
3110
2942
|
toQueryString: toQueryString,
|
|
3111
|
-
};
|
|
3112
|
-
var queryString = QueryString;
|
|
2943
|
+
};
|
|
3113
2944
|
|
|
3114
2945
|
const REGEXP_SPECIAL_UNICODE = new RegExp('[\\u0300-\\u036f]', 'g');
|
|
3115
2946
|
const REGEXP_ACCENT_D = new RegExp('[đ|Đ]', 'g');
|
|
@@ -3257,7 +3088,8 @@
|
|
|
3257
3088
|
const formattedStr = str
|
|
3258
3089
|
.replace(/\n/g, '\\n')
|
|
3259
3090
|
.replace(/\r/g, '\\r')
|
|
3260
|
-
.replace(/\t/g, '\\t')
|
|
3091
|
+
.replace(/\t/g, '\\t')
|
|
3092
|
+
.replace(/\x00/g, '');
|
|
3261
3093
|
return JSON.parse(formattedStr, (key, value) => {
|
|
3262
3094
|
return value;
|
|
3263
3095
|
});
|
|
@@ -3431,7 +3263,7 @@
|
|
|
3431
3263
|
if (!_.isUndefined(currentVersion)) {
|
|
3432
3264
|
inputData.currentVersion = currentVersion;
|
|
3433
3265
|
}
|
|
3434
|
-
const api =
|
|
3266
|
+
const api = QueryString.appendToUrl(`${API_DOMAIN}${H5_API.GET_APP_INFO}`, inputData);
|
|
3435
3267
|
const msgApi = yield fetch(api, {
|
|
3436
3268
|
credentials: 'include'
|
|
3437
3269
|
});
|
|
@@ -3791,9 +3623,7 @@
|
|
|
3791
3623
|
}
|
|
3792
3624
|
});
|
|
3793
3625
|
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
class ZMPEEmitter extends EventEmitter {
|
|
3626
|
+
class ZMPEEmitter extends eventemitter3 {
|
|
3797
3627
|
constructor() {
|
|
3798
3628
|
super();
|
|
3799
3629
|
this.debug = Debug("zmp:event-emitter");
|
|
@@ -3905,9 +3735,9 @@
|
|
|
3905
3735
|
}
|
|
3906
3736
|
function execute(url, method, params, cb) {
|
|
3907
3737
|
params.suppress_http_code = 1;
|
|
3908
|
-
var data =
|
|
3738
|
+
var data = QueryString.encode(params);
|
|
3909
3739
|
if (method != 'post') {
|
|
3910
|
-
url =
|
|
3740
|
+
url = QueryString.appendToUrl(url, data);
|
|
3911
3741
|
data = '';
|
|
3912
3742
|
}
|
|
3913
3743
|
var request = createCORSRequest(method, url);
|
|
@@ -3938,10 +3768,9 @@
|
|
|
3938
3768
|
}
|
|
3939
3769
|
var CORSRequest = {
|
|
3940
3770
|
execute: execute
|
|
3941
|
-
};
|
|
3942
|
-
var CORSRequest$1 = CORSRequest;
|
|
3771
|
+
};
|
|
3943
3772
|
|
|
3944
|
-
class ZaloJSBridge extends
|
|
3773
|
+
class ZaloJSBridge extends eventemitter3 {
|
|
3945
3774
|
constructor() {
|
|
3946
3775
|
super();
|
|
3947
3776
|
this.debug = Debug('zmp:ZaloJSBridge');
|
|
@@ -3992,7 +3821,7 @@
|
|
|
3992
3821
|
}
|
|
3993
3822
|
sendLogData(data) {
|
|
3994
3823
|
try {
|
|
3995
|
-
CORSRequest
|
|
3824
|
+
CORSRequest.execute('https://h5.zalo.me/log/async', 'post', {
|
|
3996
3825
|
appId: window.APP_ID,
|
|
3997
3826
|
data: JSON.stringify(data)
|
|
3998
3827
|
}, (response) => { });
|
|
@@ -4233,7 +4062,7 @@
|
|
|
4233
4062
|
}
|
|
4234
4063
|
_ZJSBridgeProvider_bridge = new WeakMap();
|
|
4235
4064
|
|
|
4236
|
-
var version = "2.19.
|
|
4065
|
+
var version = "2.19.2";
|
|
4237
4066
|
|
|
4238
4067
|
class Basics {
|
|
4239
4068
|
/**
|
|
@@ -4587,8 +4416,7 @@
|
|
|
4587
4416
|
}
|
|
4588
4417
|
}
|
|
4589
4418
|
_Logger_logLevel = new WeakMap(), _Logger_friendly = new WeakMap(), _Logger_content = new WeakMap(), _Logger_metric = new WeakMap(), _Logger_internalLog = new WeakMap();
|
|
4590
|
-
const logger = new Logger();
|
|
4591
|
-
var logger$1 = logger;
|
|
4419
|
+
const logger = new Logger();
|
|
4592
4420
|
|
|
4593
4421
|
class Device {
|
|
4594
4422
|
/**
|
|
@@ -4687,7 +4515,7 @@
|
|
|
4687
4515
|
callback(res);
|
|
4688
4516
|
})
|
|
4689
4517
|
.catch((error) => {
|
|
4690
|
-
logger
|
|
4518
|
+
logger.error(error, 'onNetworkStatusChange');
|
|
4691
4519
|
});
|
|
4692
4520
|
});
|
|
4693
4521
|
});
|
|
@@ -5185,6 +5013,18 @@
|
|
|
5185
5013
|
});
|
|
5186
5014
|
});
|
|
5187
5015
|
}
|
|
5016
|
+
/**
|
|
5017
|
+
* Open App Store.
|
|
5018
|
+
* @async
|
|
5019
|
+
* @function openAppStore
|
|
5020
|
+
* @category Device
|
|
5021
|
+
*
|
|
5022
|
+
*/
|
|
5023
|
+
static openAppStore(object) {
|
|
5024
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5025
|
+
return yield this.callNative(ACTION.OPEN_APPSTORE, object);
|
|
5026
|
+
});
|
|
5027
|
+
}
|
|
5188
5028
|
}
|
|
5189
5029
|
|
|
5190
5030
|
var _LocalResourceStorage_storage, _LocalResourceStorage_prefix, _LocalResourceStorage_resourceInfo;
|
|
@@ -5224,7 +5064,7 @@
|
|
|
5224
5064
|
}
|
|
5225
5065
|
}
|
|
5226
5066
|
catch (error) {
|
|
5227
|
-
logger
|
|
5067
|
+
logger.error(error, 'LocalResourceStorage > findAllCurrentDataByApp');
|
|
5228
5068
|
}
|
|
5229
5069
|
}
|
|
5230
5070
|
get(keys) {
|
|
@@ -6203,15 +6043,14 @@
|
|
|
6203
6043
|
edit_view: Object.assign(Object.assign({}, defaultEditView), editView),
|
|
6204
6044
|
silent_request: silentRequest,
|
|
6205
6045
|
upload: uploadSetting,
|
|
6206
|
-
|
|
6046
|
+
max_select_items: maxSelectItem
|
|
6207
6047
|
}, {
|
|
6208
6048
|
isMultiCallback: true,
|
|
6209
6049
|
callback: (nativeData, error) => {
|
|
6210
|
-
var _a
|
|
6050
|
+
var _a;
|
|
6211
6051
|
if (nativeData.error_code === 0) {
|
|
6212
|
-
const resultContent = stringToData((_a = nativeData.data) === null || _a === void 0 ? void 0 : _a.result_content);
|
|
6213
6052
|
const res = {
|
|
6214
|
-
|
|
6053
|
+
data: (_a = nativeData.data) === null || _a === void 0 ? void 0 : _a.result_content
|
|
6215
6054
|
};
|
|
6216
6055
|
return Promise.resolve(res);
|
|
6217
6056
|
}
|
|
@@ -6252,7 +6091,7 @@
|
|
|
6252
6091
|
try {
|
|
6253
6092
|
let searchString = new URL(url).searchParams.toString();
|
|
6254
6093
|
if (searchString) {
|
|
6255
|
-
result =
|
|
6094
|
+
result = QueryString.getParamsAsObject(searchString);
|
|
6256
6095
|
}
|
|
6257
6096
|
}
|
|
6258
6097
|
catch (err) {
|
|
@@ -6410,6 +6249,7 @@
|
|
|
6410
6249
|
this.openMediaPicker = Zalo.openMediaPicker;
|
|
6411
6250
|
this.openOutApp = Zalo.openOutApp;
|
|
6412
6251
|
this.closeLoading = Window.closeLoading;
|
|
6252
|
+
this.openAppStore = Device.openAppStore;
|
|
6413
6253
|
__classPrivateFieldSet(this, _ZaloMiniProgramSDKService_zOAuth, null, "f");
|
|
6414
6254
|
__classPrivateFieldSet(this, _ZaloMiniProgramSDKService_zOAuthVrf, null, "f");
|
|
6415
6255
|
__classPrivateFieldSet(this, _ZaloMiniProgramSDKService_accessToken, null, "f");
|
|
@@ -6870,6 +6710,9 @@
|
|
|
6870
6710
|
this.closeLoading = (when) => {
|
|
6871
6711
|
return Promise.resolve();
|
|
6872
6712
|
};
|
|
6713
|
+
this.openAppStore = (data) => {
|
|
6714
|
+
return Promise.resolve();
|
|
6715
|
+
};
|
|
6873
6716
|
}
|
|
6874
6717
|
on(event, fn, context) {
|
|
6875
6718
|
throw new Error('Method not implemented.');
|
|
@@ -6886,9 +6729,10 @@
|
|
|
6886
6729
|
openMediaPicker(type, serverUpload, maxItemSize, editView, silentRequest, maxSelectItem) {
|
|
6887
6730
|
console.warn('This api only works on zalo app');
|
|
6888
6731
|
return Promise.resolve({
|
|
6889
|
-
|
|
6732
|
+
data: ""
|
|
6890
6733
|
});
|
|
6891
6734
|
}
|
|
6735
|
+
;
|
|
6892
6736
|
}
|
|
6893
6737
|
_MockSDKService_appId = new WeakMap(), _MockSDKService_appConfig = new WeakMap(), _MockSDKService_zOAuth = new WeakMap(), _MockSDKService_accessToken = new WeakMap(), _MockSDKService_cache = new WeakMap(), _MockSDKService_loggedId = new WeakMap();
|
|
6894
6738
|
|
|
@@ -7341,9 +7185,9 @@
|
|
|
7341
7185
|
openWebview(object) {
|
|
7342
7186
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7343
7187
|
const url = new URL(object.url);
|
|
7344
|
-
const typeInapp = url.searchParams.get(
|
|
7188
|
+
const typeInapp = url.searchParams.get('typeInapp');
|
|
7345
7189
|
if (_.isEmpty(typeInapp)) {
|
|
7346
|
-
url.searchParams.set(
|
|
7190
|
+
url.searchParams.set('typeInapp', '1');
|
|
7347
7191
|
}
|
|
7348
7192
|
yield __classPrivateFieldGet(this, _SDKCreator_sdkService, "f").openWebview(url.href);
|
|
7349
7193
|
});
|
|
@@ -7403,7 +7247,7 @@
|
|
|
7403
7247
|
users = uIds.map((item) => {
|
|
7404
7248
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
7405
7249
|
return {
|
|
7406
|
-
id: ((_b = (_a = resData.data[item]) === null || _a === void 0 ? void 0 : _a.user_info) === null || _b === void 0 ? void 0 : _b.user_id_by_app) ||
|
|
7250
|
+
id: ((_b = (_a = resData.data[item]) === null || _a === void 0 ? void 0 : _a.user_info) === null || _b === void 0 ? void 0 : _b.user_id_by_app) || '',
|
|
7407
7251
|
profile: {
|
|
7408
7252
|
name: (_d = (_c = resData.data[item]) === null || _c === void 0 ? void 0 : _c.user_info) === null || _d === void 0 ? void 0 : _d.name,
|
|
7409
7253
|
avatar: (_h = (_g = (_f = (_e = resData.data[item]) === null || _e === void 0 ? void 0 : _e.user_info) === null || _f === void 0 ? void 0 : _f.picture) === null || _g === void 0 ? void 0 : _g.data) === null || _h === void 0 ? void 0 : _h.url
|
|
@@ -7471,6 +7315,14 @@
|
|
|
7471
7315
|
return yield __classPrivateFieldGet(this, _SDKCreator_sdkService, "f").closeLoading('user action');
|
|
7472
7316
|
});
|
|
7473
7317
|
}
|
|
7318
|
+
requestUpdateZalo(object) {
|
|
7319
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
7320
|
+
const appStoreURL = checkPlatform().isIOS
|
|
7321
|
+
? 'https://apps.apple.com/vn/app/zalo/id579523206'
|
|
7322
|
+
: 'https://play.google.com/store/apps/details?id=com.zing.zalo';
|
|
7323
|
+
return yield __classPrivateFieldGet(this, _SDKCreator_sdkService, "f").openOutApp(appStoreURL);
|
|
7324
|
+
});
|
|
7325
|
+
}
|
|
7474
7326
|
}
|
|
7475
7327
|
_SDKCreator_sdkService = new WeakMap();
|
|
7476
7328
|
__decorate([
|
|
@@ -7858,9 +7710,9 @@
|
|
|
7858
7710
|
validate,
|
|
7859
7711
|
__param(0, checkType('object', {
|
|
7860
7712
|
type: checkData('string', {
|
|
7861
|
-
values: ['photo', 'video', 'file'
|
|
7713
|
+
values: ['photo', 'video', 'file']
|
|
7862
7714
|
}),
|
|
7863
|
-
|
|
7715
|
+
serverUploadUrl: checkData('url'),
|
|
7864
7716
|
'maxItemSize?': checkData('number', { min: 0 }),
|
|
7865
7717
|
'editView?': checkData('object'),
|
|
7866
7718
|
'editView.enable?': checkData('boolean'),
|
|
@@ -7885,6 +7737,10 @@
|
|
|
7885
7737
|
handleError,
|
|
7886
7738
|
validate
|
|
7887
7739
|
], SDKCreator.prototype, "closeLoading", null);
|
|
7740
|
+
__decorate([
|
|
7741
|
+
handleError,
|
|
7742
|
+
validate
|
|
7743
|
+
], SDKCreator.prototype, "requestUpdateZalo", null);
|
|
7888
7744
|
class ZaloMiniAppSDKCreator extends SDKCreator {
|
|
7889
7745
|
getServiceInstance() {
|
|
7890
7746
|
return ZaloMiniProgramSDKService.getInstance();
|
|
@@ -7969,7 +7825,7 @@
|
|
|
7969
7825
|
if (object.method) {
|
|
7970
7826
|
params.method = object.method;
|
|
7971
7827
|
}
|
|
7972
|
-
const buildURLQuery =
|
|
7828
|
+
const buildURLQuery = QueryString.encode(params);
|
|
7973
7829
|
const h5Url = new URL(`?${buildURLQuery}`, PAYMENT_H5_URL).toString();
|
|
7974
7830
|
yield sdk.openWebview({
|
|
7975
7831
|
url: h5Url,
|
|
@@ -8004,8 +7860,8 @@
|
|
|
8004
7860
|
id = inputData.appTransID || inputData.orderId || inputData.apptransid;
|
|
8005
7861
|
}
|
|
8006
7862
|
if (typeof inputData === 'string') {
|
|
8007
|
-
const orderId =
|
|
8008
|
-
const appTransID =
|
|
7863
|
+
const orderId = QueryString.getParameterByName("orderId", inputData);
|
|
7864
|
+
const appTransID = QueryString.getParameterByName("appTransID", inputData) || QueryString.getParameterByName("apptransid", inputData);
|
|
8009
7865
|
id = orderId || appTransID;
|
|
8010
7866
|
}
|
|
8011
7867
|
const getConfig = {
|