UNPKG

80.4 kBJavaScriptView Raw
1(function (global, factory) {
2 typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
3 typeof define === 'function' && define.amd ? define(['jquery'], factory) :
4 (global = global || self, factory(global.jQuery));
5}(this, function ($) { 'use strict';
6
7 $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
8
9 var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
10
11 function createCommonjsModule(fn, module) {
12 return module = { exports: {} }, fn(module, module.exports), module.exports;
13 }
14
15 var O = 'object';
16 var check = function (it) {
17 return it && it.Math == Math && it;
18 };
19
20 // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
21 var global_1 =
22 // eslint-disable-next-line no-undef
23 check(typeof globalThis == O && globalThis) ||
24 check(typeof window == O && window) ||
25 check(typeof self == O && self) ||
26 check(typeof commonjsGlobal == O && commonjsGlobal) ||
27 // eslint-disable-next-line no-new-func
28 Function('return this')();
29
30 var fails = function (exec) {
31 try {
32 return !!exec();
33 } catch (error) {
34 return true;
35 }
36 };
37
38 // Thank's IE8 for his funny defineProperty
39 var descriptors = !fails(function () {
40 return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
41 });
42
43 var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
44 var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
45
46 // Nashorn ~ JDK8 bug
47 var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
48
49 // `Object.prototype.propertyIsEnumerable` method implementation
50 // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
51 var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
52 var descriptor = getOwnPropertyDescriptor(this, V);
53 return !!descriptor && descriptor.enumerable;
54 } : nativePropertyIsEnumerable;
55
56 var objectPropertyIsEnumerable = {
57 f: f
58 };
59
60 var createPropertyDescriptor = function (bitmap, value) {
61 return {
62 enumerable: !(bitmap & 1),
63 configurable: !(bitmap & 2),
64 writable: !(bitmap & 4),
65 value: value
66 };
67 };
68
69 var toString = {}.toString;
70
71 var classofRaw = function (it) {
72 return toString.call(it).slice(8, -1);
73 };
74
75 var split = ''.split;
76
77 // fallback for non-array-like ES3 and non-enumerable old V8 strings
78 var indexedObject = fails(function () {
79 // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
80 // eslint-disable-next-line no-prototype-builtins
81 return !Object('z').propertyIsEnumerable(0);
82 }) ? function (it) {
83 return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
84 } : Object;
85
86 // `RequireObjectCoercible` abstract operation
87 // https://tc39.github.io/ecma262/#sec-requireobjectcoercible
88 var requireObjectCoercible = function (it) {
89 if (it == undefined) throw TypeError("Can't call method on " + it);
90 return it;
91 };
92
93 // toObject with fallback for non-array-like ES3 strings
94
95
96
97 var toIndexedObject = function (it) {
98 return indexedObject(requireObjectCoercible(it));
99 };
100
101 var isObject = function (it) {
102 return typeof it === 'object' ? it !== null : typeof it === 'function';
103 };
104
105 // `ToPrimitive` abstract operation
106 // https://tc39.github.io/ecma262/#sec-toprimitive
107 // instead of the ES6 spec version, we didn't implement @@toPrimitive case
108 // and the second argument - flag - preferred type is a string
109 var toPrimitive = function (input, PREFERRED_STRING) {
110 if (!isObject(input)) return input;
111 var fn, val;
112 if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
113 if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
114 if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
115 throw TypeError("Can't convert object to primitive value");
116 };
117
118 var hasOwnProperty = {}.hasOwnProperty;
119
120 var has = function (it, key) {
121 return hasOwnProperty.call(it, key);
122 };
123
124 var document = global_1.document;
125 // typeof document.createElement is 'object' in old IE
126 var EXISTS = isObject(document) && isObject(document.createElement);
127
128 var documentCreateElement = function (it) {
129 return EXISTS ? document.createElement(it) : {};
130 };
131
132 // Thank's IE8 for his funny defineProperty
133 var ie8DomDefine = !descriptors && !fails(function () {
134 return Object.defineProperty(documentCreateElement('div'), 'a', {
135 get: function () { return 7; }
136 }).a != 7;
137 });
138
139 var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
140
141 // `Object.getOwnPropertyDescriptor` method
142 // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
143 var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
144 O = toIndexedObject(O);
145 P = toPrimitive(P, true);
146 if (ie8DomDefine) try {
147 return nativeGetOwnPropertyDescriptor(O, P);
148 } catch (error) { /* empty */ }
149 if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
150 };
151
152 var objectGetOwnPropertyDescriptor = {
153 f: f$1
154 };
155
156 var anObject = function (it) {
157 if (!isObject(it)) {
158 throw TypeError(String(it) + ' is not an object');
159 } return it;
160 };
161
162 var nativeDefineProperty = Object.defineProperty;
163
164 // `Object.defineProperty` method
165 // https://tc39.github.io/ecma262/#sec-object.defineproperty
166 var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
167 anObject(O);
168 P = toPrimitive(P, true);
169 anObject(Attributes);
170 if (ie8DomDefine) try {
171 return nativeDefineProperty(O, P, Attributes);
172 } catch (error) { /* empty */ }
173 if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
174 if ('value' in Attributes) O[P] = Attributes.value;
175 return O;
176 };
177
178 var objectDefineProperty = {
179 f: f$2
180 };
181
182 var hide = descriptors ? function (object, key, value) {
183 return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
184 } : function (object, key, value) {
185 object[key] = value;
186 return object;
187 };
188
189 var setGlobal = function (key, value) {
190 try {
191 hide(global_1, key, value);
192 } catch (error) {
193 global_1[key] = value;
194 } return value;
195 };
196
197 var shared = createCommonjsModule(function (module) {
198 var SHARED = '__core-js_shared__';
199 var store = global_1[SHARED] || setGlobal(SHARED, {});
200
201 (module.exports = function (key, value) {
202 return store[key] || (store[key] = value !== undefined ? value : {});
203 })('versions', []).push({
204 version: '3.1.3',
205 mode: 'global',
206 copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
207 });
208 });
209
210 var functionToString = shared('native-function-to-string', Function.toString);
211
212 var WeakMap = global_1.WeakMap;
213
214 var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(functionToString.call(WeakMap));
215
216 var id = 0;
217 var postfix = Math.random();
218
219 var uid = function (key) {
220 return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
221 };
222
223 var keys = shared('keys');
224
225 var sharedKey = function (key) {
226 return keys[key] || (keys[key] = uid(key));
227 };
228
229 var hiddenKeys = {};
230
231 var WeakMap$1 = global_1.WeakMap;
232 var set, get, has$1;
233
234 var enforce = function (it) {
235 return has$1(it) ? get(it) : set(it, {});
236 };
237
238 var getterFor = function (TYPE) {
239 return function (it) {
240 var state;
241 if (!isObject(it) || (state = get(it)).type !== TYPE) {
242 throw TypeError('Incompatible receiver, ' + TYPE + ' required');
243 } return state;
244 };
245 };
246
247 if (nativeWeakMap) {
248 var store = new WeakMap$1();
249 var wmget = store.get;
250 var wmhas = store.has;
251 var wmset = store.set;
252 set = function (it, metadata) {
253 wmset.call(store, it, metadata);
254 return metadata;
255 };
256 get = function (it) {
257 return wmget.call(store, it) || {};
258 };
259 has$1 = function (it) {
260 return wmhas.call(store, it);
261 };
262 } else {
263 var STATE = sharedKey('state');
264 hiddenKeys[STATE] = true;
265 set = function (it, metadata) {
266 hide(it, STATE, metadata);
267 return metadata;
268 };
269 get = function (it) {
270 return has(it, STATE) ? it[STATE] : {};
271 };
272 has$1 = function (it) {
273 return has(it, STATE);
274 };
275 }
276
277 var internalState = {
278 set: set,
279 get: get,
280 has: has$1,
281 enforce: enforce,
282 getterFor: getterFor
283 };
284
285 var redefine = createCommonjsModule(function (module) {
286 var getInternalState = internalState.get;
287 var enforceInternalState = internalState.enforce;
288 var TEMPLATE = String(functionToString).split('toString');
289
290 shared('inspectSource', function (it) {
291 return functionToString.call(it);
292 });
293
294 (module.exports = function (O, key, value, options) {
295 var unsafe = options ? !!options.unsafe : false;
296 var simple = options ? !!options.enumerable : false;
297 var noTargetGet = options ? !!options.noTargetGet : false;
298 if (typeof value == 'function') {
299 if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key);
300 enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
301 }
302 if (O === global_1) {
303 if (simple) O[key] = value;
304 else setGlobal(key, value);
305 return;
306 } else if (!unsafe) {
307 delete O[key];
308 } else if (!noTargetGet && O[key]) {
309 simple = true;
310 }
311 if (simple) O[key] = value;
312 else hide(O, key, value);
313 // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
314 })(Function.prototype, 'toString', function toString() {
315 return typeof this == 'function' && getInternalState(this).source || functionToString.call(this);
316 });
317 });
318
319 var path = global_1;
320
321 var aFunction = function (variable) {
322 return typeof variable == 'function' ? variable : undefined;
323 };
324
325 var getBuiltIn = function (namespace, method) {
326 return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
327 : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
328 };
329
330 var ceil = Math.ceil;
331 var floor = Math.floor;
332
333 // `ToInteger` abstract operation
334 // https://tc39.github.io/ecma262/#sec-tointeger
335 var toInteger = function (argument) {
336 return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
337 };
338
339 var min = Math.min;
340
341 // `ToLength` abstract operation
342 // https://tc39.github.io/ecma262/#sec-tolength
343 var toLength = function (argument) {
344 return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
345 };
346
347 var max = Math.max;
348 var min$1 = Math.min;
349
350 // Helper for a popular repeating case of the spec:
351 // Let integer be ? ToInteger(index).
352 // If integer < 0, let result be max((length + integer), 0); else let result be min(length, length).
353 var toAbsoluteIndex = function (index, length) {
354 var integer = toInteger(index);
355 return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
356 };
357
358 // `Array.prototype.{ indexOf, includes }` methods implementation
359 var createMethod = function (IS_INCLUDES) {
360 return function ($this, el, fromIndex) {
361 var O = toIndexedObject($this);
362 var length = toLength(O.length);
363 var index = toAbsoluteIndex(fromIndex, length);
364 var value;
365 // Array#includes uses SameValueZero equality algorithm
366 // eslint-disable-next-line no-self-compare
367 if (IS_INCLUDES && el != el) while (length > index) {
368 value = O[index++];
369 // eslint-disable-next-line no-self-compare
370 if (value != value) return true;
371 // Array#indexOf ignores holes, Array#includes - not
372 } else for (;length > index; index++) {
373 if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
374 } return !IS_INCLUDES && -1;
375 };
376 };
377
378 var arrayIncludes = {
379 // `Array.prototype.includes` method
380 // https://tc39.github.io/ecma262/#sec-array.prototype.includes
381 includes: createMethod(true),
382 // `Array.prototype.indexOf` method
383 // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
384 indexOf: createMethod(false)
385 };
386
387 var indexOf = arrayIncludes.indexOf;
388
389
390 var objectKeysInternal = function (object, names) {
391 var O = toIndexedObject(object);
392 var i = 0;
393 var result = [];
394 var key;
395 for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
396 // Don't enum bug & hidden keys
397 while (names.length > i) if (has(O, key = names[i++])) {
398 ~indexOf(result, key) || result.push(key);
399 }
400 return result;
401 };
402
403 // IE8- don't enum bug keys
404 var enumBugKeys = [
405 'constructor',
406 'hasOwnProperty',
407 'isPrototypeOf',
408 'propertyIsEnumerable',
409 'toLocaleString',
410 'toString',
411 'valueOf'
412 ];
413
414 var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
415
416 // `Object.getOwnPropertyNames` method
417 // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
418 var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
419 return objectKeysInternal(O, hiddenKeys$1);
420 };
421
422 var objectGetOwnPropertyNames = {
423 f: f$3
424 };
425
426 var f$4 = Object.getOwnPropertySymbols;
427
428 var objectGetOwnPropertySymbols = {
429 f: f$4
430 };
431
432 // all object keys, includes non-enumerable and symbols
433 var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
434 var keys = objectGetOwnPropertyNames.f(anObject(it));
435 var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
436 return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
437 };
438
439 var copyConstructorProperties = function (target, source) {
440 var keys = ownKeys(source);
441 var defineProperty = objectDefineProperty.f;
442 var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
443 for (var i = 0; i < keys.length; i++) {
444 var key = keys[i];
445 if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
446 }
447 };
448
449 var replacement = /#|\.prototype\./;
450
451 var isForced = function (feature, detection) {
452 var value = data[normalize(feature)];
453 return value == POLYFILL ? true
454 : value == NATIVE ? false
455 : typeof detection == 'function' ? fails(detection)
456 : !!detection;
457 };
458
459 var normalize = isForced.normalize = function (string) {
460 return String(string).replace(replacement, '.').toLowerCase();
461 };
462
463 var data = isForced.data = {};
464 var NATIVE = isForced.NATIVE = 'N';
465 var POLYFILL = isForced.POLYFILL = 'P';
466
467 var isForced_1 = isForced;
468
469 var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
470
471
472
473
474
475
476 /*
477 options.target - name of the target object
478 options.global - target is the global object
479 options.stat - export as static methods of target
480 options.proto - export as prototype methods of target
481 options.real - real prototype method for the `pure` version
482 options.forced - export even if the native feature is available
483 options.bind - bind methods to the target, required for the `pure` version
484 options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
485 options.unsafe - use the simple assignment of property instead of delete + defineProperty
486 options.sham - add a flag to not completely full polyfills
487 options.enumerable - export as enumerable property
488 options.noTargetGet - prevent calling a getter on target
489 */
490 var _export = function (options, source) {
491 var TARGET = options.target;
492 var GLOBAL = options.global;
493 var STATIC = options.stat;
494 var FORCED, target, key, targetProperty, sourceProperty, descriptor;
495 if (GLOBAL) {
496 target = global_1;
497 } else if (STATIC) {
498 target = global_1[TARGET] || setGlobal(TARGET, {});
499 } else {
500 target = (global_1[TARGET] || {}).prototype;
501 }
502 if (target) for (key in source) {
503 sourceProperty = source[key];
504 if (options.noTargetGet) {
505 descriptor = getOwnPropertyDescriptor$1(target, key);
506 targetProperty = descriptor && descriptor.value;
507 } else targetProperty = target[key];
508 FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
509 // contained in target
510 if (!FORCED && targetProperty !== undefined) {
511 if (typeof sourceProperty === typeof targetProperty) continue;
512 copyConstructorProperties(sourceProperty, targetProperty);
513 }
514 // add a flag to not completely full polyfills
515 if (options.sham || (targetProperty && targetProperty.sham)) {
516 hide(sourceProperty, 'sham', true);
517 }
518 // extend global
519 redefine(target, key, sourceProperty, options);
520 }
521 };
522
523 var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
524 // Chrome 38 Symbol has incorrect toString conversion
525 // eslint-disable-next-line no-undef
526 return !String(Symbol());
527 });
528
529 // `IsArray` abstract operation
530 // https://tc39.github.io/ecma262/#sec-isarray
531 var isArray = Array.isArray || function isArray(arg) {
532 return classofRaw(arg) == 'Array';
533 };
534
535 // `ToObject` abstract operation
536 // https://tc39.github.io/ecma262/#sec-toobject
537 var toObject = function (argument) {
538 return Object(requireObjectCoercible(argument));
539 };
540
541 // `Object.keys` method
542 // https://tc39.github.io/ecma262/#sec-object.keys
543 var objectKeys = Object.keys || function keys(O) {
544 return objectKeysInternal(O, enumBugKeys);
545 };
546
547 // `Object.defineProperties` method
548 // https://tc39.github.io/ecma262/#sec-object.defineproperties
549 var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
550 anObject(O);
551 var keys = objectKeys(Properties);
552 var length = keys.length;
553 var index = 0;
554 var key;
555 while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
556 return O;
557 };
558
559 var html = getBuiltIn('document', 'documentElement');
560
561 var IE_PROTO = sharedKey('IE_PROTO');
562
563 var PROTOTYPE = 'prototype';
564 var Empty = function () { /* empty */ };
565
566 // Create object with fake `null` prototype: use iframe Object with cleared prototype
567 var createDict = function () {
568 // Thrash, waste and sodomy: IE GC bug
569 var iframe = documentCreateElement('iframe');
570 var length = enumBugKeys.length;
571 var lt = '<';
572 var script = 'script';
573 var gt = '>';
574 var js = 'java' + script + ':';
575 var iframeDocument;
576 iframe.style.display = 'none';
577 html.appendChild(iframe);
578 iframe.src = String(js);
579 iframeDocument = iframe.contentWindow.document;
580 iframeDocument.open();
581 iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
582 iframeDocument.close();
583 createDict = iframeDocument.F;
584 while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
585 return createDict();
586 };
587
588 // `Object.create` method
589 // https://tc39.github.io/ecma262/#sec-object.create
590 var objectCreate = Object.create || function create(O, Properties) {
591 var result;
592 if (O !== null) {
593 Empty[PROTOTYPE] = anObject(O);
594 result = new Empty();
595 Empty[PROTOTYPE] = null;
596 // add "__proto__" for Object.getPrototypeOf polyfill
597 result[IE_PROTO] = O;
598 } else result = createDict();
599 return Properties === undefined ? result : objectDefineProperties(result, Properties);
600 };
601
602 hiddenKeys[IE_PROTO] = true;
603
604 var nativeGetOwnPropertyNames = objectGetOwnPropertyNames.f;
605
606 var toString$1 = {}.toString;
607
608 var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
609 ? Object.getOwnPropertyNames(window) : [];
610
611 var getWindowNames = function (it) {
612 try {
613 return nativeGetOwnPropertyNames(it);
614 } catch (error) {
615 return windowNames.slice();
616 }
617 };
618
619 // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
620 var f$5 = function getOwnPropertyNames(it) {
621 return windowNames && toString$1.call(it) == '[object Window]'
622 ? getWindowNames(it)
623 : nativeGetOwnPropertyNames(toIndexedObject(it));
624 };
625
626 var objectGetOwnPropertyNamesExternal = {
627 f: f$5
628 };
629
630 var Symbol$1 = global_1.Symbol;
631 var store$1 = shared('wks');
632
633 var wellKnownSymbol = function (name) {
634 return store$1[name] || (store$1[name] = nativeSymbol && Symbol$1[name]
635 || (nativeSymbol ? Symbol$1 : uid)('Symbol.' + name));
636 };
637
638 var f$6 = wellKnownSymbol;
639
640 var wrappedWellKnownSymbol = {
641 f: f$6
642 };
643
644 var defineProperty = objectDefineProperty.f;
645
646 var defineWellKnownSymbol = function (NAME) {
647 var Symbol = path.Symbol || (path.Symbol = {});
648 if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {
649 value: wrappedWellKnownSymbol.f(NAME)
650 });
651 };
652
653 var defineProperty$1 = objectDefineProperty.f;
654
655
656
657 var TO_STRING_TAG = wellKnownSymbol('toStringTag');
658
659 var setToStringTag = function (it, TAG, STATIC) {
660 if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
661 defineProperty$1(it, TO_STRING_TAG, { configurable: true, value: TAG });
662 }
663 };
664
665 var aFunction$1 = function (it) {
666 if (typeof it != 'function') {
667 throw TypeError(String(it) + ' is not a function');
668 } return it;
669 };
670
671 // optional / simple context binding
672 var bindContext = function (fn, that, length) {
673 aFunction$1(fn);
674 if (that === undefined) return fn;
675 switch (length) {
676 case 0: return function () {
677 return fn.call(that);
678 };
679 case 1: return function (a) {
680 return fn.call(that, a);
681 };
682 case 2: return function (a, b) {
683 return fn.call(that, a, b);
684 };
685 case 3: return function (a, b, c) {
686 return fn.call(that, a, b, c);
687 };
688 }
689 return function (/* ...args */) {
690 return fn.apply(that, arguments);
691 };
692 };
693
694 var SPECIES = wellKnownSymbol('species');
695
696 // `ArraySpeciesCreate` abstract operation
697 // https://tc39.github.io/ecma262/#sec-arrayspeciescreate
698 var arraySpeciesCreate = function (originalArray, length) {
699 var C;
700 if (isArray(originalArray)) {
701 C = originalArray.constructor;
702 // cross-realm fallback
703 if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
704 else if (isObject(C)) {
705 C = C[SPECIES];
706 if (C === null) C = undefined;
707 }
708 } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
709 };
710
711 var push = [].push;
712
713 // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
714 var createMethod$1 = function (TYPE) {
715 var IS_MAP = TYPE == 1;
716 var IS_FILTER = TYPE == 2;
717 var IS_SOME = TYPE == 3;
718 var IS_EVERY = TYPE == 4;
719 var IS_FIND_INDEX = TYPE == 6;
720 var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
721 return function ($this, callbackfn, that, specificCreate) {
722 var O = toObject($this);
723 var self = indexedObject(O);
724 var boundFunction = bindContext(callbackfn, that, 3);
725 var length = toLength(self.length);
726 var index = 0;
727 var create = specificCreate || arraySpeciesCreate;
728 var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
729 var value, result;
730 for (;length > index; index++) if (NO_HOLES || index in self) {
731 value = self[index];
732 result = boundFunction(value, index, O);
733 if (TYPE) {
734 if (IS_MAP) target[index] = result; // map
735 else if (result) switch (TYPE) {
736 case 3: return true; // some
737 case 5: return value; // find
738 case 6: return index; // findIndex
739 case 2: push.call(target, value); // filter
740 } else if (IS_EVERY) return false; // every
741 }
742 }
743 return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
744 };
745 };
746
747 var arrayIteration = {
748 // `Array.prototype.forEach` method
749 // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
750 forEach: createMethod$1(0),
751 // `Array.prototype.map` method
752 // https://tc39.github.io/ecma262/#sec-array.prototype.map
753 map: createMethod$1(1),
754 // `Array.prototype.filter` method
755 // https://tc39.github.io/ecma262/#sec-array.prototype.filter
756 filter: createMethod$1(2),
757 // `Array.prototype.some` method
758 // https://tc39.github.io/ecma262/#sec-array.prototype.some
759 some: createMethod$1(3),
760 // `Array.prototype.every` method
761 // https://tc39.github.io/ecma262/#sec-array.prototype.every
762 every: createMethod$1(4),
763 // `Array.prototype.find` method
764 // https://tc39.github.io/ecma262/#sec-array.prototype.find
765 find: createMethod$1(5),
766 // `Array.prototype.findIndex` method
767 // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
768 findIndex: createMethod$1(6)
769 };
770
771 var $forEach = arrayIteration.forEach;
772
773 var HIDDEN = sharedKey('hidden');
774 var SYMBOL = 'Symbol';
775 var PROTOTYPE$1 = 'prototype';
776 var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
777 var setInternalState = internalState.set;
778 var getInternalState = internalState.getterFor(SYMBOL);
779 var ObjectPrototype = Object[PROTOTYPE$1];
780 var $Symbol = global_1.Symbol;
781 var JSON = global_1.JSON;
782 var nativeJSONStringify = JSON && JSON.stringify;
783 var nativeGetOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
784 var nativeDefineProperty$1 = objectDefineProperty.f;
785 var nativeGetOwnPropertyNames$1 = objectGetOwnPropertyNamesExternal.f;
786 var nativePropertyIsEnumerable$1 = objectPropertyIsEnumerable.f;
787 var AllSymbols = shared('symbols');
788 var ObjectPrototypeSymbols = shared('op-symbols');
789 var StringToSymbolRegistry = shared('string-to-symbol-registry');
790 var SymbolToStringRegistry = shared('symbol-to-string-registry');
791 var WellKnownSymbolsStore = shared('wks');
792 var QObject = global_1.QObject;
793 // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
794 var USE_SETTER = !QObject || !QObject[PROTOTYPE$1] || !QObject[PROTOTYPE$1].findChild;
795
796 // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
797 var setSymbolDescriptor = descriptors && fails(function () {
798 return objectCreate(nativeDefineProperty$1({}, 'a', {
799 get: function () { return nativeDefineProperty$1(this, 'a', { value: 7 }).a; }
800 })).a != 7;
801 }) ? function (O, P, Attributes) {
802 var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor$1(ObjectPrototype, P);
803 if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
804 nativeDefineProperty$1(O, P, Attributes);
805 if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
806 nativeDefineProperty$1(ObjectPrototype, P, ObjectPrototypeDescriptor);
807 }
808 } : nativeDefineProperty$1;
809
810 var wrap = function (tag, description) {
811 var symbol = AllSymbols[tag] = objectCreate($Symbol[PROTOTYPE$1]);
812 setInternalState(symbol, {
813 type: SYMBOL,
814 tag: tag,
815 description: description
816 });
817 if (!descriptors) symbol.description = description;
818 return symbol;
819 };
820
821 var isSymbol = nativeSymbol && typeof $Symbol.iterator == 'symbol' ? function (it) {
822 return typeof it == 'symbol';
823 } : function (it) {
824 return Object(it) instanceof $Symbol;
825 };
826
827 var $defineProperty = function defineProperty(O, P, Attributes) {
828 if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
829 anObject(O);
830 var key = toPrimitive(P, true);
831 anObject(Attributes);
832 if (has(AllSymbols, key)) {
833 if (!Attributes.enumerable) {
834 if (!has(O, HIDDEN)) nativeDefineProperty$1(O, HIDDEN, createPropertyDescriptor(1, {}));
835 O[HIDDEN][key] = true;
836 } else {
837 if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
838 Attributes = objectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
839 } return setSymbolDescriptor(O, key, Attributes);
840 } return nativeDefineProperty$1(O, key, Attributes);
841 };
842
843 var $defineProperties = function defineProperties(O, Properties) {
844 anObject(O);
845 var properties = toIndexedObject(Properties);
846 var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
847 $forEach(keys, function (key) {
848 if (!descriptors || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);
849 });
850 return O;
851 };
852
853 var $create = function create(O, Properties) {
854 return Properties === undefined ? objectCreate(O) : $defineProperties(objectCreate(O), Properties);
855 };
856
857 var $propertyIsEnumerable = function propertyIsEnumerable(V) {
858 var P = toPrimitive(V, true);
859 var enumerable = nativePropertyIsEnumerable$1.call(this, P);
860 if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;
861 return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;
862 };
863
864 var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
865 var it = toIndexedObject(O);
866 var key = toPrimitive(P, true);
867 if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;
868 var descriptor = nativeGetOwnPropertyDescriptor$1(it, key);
869 if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {
870 descriptor.enumerable = true;
871 }
872 return descriptor;
873 };
874
875 var $getOwnPropertyNames = function getOwnPropertyNames(O) {
876 var names = nativeGetOwnPropertyNames$1(toIndexedObject(O));
877 var result = [];
878 $forEach(names, function (key) {
879 if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);
880 });
881 return result;
882 };
883
884 var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
885 var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
886 var names = nativeGetOwnPropertyNames$1(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
887 var result = [];
888 $forEach(names, function (key) {
889 if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {
890 result.push(AllSymbols[key]);
891 }
892 });
893 return result;
894 };
895
896 // `Symbol` constructor
897 // https://tc39.github.io/ecma262/#sec-symbol-constructor
898 if (!nativeSymbol) {
899 $Symbol = function Symbol() {
900 if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
901 var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);
902 var tag = uid(description);
903 var setter = function (value) {
904 if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);
905 if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
906 setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
907 };
908 if (descriptors && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
909 return wrap(tag, description);
910 };
911
912 redefine($Symbol[PROTOTYPE$1], 'toString', function toString() {
913 return getInternalState(this).tag;
914 });
915
916 objectPropertyIsEnumerable.f = $propertyIsEnumerable;
917 objectDefineProperty.f = $defineProperty;
918 objectGetOwnPropertyDescriptor.f = $getOwnPropertyDescriptor;
919 objectGetOwnPropertyNames.f = objectGetOwnPropertyNamesExternal.f = $getOwnPropertyNames;
920 objectGetOwnPropertySymbols.f = $getOwnPropertySymbols;
921
922 if (descriptors) {
923 // https://github.com/tc39/proposal-Symbol-description
924 nativeDefineProperty$1($Symbol[PROTOTYPE$1], 'description', {
925 configurable: true,
926 get: function description() {
927 return getInternalState(this).description;
928 }
929 });
930 {
931 redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
932 }
933 }
934
935 wrappedWellKnownSymbol.f = function (name) {
936 return wrap(wellKnownSymbol(name), name);
937 };
938 }
939
940 _export({ global: true, wrap: true, forced: !nativeSymbol, sham: !nativeSymbol }, {
941 Symbol: $Symbol
942 });
943
944 $forEach(objectKeys(WellKnownSymbolsStore), function (name) {
945 defineWellKnownSymbol(name);
946 });
947
948 _export({ target: SYMBOL, stat: true, forced: !nativeSymbol }, {
949 // `Symbol.for` method
950 // https://tc39.github.io/ecma262/#sec-symbol.for
951 'for': function (key) {
952 var string = String(key);
953 if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
954 var symbol = $Symbol(string);
955 StringToSymbolRegistry[string] = symbol;
956 SymbolToStringRegistry[symbol] = string;
957 return symbol;
958 },
959 // `Symbol.keyFor` method
960 // https://tc39.github.io/ecma262/#sec-symbol.keyfor
961 keyFor: function keyFor(sym) {
962 if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
963 if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
964 },
965 useSetter: function () { USE_SETTER = true; },
966 useSimple: function () { USE_SETTER = false; }
967 });
968
969 _export({ target: 'Object', stat: true, forced: !nativeSymbol, sham: !descriptors }, {
970 // `Object.create` method
971 // https://tc39.github.io/ecma262/#sec-object.create
972 create: $create,
973 // `Object.defineProperty` method
974 // https://tc39.github.io/ecma262/#sec-object.defineproperty
975 defineProperty: $defineProperty,
976 // `Object.defineProperties` method
977 // https://tc39.github.io/ecma262/#sec-object.defineproperties
978 defineProperties: $defineProperties,
979 // `Object.getOwnPropertyDescriptor` method
980 // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors
981 getOwnPropertyDescriptor: $getOwnPropertyDescriptor
982 });
983
984 _export({ target: 'Object', stat: true, forced: !nativeSymbol }, {
985 // `Object.getOwnPropertyNames` method
986 // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
987 getOwnPropertyNames: $getOwnPropertyNames,
988 // `Object.getOwnPropertySymbols` method
989 // https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols
990 getOwnPropertySymbols: $getOwnPropertySymbols
991 });
992
993 // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
994 // https://bugs.chromium.org/p/v8/issues/detail?id=3443
995 _export({ target: 'Object', stat: true, forced: fails(function () { objectGetOwnPropertySymbols.f(1); }) }, {
996 getOwnPropertySymbols: function getOwnPropertySymbols(it) {
997 return objectGetOwnPropertySymbols.f(toObject(it));
998 }
999 });
1000
1001 // `JSON.stringify` method behavior with symbols
1002 // https://tc39.github.io/ecma262/#sec-json.stringify
1003 JSON && _export({ target: 'JSON', stat: true, forced: !nativeSymbol || fails(function () {
1004 var symbol = $Symbol();
1005 // MS Edge converts symbol values to JSON as {}
1006 return nativeJSONStringify([symbol]) != '[null]'
1007 // WebKit converts symbol values to JSON as null
1008 || nativeJSONStringify({ a: symbol }) != '{}'
1009 // V8 throws on boxed symbols
1010 || nativeJSONStringify(Object(symbol)) != '{}';
1011 }) }, {
1012 stringify: function stringify(it) {
1013 var args = [it];
1014 var index = 1;
1015 var replacer, $replacer;
1016 while (arguments.length > index) args.push(arguments[index++]);
1017 $replacer = replacer = args[1];
1018 if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
1019 if (!isArray(replacer)) replacer = function (key, value) {
1020 if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
1021 if (!isSymbol(value)) return value;
1022 };
1023 args[1] = replacer;
1024 return nativeJSONStringify.apply(JSON, args);
1025 }
1026 });
1027
1028 // `Symbol.prototype[@@toPrimitive]` method
1029 // https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive
1030 if (!$Symbol[PROTOTYPE$1][TO_PRIMITIVE]) hide($Symbol[PROTOTYPE$1], TO_PRIMITIVE, $Symbol[PROTOTYPE$1].valueOf);
1031 // `Symbol.prototype[@@toStringTag]` property
1032 // https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag
1033 setToStringTag($Symbol, SYMBOL);
1034
1035 hiddenKeys[HIDDEN] = true;
1036
1037 var defineProperty$2 = objectDefineProperty.f;
1038
1039
1040 var NativeSymbol = global_1.Symbol;
1041
1042 if (descriptors && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||
1043 // Safari 12 bug
1044 NativeSymbol().description !== undefined
1045 )) {
1046 var EmptyStringDescriptionStore = {};
1047 // wrap Symbol constructor for correct work with undefined description
1048 var SymbolWrapper = function Symbol() {
1049 var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);
1050 var result = this instanceof SymbolWrapper
1051 ? new NativeSymbol(description)
1052 // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
1053 : description === undefined ? NativeSymbol() : NativeSymbol(description);
1054 if (description === '') EmptyStringDescriptionStore[result] = true;
1055 return result;
1056 };
1057 copyConstructorProperties(SymbolWrapper, NativeSymbol);
1058 var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;
1059 symbolPrototype.constructor = SymbolWrapper;
1060
1061 var symbolToString = symbolPrototype.toString;
1062 var native = String(NativeSymbol('test')) == 'Symbol(test)';
1063 var regexp = /^Symbol\((.*)\)[^)]+$/;
1064 defineProperty$2(symbolPrototype, 'description', {
1065 configurable: true,
1066 get: function description() {
1067 var symbol = isObject(this) ? this.valueOf() : this;
1068 var string = symbolToString.call(symbol);
1069 if (has(EmptyStringDescriptionStore, symbol)) return '';
1070 var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');
1071 return desc === '' ? undefined : desc;
1072 }
1073 });
1074
1075 _export({ global: true, forced: true }, {
1076 Symbol: SymbolWrapper
1077 });
1078 }
1079
1080 // `Symbol.iterator` well-known symbol
1081 // https://tc39.github.io/ecma262/#sec-symbol.iterator
1082 defineWellKnownSymbol('iterator');
1083
1084 var createProperty = function (object, key, value) {
1085 var propertyKey = toPrimitive(key);
1086 if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
1087 else object[propertyKey] = value;
1088 };
1089
1090 var SPECIES$1 = wellKnownSymbol('species');
1091
1092 var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
1093 return !fails(function () {
1094 var array = [];
1095 var constructor = array.constructor = {};
1096 constructor[SPECIES$1] = function () {
1097 return { foo: 1 };
1098 };
1099 return array[METHOD_NAME](Boolean).foo !== 1;
1100 });
1101 };
1102
1103 var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
1104 var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
1105 var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
1106
1107 var IS_CONCAT_SPREADABLE_SUPPORT = !fails(function () {
1108 var array = [];
1109 array[IS_CONCAT_SPREADABLE] = false;
1110 return array.concat()[0] !== array;
1111 });
1112
1113 var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
1114
1115 var isConcatSpreadable = function (O) {
1116 if (!isObject(O)) return false;
1117 var spreadable = O[IS_CONCAT_SPREADABLE];
1118 return spreadable !== undefined ? !!spreadable : isArray(O);
1119 };
1120
1121 var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
1122
1123 // `Array.prototype.concat` method
1124 // https://tc39.github.io/ecma262/#sec-array.prototype.concat
1125 // with adding support of @@isConcatSpreadable and @@species
1126 _export({ target: 'Array', proto: true, forced: FORCED }, {
1127 concat: function concat(arg) { // eslint-disable-line no-unused-vars
1128 var O = toObject(this);
1129 var A = arraySpeciesCreate(O, 0);
1130 var n = 0;
1131 var i, k, length, len, E;
1132 for (i = -1, length = arguments.length; i < length; i++) {
1133 E = i === -1 ? O : arguments[i];
1134 if (isConcatSpreadable(E)) {
1135 len = toLength(E.length);
1136 if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
1137 for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
1138 } else {
1139 if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
1140 createProperty(A, n++, E);
1141 }
1142 }
1143 A.length = n;
1144 return A;
1145 }
1146 });
1147
1148 var $filter = arrayIteration.filter;
1149
1150
1151 // `Array.prototype.filter` method
1152 // https://tc39.github.io/ecma262/#sec-array.prototype.filter
1153 // with adding support of @@species
1154 _export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('filter') }, {
1155 filter: function filter(callbackfn /* , thisArg */) {
1156 return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
1157 }
1158 });
1159
1160 var UNSCOPABLES = wellKnownSymbol('unscopables');
1161 var ArrayPrototype = Array.prototype;
1162
1163 // Array.prototype[@@unscopables]
1164 // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
1165 if (ArrayPrototype[UNSCOPABLES] == undefined) {
1166 hide(ArrayPrototype, UNSCOPABLES, objectCreate(null));
1167 }
1168
1169 // add a key to Array.prototype[@@unscopables]
1170 var addToUnscopables = function (key) {
1171 ArrayPrototype[UNSCOPABLES][key] = true;
1172 };
1173
1174 var $find = arrayIteration.find;
1175
1176
1177 var FIND = 'find';
1178 var SKIPS_HOLES = true;
1179
1180 // Shouldn't skip holes
1181 if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
1182
1183 // `Array.prototype.find` method
1184 // https://tc39.github.io/ecma262/#sec-array.prototype.find
1185 _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
1186 find: function find(callbackfn /* , that = undefined */) {
1187 return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
1188 }
1189 });
1190
1191 // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
1192 addToUnscopables(FIND);
1193
1194 var $includes = arrayIncludes.includes;
1195
1196
1197 // `Array.prototype.includes` method
1198 // https://tc39.github.io/ecma262/#sec-array.prototype.includes
1199 _export({ target: 'Array', proto: true }, {
1200 includes: function includes(el /* , fromIndex = 0 */) {
1201 return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
1202 }
1203 });
1204
1205 // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
1206 addToUnscopables('includes');
1207
1208 var sloppyArrayMethod = function (METHOD_NAME, argument) {
1209 var method = [][METHOD_NAME];
1210 return !method || !fails(function () {
1211 // eslint-disable-next-line no-useless-call,no-throw-literal
1212 method.call(null, argument || function () { throw 1; }, 1);
1213 });
1214 };
1215
1216 var $indexOf = arrayIncludes.indexOf;
1217
1218
1219 var nativeIndexOf = [].indexOf;
1220
1221 var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
1222 var SLOPPY_METHOD = sloppyArrayMethod('indexOf');
1223
1224 // `Array.prototype.indexOf` method
1225 // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
1226 _export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || SLOPPY_METHOD }, {
1227 indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
1228 return NEGATIVE_ZERO
1229 // convert -0 to +0
1230 ? nativeIndexOf.apply(this, arguments) || 0
1231 : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
1232 }
1233 });
1234
1235 var correctPrototypeGetter = !fails(function () {
1236 function F() { /* empty */ }
1237 F.prototype.constructor = null;
1238 return Object.getPrototypeOf(new F()) !== F.prototype;
1239 });
1240
1241 var IE_PROTO$1 = sharedKey('IE_PROTO');
1242 var ObjectPrototype$1 = Object.prototype;
1243
1244 // `Object.getPrototypeOf` method
1245 // https://tc39.github.io/ecma262/#sec-object.getprototypeof
1246 var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {
1247 O = toObject(O);
1248 if (has(O, IE_PROTO$1)) return O[IE_PROTO$1];
1249 if (typeof O.constructor == 'function' && O instanceof O.constructor) {
1250 return O.constructor.prototype;
1251 } return O instanceof Object ? ObjectPrototype$1 : null;
1252 };
1253
1254 var ITERATOR = wellKnownSymbol('iterator');
1255 var BUGGY_SAFARI_ITERATORS = false;
1256
1257 var returnThis = function () { return this; };
1258
1259 // `%IteratorPrototype%` object
1260 // https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
1261 var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
1262
1263 if ([].keys) {
1264 arrayIterator = [].keys();
1265 // Safari 8 has buggy iterators w/o `next`
1266 if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
1267 else {
1268 PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));
1269 if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
1270 }
1271 }
1272
1273 if (IteratorPrototype == undefined) IteratorPrototype = {};
1274
1275 // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
1276 if ( !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
1277
1278 var iteratorsCore = {
1279 IteratorPrototype: IteratorPrototype,
1280 BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
1281 };
1282
1283 var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1284
1285 var createIteratorConstructor = function (IteratorConstructor, NAME, next) {
1286 var TO_STRING_TAG = NAME + ' Iterator';
1287 IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(1, next) });
1288 setToStringTag(IteratorConstructor, TO_STRING_TAG, false);
1289 return IteratorConstructor;
1290 };
1291
1292 var aPossiblePrototype = function (it) {
1293 if (!isObject(it) && it !== null) {
1294 throw TypeError("Can't set " + String(it) + ' as a prototype');
1295 } return it;
1296 };
1297
1298 // `Object.setPrototypeOf` method
1299 // https://tc39.github.io/ecma262/#sec-object.setprototypeof
1300 // Works with __proto__ only. Old v8 can't work with null proto objects.
1301 /* eslint-disable no-proto */
1302 var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1303 var CORRECT_SETTER = false;
1304 var test = {};
1305 var setter;
1306 try {
1307 setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
1308 setter.call(test, []);
1309 CORRECT_SETTER = test instanceof Array;
1310 } catch (error) { /* empty */ }
1311 return function setPrototypeOf(O, proto) {
1312 anObject(O);
1313 aPossiblePrototype(proto);
1314 if (CORRECT_SETTER) setter.call(O, proto);
1315 else O.__proto__ = proto;
1316 return O;
1317 };
1318 }() : undefined);
1319
1320 var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;
1321 var BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS;
1322 var ITERATOR$1 = wellKnownSymbol('iterator');
1323 var KEYS = 'keys';
1324 var VALUES = 'values';
1325 var ENTRIES = 'entries';
1326
1327 var returnThis$1 = function () { return this; };
1328
1329 var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1330 createIteratorConstructor(IteratorConstructor, NAME, next);
1331
1332 var getIterationMethod = function (KIND) {
1333 if (KIND === DEFAULT && defaultIterator) return defaultIterator;
1334 if (!BUGGY_SAFARI_ITERATORS$1 && KIND in IterablePrototype) return IterablePrototype[KIND];
1335 switch (KIND) {
1336 case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
1337 case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
1338 case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
1339 } return function () { return new IteratorConstructor(this); };
1340 };
1341
1342 var TO_STRING_TAG = NAME + ' Iterator';
1343 var INCORRECT_VALUES_NAME = false;
1344 var IterablePrototype = Iterable.prototype;
1345 var nativeIterator = IterablePrototype[ITERATOR$1]
1346 || IterablePrototype['@@iterator']
1347 || DEFAULT && IterablePrototype[DEFAULT];
1348 var defaultIterator = !BUGGY_SAFARI_ITERATORS$1 && nativeIterator || getIterationMethod(DEFAULT);
1349 var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
1350 var CurrentIteratorPrototype, methods, KEY;
1351
1352 // fix native
1353 if (anyNativeIterator) {
1354 CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable()));
1355 if (IteratorPrototype$2 !== Object.prototype && CurrentIteratorPrototype.next) {
1356 if ( objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype$2) {
1357 if (objectSetPrototypeOf) {
1358 objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2);
1359 } else if (typeof CurrentIteratorPrototype[ITERATOR$1] != 'function') {
1360 hide(CurrentIteratorPrototype, ITERATOR$1, returnThis$1);
1361 }
1362 }
1363 // Set @@toStringTag to native iterators
1364 setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
1365 }
1366 }
1367
1368 // fix Array#{values, @@iterator}.name in V8 / FF
1369 if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1370 INCORRECT_VALUES_NAME = true;
1371 defaultIterator = function values() { return nativeIterator.call(this); };
1372 }
1373
1374 // define iterator
1375 if ( IterablePrototype[ITERATOR$1] !== defaultIterator) {
1376 hide(IterablePrototype, ITERATOR$1, defaultIterator);
1377 }
1378
1379 // export additional methods
1380 if (DEFAULT) {
1381 methods = {
1382 values: getIterationMethod(VALUES),
1383 keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
1384 entries: getIterationMethod(ENTRIES)
1385 };
1386 if (FORCED) for (KEY in methods) {
1387 if (BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1388 redefine(IterablePrototype, KEY, methods[KEY]);
1389 }
1390 } else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME }, methods);
1391 }
1392
1393 return methods;
1394 };
1395
1396 var ARRAY_ITERATOR = 'Array Iterator';
1397 var setInternalState$1 = internalState.set;
1398 var getInternalState$1 = internalState.getterFor(ARRAY_ITERATOR);
1399
1400 // `Array.prototype.entries` method
1401 // https://tc39.github.io/ecma262/#sec-array.prototype.entries
1402 // `Array.prototype.keys` method
1403 // https://tc39.github.io/ecma262/#sec-array.prototype.keys
1404 // `Array.prototype.values` method
1405 // https://tc39.github.io/ecma262/#sec-array.prototype.values
1406 // `Array.prototype[@@iterator]` method
1407 // https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator
1408 // `CreateArrayIterator` internal method
1409 // https://tc39.github.io/ecma262/#sec-createarrayiterator
1410 var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1411 setInternalState$1(this, {
1412 type: ARRAY_ITERATOR,
1413 target: toIndexedObject(iterated), // target
1414 index: 0, // next index
1415 kind: kind // kind
1416 });
1417 // `%ArrayIteratorPrototype%.next` method
1418 // https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next
1419 }, function () {
1420 var state = getInternalState$1(this);
1421 var target = state.target;
1422 var kind = state.kind;
1423 var index = state.index++;
1424 if (!target || index >= target.length) {
1425 state.target = undefined;
1426 return { value: undefined, done: true };
1427 }
1428 if (kind == 'keys') return { value: index, done: false };
1429 if (kind == 'values') return { value: target[index], done: false };
1430 return { value: [index, target[index]], done: false };
1431 }, 'values');
1432
1433 // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
1434 addToUnscopables('keys');
1435 addToUnscopables('values');
1436 addToUnscopables('entries');
1437
1438 var nativeJoin = [].join;
1439
1440 var ES3_STRINGS = indexedObject != Object;
1441 var SLOPPY_METHOD$1 = sloppyArrayMethod('join', ',');
1442
1443 // `Array.prototype.join` method
1444 // https://tc39.github.io/ecma262/#sec-array.prototype.join
1445 _export({ target: 'Array', proto: true, forced: ES3_STRINGS || SLOPPY_METHOD$1 }, {
1446 join: function join(separator) {
1447 return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
1448 }
1449 });
1450
1451 var propertyIsEnumerable = objectPropertyIsEnumerable.f;
1452
1453 // `Object.{ entries, values }` methods implementation
1454 var createMethod$2 = function (TO_ENTRIES) {
1455 return function (it) {
1456 var O = toIndexedObject(it);
1457 var keys = objectKeys(O);
1458 var length = keys.length;
1459 var i = 0;
1460 var result = [];
1461 var key;
1462 while (length > i) {
1463 key = keys[i++];
1464 if (!descriptors || propertyIsEnumerable.call(O, key)) {
1465 result.push(TO_ENTRIES ? [key, O[key]] : O[key]);
1466 }
1467 }
1468 return result;
1469 };
1470 };
1471
1472 var objectToArray = {
1473 // `Object.entries` method
1474 // https://tc39.github.io/ecma262/#sec-object.entries
1475 entries: createMethod$2(true),
1476 // `Object.values` method
1477 // https://tc39.github.io/ecma262/#sec-object.values
1478 values: createMethod$2(false)
1479 };
1480
1481 var $entries = objectToArray.entries;
1482
1483 // `Object.entries` method
1484 // https://tc39.github.io/ecma262/#sec-object.entries
1485 _export({ target: 'Object', stat: true }, {
1486 entries: function entries(O) {
1487 return $entries(O);
1488 }
1489 });
1490
1491 var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
1492 // ES3 wrong here
1493 var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1494
1495 // fallback for IE11 Script Access Denied error
1496 var tryGet = function (it, key) {
1497 try {
1498 return it[key];
1499 } catch (error) { /* empty */ }
1500 };
1501
1502 // getting tag from ES6+ `Object.prototype.toString`
1503 var classof = function (it) {
1504 var O, tag, result;
1505 return it === undefined ? 'Undefined' : it === null ? 'Null'
1506 // @@toStringTag case
1507 : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag
1508 // builtinTag case
1509 : CORRECT_ARGUMENTS ? classofRaw(O)
1510 // ES3 arguments fallback
1511 : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
1512 };
1513
1514 var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
1515 var test = {};
1516
1517 test[TO_STRING_TAG$2] = 'z';
1518
1519 // `Object.prototype.toString` method implementation
1520 // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
1521 var objectToString = String(test) !== '[object z]' ? function toString() {
1522 return '[object ' + classof(this) + ']';
1523 } : test.toString;
1524
1525 var ObjectPrototype$2 = Object.prototype;
1526
1527 // `Object.prototype.toString` method
1528 // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
1529 if (objectToString !== ObjectPrototype$2.toString) {
1530 redefine(ObjectPrototype$2, 'toString', objectToString, { unsafe: true });
1531 }
1532
1533 var MATCH = wellKnownSymbol('match');
1534
1535 // `IsRegExp` abstract operation
1536 // https://tc39.github.io/ecma262/#sec-isregexp
1537 var isRegexp = function (it) {
1538 var isRegExp;
1539 return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
1540 };
1541
1542 var notARegexp = function (it) {
1543 if (isRegexp(it)) {
1544 throw TypeError("The method doesn't accept regular expressions");
1545 } return it;
1546 };
1547
1548 var MATCH$1 = wellKnownSymbol('match');
1549
1550 var correctIsRegexpLogic = function (METHOD_NAME) {
1551 var regexp = /./;
1552 try {
1553 '/./'[METHOD_NAME](regexp);
1554 } catch (e) {
1555 try {
1556 regexp[MATCH$1] = false;
1557 return '/./'[METHOD_NAME](regexp);
1558 } catch (f) { /* empty */ }
1559 } return false;
1560 };
1561
1562 // `String.prototype.includes` method
1563 // https://tc39.github.io/ecma262/#sec-string.prototype.includes
1564 _export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {
1565 includes: function includes(searchString /* , position = 0 */) {
1566 return !!~String(requireObjectCoercible(this))
1567 .indexOf(notARegexp(searchString), arguments.length > 1 ? arguments[1] : undefined);
1568 }
1569 });
1570
1571 // `String.prototype.{ codePointAt, at }` methods implementation
1572 var createMethod$3 = function (CONVERT_TO_STRING) {
1573 return function ($this, pos) {
1574 var S = String(requireObjectCoercible($this));
1575 var position = toInteger(pos);
1576 var size = S.length;
1577 var first, second;
1578 if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
1579 first = S.charCodeAt(position);
1580 return first < 0xD800 || first > 0xDBFF || position + 1 === size
1581 || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
1582 ? CONVERT_TO_STRING ? S.charAt(position) : first
1583 : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
1584 };
1585 };
1586
1587 var stringMultibyte = {
1588 // `String.prototype.codePointAt` method
1589 // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
1590 codeAt: createMethod$3(false),
1591 // `String.prototype.at` method
1592 // https://github.com/mathiasbynens/String.prototype.at
1593 charAt: createMethod$3(true)
1594 };
1595
1596 var charAt = stringMultibyte.charAt;
1597
1598
1599
1600 var STRING_ITERATOR = 'String Iterator';
1601 var setInternalState$2 = internalState.set;
1602 var getInternalState$2 = internalState.getterFor(STRING_ITERATOR);
1603
1604 // `String.prototype[@@iterator]` method
1605 // https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
1606 defineIterator(String, 'String', function (iterated) {
1607 setInternalState$2(this, {
1608 type: STRING_ITERATOR,
1609 string: String(iterated),
1610 index: 0
1611 });
1612 // `%StringIteratorPrototype%.next` method
1613 // https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
1614 }, function next() {
1615 var state = getInternalState$2(this);
1616 var string = state.string;
1617 var index = state.index;
1618 var point;
1619 if (index >= string.length) return { value: undefined, done: true };
1620 point = charAt(string, index);
1621 state.index += point.length;
1622 return { value: point, done: false };
1623 });
1624
1625 // `RegExp.prototype.flags` getter implementation
1626 // https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
1627 var regexpFlags = function () {
1628 var that = anObject(this);
1629 var result = '';
1630 if (that.global) result += 'g';
1631 if (that.ignoreCase) result += 'i';
1632 if (that.multiline) result += 'm';
1633 if (that.dotAll) result += 's';
1634 if (that.unicode) result += 'u';
1635 if (that.sticky) result += 'y';
1636 return result;
1637 };
1638
1639 var nativeExec = RegExp.prototype.exec;
1640 // This always refers to the native implementation, because the
1641 // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
1642 // which loads this file before patching the method.
1643 var nativeReplace = String.prototype.replace;
1644
1645 var patchedExec = nativeExec;
1646
1647 var UPDATES_LAST_INDEX_WRONG = (function () {
1648 var re1 = /a/;
1649 var re2 = /b*/g;
1650 nativeExec.call(re1, 'a');
1651 nativeExec.call(re2, 'a');
1652 return re1.lastIndex !== 0 || re2.lastIndex !== 0;
1653 })();
1654
1655 // nonparticipating capturing group, copied from es5-shim's String#split patch.
1656 var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
1657
1658 var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
1659
1660 if (PATCH) {
1661 patchedExec = function exec(str) {
1662 var re = this;
1663 var lastIndex, reCopy, match, i;
1664
1665 if (NPCG_INCLUDED) {
1666 reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
1667 }
1668 if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
1669
1670 match = nativeExec.call(re, str);
1671
1672 if (UPDATES_LAST_INDEX_WRONG && match) {
1673 re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
1674 }
1675 if (NPCG_INCLUDED && match && match.length > 1) {
1676 // Fix browsers whose `exec` methods don't consistently return `undefined`
1677 // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
1678 nativeReplace.call(match[0], reCopy, function () {
1679 for (i = 1; i < arguments.length - 2; i++) {
1680 if (arguments[i] === undefined) match[i] = undefined;
1681 }
1682 });
1683 }
1684
1685 return match;
1686 };
1687 }
1688
1689 var regexpExec = patchedExec;
1690
1691 var SPECIES$2 = wellKnownSymbol('species');
1692
1693 var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
1694 // #replace needs built-in support for named groups.
1695 // #match works fine because it just return the exec results, even if it has
1696 // a "grops" property.
1697 var re = /./;
1698 re.exec = function () {
1699 var result = [];
1700 result.groups = { a: '7' };
1701 return result;
1702 };
1703 return ''.replace(re, '$<a>') !== '7';
1704 });
1705
1706 // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
1707 // Weex JS has frozen built-in prototypes, so use try / catch wrapper
1708 var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
1709 var re = /(?:)/;
1710 var originalExec = re.exec;
1711 re.exec = function () { return originalExec.apply(this, arguments); };
1712 var result = 'ab'.split(re);
1713 return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
1714 });
1715
1716 var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
1717 var SYMBOL = wellKnownSymbol(KEY);
1718
1719 var DELEGATES_TO_SYMBOL = !fails(function () {
1720 // String methods call symbol-named RegEp methods
1721 var O = {};
1722 O[SYMBOL] = function () { return 7; };
1723 return ''[KEY](O) != 7;
1724 });
1725
1726 var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
1727 // Symbol-named RegExp methods call .exec
1728 var execCalled = false;
1729 var re = /a/;
1730 re.exec = function () { execCalled = true; return null; };
1731
1732 if (KEY === 'split') {
1733 // RegExp[@@split] doesn't call the regex's exec method, but first creates
1734 // a new one. We need to return the patched regex when creating the new one.
1735 re.constructor = {};
1736 re.constructor[SPECIES$2] = function () { return re; };
1737 }
1738
1739 re[SYMBOL]('');
1740 return !execCalled;
1741 });
1742
1743 if (
1744 !DELEGATES_TO_SYMBOL ||
1745 !DELEGATES_TO_EXEC ||
1746 (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
1747 (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
1748 ) {
1749 var nativeRegExpMethod = /./[SYMBOL];
1750 var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
1751 if (regexp.exec === regexpExec) {
1752 if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
1753 // The native String method already delegates to @@method (this
1754 // polyfilled function), leasing to infinite recursion.
1755 // We avoid it by directly calling the native @@method method.
1756 return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
1757 }
1758 return { done: true, value: nativeMethod.call(str, regexp, arg2) };
1759 }
1760 return { done: false };
1761 });
1762 var stringMethod = methods[0];
1763 var regexMethod = methods[1];
1764
1765 redefine(String.prototype, KEY, stringMethod);
1766 redefine(RegExp.prototype, SYMBOL, length == 2
1767 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
1768 // 21.2.5.11 RegExp.prototype[@@split](string, limit)
1769 ? function (string, arg) { return regexMethod.call(string, this, arg); }
1770 // 21.2.5.6 RegExp.prototype[@@match](string)
1771 // 21.2.5.9 RegExp.prototype[@@search](string)
1772 : function (string) { return regexMethod.call(string, this); }
1773 );
1774 if (sham) hide(RegExp.prototype[SYMBOL], 'sham', true);
1775 }
1776 };
1777
1778 // `SameValue` abstract operation
1779 // https://tc39.github.io/ecma262/#sec-samevalue
1780 var sameValue = Object.is || function is(x, y) {
1781 // eslint-disable-next-line no-self-compare
1782 return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
1783 };
1784
1785 // `RegExpExec` abstract operation
1786 // https://tc39.github.io/ecma262/#sec-regexpexec
1787 var regexpExecAbstract = function (R, S) {
1788 var exec = R.exec;
1789 if (typeof exec === 'function') {
1790 var result = exec.call(R, S);
1791 if (typeof result !== 'object') {
1792 throw TypeError('RegExp exec method returned something other than an Object or null');
1793 }
1794 return result;
1795 }
1796
1797 if (classofRaw(R) !== 'RegExp') {
1798 throw TypeError('RegExp#exec called on incompatible receiver');
1799 }
1800
1801 return regexpExec.call(R, S);
1802 };
1803
1804 // @@search logic
1805 fixRegexpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {
1806 return [
1807 // `String.prototype.search` method
1808 // https://tc39.github.io/ecma262/#sec-string.prototype.search
1809 function search(regexp) {
1810 var O = requireObjectCoercible(this);
1811 var searcher = regexp == undefined ? undefined : regexp[SEARCH];
1812 return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
1813 },
1814 // `RegExp.prototype[@@search]` method
1815 // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search
1816 function (regexp) {
1817 var res = maybeCallNative(nativeSearch, regexp, this);
1818 if (res.done) return res.value;
1819
1820 var rx = anObject(regexp);
1821 var S = String(this);
1822
1823 var previousLastIndex = rx.lastIndex;
1824 if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
1825 var result = regexpExecAbstract(rx, S);
1826 if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
1827 return result === null ? -1 : result.index;
1828 }
1829 ];
1830 });
1831
1832 // a string of all valid unicode whitespaces
1833 // eslint-disable-next-line max-len
1834 var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
1835
1836 var whitespace = '[' + whitespaces + ']';
1837 var ltrim = RegExp('^' + whitespace + whitespace + '*');
1838 var rtrim = RegExp(whitespace + whitespace + '*$');
1839
1840 // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
1841 var createMethod$4 = function (TYPE) {
1842 return function ($this) {
1843 var string = String(requireObjectCoercible($this));
1844 if (TYPE & 1) string = string.replace(ltrim, '');
1845 if (TYPE & 2) string = string.replace(rtrim, '');
1846 return string;
1847 };
1848 };
1849
1850 var stringTrim = {
1851 // `String.prototype.{ trimLeft, trimStart }` methods
1852 // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
1853 start: createMethod$4(1),
1854 // `String.prototype.{ trimRight, trimEnd }` methods
1855 // https://tc39.github.io/ecma262/#sec-string.prototype.trimend
1856 end: createMethod$4(2),
1857 // `String.prototype.trim` method
1858 // https://tc39.github.io/ecma262/#sec-string.prototype.trim
1859 trim: createMethod$4(3)
1860 };
1861
1862 var non = '\u200B\u0085\u180E';
1863
1864 // check that a method works with the correct list
1865 // of whitespaces and has a correct name
1866 var forcedStringTrimMethod = function (METHOD_NAME) {
1867 return fails(function () {
1868 return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;
1869 });
1870 };
1871
1872 var $trim = stringTrim.trim;
1873
1874
1875 // `String.prototype.trim` method
1876 // https://tc39.github.io/ecma262/#sec-string.prototype.trim
1877 _export({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
1878 trim: function trim() {
1879 return $trim(this);
1880 }
1881 });
1882
1883 // iterable DOM collections
1884 // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1885 var domIterables = {
1886 CSSRuleList: 0,
1887 CSSStyleDeclaration: 0,
1888 CSSValueList: 0,
1889 ClientRectList: 0,
1890 DOMRectList: 0,
1891 DOMStringList: 0,
1892 DOMTokenList: 1,
1893 DataTransferItemList: 0,
1894 FileList: 0,
1895 HTMLAllCollection: 0,
1896 HTMLCollection: 0,
1897 HTMLFormElement: 0,
1898 HTMLSelectElement: 0,
1899 MediaList: 0,
1900 MimeTypeArray: 0,
1901 NamedNodeMap: 0,
1902 NodeList: 1,
1903 PaintRequestList: 0,
1904 Plugin: 0,
1905 PluginArray: 0,
1906 SVGLengthList: 0,
1907 SVGNumberList: 0,
1908 SVGPathSegList: 0,
1909 SVGPointList: 0,
1910 SVGStringList: 0,
1911 SVGTransformList: 0,
1912 SourceBufferList: 0,
1913 StyleSheetList: 0,
1914 TextTrackCueList: 0,
1915 TextTrackList: 0,
1916 TouchList: 0
1917 };
1918
1919 var ITERATOR$2 = wellKnownSymbol('iterator');
1920 var TO_STRING_TAG$3 = wellKnownSymbol('toStringTag');
1921 var ArrayValues = es_array_iterator.values;
1922
1923 for (var COLLECTION_NAME in domIterables) {
1924 var Collection = global_1[COLLECTION_NAME];
1925 var CollectionPrototype = Collection && Collection.prototype;
1926 if (CollectionPrototype) {
1927 // some Chrome versions have non-configurable methods on DOMTokenList
1928 if (CollectionPrototype[ITERATOR$2] !== ArrayValues) try {
1929 hide(CollectionPrototype, ITERATOR$2, ArrayValues);
1930 } catch (error) {
1931 CollectionPrototype[ITERATOR$2] = ArrayValues;
1932 }
1933 if (!CollectionPrototype[TO_STRING_TAG$3]) hide(CollectionPrototype, TO_STRING_TAG$3, COLLECTION_NAME);
1934 if (domIterables[COLLECTION_NAME]) for (var METHOD_NAME in es_array_iterator) {
1935 // some Chrome versions have non-configurable methods on DOMTokenList
1936 if (CollectionPrototype[METHOD_NAME] !== es_array_iterator[METHOD_NAME]) try {
1937 hide(CollectionPrototype, METHOD_NAME, es_array_iterator[METHOD_NAME]);
1938 } catch (error) {
1939 CollectionPrototype[METHOD_NAME] = es_array_iterator[METHOD_NAME];
1940 }
1941 }
1942 }
1943 }
1944
1945 function _classCallCheck(instance, Constructor) {
1946 if (!(instance instanceof Constructor)) {
1947 throw new TypeError("Cannot call a class as a function");
1948 }
1949 }
1950
1951 function _defineProperties(target, props) {
1952 for (var i = 0; i < props.length; i++) {
1953 var descriptor = props[i];
1954 descriptor.enumerable = descriptor.enumerable || false;
1955 descriptor.configurable = true;
1956 if ("value" in descriptor) descriptor.writable = true;
1957 Object.defineProperty(target, descriptor.key, descriptor);
1958 }
1959 }
1960
1961 function _createClass(Constructor, protoProps, staticProps) {
1962 if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1963 if (staticProps) _defineProperties(Constructor, staticProps);
1964 return Constructor;
1965 }
1966
1967 function _inherits(subClass, superClass) {
1968 if (typeof superClass !== "function" && superClass !== null) {
1969 throw new TypeError("Super expression must either be null or a function");
1970 }
1971
1972 subClass.prototype = Object.create(superClass && superClass.prototype, {
1973 constructor: {
1974 value: subClass,
1975 writable: true,
1976 configurable: true
1977 }
1978 });
1979 if (superClass) _setPrototypeOf(subClass, superClass);
1980 }
1981
1982 function _getPrototypeOf(o) {
1983 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
1984 return o.__proto__ || Object.getPrototypeOf(o);
1985 };
1986 return _getPrototypeOf(o);
1987 }
1988
1989 function _setPrototypeOf(o, p) {
1990 _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
1991 o.__proto__ = p;
1992 return o;
1993 };
1994
1995 return _setPrototypeOf(o, p);
1996 }
1997
1998 function _assertThisInitialized(self) {
1999 if (self === void 0) {
2000 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2001 }
2002
2003 return self;
2004 }
2005
2006 function _possibleConstructorReturn(self, call) {
2007 if (call && (typeof call === "object" || typeof call === "function")) {
2008 return call;
2009 }
2010
2011 return _assertThisInitialized(self);
2012 }
2013
2014 function _superPropBase(object, property) {
2015 while (!Object.prototype.hasOwnProperty.call(object, property)) {
2016 object = _getPrototypeOf(object);
2017 if (object === null) break;
2018 }
2019
2020 return object;
2021 }
2022
2023 function _get(target, property, receiver) {
2024 if (typeof Reflect !== "undefined" && Reflect.get) {
2025 _get = Reflect.get;
2026 } else {
2027 _get = function _get(target, property, receiver) {
2028 var base = _superPropBase(target, property);
2029
2030 if (!base) return;
2031 var desc = Object.getOwnPropertyDescriptor(base, property);
2032
2033 if (desc.get) {
2034 return desc.get.call(receiver);
2035 }
2036
2037 return desc.value;
2038 };
2039 }
2040
2041 return _get(target, property, receiver || target);
2042 }
2043
2044 function _slicedToArray(arr, i) {
2045 return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
2046 }
2047
2048 function _arrayWithHoles(arr) {
2049 if (Array.isArray(arr)) return arr;
2050 }
2051
2052 function _iterableToArrayLimit(arr, i) {
2053 var _arr = [];
2054 var _n = true;
2055 var _d = false;
2056 var _e = undefined;
2057
2058 try {
2059 for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
2060 _arr.push(_s.value);
2061
2062 if (i && _arr.length === i) break;
2063 }
2064 } catch (err) {
2065 _d = true;
2066 _e = err;
2067 } finally {
2068 try {
2069 if (!_n && _i["return"] != null) _i["return"]();
2070 } finally {
2071 if (_d) throw _e;
2072 }
2073 }
2074
2075 return _arr;
2076 }
2077
2078 function _nonIterableRest() {
2079 throw new TypeError("Invalid attempt to destructure non-iterable instance");
2080 }
2081
2082 /**
2083 * @author: aperez <aperez@datadec.es>
2084 * @version: v2.0.0
2085 *
2086 * @update Dennis Hernández <http://djhvscf.github.io/Blog>
2087 * @update zhixin wen <wenzhixin2010@gmail.com>
2088 */
2089
2090 var Utils = $.fn.bootstrapTable.utils;
2091 var bootstrap = {
2092 bootstrap3: {
2093 icons: {
2094 advancedSearchIcon: 'glyphicon-chevron-down'
2095 },
2096 html: {
2097 modalHeader: "\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n <h4 class=\"modal-title\">%s</h4>\n </div>\n "
2098 }
2099 },
2100 bootstrap4: {
2101 icons: {
2102 advancedSearchIcon: 'fa-chevron-down'
2103 },
2104 html: {
2105 modalHeader: "\n <div class=\"modal-header\">\n <h4 class=\"modal-title\">%s</h4>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n "
2106 }
2107 }
2108 }[$.fn.bootstrapTable.theme];
2109 $.extend($.fn.bootstrapTable.defaults, {
2110 advancedSearch: false,
2111 idForm: 'advancedSearch',
2112 actionForm: '',
2113 idTable: undefined,
2114 onColumnAdvancedSearch: function onColumnAdvancedSearch(field, text) {
2115 return false;
2116 }
2117 });
2118 $.extend($.fn.bootstrapTable.defaults.icons, {
2119 advancedSearchIcon: bootstrap.icons.advancedSearchIcon
2120 });
2121 $.extend($.fn.bootstrapTable.Constructor.EVENTS, {
2122 'column-advanced-search.bs.table': 'onColumnAdvancedSearch'
2123 });
2124 $.extend($.fn.bootstrapTable.locales, {
2125 formatAdvancedSearch: function formatAdvancedSearch() {
2126 return 'Advanced search';
2127 },
2128 formatAdvancedCloseButton: function formatAdvancedCloseButton() {
2129 return 'Close';
2130 }
2131 });
2132 $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
2133
2134 $.BootstrapTable =
2135 /*#__PURE__*/
2136 function (_$$BootstrapTable) {
2137 _inherits(_class, _$$BootstrapTable);
2138
2139 function _class() {
2140 _classCallCheck(this, _class);
2141
2142 return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
2143 }
2144
2145 _createClass(_class, [{
2146 key: "initToolbar",
2147 value: function initToolbar() {
2148 var _this = this;
2149
2150 var o = this.options;
2151 this.showToolbar = this.showToolbar || o.search && o.advancedSearch && o.idTable;
2152
2153 _get(_getPrototypeOf(_class.prototype), "initToolbar", this).call(this);
2154
2155 if (!o.search || !o.advancedSearch || !o.idTable) {
2156 return;
2157 }
2158
2159 this.$toolbar.find('>.columns').append("\n <button class=\"btn btn-default".concat(Utils.sprintf(' btn-%s', o.buttonsClass)).concat(Utils.sprintf(' btn-%s', o.iconSize), "\"\n type=\"button\"\n name=\"advancedSearch\"\n aria-label=\"advanced search\"\n title=\"").concat(o.formatAdvancedSearch(), "\">\n ").concat(this.options.showButtonIcons ? Utils.sprintf(this.constants.html.icon, o.iconsPrefix, o.icons.advancedSearchIcon) : '', "\n ").concat(this.options.showButtonText ? this.options.formatAdvancedSearch() : '', "\n </button>\n "));
2160 this.$toolbar.find('button[name="advancedSearch"]').off('click').on('click', function () {
2161 return _this.showAvdSearch();
2162 });
2163 }
2164 }, {
2165 key: "showAvdSearch",
2166 value: function showAvdSearch() {
2167 var _this2 = this;
2168
2169 var o = this.options;
2170
2171 if (!$("#avdSearchModal_".concat(o.idTable)).hasClass('modal')) {
2172 $('body').append("\n <div id=\"avdSearchModal_".concat(o.idTable, "\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"mySmallModalLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog modal-xs\">\n <div class=\"modal-content\">\n ").concat(Utils.sprintf(bootstrap.html.modalHeader, o.formatAdvancedSearch()), "\n <div class=\"modal-body modal-body-custom\">\n <div class=\"container-fluid\" id=\"avdSearchModalContent_").concat(o.idTable, "\"\n style=\"padding-right: 0px; padding-left: 0px;\" >\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" id=\"btnCloseAvd_").concat(o.idTable, "\" class=\"btn btn-").concat(o.buttonsClass, "\">\n ").concat(o.formatAdvancedCloseButton(), "\n </button>\n </div>\n </div>\n </div>\n </div>\n "));
2173 var timeoutId = 0;
2174 $("#avdSearchModalContent_".concat(o.idTable)).append(this.createFormAvd().join(''));
2175 $("#".concat(o.idForm)).off('keyup blur', 'input').on('keyup blur', 'input', function (e) {
2176 if (o.sidePagination === 'server') {
2177 _this2.onColumnAdvancedSearch(e);
2178 } else {
2179 clearTimeout(timeoutId);
2180 timeoutId = setTimeout(function () {
2181 _this2.onColumnAdvancedSearch(e);
2182 }, o.searchTimeOut);
2183 }
2184 });
2185 $("#btnCloseAvd_".concat(o.idTable)).click(function () {
2186 $("#avdSearchModal_".concat(o.idTable)).modal('hide');
2187
2188 if (o.sidePagination === 'server') {
2189 _this2.options.pageNumber = 1;
2190
2191 _this2.updatePagination();
2192
2193 _this2.trigger('column-advanced-search', _this2.filterColumnsPartial);
2194 }
2195 });
2196 $("#avdSearchModal_".concat(o.idTable)).modal();
2197 } else {
2198 $("#avdSearchModal_".concat(o.idTable)).modal();
2199 }
2200 }
2201 }, {
2202 key: "createFormAvd",
2203 value: function createFormAvd() {
2204 var o = this.options;
2205 var html = ["<form class=\"form-horizontal\" id=\"".concat(o.idForm, "\" action=\"").concat(o.actionForm, "\">")];
2206 var _iteratorNormalCompletion = true;
2207 var _didIteratorError = false;
2208 var _iteratorError = undefined;
2209
2210 try {
2211 for (var _iterator = this.columns[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
2212 var column = _step.value;
2213
2214 if (!column.checkbox && column.visible && column.searchable) {
2215 html.push("\n <div class=\"form-group row\">\n <label class=\"col-sm-4 control-label\">".concat(column.title, "</label>\n <div class=\"col-sm-6\">\n <input type=\"text\" class=\"form-control input-md\" name=\"").concat(column.field, "\" placeholder=\"").concat(column.title, "\" id=\"").concat(column.field, "\">\n </div>\n </div>\n "));
2216 }
2217 }
2218 } catch (err) {
2219 _didIteratorError = true;
2220 _iteratorError = err;
2221 } finally {
2222 try {
2223 if (!_iteratorNormalCompletion && _iterator.return != null) {
2224 _iterator.return();
2225 }
2226 } finally {
2227 if (_didIteratorError) {
2228 throw _iteratorError;
2229 }
2230 }
2231 }
2232
2233 html.push('</form>');
2234 return html;
2235 }
2236 }, {
2237 key: "initSearch",
2238 value: function initSearch() {
2239 var _this3 = this;
2240
2241 _get(_getPrototypeOf(_class.prototype), "initSearch", this).call(this);
2242
2243 if (!this.options.advancedSearch || this.options.sidePagination === 'server') {
2244 return;
2245 }
2246
2247 var fp = $.isEmptyObject(this.filterColumnsPartial) ? null : this.filterColumnsPartial;
2248 this.data = fp ? this.data.filter(function (item, i) {
2249 for (var _i = 0, _Object$entries = Object.entries(fp); _i < _Object$entries.length; _i++) {
2250 var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
2251 key = _Object$entries$_i[0],
2252 v = _Object$entries$_i[1];
2253
2254 var fval = v.toLowerCase();
2255 var value = item[key];
2256
2257 var index = _this3.header.fields.indexOf(key);
2258
2259 value = Utils.calculateObjectValue(_this3.header, _this3.header.formatters[index], [value, item, i], value);
2260
2261 if (!(index !== -1 && (typeof value === 'string' || typeof value === 'number') && "".concat(value).toLowerCase().includes(fval))) {
2262 return false;
2263 }
2264 }
2265
2266 return true;
2267 }) : this.data;
2268 }
2269 }, {
2270 key: "onColumnAdvancedSearch",
2271 value: function onColumnAdvancedSearch(e) {
2272 var text = $.trim($(e.currentTarget).val());
2273 var $field = $(e.currentTarget)[0].id;
2274
2275 if ($.isEmptyObject(this.filterColumnsPartial)) {
2276 this.filterColumnsPartial = {};
2277 }
2278
2279 if (text) {
2280 this.filterColumnsPartial[$field] = text;
2281 } else {
2282 delete this.filterColumnsPartial[$field];
2283 }
2284
2285 if (this.options.sidePagination !== 'server') {
2286 this.options.pageNumber = 1;
2287 this.onSearch(e);
2288 this.updatePagination();
2289 this.trigger('column-advanced-search', $field, text);
2290 }
2291 }
2292 }]);
2293
2294 return _class;
2295 }($.BootstrapTable);
2296
2297}));