UNPKG

68.2 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 correctPrototypeGetter = !fails(function () {
1195 function F() { /* empty */ }
1196 F.prototype.constructor = null;
1197 return Object.getPrototypeOf(new F()) !== F.prototype;
1198 });
1199
1200 var IE_PROTO$1 = sharedKey('IE_PROTO');
1201 var ObjectPrototype$1 = Object.prototype;
1202
1203 // `Object.getPrototypeOf` method
1204 // https://tc39.github.io/ecma262/#sec-object.getprototypeof
1205 var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {
1206 O = toObject(O);
1207 if (has(O, IE_PROTO$1)) return O[IE_PROTO$1];
1208 if (typeof O.constructor == 'function' && O instanceof O.constructor) {
1209 return O.constructor.prototype;
1210 } return O instanceof Object ? ObjectPrototype$1 : null;
1211 };
1212
1213 var ITERATOR = wellKnownSymbol('iterator');
1214 var BUGGY_SAFARI_ITERATORS = false;
1215
1216 var returnThis = function () { return this; };
1217
1218 // `%IteratorPrototype%` object
1219 // https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
1220 var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
1221
1222 if ([].keys) {
1223 arrayIterator = [].keys();
1224 // Safari 8 has buggy iterators w/o `next`
1225 if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
1226 else {
1227 PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));
1228 if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
1229 }
1230 }
1231
1232 if (IteratorPrototype == undefined) IteratorPrototype = {};
1233
1234 // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
1235 if ( !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
1236
1237 var iteratorsCore = {
1238 IteratorPrototype: IteratorPrototype,
1239 BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
1240 };
1241
1242 var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1243
1244 var createIteratorConstructor = function (IteratorConstructor, NAME, next) {
1245 var TO_STRING_TAG = NAME + ' Iterator';
1246 IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(1, next) });
1247 setToStringTag(IteratorConstructor, TO_STRING_TAG, false);
1248 return IteratorConstructor;
1249 };
1250
1251 var aPossiblePrototype = function (it) {
1252 if (!isObject(it) && it !== null) {
1253 throw TypeError("Can't set " + String(it) + ' as a prototype');
1254 } return it;
1255 };
1256
1257 // `Object.setPrototypeOf` method
1258 // https://tc39.github.io/ecma262/#sec-object.setprototypeof
1259 // Works with __proto__ only. Old v8 can't work with null proto objects.
1260 /* eslint-disable no-proto */
1261 var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1262 var CORRECT_SETTER = false;
1263 var test = {};
1264 var setter;
1265 try {
1266 setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
1267 setter.call(test, []);
1268 CORRECT_SETTER = test instanceof Array;
1269 } catch (error) { /* empty */ }
1270 return function setPrototypeOf(O, proto) {
1271 anObject(O);
1272 aPossiblePrototype(proto);
1273 if (CORRECT_SETTER) setter.call(O, proto);
1274 else O.__proto__ = proto;
1275 return O;
1276 };
1277 }() : undefined);
1278
1279 var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;
1280 var BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS;
1281 var ITERATOR$1 = wellKnownSymbol('iterator');
1282 var KEYS = 'keys';
1283 var VALUES = 'values';
1284 var ENTRIES = 'entries';
1285
1286 var returnThis$1 = function () { return this; };
1287
1288 var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1289 createIteratorConstructor(IteratorConstructor, NAME, next);
1290
1291 var getIterationMethod = function (KIND) {
1292 if (KIND === DEFAULT && defaultIterator) return defaultIterator;
1293 if (!BUGGY_SAFARI_ITERATORS$1 && KIND in IterablePrototype) return IterablePrototype[KIND];
1294 switch (KIND) {
1295 case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
1296 case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
1297 case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
1298 } return function () { return new IteratorConstructor(this); };
1299 };
1300
1301 var TO_STRING_TAG = NAME + ' Iterator';
1302 var INCORRECT_VALUES_NAME = false;
1303 var IterablePrototype = Iterable.prototype;
1304 var nativeIterator = IterablePrototype[ITERATOR$1]
1305 || IterablePrototype['@@iterator']
1306 || DEFAULT && IterablePrototype[DEFAULT];
1307 var defaultIterator = !BUGGY_SAFARI_ITERATORS$1 && nativeIterator || getIterationMethod(DEFAULT);
1308 var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
1309 var CurrentIteratorPrototype, methods, KEY;
1310
1311 // fix native
1312 if (anyNativeIterator) {
1313 CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable()));
1314 if (IteratorPrototype$2 !== Object.prototype && CurrentIteratorPrototype.next) {
1315 if ( objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype$2) {
1316 if (objectSetPrototypeOf) {
1317 objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2);
1318 } else if (typeof CurrentIteratorPrototype[ITERATOR$1] != 'function') {
1319 hide(CurrentIteratorPrototype, ITERATOR$1, returnThis$1);
1320 }
1321 }
1322 // Set @@toStringTag to native iterators
1323 setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
1324 }
1325 }
1326
1327 // fix Array#{values, @@iterator}.name in V8 / FF
1328 if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1329 INCORRECT_VALUES_NAME = true;
1330 defaultIterator = function values() { return nativeIterator.call(this); };
1331 }
1332
1333 // define iterator
1334 if ( IterablePrototype[ITERATOR$1] !== defaultIterator) {
1335 hide(IterablePrototype, ITERATOR$1, defaultIterator);
1336 }
1337
1338 // export additional methods
1339 if (DEFAULT) {
1340 methods = {
1341 values: getIterationMethod(VALUES),
1342 keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
1343 entries: getIterationMethod(ENTRIES)
1344 };
1345 if (FORCED) for (KEY in methods) {
1346 if (BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1347 redefine(IterablePrototype, KEY, methods[KEY]);
1348 }
1349 } else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME }, methods);
1350 }
1351
1352 return methods;
1353 };
1354
1355 var ARRAY_ITERATOR = 'Array Iterator';
1356 var setInternalState$1 = internalState.set;
1357 var getInternalState$1 = internalState.getterFor(ARRAY_ITERATOR);
1358
1359 // `Array.prototype.entries` method
1360 // https://tc39.github.io/ecma262/#sec-array.prototype.entries
1361 // `Array.prototype.keys` method
1362 // https://tc39.github.io/ecma262/#sec-array.prototype.keys
1363 // `Array.prototype.values` method
1364 // https://tc39.github.io/ecma262/#sec-array.prototype.values
1365 // `Array.prototype[@@iterator]` method
1366 // https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator
1367 // `CreateArrayIterator` internal method
1368 // https://tc39.github.io/ecma262/#sec-createarrayiterator
1369 var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1370 setInternalState$1(this, {
1371 type: ARRAY_ITERATOR,
1372 target: toIndexedObject(iterated), // target
1373 index: 0, // next index
1374 kind: kind // kind
1375 });
1376 // `%ArrayIteratorPrototype%.next` method
1377 // https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next
1378 }, function () {
1379 var state = getInternalState$1(this);
1380 var target = state.target;
1381 var kind = state.kind;
1382 var index = state.index++;
1383 if (!target || index >= target.length) {
1384 state.target = undefined;
1385 return { value: undefined, done: true };
1386 }
1387 if (kind == 'keys') return { value: index, done: false };
1388 if (kind == 'values') return { value: target[index], done: false };
1389 return { value: [index, target[index]], done: false };
1390 }, 'values');
1391
1392 // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
1393 addToUnscopables('keys');
1394 addToUnscopables('values');
1395 addToUnscopables('entries');
1396
1397 var sloppyArrayMethod = function (METHOD_NAME, argument) {
1398 var method = [][METHOD_NAME];
1399 return !method || !fails(function () {
1400 // eslint-disable-next-line no-useless-call,no-throw-literal
1401 method.call(null, argument || function () { throw 1; }, 1);
1402 });
1403 };
1404
1405 var nativeJoin = [].join;
1406
1407 var ES3_STRINGS = indexedObject != Object;
1408 var SLOPPY_METHOD = sloppyArrayMethod('join', ',');
1409
1410 // `Array.prototype.join` method
1411 // https://tc39.github.io/ecma262/#sec-array.prototype.join
1412 _export({ target: 'Array', proto: true, forced: ES3_STRINGS || SLOPPY_METHOD }, {
1413 join: function join(separator) {
1414 return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
1415 }
1416 });
1417
1418 var $map = arrayIteration.map;
1419
1420
1421 // `Array.prototype.map` method
1422 // https://tc39.github.io/ecma262/#sec-array.prototype.map
1423 // with adding support of @@species
1424 _export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('map') }, {
1425 map: function map(callbackfn /* , thisArg */) {
1426 return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
1427 }
1428 });
1429
1430 var SPECIES$2 = wellKnownSymbol('species');
1431 var nativeSlice = [].slice;
1432 var max$1 = Math.max;
1433
1434 // `Array.prototype.slice` method
1435 // https://tc39.github.io/ecma262/#sec-array.prototype.slice
1436 // fallback for not array-like ES3 strings and DOM objects
1437 _export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('slice') }, {
1438 slice: function slice(start, end) {
1439 var O = toIndexedObject(this);
1440 var length = toLength(O.length);
1441 var k = toAbsoluteIndex(start, length);
1442 var fin = toAbsoluteIndex(end === undefined ? length : end, length);
1443 // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
1444 var Constructor, result, n;
1445 if (isArray(O)) {
1446 Constructor = O.constructor;
1447 // cross-realm fallback
1448 if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
1449 Constructor = undefined;
1450 } else if (isObject(Constructor)) {
1451 Constructor = Constructor[SPECIES$2];
1452 if (Constructor === null) Constructor = undefined;
1453 }
1454 if (Constructor === Array || Constructor === undefined) {
1455 return nativeSlice.call(O, k, fin);
1456 }
1457 }
1458 result = new (Constructor === undefined ? Array : Constructor)(max$1(fin - k, 0));
1459 for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
1460 result.length = n;
1461 return result;
1462 }
1463 });
1464
1465 var nativeSort = [].sort;
1466 var test = [1, 2, 3];
1467
1468 // IE8-
1469 var FAILS_ON_UNDEFINED = fails(function () {
1470 test.sort(undefined);
1471 });
1472 // V8 bug
1473 var FAILS_ON_NULL = fails(function () {
1474 test.sort(null);
1475 });
1476 // Old WebKit
1477 var SLOPPY_METHOD$1 = sloppyArrayMethod('sort');
1478
1479 var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || SLOPPY_METHOD$1;
1480
1481 // `Array.prototype.sort` method
1482 // https://tc39.github.io/ecma262/#sec-array.prototype.sort
1483 _export({ target: 'Array', proto: true, forced: FORCED$1 }, {
1484 sort: function sort(comparefn) {
1485 return comparefn === undefined
1486 ? nativeSort.call(toObject(this))
1487 : nativeSort.call(toObject(this), aFunction$1(comparefn));
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$1 = {};
1516
1517 test$1[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$1) !== '[object z]' ? function toString() {
1522 return '[object ' + classof(this) + ']';
1523 } : test$1.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 // `String.prototype.{ codePointAt, at }` methods implementation
1534 var createMethod$2 = function (CONVERT_TO_STRING) {
1535 return function ($this, pos) {
1536 var S = String(requireObjectCoercible($this));
1537 var position = toInteger(pos);
1538 var size = S.length;
1539 var first, second;
1540 if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
1541 first = S.charCodeAt(position);
1542 return first < 0xD800 || first > 0xDBFF || position + 1 === size
1543 || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
1544 ? CONVERT_TO_STRING ? S.charAt(position) : first
1545 : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
1546 };
1547 };
1548
1549 var stringMultibyte = {
1550 // `String.prototype.codePointAt` method
1551 // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
1552 codeAt: createMethod$2(false),
1553 // `String.prototype.at` method
1554 // https://github.com/mathiasbynens/String.prototype.at
1555 charAt: createMethod$2(true)
1556 };
1557
1558 var charAt = stringMultibyte.charAt;
1559
1560
1561
1562 var STRING_ITERATOR = 'String Iterator';
1563 var setInternalState$2 = internalState.set;
1564 var getInternalState$2 = internalState.getterFor(STRING_ITERATOR);
1565
1566 // `String.prototype[@@iterator]` method
1567 // https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
1568 defineIterator(String, 'String', function (iterated) {
1569 setInternalState$2(this, {
1570 type: STRING_ITERATOR,
1571 string: String(iterated),
1572 index: 0
1573 });
1574 // `%StringIteratorPrototype%.next` method
1575 // https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
1576 }, function next() {
1577 var state = getInternalState$2(this);
1578 var string = state.string;
1579 var index = state.index;
1580 var point;
1581 if (index >= string.length) return { value: undefined, done: true };
1582 point = charAt(string, index);
1583 state.index += point.length;
1584 return { value: point, done: false };
1585 });
1586
1587 // iterable DOM collections
1588 // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1589 var domIterables = {
1590 CSSRuleList: 0,
1591 CSSStyleDeclaration: 0,
1592 CSSValueList: 0,
1593 ClientRectList: 0,
1594 DOMRectList: 0,
1595 DOMStringList: 0,
1596 DOMTokenList: 1,
1597 DataTransferItemList: 0,
1598 FileList: 0,
1599 HTMLAllCollection: 0,
1600 HTMLCollection: 0,
1601 HTMLFormElement: 0,
1602 HTMLSelectElement: 0,
1603 MediaList: 0,
1604 MimeTypeArray: 0,
1605 NamedNodeMap: 0,
1606 NodeList: 1,
1607 PaintRequestList: 0,
1608 Plugin: 0,
1609 PluginArray: 0,
1610 SVGLengthList: 0,
1611 SVGNumberList: 0,
1612 SVGPathSegList: 0,
1613 SVGPointList: 0,
1614 SVGStringList: 0,
1615 SVGTransformList: 0,
1616 SourceBufferList: 0,
1617 StyleSheetList: 0,
1618 TextTrackCueList: 0,
1619 TextTrackList: 0,
1620 TouchList: 0
1621 };
1622
1623 var ITERATOR$2 = wellKnownSymbol('iterator');
1624 var TO_STRING_TAG$3 = wellKnownSymbol('toStringTag');
1625 var ArrayValues = es_array_iterator.values;
1626
1627 for (var COLLECTION_NAME in domIterables) {
1628 var Collection = global_1[COLLECTION_NAME];
1629 var CollectionPrototype = Collection && Collection.prototype;
1630 if (CollectionPrototype) {
1631 // some Chrome versions have non-configurable methods on DOMTokenList
1632 if (CollectionPrototype[ITERATOR$2] !== ArrayValues) try {
1633 hide(CollectionPrototype, ITERATOR$2, ArrayValues);
1634 } catch (error) {
1635 CollectionPrototype[ITERATOR$2] = ArrayValues;
1636 }
1637 if (!CollectionPrototype[TO_STRING_TAG$3]) hide(CollectionPrototype, TO_STRING_TAG$3, COLLECTION_NAME);
1638 if (domIterables[COLLECTION_NAME]) for (var METHOD_NAME in es_array_iterator) {
1639 // some Chrome versions have non-configurable methods on DOMTokenList
1640 if (CollectionPrototype[METHOD_NAME] !== es_array_iterator[METHOD_NAME]) try {
1641 hide(CollectionPrototype, METHOD_NAME, es_array_iterator[METHOD_NAME]);
1642 } catch (error) {
1643 CollectionPrototype[METHOD_NAME] = es_array_iterator[METHOD_NAME];
1644 }
1645 }
1646 }
1647 }
1648
1649 function _classCallCheck(instance, Constructor) {
1650 if (!(instance instanceof Constructor)) {
1651 throw new TypeError("Cannot call a class as a function");
1652 }
1653 }
1654
1655 function _defineProperties(target, props) {
1656 for (var i = 0; i < props.length; i++) {
1657 var descriptor = props[i];
1658 descriptor.enumerable = descriptor.enumerable || false;
1659 descriptor.configurable = true;
1660 if ("value" in descriptor) descriptor.writable = true;
1661 Object.defineProperty(target, descriptor.key, descriptor);
1662 }
1663 }
1664
1665 function _createClass(Constructor, protoProps, staticProps) {
1666 if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1667 if (staticProps) _defineProperties(Constructor, staticProps);
1668 return Constructor;
1669 }
1670
1671 function _inherits(subClass, superClass) {
1672 if (typeof superClass !== "function" && superClass !== null) {
1673 throw new TypeError("Super expression must either be null or a function");
1674 }
1675
1676 subClass.prototype = Object.create(superClass && superClass.prototype, {
1677 constructor: {
1678 value: subClass,
1679 writable: true,
1680 configurable: true
1681 }
1682 });
1683 if (superClass) _setPrototypeOf(subClass, superClass);
1684 }
1685
1686 function _getPrototypeOf(o) {
1687 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
1688 return o.__proto__ || Object.getPrototypeOf(o);
1689 };
1690 return _getPrototypeOf(o);
1691 }
1692
1693 function _setPrototypeOf(o, p) {
1694 _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
1695 o.__proto__ = p;
1696 return o;
1697 };
1698
1699 return _setPrototypeOf(o, p);
1700 }
1701
1702 function _assertThisInitialized(self) {
1703 if (self === void 0) {
1704 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1705 }
1706
1707 return self;
1708 }
1709
1710 function _possibleConstructorReturn(self, call) {
1711 if (call && (typeof call === "object" || typeof call === "function")) {
1712 return call;
1713 }
1714
1715 return _assertThisInitialized(self);
1716 }
1717
1718 function _superPropBase(object, property) {
1719 while (!Object.prototype.hasOwnProperty.call(object, property)) {
1720 object = _getPrototypeOf(object);
1721 if (object === null) break;
1722 }
1723
1724 return object;
1725 }
1726
1727 function _get(target, property, receiver) {
1728 if (typeof Reflect !== "undefined" && Reflect.get) {
1729 _get = Reflect.get;
1730 } else {
1731 _get = function _get(target, property, receiver) {
1732 var base = _superPropBase(target, property);
1733
1734 if (!base) return;
1735 var desc = Object.getOwnPropertyDescriptor(base, property);
1736
1737 if (desc.get) {
1738 return desc.get.call(receiver);
1739 }
1740
1741 return desc.value;
1742 };
1743 }
1744
1745 return _get(target, property, receiver || target);
1746 }
1747
1748 /**
1749 * @update zhixin wen <wenzhixin2010@gmail.com>
1750 */
1751
1752 var Utils = $.fn.bootstrapTable.utils;
1753
1754 function printPageBuilderDefault(table) {
1755 return "\n <html>\n <head>\n <style type=\"text/css\" media=\"print\">\n @page {\n size: auto;\n margin: 25px 0 25px 0;\n }\n </style>\n <style type=\"text/css\" media=\"all\">\n table {\n border-collapse: collapse;\n font-size: 12px;\n }\n table, th, td {\n border: 1px solid grey;\n }\n th, td {\n text-align: center;\n vertical-align: middle;\n }\n p {\n font-weight: bold;\n margin-left:20px;\n }\n table {\n width:94%;\n margin-left:3%;\n margin-right:3%;\n }\n div.bs-table-print {\n text-align:center;\n }\n </style>\n </head>\n <title>Print Table</title>\n <body>\n <p>Printed on: ".concat(new Date(), " </p>\n <div class=\"bs-table-print\">").concat(table, "</div>\n </body>\n </html>");
1756 }
1757
1758 $.extend($.fn.bootstrapTable.defaults, {
1759 showPrint: false,
1760 printAsFilteredAndSortedOnUI: true,
1761 printSortColumn: undefined,
1762 printSortOrder: 'asc',
1763 printPageBuilder: function printPageBuilder(table) {
1764 return printPageBuilderDefault(table);
1765 }
1766 });
1767 $.extend($.fn.bootstrapTable.COLUMN_DEFAULTS, {
1768 printFilter: undefined,
1769 printIgnore: false,
1770 printFormatter: undefined
1771 });
1772 $.extend($.fn.bootstrapTable.defaults.icons, {
1773 print: {
1774 bootstrap3: 'glyphicon-print icon-share'
1775 }[$.fn.bootstrapTable.theme] || 'fa-print'
1776 });
1777
1778 $.BootstrapTable =
1779 /*#__PURE__*/
1780 function (_$$BootstrapTable) {
1781 _inherits(_class, _$$BootstrapTable);
1782
1783 function _class() {
1784 _classCallCheck(this, _class);
1785
1786 return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
1787 }
1788
1789 _createClass(_class, [{
1790 key: "initToolbar",
1791 value: function initToolbar() {
1792 var _get2,
1793 _this = this;
1794
1795 this.showToolbar = this.showToolbar || this.options.showPrint;
1796
1797 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1798 args[_key] = arguments[_key];
1799 }
1800
1801 (_get2 = _get(_getPrototypeOf(_class.prototype), "initToolbar", this)).call.apply(_get2, [this].concat(args));
1802
1803 if (!this.options.showPrint) {
1804 return;
1805 }
1806
1807 var $btnGroup = this.$toolbar.find('>.btn-group');
1808 var $print = $btnGroup.find('button.bs-print');
1809
1810 if (!$print.length) {
1811 $print = $("\n <button class=\"".concat(this.constants.buttonsClass, " bs-print\" type=\"button\">\n <i class=\"").concat(this.options.iconsPrefix, " ").concat(this.options.icons.print, "\"></i>\n </button>")).appendTo($btnGroup);
1812 }
1813
1814 $print.off('click').on('click', function () {
1815 _this.doPrint(_this.options.printAsFilteredAndSortedOnUI ? _this.getData() : _this.options.data.slice(0));
1816 });
1817 }
1818 }, {
1819 key: "doPrint",
1820 value: function doPrint(data) {
1821 var _this2 = this;
1822
1823 var formatValue = function formatValue(row, i, column) {
1824 var value = row[column.field];
1825
1826 if (typeof column.printFormatter === 'function') {
1827 return column.printFormatter.apply(column, [value, row, i]);
1828 }
1829
1830 return typeof value === 'undefined' ? '-' : value;
1831 };
1832
1833 var buildTable = function buildTable(data, columnsArray) {
1834 var dir = _this2.$el.attr('dir') || 'ltr';
1835 var html = ["<table dir=\"".concat(dir, "\"><thead>")];
1836 var _iteratorNormalCompletion = true;
1837 var _didIteratorError = false;
1838 var _iteratorError = undefined;
1839
1840 try {
1841 for (var _iterator = columnsArray[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
1842 var _columns = _step.value;
1843 html.push('<tr>');
1844
1845 for (var h = 0; h < _columns.length; h++) {
1846 if (!_columns[h].printIgnore) {
1847 html.push("<th\n ".concat(Utils.sprintf(' rowspan="%s"', _columns[h].rowspan), "\n ").concat(Utils.sprintf(' colspan="%s"', _columns[h].colspan), "\n >").concat(_columns[h].title, "</th>"));
1848 }
1849 }
1850
1851 html.push('</tr>');
1852 }
1853 } catch (err) {
1854 _didIteratorError = true;
1855 _iteratorError = err;
1856 } finally {
1857 try {
1858 if (!_iteratorNormalCompletion && _iterator.return != null) {
1859 _iterator.return();
1860 }
1861 } finally {
1862 if (_didIteratorError) {
1863 throw _iteratorError;
1864 }
1865 }
1866 }
1867
1868 html.push('</thead><tbody>');
1869
1870 for (var i = 0; i < data.length; i++) {
1871 html.push('<tr>');
1872 var _iteratorNormalCompletion2 = true;
1873 var _didIteratorError2 = false;
1874 var _iteratorError2 = undefined;
1875
1876 try {
1877 for (var _iterator2 = columnsArray[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
1878 var columns = _step2.value;
1879
1880 for (var j = 0; j < columns.length; j++) {
1881 if (!columns[j].printIgnore && columns[j].field) {
1882 html.push('<td>', formatValue(data[i], i, columns[j]), '</td>');
1883 }
1884 }
1885 }
1886 } catch (err) {
1887 _didIteratorError2 = true;
1888 _iteratorError2 = err;
1889 } finally {
1890 try {
1891 if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
1892 _iterator2.return();
1893 }
1894 } finally {
1895 if (_didIteratorError2) {
1896 throw _iteratorError2;
1897 }
1898 }
1899 }
1900
1901 html.push('</tr>');
1902 }
1903
1904 html.push('</tbody></table>');
1905 return html.join('');
1906 };
1907
1908 var sortRows = function sortRows(data, colName, sortOrder) {
1909 if (!colName) {
1910 return data;
1911 }
1912
1913 var reverse = sortOrder !== 'asc';
1914 reverse = -(+reverse || -1);
1915 return data.sort(function (a, b) {
1916 return reverse * a[colName].localeCompare(b[colName]);
1917 });
1918 };
1919
1920 var filterRow = function filterRow(row, filters) {
1921 for (var index = 0; index < filters.length; ++index) {
1922 if (row[filters[index].colName] !== filters[index].value) {
1923 return false;
1924 }
1925 }
1926
1927 return true;
1928 };
1929
1930 var filterRows = function filterRows(data, filters) {
1931 return data.filter(function (row) {
1932 return filterRow(row, filters);
1933 });
1934 };
1935
1936 var getColumnFilters = function getColumnFilters(columns) {
1937 return !columns || !columns[0] ? [] : columns[0].filter(function (col) {
1938 return col.printFilter;
1939 }).map(function (col) {
1940 return {
1941 colName: col.field,
1942 value: col.printFilter
1943 };
1944 });
1945 };
1946
1947 data = filterRows(data, getColumnFilters(this.options.columns));
1948 data = sortRows(data, this.options.printSortColumn, this.options.printSortOrder);
1949 var table = buildTable(data, this.options.columns);
1950 var newWin = window.open('');
1951 newWin.document.write(this.options.printPageBuilder.call(this, table));
1952 newWin.print();
1953 newWin.close();
1954 }
1955 }]);
1956
1957 return _class;
1958 }($.BootstrapTable);
1959
1960}));