UNPKG

39.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$1 = global_1.document;
125 // typeof document.createElement is 'object' in old IE
126 var EXISTS = isObject(document$1) && isObject(document$1.createElement);
127
128 var documentCreateElement = function (it) {
129 return EXISTS ? document$1.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 // `IsArray` abstract operation
524 // https://tc39.github.io/ecma262/#sec-isarray
525 var isArray = Array.isArray || function isArray(arg) {
526 return classofRaw(arg) == 'Array';
527 };
528
529 // `ToObject` abstract operation
530 // https://tc39.github.io/ecma262/#sec-toobject
531 var toObject = function (argument) {
532 return Object(requireObjectCoercible(argument));
533 };
534
535 var createProperty = function (object, key, value) {
536 var propertyKey = toPrimitive(key);
537 if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
538 else object[propertyKey] = value;
539 };
540
541 var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
542 // Chrome 38 Symbol has incorrect toString conversion
543 // eslint-disable-next-line no-undef
544 return !String(Symbol());
545 });
546
547 var Symbol$1 = global_1.Symbol;
548 var store$1 = shared('wks');
549
550 var wellKnownSymbol = function (name) {
551 return store$1[name] || (store$1[name] = nativeSymbol && Symbol$1[name]
552 || (nativeSymbol ? Symbol$1 : uid)('Symbol.' + name));
553 };
554
555 var SPECIES = wellKnownSymbol('species');
556
557 // `ArraySpeciesCreate` abstract operation
558 // https://tc39.github.io/ecma262/#sec-arrayspeciescreate
559 var arraySpeciesCreate = function (originalArray, length) {
560 var C;
561 if (isArray(originalArray)) {
562 C = originalArray.constructor;
563 // cross-realm fallback
564 if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
565 else if (isObject(C)) {
566 C = C[SPECIES];
567 if (C === null) C = undefined;
568 }
569 } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
570 };
571
572 var SPECIES$1 = wellKnownSymbol('species');
573
574 var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
575 return !fails(function () {
576 var array = [];
577 var constructor = array.constructor = {};
578 constructor[SPECIES$1] = function () {
579 return { foo: 1 };
580 };
581 return array[METHOD_NAME](Boolean).foo !== 1;
582 });
583 };
584
585 var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
586 var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
587 var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
588
589 var IS_CONCAT_SPREADABLE_SUPPORT = !fails(function () {
590 var array = [];
591 array[IS_CONCAT_SPREADABLE] = false;
592 return array.concat()[0] !== array;
593 });
594
595 var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
596
597 var isConcatSpreadable = function (O) {
598 if (!isObject(O)) return false;
599 var spreadable = O[IS_CONCAT_SPREADABLE];
600 return spreadable !== undefined ? !!spreadable : isArray(O);
601 };
602
603 var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
604
605 // `Array.prototype.concat` method
606 // https://tc39.github.io/ecma262/#sec-array.prototype.concat
607 // with adding support of @@isConcatSpreadable and @@species
608 _export({ target: 'Array', proto: true, forced: FORCED }, {
609 concat: function concat(arg) { // eslint-disable-line no-unused-vars
610 var O = toObject(this);
611 var A = arraySpeciesCreate(O, 0);
612 var n = 0;
613 var i, k, length, len, E;
614 for (i = -1, length = arguments.length; i < length; i++) {
615 E = i === -1 ? O : arguments[i];
616 if (isConcatSpreadable(E)) {
617 len = toLength(E.length);
618 if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
619 for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
620 } else {
621 if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
622 createProperty(A, n++, E);
623 }
624 }
625 A.length = n;
626 return A;
627 }
628 });
629
630 var aFunction$1 = function (it) {
631 if (typeof it != 'function') {
632 throw TypeError(String(it) + ' is not a function');
633 } return it;
634 };
635
636 // optional / simple context binding
637 var bindContext = function (fn, that, length) {
638 aFunction$1(fn);
639 if (that === undefined) return fn;
640 switch (length) {
641 case 0: return function () {
642 return fn.call(that);
643 };
644 case 1: return function (a) {
645 return fn.call(that, a);
646 };
647 case 2: return function (a, b) {
648 return fn.call(that, a, b);
649 };
650 case 3: return function (a, b, c) {
651 return fn.call(that, a, b, c);
652 };
653 }
654 return function (/* ...args */) {
655 return fn.apply(that, arguments);
656 };
657 };
658
659 var push = [].push;
660
661 // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
662 var createMethod$1 = function (TYPE) {
663 var IS_MAP = TYPE == 1;
664 var IS_FILTER = TYPE == 2;
665 var IS_SOME = TYPE == 3;
666 var IS_EVERY = TYPE == 4;
667 var IS_FIND_INDEX = TYPE == 6;
668 var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
669 return function ($this, callbackfn, that, specificCreate) {
670 var O = toObject($this);
671 var self = indexedObject(O);
672 var boundFunction = bindContext(callbackfn, that, 3);
673 var length = toLength(self.length);
674 var index = 0;
675 var create = specificCreate || arraySpeciesCreate;
676 var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
677 var value, result;
678 for (;length > index; index++) if (NO_HOLES || index in self) {
679 value = self[index];
680 result = boundFunction(value, index, O);
681 if (TYPE) {
682 if (IS_MAP) target[index] = result; // map
683 else if (result) switch (TYPE) {
684 case 3: return true; // some
685 case 5: return value; // find
686 case 6: return index; // findIndex
687 case 2: push.call(target, value); // filter
688 } else if (IS_EVERY) return false; // every
689 }
690 }
691 return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
692 };
693 };
694
695 var arrayIteration = {
696 // `Array.prototype.forEach` method
697 // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
698 forEach: createMethod$1(0),
699 // `Array.prototype.map` method
700 // https://tc39.github.io/ecma262/#sec-array.prototype.map
701 map: createMethod$1(1),
702 // `Array.prototype.filter` method
703 // https://tc39.github.io/ecma262/#sec-array.prototype.filter
704 filter: createMethod$1(2),
705 // `Array.prototype.some` method
706 // https://tc39.github.io/ecma262/#sec-array.prototype.some
707 some: createMethod$1(3),
708 // `Array.prototype.every` method
709 // https://tc39.github.io/ecma262/#sec-array.prototype.every
710 every: createMethod$1(4),
711 // `Array.prototype.find` method
712 // https://tc39.github.io/ecma262/#sec-array.prototype.find
713 find: createMethod$1(5),
714 // `Array.prototype.findIndex` method
715 // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
716 findIndex: createMethod$1(6)
717 };
718
719 // `Object.keys` method
720 // https://tc39.github.io/ecma262/#sec-object.keys
721 var objectKeys = Object.keys || function keys(O) {
722 return objectKeysInternal(O, enumBugKeys);
723 };
724
725 // `Object.defineProperties` method
726 // https://tc39.github.io/ecma262/#sec-object.defineproperties
727 var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
728 anObject(O);
729 var keys = objectKeys(Properties);
730 var length = keys.length;
731 var index = 0;
732 var key;
733 while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
734 return O;
735 };
736
737 var html = getBuiltIn('document', 'documentElement');
738
739 var IE_PROTO = sharedKey('IE_PROTO');
740
741 var PROTOTYPE = 'prototype';
742 var Empty = function () { /* empty */ };
743
744 // Create object with fake `null` prototype: use iframe Object with cleared prototype
745 var createDict = function () {
746 // Thrash, waste and sodomy: IE GC bug
747 var iframe = documentCreateElement('iframe');
748 var length = enumBugKeys.length;
749 var lt = '<';
750 var script = 'script';
751 var gt = '>';
752 var js = 'java' + script + ':';
753 var iframeDocument;
754 iframe.style.display = 'none';
755 html.appendChild(iframe);
756 iframe.src = String(js);
757 iframeDocument = iframe.contentWindow.document;
758 iframeDocument.open();
759 iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
760 iframeDocument.close();
761 createDict = iframeDocument.F;
762 while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
763 return createDict();
764 };
765
766 // `Object.create` method
767 // https://tc39.github.io/ecma262/#sec-object.create
768 var objectCreate = Object.create || function create(O, Properties) {
769 var result;
770 if (O !== null) {
771 Empty[PROTOTYPE] = anObject(O);
772 result = new Empty();
773 Empty[PROTOTYPE] = null;
774 // add "__proto__" for Object.getPrototypeOf polyfill
775 result[IE_PROTO] = O;
776 } else result = createDict();
777 return Properties === undefined ? result : objectDefineProperties(result, Properties);
778 };
779
780 hiddenKeys[IE_PROTO] = true;
781
782 var UNSCOPABLES = wellKnownSymbol('unscopables');
783 var ArrayPrototype = Array.prototype;
784
785 // Array.prototype[@@unscopables]
786 // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
787 if (ArrayPrototype[UNSCOPABLES] == undefined) {
788 hide(ArrayPrototype, UNSCOPABLES, objectCreate(null));
789 }
790
791 // add a key to Array.prototype[@@unscopables]
792 var addToUnscopables = function (key) {
793 ArrayPrototype[UNSCOPABLES][key] = true;
794 };
795
796 var $find = arrayIteration.find;
797
798
799 var FIND = 'find';
800 var SKIPS_HOLES = true;
801
802 // Shouldn't skip holes
803 if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
804
805 // `Array.prototype.find` method
806 // https://tc39.github.io/ecma262/#sec-array.prototype.find
807 _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
808 find: function find(callbackfn /* , that = undefined */) {
809 return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
810 }
811 });
812
813 // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
814 addToUnscopables(FIND);
815
816 // `RegExp.prototype.flags` getter implementation
817 // https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
818 var regexpFlags = function () {
819 var that = anObject(this);
820 var result = '';
821 if (that.global) result += 'g';
822 if (that.ignoreCase) result += 'i';
823 if (that.multiline) result += 'm';
824 if (that.dotAll) result += 's';
825 if (that.unicode) result += 'u';
826 if (that.sticky) result += 'y';
827 return result;
828 };
829
830 var nativeExec = RegExp.prototype.exec;
831 // This always refers to the native implementation, because the
832 // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
833 // which loads this file before patching the method.
834 var nativeReplace = String.prototype.replace;
835
836 var patchedExec = nativeExec;
837
838 var UPDATES_LAST_INDEX_WRONG = (function () {
839 var re1 = /a/;
840 var re2 = /b*/g;
841 nativeExec.call(re1, 'a');
842 nativeExec.call(re2, 'a');
843 return re1.lastIndex !== 0 || re2.lastIndex !== 0;
844 })();
845
846 // nonparticipating capturing group, copied from es5-shim's String#split patch.
847 var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
848
849 var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
850
851 if (PATCH) {
852 patchedExec = function exec(str) {
853 var re = this;
854 var lastIndex, reCopy, match, i;
855
856 if (NPCG_INCLUDED) {
857 reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
858 }
859 if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
860
861 match = nativeExec.call(re, str);
862
863 if (UPDATES_LAST_INDEX_WRONG && match) {
864 re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
865 }
866 if (NPCG_INCLUDED && match && match.length > 1) {
867 // Fix browsers whose `exec` methods don't consistently return `undefined`
868 // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
869 nativeReplace.call(match[0], reCopy, function () {
870 for (i = 1; i < arguments.length - 2; i++) {
871 if (arguments[i] === undefined) match[i] = undefined;
872 }
873 });
874 }
875
876 return match;
877 };
878 }
879
880 var regexpExec = patchedExec;
881
882 var SPECIES$2 = wellKnownSymbol('species');
883
884 var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
885 // #replace needs built-in support for named groups.
886 // #match works fine because it just return the exec results, even if it has
887 // a "grops" property.
888 var re = /./;
889 re.exec = function () {
890 var result = [];
891 result.groups = { a: '7' };
892 return result;
893 };
894 return ''.replace(re, '$<a>') !== '7';
895 });
896
897 // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
898 // Weex JS has frozen built-in prototypes, so use try / catch wrapper
899 var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
900 var re = /(?:)/;
901 var originalExec = re.exec;
902 re.exec = function () { return originalExec.apply(this, arguments); };
903 var result = 'ab'.split(re);
904 return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
905 });
906
907 var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
908 var SYMBOL = wellKnownSymbol(KEY);
909
910 var DELEGATES_TO_SYMBOL = !fails(function () {
911 // String methods call symbol-named RegEp methods
912 var O = {};
913 O[SYMBOL] = function () { return 7; };
914 return ''[KEY](O) != 7;
915 });
916
917 var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
918 // Symbol-named RegExp methods call .exec
919 var execCalled = false;
920 var re = /a/;
921 re.exec = function () { execCalled = true; return null; };
922
923 if (KEY === 'split') {
924 // RegExp[@@split] doesn't call the regex's exec method, but first creates
925 // a new one. We need to return the patched regex when creating the new one.
926 re.constructor = {};
927 re.constructor[SPECIES$2] = function () { return re; };
928 }
929
930 re[SYMBOL]('');
931 return !execCalled;
932 });
933
934 if (
935 !DELEGATES_TO_SYMBOL ||
936 !DELEGATES_TO_EXEC ||
937 (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
938 (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
939 ) {
940 var nativeRegExpMethod = /./[SYMBOL];
941 var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
942 if (regexp.exec === regexpExec) {
943 if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
944 // The native String method already delegates to @@method (this
945 // polyfilled function), leasing to infinite recursion.
946 // We avoid it by directly calling the native @@method method.
947 return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
948 }
949 return { done: true, value: nativeMethod.call(str, regexp, arg2) };
950 }
951 return { done: false };
952 });
953 var stringMethod = methods[0];
954 var regexMethod = methods[1];
955
956 redefine(String.prototype, KEY, stringMethod);
957 redefine(RegExp.prototype, SYMBOL, length == 2
958 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
959 // 21.2.5.11 RegExp.prototype[@@split](string, limit)
960 ? function (string, arg) { return regexMethod.call(string, this, arg); }
961 // 21.2.5.6 RegExp.prototype[@@match](string)
962 // 21.2.5.9 RegExp.prototype[@@search](string)
963 : function (string) { return regexMethod.call(string, this); }
964 );
965 if (sham) hide(RegExp.prototype[SYMBOL], 'sham', true);
966 }
967 };
968
969 // `SameValue` abstract operation
970 // https://tc39.github.io/ecma262/#sec-samevalue
971 var sameValue = Object.is || function is(x, y) {
972 // eslint-disable-next-line no-self-compare
973 return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
974 };
975
976 // `RegExpExec` abstract operation
977 // https://tc39.github.io/ecma262/#sec-regexpexec
978 var regexpExecAbstract = function (R, S) {
979 var exec = R.exec;
980 if (typeof exec === 'function') {
981 var result = exec.call(R, S);
982 if (typeof result !== 'object') {
983 throw TypeError('RegExp exec method returned something other than an Object or null');
984 }
985 return result;
986 }
987
988 if (classofRaw(R) !== 'RegExp') {
989 throw TypeError('RegExp#exec called on incompatible receiver');
990 }
991
992 return regexpExec.call(R, S);
993 };
994
995 // @@search logic
996 fixRegexpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {
997 return [
998 // `String.prototype.search` method
999 // https://tc39.github.io/ecma262/#sec-string.prototype.search
1000 function search(regexp) {
1001 var O = requireObjectCoercible(this);
1002 var searcher = regexp == undefined ? undefined : regexp[SEARCH];
1003 return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
1004 },
1005 // `RegExp.prototype[@@search]` method
1006 // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search
1007 function (regexp) {
1008 var res = maybeCallNative(nativeSearch, regexp, this);
1009 if (res.done) return res.value;
1010
1011 var rx = anObject(regexp);
1012 var S = String(this);
1013
1014 var previousLastIndex = rx.lastIndex;
1015 if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
1016 var result = regexpExecAbstract(rx, S);
1017 if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
1018 return result === null ? -1 : result.index;
1019 }
1020 ];
1021 });
1022
1023 function _classCallCheck(instance, Constructor) {
1024 if (!(instance instanceof Constructor)) {
1025 throw new TypeError("Cannot call a class as a function");
1026 }
1027 }
1028
1029 function _defineProperties(target, props) {
1030 for (var i = 0; i < props.length; i++) {
1031 var descriptor = props[i];
1032 descriptor.enumerable = descriptor.enumerable || false;
1033 descriptor.configurable = true;
1034 if ("value" in descriptor) descriptor.writable = true;
1035 Object.defineProperty(target, descriptor.key, descriptor);
1036 }
1037 }
1038
1039 function _createClass(Constructor, protoProps, staticProps) {
1040 if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1041 if (staticProps) _defineProperties(Constructor, staticProps);
1042 return Constructor;
1043 }
1044
1045 function _inherits(subClass, superClass) {
1046 if (typeof superClass !== "function" && superClass !== null) {
1047 throw new TypeError("Super expression must either be null or a function");
1048 }
1049
1050 subClass.prototype = Object.create(superClass && superClass.prototype, {
1051 constructor: {
1052 value: subClass,
1053 writable: true,
1054 configurable: true
1055 }
1056 });
1057 if (superClass) _setPrototypeOf(subClass, superClass);
1058 }
1059
1060 function _getPrototypeOf(o) {
1061 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
1062 return o.__proto__ || Object.getPrototypeOf(o);
1063 };
1064 return _getPrototypeOf(o);
1065 }
1066
1067 function _setPrototypeOf(o, p) {
1068 _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
1069 o.__proto__ = p;
1070 return o;
1071 };
1072
1073 return _setPrototypeOf(o, p);
1074 }
1075
1076 function _assertThisInitialized(self) {
1077 if (self === void 0) {
1078 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1079 }
1080
1081 return self;
1082 }
1083
1084 function _possibleConstructorReturn(self, call) {
1085 if (call && (typeof call === "object" || typeof call === "function")) {
1086 return call;
1087 }
1088
1089 return _assertThisInitialized(self);
1090 }
1091
1092 function _superPropBase(object, property) {
1093 while (!Object.prototype.hasOwnProperty.call(object, property)) {
1094 object = _getPrototypeOf(object);
1095 if (object === null) break;
1096 }
1097
1098 return object;
1099 }
1100
1101 function _get(target, property, receiver) {
1102 if (typeof Reflect !== "undefined" && Reflect.get) {
1103 _get = Reflect.get;
1104 } else {
1105 _get = function _get(target, property, receiver) {
1106 var base = _superPropBase(target, property);
1107
1108 if (!base) return;
1109 var desc = Object.getOwnPropertyDescriptor(base, property);
1110
1111 if (desc.get) {
1112 return desc.get.call(receiver);
1113 }
1114
1115 return desc.value;
1116 };
1117 }
1118
1119 return _get(target, property, receiver || target);
1120 }
1121
1122 /**
1123 * @author: Dennis Hernández
1124 * @webSite: http://djhvscf.github.io/Blog
1125 * @update zhixin wen <wenzhixin2010@gmail.com>
1126 */
1127
1128 $.extend($.fn.bootstrapTable.defaults, {
1129 keyEvents: false
1130 });
1131
1132 $.BootstrapTable =
1133 /*#__PURE__*/
1134 function (_$$BootstrapTable) {
1135 _inherits(_class, _$$BootstrapTable);
1136
1137 function _class() {
1138 _classCallCheck(this, _class);
1139
1140 return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
1141 }
1142
1143 _createClass(_class, [{
1144 key: "init",
1145 value: function init() {
1146 var _get2;
1147
1148 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1149 args[_key] = arguments[_key];
1150 }
1151
1152 (_get2 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get2, [this].concat(args));
1153
1154 if (this.options.keyEvents) {
1155 this.initKeyEvents();
1156 }
1157 }
1158 }, {
1159 key: "initKeyEvents",
1160 value: function initKeyEvents() {
1161 var _this = this;
1162
1163 $(document).off('keydown').on('keydown', function (e) {
1164 var $search = _this.$toolbar.find('.search input');
1165
1166 var $refresh = _this.$toolbar.find('button[name="refresh"]');
1167
1168 var $toggle = _this.$toolbar.find('button[name="toggle"]');
1169
1170 var $paginationSwitch = _this.$toolbar.find('button[name="paginationSwitch"]');
1171
1172 if (document.activeElement === $search.get(0) || !$.contains(document.activeElement, _this.$toolbar.get(0))) {
1173 return true;
1174 }
1175
1176 switch (e.keyCode) {
1177 case 83:
1178 // s
1179 if (!_this.options.search) {
1180 return;
1181 }
1182
1183 $search.focus();
1184 return false;
1185
1186 case 82:
1187 // r
1188 if (!_this.options.showRefresh) {
1189 return;
1190 }
1191
1192 $refresh.click();
1193 return false;
1194
1195 case 84:
1196 // t
1197 if (!_this.options.showToggle) {
1198 return;
1199 }
1200
1201 $toggle.click();
1202 return false;
1203
1204 case 80:
1205 // p
1206 if (!_this.options.showPaginationSwitch) {
1207 return;
1208 }
1209
1210 $paginationSwitch.click();
1211 return false;
1212
1213 case 37:
1214 // left
1215 if (!_this.options.pagination) {
1216 return;
1217 }
1218
1219 _this.prevPage();
1220
1221 return false;
1222
1223 case 39:
1224 // right
1225 if (!_this.options.pagination) {
1226 return;
1227 }
1228
1229 _this.nextPage();
1230
1231 return;
1232
1233 default:
1234 break;
1235 }
1236 });
1237 }
1238 }]);
1239
1240 return _class;
1241 }($.BootstrapTable);
1242
1243}));